@lssm/lib.feature-flags 0.0.0-canary-20251217083314 → 1.41.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/contracts/index.js +1 -910
- package/dist/docs/feature-flags.docblock.js +2 -21
- package/dist/docs/index.js +1 -1
- package/dist/entities/index.js +1 -325
- package/dist/evaluation/index.js +1 -220
- package/dist/events.js +1 -459
- package/dist/feature-flags.feature.js +1 -139
- package/dist/index.js +1 -8
- package/package.json +13 -14
- package/dist/contracts/dist/capabilities/openbanking.js +0 -88
- package/dist/contracts/dist/client/index.js +0 -5
- package/dist/contracts/dist/client/react/feature-render.js +0 -2
- package/dist/contracts/dist/client/react/form-render.js +0 -4
- package/dist/contracts/dist/client/react/index.js +0 -4
- package/dist/contracts/dist/contract-registry/index.js +0 -1
- package/dist/contracts/dist/contract-registry/schemas.js +0 -60
- package/dist/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
- package/dist/contracts/dist/docs/index.js +0 -29
- package/dist/contracts/dist/docs/presentations.js +0 -71
- package/dist/contracts/dist/docs/registry.js +0 -44
- package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
- package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
- package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
- package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
- package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
- package/dist/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
- package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
- package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
- package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
- package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
- package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
- package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
- package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
- package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
- package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
- package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
- package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
- package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
- package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
- package/dist/contracts/dist/events.js +0 -10
- package/dist/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/contracts/dist/index.js +0 -71
- package/dist/contracts/dist/install.js +0 -2
- package/dist/contracts/dist/integrations/contracts.js +0 -377
- package/dist/contracts/dist/integrations/index.js +0 -18
- package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
- package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
- package/dist/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
- package/dist/contracts/dist/integrations/openbanking/models.js +0 -242
- package/dist/contracts/dist/integrations/openbanking/telemetry.js +0 -13
- package/dist/contracts/dist/integrations/providers/elevenlabs.js +0 -52
- package/dist/contracts/dist/integrations/providers/gcs-storage.js +0 -75
- package/dist/contracts/dist/integrations/providers/gmail.js +0 -87
- package/dist/contracts/dist/integrations/providers/google-calendar.js +0 -66
- package/dist/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/contracts/dist/integrations/providers/mistral.js +0 -68
- package/dist/contracts/dist/integrations/providers/postmark.js +0 -68
- package/dist/contracts/dist/integrations/providers/powens.js +0 -116
- package/dist/contracts/dist/integrations/providers/qdrant.js +0 -73
- package/dist/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/contracts/dist/integrations/providers/stripe.js +0 -83
- package/dist/contracts/dist/integrations/providers/twilio-sms.js +0 -61
- package/dist/contracts/dist/jsonschema.js +0 -1
- package/dist/contracts/dist/knowledge/contracts.js +0 -306
- package/dist/contracts/dist/knowledge/index.js +0 -7
- package/dist/contracts/dist/knowledge/spaces/email-threads.js +0 -34
- package/dist/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
- package/dist/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
- package/dist/contracts/dist/knowledge/spaces/index.js +0 -6
- package/dist/contracts/dist/knowledge/spaces/product-canon.js +0 -34
- package/dist/contracts/dist/knowledge/spaces/support-faq.js +0 -37
- package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
- package/dist/contracts/dist/llm/exporters.js +0 -19
- package/dist/contracts/dist/llm/index.js +0 -2
- package/dist/contracts/dist/llm/prompts.js +0 -1
- package/dist/contracts/dist/onboarding-base.js +0 -196
- package/dist/contracts/dist/openapi.js +0 -1
- package/dist/contracts/dist/ownership.js +0 -21
- package/dist/contracts/dist/presentations.js +0 -1
- package/dist/contracts/dist/presentations.v2.js +0 -11
- package/dist/contracts/dist/prompt.js +0 -1
- package/dist/contracts/dist/promptRegistry.js +0 -1
- package/dist/contracts/dist/regenerator/index.js +0 -1
- package/dist/contracts/dist/regenerator/service.js +0 -6
- package/dist/contracts/dist/registry.js +0 -2
- package/dist/contracts/dist/resources.js +0 -1
- package/dist/contracts/dist/schema/dist/EnumType.js +0 -2
- package/dist/contracts/dist/schema/dist/FieldType.js +0 -49
- package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/contracts/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/contracts/dist/schema/dist/entity/index.js +0 -2
- package/dist/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/contracts/dist/schema/dist/index.js +0 -6
- package/dist/contracts/dist/server/graphql-pothos.js +0 -6
- package/dist/contracts/dist/server/index.js +0 -8
- package/dist/contracts/dist/server/mcp/createMcpServer.js +0 -4
- package/dist/contracts/dist/server/mcp/registerPresentations.js +0 -2
- package/dist/contracts/dist/server/mcp/registerPrompts.js +0 -1
- package/dist/contracts/dist/server/mcp/registerResources.js +0 -2
- package/dist/contracts/dist/server/mcp/registerTools.js +0 -1
- package/dist/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/contracts/dist/server/rest-express.js +0 -1
- package/dist/contracts/dist/server/rest-generic.js +0 -1
- package/dist/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/contracts/dist/spec.js +0 -34
- package/dist/contracts/dist/telemetry/index.js +0 -1
- package/dist/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/contracts/dist/tests/index.js +0 -1
- package/dist/contracts/dist/tests/runner.js +0 -2
- package/dist/contracts/dist/workflow/index.js +0 -1
- package/dist/contracts/dist/workflow/runner.js +0 -1
- package/dist/contracts/index.d.ts +0 -1006
- package/dist/docs/feature-flags.docblock.d.ts +0 -1
- package/dist/docs/index.d.ts +0 -1
- package/dist/entities/index.d.ts +0 -200
- package/dist/evaluation/index.d.ts +0 -162
- package/dist/events.d.ts +0 -624
- package/dist/feature-flags.feature.d.ts +0 -11
- package/dist/index.d.ts +0 -6
- package/dist/schema/dist/EnumType.js +0 -2
- package/dist/schema/dist/FieldType.js +0 -49
- package/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/schema/dist/SchemaModel.js +0 -39
- package/dist/schema/dist/entity/defineEntity.js +0 -236
- package/dist/schema/dist/entity/index.js +0 -2
- package/dist/schema/dist/entity/types.js +0 -1
- package/dist/schema/dist/index.js +0 -6
package/dist/events.js
CHANGED
|
@@ -1,459 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineSchemaModel } from "./schema/dist/SchemaModel.js";
|
|
3
|
-
import "./schema/dist/index.js";
|
|
4
|
-
import { defineEvent } from "./contracts/dist/events.js";
|
|
5
|
-
import "./contracts/dist/index.js";
|
|
6
|
-
|
|
7
|
-
//#region src/events.ts
|
|
8
|
-
const FlagCreatedPayload = defineSchemaModel({
|
|
9
|
-
name: "FlagCreatedEventPayload",
|
|
10
|
-
description: "Payload when a feature flag is created",
|
|
11
|
-
fields: {
|
|
12
|
-
flagId: {
|
|
13
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
-
isOptional: false
|
|
15
|
-
},
|
|
16
|
-
key: {
|
|
17
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
-
isOptional: false
|
|
19
|
-
},
|
|
20
|
-
name: {
|
|
21
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
-
isOptional: false
|
|
23
|
-
},
|
|
24
|
-
status: {
|
|
25
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
-
isOptional: false
|
|
27
|
-
},
|
|
28
|
-
orgId: {
|
|
29
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
-
isOptional: true
|
|
31
|
-
},
|
|
32
|
-
createdBy: {
|
|
33
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
34
|
-
isOptional: true
|
|
35
|
-
},
|
|
36
|
-
createdAt: {
|
|
37
|
-
type: ScalarTypeEnum.DateTime(),
|
|
38
|
-
isOptional: false
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const FlagUpdatedPayload = defineSchemaModel({
|
|
43
|
-
name: "FlagUpdatedEventPayload",
|
|
44
|
-
description: "Payload when a feature flag is updated",
|
|
45
|
-
fields: {
|
|
46
|
-
flagId: {
|
|
47
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
48
|
-
isOptional: false
|
|
49
|
-
},
|
|
50
|
-
key: {
|
|
51
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
52
|
-
isOptional: false
|
|
53
|
-
},
|
|
54
|
-
changes: {
|
|
55
|
-
type: ScalarTypeEnum.JSON(),
|
|
56
|
-
isOptional: false
|
|
57
|
-
},
|
|
58
|
-
updatedBy: {
|
|
59
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
60
|
-
isOptional: true
|
|
61
|
-
},
|
|
62
|
-
updatedAt: {
|
|
63
|
-
type: ScalarTypeEnum.DateTime(),
|
|
64
|
-
isOptional: false
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
const FlagDeletedPayload = defineSchemaModel({
|
|
69
|
-
name: "FlagDeletedEventPayload",
|
|
70
|
-
description: "Payload when a feature flag is deleted",
|
|
71
|
-
fields: {
|
|
72
|
-
flagId: {
|
|
73
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
74
|
-
isOptional: false
|
|
75
|
-
},
|
|
76
|
-
key: {
|
|
77
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
78
|
-
isOptional: false
|
|
79
|
-
},
|
|
80
|
-
deletedBy: {
|
|
81
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
82
|
-
isOptional: true
|
|
83
|
-
},
|
|
84
|
-
deletedAt: {
|
|
85
|
-
type: ScalarTypeEnum.DateTime(),
|
|
86
|
-
isOptional: false
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
const FlagToggledPayload = defineSchemaModel({
|
|
91
|
-
name: "FlagToggledEventPayload",
|
|
92
|
-
description: "Payload when a feature flag status is toggled",
|
|
93
|
-
fields: {
|
|
94
|
-
flagId: {
|
|
95
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
96
|
-
isOptional: false
|
|
97
|
-
},
|
|
98
|
-
key: {
|
|
99
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
100
|
-
isOptional: false
|
|
101
|
-
},
|
|
102
|
-
previousStatus: {
|
|
103
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
104
|
-
isOptional: false
|
|
105
|
-
},
|
|
106
|
-
newStatus: {
|
|
107
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
108
|
-
isOptional: false
|
|
109
|
-
},
|
|
110
|
-
toggledBy: {
|
|
111
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
112
|
-
isOptional: true
|
|
113
|
-
},
|
|
114
|
-
toggledAt: {
|
|
115
|
-
type: ScalarTypeEnum.DateTime(),
|
|
116
|
-
isOptional: false
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
const RuleCreatedPayload = defineSchemaModel({
|
|
121
|
-
name: "RuleCreatedEventPayload",
|
|
122
|
-
description: "Payload when a targeting rule is created",
|
|
123
|
-
fields: {
|
|
124
|
-
ruleId: {
|
|
125
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
-
isOptional: false
|
|
127
|
-
},
|
|
128
|
-
flagId: {
|
|
129
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
130
|
-
isOptional: false
|
|
131
|
-
},
|
|
132
|
-
flagKey: {
|
|
133
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
134
|
-
isOptional: false
|
|
135
|
-
},
|
|
136
|
-
attribute: {
|
|
137
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
138
|
-
isOptional: false
|
|
139
|
-
},
|
|
140
|
-
operator: {
|
|
141
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
142
|
-
isOptional: false
|
|
143
|
-
},
|
|
144
|
-
createdAt: {
|
|
145
|
-
type: ScalarTypeEnum.DateTime(),
|
|
146
|
-
isOptional: false
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
const RuleDeletedPayload = defineSchemaModel({
|
|
151
|
-
name: "RuleDeletedEventPayload",
|
|
152
|
-
description: "Payload when a targeting rule is deleted",
|
|
153
|
-
fields: {
|
|
154
|
-
ruleId: {
|
|
155
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
156
|
-
isOptional: false
|
|
157
|
-
},
|
|
158
|
-
flagId: {
|
|
159
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
160
|
-
isOptional: false
|
|
161
|
-
},
|
|
162
|
-
flagKey: {
|
|
163
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
164
|
-
isOptional: false
|
|
165
|
-
},
|
|
166
|
-
deletedAt: {
|
|
167
|
-
type: ScalarTypeEnum.DateTime(),
|
|
168
|
-
isOptional: false
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
const ExperimentCreatedPayload = defineSchemaModel({
|
|
173
|
-
name: "ExperimentCreatedEventPayload",
|
|
174
|
-
description: "Payload when an experiment is created",
|
|
175
|
-
fields: {
|
|
176
|
-
experimentId: {
|
|
177
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
178
|
-
isOptional: false
|
|
179
|
-
},
|
|
180
|
-
key: {
|
|
181
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
182
|
-
isOptional: false
|
|
183
|
-
},
|
|
184
|
-
name: {
|
|
185
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
186
|
-
isOptional: false
|
|
187
|
-
},
|
|
188
|
-
flagId: {
|
|
189
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
190
|
-
isOptional: false
|
|
191
|
-
},
|
|
192
|
-
variants: {
|
|
193
|
-
type: ScalarTypeEnum.JSON(),
|
|
194
|
-
isOptional: false
|
|
195
|
-
},
|
|
196
|
-
createdBy: {
|
|
197
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
198
|
-
isOptional: true
|
|
199
|
-
},
|
|
200
|
-
createdAt: {
|
|
201
|
-
type: ScalarTypeEnum.DateTime(),
|
|
202
|
-
isOptional: false
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
const ExperimentStartedPayload = defineSchemaModel({
|
|
207
|
-
name: "ExperimentStartedEventPayload",
|
|
208
|
-
description: "Payload when an experiment starts",
|
|
209
|
-
fields: {
|
|
210
|
-
experimentId: {
|
|
211
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
212
|
-
isOptional: false
|
|
213
|
-
},
|
|
214
|
-
key: {
|
|
215
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
216
|
-
isOptional: false
|
|
217
|
-
},
|
|
218
|
-
flagId: {
|
|
219
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
220
|
-
isOptional: false
|
|
221
|
-
},
|
|
222
|
-
variants: {
|
|
223
|
-
type: ScalarTypeEnum.JSON(),
|
|
224
|
-
isOptional: false
|
|
225
|
-
},
|
|
226
|
-
audiencePercentage: {
|
|
227
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
228
|
-
isOptional: false
|
|
229
|
-
},
|
|
230
|
-
startedBy: {
|
|
231
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
232
|
-
isOptional: true
|
|
233
|
-
},
|
|
234
|
-
startedAt: {
|
|
235
|
-
type: ScalarTypeEnum.DateTime(),
|
|
236
|
-
isOptional: false
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
const ExperimentStoppedPayload = defineSchemaModel({
|
|
241
|
-
name: "ExperimentStoppedEventPayload",
|
|
242
|
-
description: "Payload when an experiment stops",
|
|
243
|
-
fields: {
|
|
244
|
-
experimentId: {
|
|
245
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
246
|
-
isOptional: false
|
|
247
|
-
},
|
|
248
|
-
key: {
|
|
249
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
250
|
-
isOptional: false
|
|
251
|
-
},
|
|
252
|
-
reason: {
|
|
253
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
254
|
-
isOptional: false
|
|
255
|
-
},
|
|
256
|
-
winningVariant: {
|
|
257
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
258
|
-
isOptional: true
|
|
259
|
-
},
|
|
260
|
-
stoppedBy: {
|
|
261
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
262
|
-
isOptional: true
|
|
263
|
-
},
|
|
264
|
-
stoppedAt: {
|
|
265
|
-
type: ScalarTypeEnum.DateTime(),
|
|
266
|
-
isOptional: false
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
const FlagEvaluatedPayload = defineSchemaModel({
|
|
271
|
-
name: "FlagEvaluatedEventPayload",
|
|
272
|
-
description: "Payload when a flag is evaluated (for analytics)",
|
|
273
|
-
fields: {
|
|
274
|
-
flagId: {
|
|
275
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
276
|
-
isOptional: false
|
|
277
|
-
},
|
|
278
|
-
flagKey: {
|
|
279
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
280
|
-
isOptional: false
|
|
281
|
-
},
|
|
282
|
-
subjectType: {
|
|
283
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
284
|
-
isOptional: false
|
|
285
|
-
},
|
|
286
|
-
subjectId: {
|
|
287
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
288
|
-
isOptional: false
|
|
289
|
-
},
|
|
290
|
-
result: {
|
|
291
|
-
type: ScalarTypeEnum.Boolean(),
|
|
292
|
-
isOptional: false
|
|
293
|
-
},
|
|
294
|
-
variant: {
|
|
295
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
296
|
-
isOptional: true
|
|
297
|
-
},
|
|
298
|
-
reason: {
|
|
299
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
300
|
-
isOptional: false
|
|
301
|
-
},
|
|
302
|
-
evaluatedAt: {
|
|
303
|
-
type: ScalarTypeEnum.DateTime(),
|
|
304
|
-
isOptional: false
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
const VariantAssignedPayload = defineSchemaModel({
|
|
309
|
-
name: "VariantAssignedEventPayload",
|
|
310
|
-
description: "Payload when a subject is assigned to an experiment variant",
|
|
311
|
-
fields: {
|
|
312
|
-
experimentId: {
|
|
313
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
314
|
-
isOptional: false
|
|
315
|
-
},
|
|
316
|
-
experimentKey: {
|
|
317
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
318
|
-
isOptional: false
|
|
319
|
-
},
|
|
320
|
-
subjectType: {
|
|
321
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
322
|
-
isOptional: false
|
|
323
|
-
},
|
|
324
|
-
subjectId: {
|
|
325
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
326
|
-
isOptional: false
|
|
327
|
-
},
|
|
328
|
-
variant: {
|
|
329
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
330
|
-
isOptional: false
|
|
331
|
-
},
|
|
332
|
-
bucket: {
|
|
333
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
334
|
-
isOptional: false
|
|
335
|
-
},
|
|
336
|
-
assignedAt: {
|
|
337
|
-
type: ScalarTypeEnum.DateTime(),
|
|
338
|
-
isOptional: false
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
/**
|
|
343
|
-
* Emitted when a feature flag is created.
|
|
344
|
-
*/
|
|
345
|
-
const FlagCreatedEvent = defineEvent({
|
|
346
|
-
name: "flag.created",
|
|
347
|
-
version: 1,
|
|
348
|
-
description: "A feature flag has been created.",
|
|
349
|
-
payload: FlagCreatedPayload
|
|
350
|
-
});
|
|
351
|
-
/**
|
|
352
|
-
* Emitted when a feature flag is updated.
|
|
353
|
-
*/
|
|
354
|
-
const FlagUpdatedEvent = defineEvent({
|
|
355
|
-
name: "flag.updated",
|
|
356
|
-
version: 1,
|
|
357
|
-
description: "A feature flag has been updated.",
|
|
358
|
-
payload: FlagUpdatedPayload
|
|
359
|
-
});
|
|
360
|
-
/**
|
|
361
|
-
* Emitted when a feature flag is deleted.
|
|
362
|
-
*/
|
|
363
|
-
const FlagDeletedEvent = defineEvent({
|
|
364
|
-
name: "flag.deleted",
|
|
365
|
-
version: 1,
|
|
366
|
-
description: "A feature flag has been deleted.",
|
|
367
|
-
payload: FlagDeletedPayload
|
|
368
|
-
});
|
|
369
|
-
/**
|
|
370
|
-
* Emitted when a feature flag status is toggled.
|
|
371
|
-
*/
|
|
372
|
-
const FlagToggledEvent = defineEvent({
|
|
373
|
-
name: "flag.toggled",
|
|
374
|
-
version: 1,
|
|
375
|
-
description: "A feature flag status has been toggled.",
|
|
376
|
-
payload: FlagToggledPayload
|
|
377
|
-
});
|
|
378
|
-
/**
|
|
379
|
-
* Emitted when a targeting rule is created.
|
|
380
|
-
*/
|
|
381
|
-
const RuleCreatedEvent = defineEvent({
|
|
382
|
-
name: "flag.rule_created",
|
|
383
|
-
version: 1,
|
|
384
|
-
description: "A targeting rule has been created.",
|
|
385
|
-
payload: RuleCreatedPayload
|
|
386
|
-
});
|
|
387
|
-
/**
|
|
388
|
-
* Emitted when a targeting rule is deleted.
|
|
389
|
-
*/
|
|
390
|
-
const RuleDeletedEvent = defineEvent({
|
|
391
|
-
name: "flag.rule_deleted",
|
|
392
|
-
version: 1,
|
|
393
|
-
description: "A targeting rule has been deleted.",
|
|
394
|
-
payload: RuleDeletedPayload
|
|
395
|
-
});
|
|
396
|
-
/**
|
|
397
|
-
* Emitted when an experiment is created.
|
|
398
|
-
*/
|
|
399
|
-
const ExperimentCreatedEvent = defineEvent({
|
|
400
|
-
name: "experiment.created",
|
|
401
|
-
version: 1,
|
|
402
|
-
description: "An experiment has been created.",
|
|
403
|
-
payload: ExperimentCreatedPayload
|
|
404
|
-
});
|
|
405
|
-
/**
|
|
406
|
-
* Emitted when an experiment starts.
|
|
407
|
-
*/
|
|
408
|
-
const ExperimentStartedEvent = defineEvent({
|
|
409
|
-
name: "experiment.started",
|
|
410
|
-
version: 1,
|
|
411
|
-
description: "An experiment has started.",
|
|
412
|
-
payload: ExperimentStartedPayload
|
|
413
|
-
});
|
|
414
|
-
/**
|
|
415
|
-
* Emitted when an experiment stops.
|
|
416
|
-
*/
|
|
417
|
-
const ExperimentStoppedEvent = defineEvent({
|
|
418
|
-
name: "experiment.stopped",
|
|
419
|
-
version: 1,
|
|
420
|
-
description: "An experiment has stopped.",
|
|
421
|
-
payload: ExperimentStoppedPayload
|
|
422
|
-
});
|
|
423
|
-
/**
|
|
424
|
-
* Emitted when a flag is evaluated (for analytics).
|
|
425
|
-
*/
|
|
426
|
-
const FlagEvaluatedEvent = defineEvent({
|
|
427
|
-
name: "flag.evaluated",
|
|
428
|
-
version: 1,
|
|
429
|
-
description: "A feature flag has been evaluated.",
|
|
430
|
-
payload: FlagEvaluatedPayload
|
|
431
|
-
});
|
|
432
|
-
/**
|
|
433
|
-
* Emitted when a subject is assigned to an experiment variant.
|
|
434
|
-
*/
|
|
435
|
-
const VariantAssignedEvent = defineEvent({
|
|
436
|
-
name: "experiment.variant_assigned",
|
|
437
|
-
version: 1,
|
|
438
|
-
description: "A subject has been assigned to an experiment variant.",
|
|
439
|
-
payload: VariantAssignedPayload
|
|
440
|
-
});
|
|
441
|
-
/**
|
|
442
|
-
* All feature flag events.
|
|
443
|
-
*/
|
|
444
|
-
const FeatureFlagEvents = {
|
|
445
|
-
FlagCreatedEvent,
|
|
446
|
-
FlagUpdatedEvent,
|
|
447
|
-
FlagDeletedEvent,
|
|
448
|
-
FlagToggledEvent,
|
|
449
|
-
RuleCreatedEvent,
|
|
450
|
-
RuleDeletedEvent,
|
|
451
|
-
ExperimentCreatedEvent,
|
|
452
|
-
ExperimentStartedEvent,
|
|
453
|
-
ExperimentStoppedEvent,
|
|
454
|
-
FlagEvaluatedEvent,
|
|
455
|
-
VariantAssignedEvent
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
//#endregion
|
|
459
|
-
export { ExperimentCreatedEvent, ExperimentStartedEvent, ExperimentStoppedEvent, FeatureFlagEvents, FlagCreatedEvent, FlagDeletedEvent, FlagEvaluatedEvent, FlagToggledEvent, FlagUpdatedEvent, RuleCreatedEvent, RuleDeletedEvent, VariantAssignedEvent };
|
|
1
|
+
import{ScalarTypeEnum as e,defineSchemaModel as t}from"@lssm/lib.schema";import{defineEvent as n}from"@lssm/lib.contracts";const r=t({name:`FlagCreatedEventPayload`,description:`Payload when a feature flag is created`,fields:{flagId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},status:{type:e.String_unsecure(),isOptional:!1},orgId:{type:e.String_unsecure(),isOptional:!0},createdBy:{type:e.String_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),i=t({name:`FlagUpdatedEventPayload`,description:`Payload when a feature flag is updated`,fields:{flagId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},changes:{type:e.JSON(),isOptional:!1},updatedBy:{type:e.String_unsecure(),isOptional:!0},updatedAt:{type:e.DateTime(),isOptional:!1}}}),a=t({name:`FlagDeletedEventPayload`,description:`Payload when a feature flag is deleted`,fields:{flagId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},deletedBy:{type:e.String_unsecure(),isOptional:!0},deletedAt:{type:e.DateTime(),isOptional:!1}}}),o=t({name:`FlagToggledEventPayload`,description:`Payload when a feature flag status is toggled`,fields:{flagId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},previousStatus:{type:e.String_unsecure(),isOptional:!1},newStatus:{type:e.String_unsecure(),isOptional:!1},toggledBy:{type:e.String_unsecure(),isOptional:!0},toggledAt:{type:e.DateTime(),isOptional:!1}}}),s=t({name:`RuleCreatedEventPayload`,description:`Payload when a targeting rule is created`,fields:{ruleId:{type:e.String_unsecure(),isOptional:!1},flagId:{type:e.String_unsecure(),isOptional:!1},flagKey:{type:e.String_unsecure(),isOptional:!1},attribute:{type:e.String_unsecure(),isOptional:!1},operator:{type:e.String_unsecure(),isOptional:!1},createdAt:{type:e.DateTime(),isOptional:!1}}}),c=t({name:`RuleDeletedEventPayload`,description:`Payload when a targeting rule is deleted`,fields:{ruleId:{type:e.String_unsecure(),isOptional:!1},flagId:{type:e.String_unsecure(),isOptional:!1},flagKey:{type:e.String_unsecure(),isOptional:!1},deletedAt:{type:e.DateTime(),isOptional:!1}}}),l=t({name:`ExperimentCreatedEventPayload`,description:`Payload when an experiment is created`,fields:{experimentId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},flagId:{type:e.String_unsecure(),isOptional:!1},variants:{type:e.JSON(),isOptional:!1},createdBy:{type:e.String_unsecure(),isOptional:!0},createdAt:{type:e.DateTime(),isOptional:!1}}}),u=t({name:`ExperimentStartedEventPayload`,description:`Payload when an experiment starts`,fields:{experimentId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},flagId:{type:e.String_unsecure(),isOptional:!1},variants:{type:e.JSON(),isOptional:!1},audiencePercentage:{type:e.Int_unsecure(),isOptional:!1},startedBy:{type:e.String_unsecure(),isOptional:!0},startedAt:{type:e.DateTime(),isOptional:!1}}}),d=t({name:`ExperimentStoppedEventPayload`,description:`Payload when an experiment stops`,fields:{experimentId:{type:e.String_unsecure(),isOptional:!1},key:{type:e.String_unsecure(),isOptional:!1},reason:{type:e.String_unsecure(),isOptional:!1},winningVariant:{type:e.String_unsecure(),isOptional:!0},stoppedBy:{type:e.String_unsecure(),isOptional:!0},stoppedAt:{type:e.DateTime(),isOptional:!1}}}),f=t({name:`FlagEvaluatedEventPayload`,description:`Payload when a flag is evaluated (for analytics)`,fields:{flagId:{type:e.String_unsecure(),isOptional:!1},flagKey:{type:e.String_unsecure(),isOptional:!1},subjectType:{type:e.String_unsecure(),isOptional:!1},subjectId:{type:e.String_unsecure(),isOptional:!1},result:{type:e.Boolean(),isOptional:!1},variant:{type:e.String_unsecure(),isOptional:!0},reason:{type:e.String_unsecure(),isOptional:!1},evaluatedAt:{type:e.DateTime(),isOptional:!1}}}),p=t({name:`VariantAssignedEventPayload`,description:`Payload when a subject is assigned to an experiment variant`,fields:{experimentId:{type:e.String_unsecure(),isOptional:!1},experimentKey:{type:e.String_unsecure(),isOptional:!1},subjectType:{type:e.String_unsecure(),isOptional:!1},subjectId:{type:e.String_unsecure(),isOptional:!1},variant:{type:e.String_unsecure(),isOptional:!1},bucket:{type:e.Int_unsecure(),isOptional:!1},assignedAt:{type:e.DateTime(),isOptional:!1}}}),m=n({name:`flag.created`,version:1,description:`A feature flag has been created.`,payload:r}),h=n({name:`flag.updated`,version:1,description:`A feature flag has been updated.`,payload:i}),g=n({name:`flag.deleted`,version:1,description:`A feature flag has been deleted.`,payload:a}),_=n({name:`flag.toggled`,version:1,description:`A feature flag status has been toggled.`,payload:o}),v=n({name:`flag.rule_created`,version:1,description:`A targeting rule has been created.`,payload:s}),y=n({name:`flag.rule_deleted`,version:1,description:`A targeting rule has been deleted.`,payload:c}),b=n({name:`experiment.created`,version:1,description:`An experiment has been created.`,payload:l}),x=n({name:`experiment.started`,version:1,description:`An experiment has started.`,payload:u}),S=n({name:`experiment.stopped`,version:1,description:`An experiment has stopped.`,payload:d}),C=n({name:`flag.evaluated`,version:1,description:`A feature flag has been evaluated.`,payload:f}),w=n({name:`experiment.variant_assigned`,version:1,description:`A subject has been assigned to an experiment variant.`,payload:p}),T={FlagCreatedEvent:m,FlagUpdatedEvent:h,FlagDeletedEvent:g,FlagToggledEvent:_,RuleCreatedEvent:v,RuleDeletedEvent:y,ExperimentCreatedEvent:b,ExperimentStartedEvent:x,ExperimentStoppedEvent:S,FlagEvaluatedEvent:C,VariantAssignedEvent:w};export{b as ExperimentCreatedEvent,x as ExperimentStartedEvent,S as ExperimentStoppedEvent,T as FeatureFlagEvents,m as FlagCreatedEvent,g as FlagDeletedEvent,C as FlagEvaluatedEvent,_ as FlagToggledEvent,h as FlagUpdatedEvent,v as RuleCreatedEvent,y as RuleDeletedEvent,w as VariantAssignedEvent};
|
|
@@ -1,139 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Feature Flags feature module that bundles flag management,
|
|
4
|
-
* targeting rules, and A/B experiment capabilities.
|
|
5
|
-
*/
|
|
6
|
-
const FeatureFlagsFeature = {
|
|
7
|
-
meta: {
|
|
8
|
-
key: "feature-flags",
|
|
9
|
-
title: "Feature Flags",
|
|
10
|
-
description: "Feature flag management with targeting rules and A/B experiments",
|
|
11
|
-
domain: "platform",
|
|
12
|
-
owners: ["@platform.feature-flags"],
|
|
13
|
-
tags: [
|
|
14
|
-
"feature-flags",
|
|
15
|
-
"experiments",
|
|
16
|
-
"targeting"
|
|
17
|
-
],
|
|
18
|
-
stability: "stable"
|
|
19
|
-
},
|
|
20
|
-
operations: [
|
|
21
|
-
{
|
|
22
|
-
name: "flag.create",
|
|
23
|
-
version: 1
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: "flag.update",
|
|
27
|
-
version: 1
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "flag.delete",
|
|
31
|
-
version: 1
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: "flag.toggle",
|
|
35
|
-
version: 1
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: "flag.get",
|
|
39
|
-
version: 1
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "flag.list",
|
|
43
|
-
version: 1
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "flag.evaluate",
|
|
47
|
-
version: 1
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "flag.rule.create",
|
|
51
|
-
version: 1
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: "flag.rule.delete",
|
|
55
|
-
version: 1
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "experiment.create",
|
|
59
|
-
version: 1
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: "experiment.start",
|
|
63
|
-
version: 1
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: "experiment.stop",
|
|
67
|
-
version: 1
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: "experiment.get",
|
|
71
|
-
version: 1
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
events: [
|
|
75
|
-
{
|
|
76
|
-
name: "flag.created",
|
|
77
|
-
version: 1
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "flag.updated",
|
|
81
|
-
version: 1
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
name: "flag.deleted",
|
|
85
|
-
version: 1
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: "flag.toggled",
|
|
89
|
-
version: 1
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
name: "flag.evaluated",
|
|
93
|
-
version: 1
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "flag.rule_created",
|
|
97
|
-
version: 1
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: "flag.rule_deleted",
|
|
101
|
-
version: 1
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: "experiment.created",
|
|
105
|
-
version: 1
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "experiment.started",
|
|
109
|
-
version: 1
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: "experiment.stopped",
|
|
113
|
-
version: 1
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: "experiment.variant_assigned",
|
|
117
|
-
version: 1
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
presentations: [],
|
|
121
|
-
opToPresentation: [],
|
|
122
|
-
presentationsTargets: [],
|
|
123
|
-
capabilities: {
|
|
124
|
-
provides: [{
|
|
125
|
-
key: "feature-flags",
|
|
126
|
-
version: 1
|
|
127
|
-
}, {
|
|
128
|
-
key: "experiments",
|
|
129
|
-
version: 1
|
|
130
|
-
}],
|
|
131
|
-
requires: [{
|
|
132
|
-
key: "identity",
|
|
133
|
-
version: 1
|
|
134
|
-
}]
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
//#endregion
|
|
139
|
-
export { FeatureFlagsFeature };
|
|
1
|
+
const e={meta:{key:`feature-flags`,title:`Feature Flags`,description:`Feature flag management with targeting rules and A/B experiments`,domain:`platform`,owners:[`@platform.feature-flags`],tags:[`feature-flags`,`experiments`,`targeting`],stability:`stable`},operations:[{name:`flag.create`,version:1},{name:`flag.update`,version:1},{name:`flag.delete`,version:1},{name:`flag.toggle`,version:1},{name:`flag.get`,version:1},{name:`flag.list`,version:1},{name:`flag.evaluate`,version:1},{name:`flag.rule.create`,version:1},{name:`flag.rule.delete`,version:1},{name:`experiment.create`,version:1},{name:`experiment.start`,version:1},{name:`experiment.stop`,version:1},{name:`experiment.get`,version:1}],events:[{name:`flag.created`,version:1},{name:`flag.updated`,version:1},{name:`flag.deleted`,version:1},{name:`flag.toggled`,version:1},{name:`flag.evaluated`,version:1},{name:`flag.rule_created`,version:1},{name:`flag.rule_deleted`,version:1},{name:`experiment.created`,version:1},{name:`experiment.started`,version:1},{name:`experiment.stopped`,version:1},{name:`experiment.variant_assigned`,version:1}],presentations:[],opToPresentation:[],presentationsTargets:[],capabilities:{provides:[{key:`feature-flags`,version:1},{key:`experiments`,version:1}],requires:[{key:`identity`,version:1}]}};export{e as FeatureFlagsFeature};
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
import { ExperimentCreatedEvent, ExperimentStartedEvent, ExperimentStoppedEvent, FeatureFlagEvents, FlagCreatedEvent, FlagDeletedEvent, FlagEvaluatedEvent, FlagToggledEvent, FlagUpdatedEvent, RuleCreatedEvent, RuleDeletedEvent, VariantAssignedEvent
|
|
2
|
-
import { FeatureFlagsFeature } from "./feature-flags.feature.js";
|
|
3
|
-
import { ExperimentAssignmentEntity, ExperimentEntity, ExperimentStatusEnum, FeatureFlagEntity, FlagEvaluationEntity, FlagStatusEnum, FlagTargetingRuleEntity, RuleOperatorEnum, featureFlagEntities, featureFlagsSchemaContribution } from "./entities/index.js";
|
|
4
|
-
import { CreateExperimentContract, CreateFlagContract, CreateRuleContract, DeleteFlagContract, DeleteRuleContract, EvaluateFlagContract, EvaluationResultModel, ExperimentModel, FeatureFlagModel, GetExperimentContract, GetFlagContract, ListFlagsContract, StartExperimentContract, StopExperimentContract, TargetingRuleModel, ToggleFlagContract, UpdateFlagContract } from "./contracts/index.js";
|
|
5
|
-
import { FlagEvaluator, InMemoryFlagRepository, evaluateRuleCondition, getSubjectId, hashToBucket } from "./evaluation/index.js";
|
|
6
|
-
import "./docs/index.js";
|
|
7
|
-
|
|
8
|
-
export { CreateExperimentContract, CreateFlagContract, CreateRuleContract, DeleteFlagContract, DeleteRuleContract, EvaluateFlagContract, EvaluationResultModel, ExperimentAssignmentEntity, ExperimentCreatedEvent, ExperimentEntity, ExperimentModel, ExperimentStartedEvent, ExperimentStatusEnum, ExperimentStoppedEvent, FeatureFlagEntity, FeatureFlagEvents, FeatureFlagModel, FeatureFlagsFeature, FlagCreatedEvent, FlagDeletedEvent, FlagEvaluatedEvent, FlagEvaluationEntity, FlagEvaluator, FlagStatusEnum, FlagTargetingRuleEntity, FlagToggledEvent, FlagUpdatedEvent, GetExperimentContract, GetFlagContract, InMemoryFlagRepository, ListFlagsContract, RuleCreatedEvent, RuleDeletedEvent, RuleOperatorEnum, StartExperimentContract, StopExperimentContract, TargetingRuleModel, ToggleFlagContract, UpdateFlagContract, VariantAssignedEvent, evaluateRuleCondition, featureFlagEntities, featureFlagsSchemaContribution, getSubjectId, hashToBucket };
|
|
1
|
+
import{ExperimentCreatedEvent as e,ExperimentStartedEvent as t,ExperimentStoppedEvent as n,FeatureFlagEvents as r,FlagCreatedEvent as i,FlagDeletedEvent as a,FlagEvaluatedEvent as o,FlagToggledEvent as s,FlagUpdatedEvent as c,RuleCreatedEvent as l,RuleDeletedEvent as u,VariantAssignedEvent as d}from"./events.js";import{FeatureFlagsFeature as f}from"./feature-flags.feature.js";import{ExperimentAssignmentEntity as p,ExperimentEntity as m,ExperimentStatusEnum as h,FeatureFlagEntity as g,FlagEvaluationEntity as _,FlagStatusEnum as v,FlagTargetingRuleEntity as y,RuleOperatorEnum as b,featureFlagEntities as x,featureFlagsSchemaContribution as S}from"./entities/index.js";import{CreateExperimentContract as C,CreateFlagContract as w,CreateRuleContract as T,DeleteFlagContract as E,DeleteRuleContract as D,EvaluateFlagContract as O,EvaluationResultModel as k,ExperimentModel as A,FeatureFlagModel as j,GetExperimentContract as M,GetFlagContract as N,ListFlagsContract as P,StartExperimentContract as F,StopExperimentContract as I,TargetingRuleModel as L,ToggleFlagContract as R,UpdateFlagContract as z}from"./contracts/index.js";import{FlagEvaluator as B,InMemoryFlagRepository as V,evaluateRuleCondition as H,getSubjectId as U,hashToBucket as W}from"./evaluation/index.js";import"./docs/index.js";export{C as CreateExperimentContract,w as CreateFlagContract,T as CreateRuleContract,E as DeleteFlagContract,D as DeleteRuleContract,O as EvaluateFlagContract,k as EvaluationResultModel,p as ExperimentAssignmentEntity,e as ExperimentCreatedEvent,m as ExperimentEntity,A as ExperimentModel,t as ExperimentStartedEvent,h as ExperimentStatusEnum,n as ExperimentStoppedEvent,g as FeatureFlagEntity,r as FeatureFlagEvents,j as FeatureFlagModel,f as FeatureFlagsFeature,i as FlagCreatedEvent,a as FlagDeletedEvent,o as FlagEvaluatedEvent,_ as FlagEvaluationEntity,B as FlagEvaluator,v as FlagStatusEnum,y as FlagTargetingRuleEntity,s as FlagToggledEvent,c as FlagUpdatedEvent,M as GetExperimentContract,N as GetFlagContract,V as InMemoryFlagRepository,P as ListFlagsContract,l as RuleCreatedEvent,u as RuleDeletedEvent,b as RuleOperatorEnum,F as StartExperimentContract,I as StopExperimentContract,L as TargetingRuleModel,R as ToggleFlagContract,z as UpdateFlagContract,d as VariantAssignedEvent,H as evaluateRuleCondition,x as featureFlagEntities,S as featureFlagsSchemaContribution,U as getSubjectId,W as hashToBucket};
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.feature-flags",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "Feature flags and experiments module for ContractSpec applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
10
|
-
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
11
10
|
"build": "bun build:bundle && bun build:types",
|
|
12
11
|
"build:bundle": "tsdown",
|
|
13
12
|
"build:types": "tsc --noEmit",
|
|
@@ -18,24 +17,24 @@
|
|
|
18
17
|
"lint:check": "eslint src"
|
|
19
18
|
},
|
|
20
19
|
"dependencies": {
|
|
21
|
-
"@lssm/lib.schema": "
|
|
22
|
-
"@lssm/lib.contracts": "
|
|
20
|
+
"@lssm/lib.schema": "workspace:*",
|
|
21
|
+
"@lssm/lib.contracts": "workspace:*",
|
|
23
22
|
"zod": "^4.1.13"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
|
-
"@lssm/tool.typescript": "
|
|
27
|
-
"@lssm/tool.tsdown": "
|
|
25
|
+
"@lssm/tool.typescript": "workspace:*",
|
|
26
|
+
"@lssm/tool.tsdown": "workspace:*",
|
|
28
27
|
"typescript": "^5.9.3"
|
|
29
28
|
},
|
|
30
29
|
"exports": {
|
|
31
|
-
".": "./
|
|
32
|
-
"./contracts": "./
|
|
33
|
-
"./docs": "./
|
|
34
|
-
"./docs/feature-flags.docblock": "./
|
|
35
|
-
"./entities": "./
|
|
36
|
-
"./evaluation": "./
|
|
37
|
-
"./events": "./
|
|
38
|
-
"./feature-flags.feature": "./
|
|
30
|
+
".": "./src/index.ts",
|
|
31
|
+
"./contracts": "./src/contracts/index.ts",
|
|
32
|
+
"./docs": "./src/docs/index.ts",
|
|
33
|
+
"./docs/feature-flags.docblock": "./src/docs/feature-flags.docblock.ts",
|
|
34
|
+
"./entities": "./src/entities/index.ts",
|
|
35
|
+
"./evaluation": "./src/evaluation/index.ts",
|
|
36
|
+
"./events": "./src/events.ts",
|
|
37
|
+
"./feature-flags.feature": "./src/feature-flags.feature.ts",
|
|
39
38
|
"./*": "./*"
|
|
40
39
|
},
|
|
41
40
|
"module": "./dist/index.js",
|