@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.
Files changed (138) hide show
  1. package/dist/contracts/index.js +1 -910
  2. package/dist/docs/feature-flags.docblock.js +2 -21
  3. package/dist/docs/index.js +1 -1
  4. package/dist/entities/index.js +1 -325
  5. package/dist/evaluation/index.js +1 -220
  6. package/dist/events.js +1 -459
  7. package/dist/feature-flags.feature.js +1 -139
  8. package/dist/index.js +1 -8
  9. package/package.json +13 -14
  10. package/dist/contracts/dist/capabilities/openbanking.js +0 -88
  11. package/dist/contracts/dist/client/index.js +0 -5
  12. package/dist/contracts/dist/client/react/feature-render.js +0 -2
  13. package/dist/contracts/dist/client/react/form-render.js +0 -4
  14. package/dist/contracts/dist/client/react/index.js +0 -4
  15. package/dist/contracts/dist/contract-registry/index.js +0 -1
  16. package/dist/contracts/dist/contract-registry/schemas.js +0 -60
  17. package/dist/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  18. package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  19. package/dist/contracts/dist/docs/index.js +0 -29
  20. package/dist/contracts/dist/docs/presentations.js +0 -71
  21. package/dist/contracts/dist/docs/registry.js +0 -44
  22. package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  23. package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  24. package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  25. package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  26. package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  27. package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  28. package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  29. package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  30. package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  31. package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  32. package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  33. package/dist/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  34. package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  35. package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  36. package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  37. package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  38. package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  39. package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  40. package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  41. package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  42. package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  43. package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  44. package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  45. package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  46. package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  47. package/dist/contracts/dist/events.js +0 -10
  48. package/dist/contracts/dist/experiments/evaluator.js +0 -1
  49. package/dist/contracts/dist/index.js +0 -71
  50. package/dist/contracts/dist/install.js +0 -2
  51. package/dist/contracts/dist/integrations/contracts.js +0 -377
  52. package/dist/contracts/dist/integrations/index.js +0 -18
  53. package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  54. package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  55. package/dist/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  56. package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  57. package/dist/contracts/dist/integrations/openbanking/models.js +0 -242
  58. package/dist/contracts/dist/integrations/openbanking/telemetry.js +0 -13
  59. package/dist/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  60. package/dist/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  61. package/dist/contracts/dist/integrations/providers/gmail.js +0 -87
  62. package/dist/contracts/dist/integrations/providers/google-calendar.js +0 -66
  63. package/dist/contracts/dist/integrations/providers/index.js +0 -11
  64. package/dist/contracts/dist/integrations/providers/mistral.js +0 -68
  65. package/dist/contracts/dist/integrations/providers/postmark.js +0 -68
  66. package/dist/contracts/dist/integrations/providers/powens.js +0 -116
  67. package/dist/contracts/dist/integrations/providers/qdrant.js +0 -73
  68. package/dist/contracts/dist/integrations/providers/registry.js +0 -10
  69. package/dist/contracts/dist/integrations/providers/stripe.js +0 -83
  70. package/dist/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  71. package/dist/contracts/dist/jsonschema.js +0 -1
  72. package/dist/contracts/dist/knowledge/contracts.js +0 -306
  73. package/dist/contracts/dist/knowledge/index.js +0 -7
  74. package/dist/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  75. package/dist/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  76. package/dist/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  77. package/dist/contracts/dist/knowledge/spaces/index.js +0 -6
  78. package/dist/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  79. package/dist/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  80. package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  81. package/dist/contracts/dist/llm/exporters.js +0 -19
  82. package/dist/contracts/dist/llm/index.js +0 -2
  83. package/dist/contracts/dist/llm/prompts.js +0 -1
  84. package/dist/contracts/dist/onboarding-base.js +0 -196
  85. package/dist/contracts/dist/openapi.js +0 -1
  86. package/dist/contracts/dist/ownership.js +0 -21
  87. package/dist/contracts/dist/presentations.js +0 -1
  88. package/dist/contracts/dist/presentations.v2.js +0 -11
  89. package/dist/contracts/dist/prompt.js +0 -1
  90. package/dist/contracts/dist/promptRegistry.js +0 -1
  91. package/dist/contracts/dist/regenerator/index.js +0 -1
  92. package/dist/contracts/dist/regenerator/service.js +0 -6
  93. package/dist/contracts/dist/registry.js +0 -2
  94. package/dist/contracts/dist/resources.js +0 -1
  95. package/dist/contracts/dist/schema/dist/EnumType.js +0 -2
  96. package/dist/contracts/dist/schema/dist/FieldType.js +0 -49
  97. package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  98. package/dist/contracts/dist/schema/dist/SchemaModel.js +0 -34
  99. package/dist/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  100. package/dist/contracts/dist/schema/dist/entity/index.js +0 -2
  101. package/dist/contracts/dist/schema/dist/entity/types.js +0 -1
  102. package/dist/contracts/dist/schema/dist/index.js +0 -6
  103. package/dist/contracts/dist/server/graphql-pothos.js +0 -6
  104. package/dist/contracts/dist/server/index.js +0 -8
  105. package/dist/contracts/dist/server/mcp/createMcpServer.js +0 -4
  106. package/dist/contracts/dist/server/mcp/registerPresentations.js +0 -2
  107. package/dist/contracts/dist/server/mcp/registerPrompts.js +0 -1
  108. package/dist/contracts/dist/server/mcp/registerResources.js +0 -2
  109. package/dist/contracts/dist/server/mcp/registerTools.js +0 -1
  110. package/dist/contracts/dist/server/provider-mcp.js +0 -1
  111. package/dist/contracts/dist/server/rest-elysia.js +0 -1
  112. package/dist/contracts/dist/server/rest-express.js +0 -1
  113. package/dist/contracts/dist/server/rest-generic.js +0 -1
  114. package/dist/contracts/dist/server/rest-next-app.js +0 -1
  115. package/dist/contracts/dist/server/rest-next-pages.js +0 -1
  116. package/dist/contracts/dist/spec.js +0 -34
  117. package/dist/contracts/dist/telemetry/index.js +0 -1
  118. package/dist/contracts/dist/telemetry/tracker.js +0 -1
  119. package/dist/contracts/dist/tests/index.js +0 -1
  120. package/dist/contracts/dist/tests/runner.js +0 -2
  121. package/dist/contracts/dist/workflow/index.js +0 -1
  122. package/dist/contracts/dist/workflow/runner.js +0 -1
  123. package/dist/contracts/index.d.ts +0 -1006
  124. package/dist/docs/feature-flags.docblock.d.ts +0 -1
  125. package/dist/docs/index.d.ts +0 -1
  126. package/dist/entities/index.d.ts +0 -200
  127. package/dist/evaluation/index.d.ts +0 -162
  128. package/dist/events.d.ts +0 -624
  129. package/dist/feature-flags.feature.d.ts +0 -11
  130. package/dist/index.d.ts +0 -6
  131. package/dist/schema/dist/EnumType.js +0 -2
  132. package/dist/schema/dist/FieldType.js +0 -49
  133. package/dist/schema/dist/ScalarTypeEnum.js +0 -236
  134. package/dist/schema/dist/SchemaModel.js +0 -39
  135. package/dist/schema/dist/entity/defineEntity.js +0 -236
  136. package/dist/schema/dist/entity/index.js +0 -2
  137. package/dist/schema/dist/entity/types.js +0 -1
  138. package/dist/schema/dist/index.js +0 -6
package/dist/events.d.ts DELETED
@@ -1,624 +0,0 @@
1
- import * as _lssm_lib_schema0 from "@lssm/lib.schema";
2
- import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
3
-
4
- //#region src/events.d.ts
5
- /**
6
- * Emitted when a feature flag is created.
7
- */
8
- declare const FlagCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
9
- flagId: {
10
- type: _lssm_lib_schema0.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- key: {
14
- type: _lssm_lib_schema0.FieldType<string, string>;
15
- isOptional: false;
16
- };
17
- name: {
18
- type: _lssm_lib_schema0.FieldType<string, string>;
19
- isOptional: false;
20
- };
21
- status: {
22
- type: _lssm_lib_schema0.FieldType<string, string>;
23
- isOptional: false;
24
- };
25
- orgId: {
26
- type: _lssm_lib_schema0.FieldType<string, string>;
27
- isOptional: true;
28
- };
29
- createdBy: {
30
- type: _lssm_lib_schema0.FieldType<string, string>;
31
- isOptional: true;
32
- };
33
- createdAt: {
34
- type: _lssm_lib_schema0.FieldType<Date, string>;
35
- isOptional: false;
36
- };
37
- }>>;
38
- /**
39
- * Emitted when a feature flag is updated.
40
- */
41
- declare const FlagUpdatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
42
- flagId: {
43
- type: _lssm_lib_schema0.FieldType<string, string>;
44
- isOptional: false;
45
- };
46
- key: {
47
- type: _lssm_lib_schema0.FieldType<string, string>;
48
- isOptional: false;
49
- };
50
- changes: {
51
- type: _lssm_lib_schema0.FieldType<unknown, unknown>;
52
- isOptional: false;
53
- };
54
- updatedBy: {
55
- type: _lssm_lib_schema0.FieldType<string, string>;
56
- isOptional: true;
57
- };
58
- updatedAt: {
59
- type: _lssm_lib_schema0.FieldType<Date, string>;
60
- isOptional: false;
61
- };
62
- }>>;
63
- /**
64
- * Emitted when a feature flag is deleted.
65
- */
66
- declare const FlagDeletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
67
- flagId: {
68
- type: _lssm_lib_schema0.FieldType<string, string>;
69
- isOptional: false;
70
- };
71
- key: {
72
- type: _lssm_lib_schema0.FieldType<string, string>;
73
- isOptional: false;
74
- };
75
- deletedBy: {
76
- type: _lssm_lib_schema0.FieldType<string, string>;
77
- isOptional: true;
78
- };
79
- deletedAt: {
80
- type: _lssm_lib_schema0.FieldType<Date, string>;
81
- isOptional: false;
82
- };
83
- }>>;
84
- /**
85
- * Emitted when a feature flag status is toggled.
86
- */
87
- declare const FlagToggledEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
88
- flagId: {
89
- type: _lssm_lib_schema0.FieldType<string, string>;
90
- isOptional: false;
91
- };
92
- key: {
93
- type: _lssm_lib_schema0.FieldType<string, string>;
94
- isOptional: false;
95
- };
96
- previousStatus: {
97
- type: _lssm_lib_schema0.FieldType<string, string>;
98
- isOptional: false;
99
- };
100
- newStatus: {
101
- type: _lssm_lib_schema0.FieldType<string, string>;
102
- isOptional: false;
103
- };
104
- toggledBy: {
105
- type: _lssm_lib_schema0.FieldType<string, string>;
106
- isOptional: true;
107
- };
108
- toggledAt: {
109
- type: _lssm_lib_schema0.FieldType<Date, string>;
110
- isOptional: false;
111
- };
112
- }>>;
113
- /**
114
- * Emitted when a targeting rule is created.
115
- */
116
- declare const RuleCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
117
- ruleId: {
118
- type: _lssm_lib_schema0.FieldType<string, string>;
119
- isOptional: false;
120
- };
121
- flagId: {
122
- type: _lssm_lib_schema0.FieldType<string, string>;
123
- isOptional: false;
124
- };
125
- flagKey: {
126
- type: _lssm_lib_schema0.FieldType<string, string>;
127
- isOptional: false;
128
- };
129
- attribute: {
130
- type: _lssm_lib_schema0.FieldType<string, string>;
131
- isOptional: false;
132
- };
133
- operator: {
134
- type: _lssm_lib_schema0.FieldType<string, string>;
135
- isOptional: false;
136
- };
137
- createdAt: {
138
- type: _lssm_lib_schema0.FieldType<Date, string>;
139
- isOptional: false;
140
- };
141
- }>>;
142
- /**
143
- * Emitted when a targeting rule is deleted.
144
- */
145
- declare const RuleDeletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
146
- ruleId: {
147
- type: _lssm_lib_schema0.FieldType<string, string>;
148
- isOptional: false;
149
- };
150
- flagId: {
151
- type: _lssm_lib_schema0.FieldType<string, string>;
152
- isOptional: false;
153
- };
154
- flagKey: {
155
- type: _lssm_lib_schema0.FieldType<string, string>;
156
- isOptional: false;
157
- };
158
- deletedAt: {
159
- type: _lssm_lib_schema0.FieldType<Date, string>;
160
- isOptional: false;
161
- };
162
- }>>;
163
- /**
164
- * Emitted when an experiment is created.
165
- */
166
- declare const ExperimentCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
167
- experimentId: {
168
- type: _lssm_lib_schema0.FieldType<string, string>;
169
- isOptional: false;
170
- };
171
- key: {
172
- type: _lssm_lib_schema0.FieldType<string, string>;
173
- isOptional: false;
174
- };
175
- name: {
176
- type: _lssm_lib_schema0.FieldType<string, string>;
177
- isOptional: false;
178
- };
179
- flagId: {
180
- type: _lssm_lib_schema0.FieldType<string, string>;
181
- isOptional: false;
182
- };
183
- variants: {
184
- type: _lssm_lib_schema0.FieldType<unknown, unknown>;
185
- isOptional: false;
186
- };
187
- createdBy: {
188
- type: _lssm_lib_schema0.FieldType<string, string>;
189
- isOptional: true;
190
- };
191
- createdAt: {
192
- type: _lssm_lib_schema0.FieldType<Date, string>;
193
- isOptional: false;
194
- };
195
- }>>;
196
- /**
197
- * Emitted when an experiment starts.
198
- */
199
- declare const ExperimentStartedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
200
- experimentId: {
201
- type: _lssm_lib_schema0.FieldType<string, string>;
202
- isOptional: false;
203
- };
204
- key: {
205
- type: _lssm_lib_schema0.FieldType<string, string>;
206
- isOptional: false;
207
- };
208
- flagId: {
209
- type: _lssm_lib_schema0.FieldType<string, string>;
210
- isOptional: false;
211
- };
212
- variants: {
213
- type: _lssm_lib_schema0.FieldType<unknown, unknown>;
214
- isOptional: false;
215
- };
216
- audiencePercentage: {
217
- type: _lssm_lib_schema0.FieldType<number, number>;
218
- isOptional: false;
219
- };
220
- startedBy: {
221
- type: _lssm_lib_schema0.FieldType<string, string>;
222
- isOptional: true;
223
- };
224
- startedAt: {
225
- type: _lssm_lib_schema0.FieldType<Date, string>;
226
- isOptional: false;
227
- };
228
- }>>;
229
- /**
230
- * Emitted when an experiment stops.
231
- */
232
- declare const ExperimentStoppedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
233
- experimentId: {
234
- type: _lssm_lib_schema0.FieldType<string, string>;
235
- isOptional: false;
236
- };
237
- key: {
238
- type: _lssm_lib_schema0.FieldType<string, string>;
239
- isOptional: false;
240
- };
241
- reason: {
242
- type: _lssm_lib_schema0.FieldType<string, string>;
243
- isOptional: false;
244
- };
245
- winningVariant: {
246
- type: _lssm_lib_schema0.FieldType<string, string>;
247
- isOptional: true;
248
- };
249
- stoppedBy: {
250
- type: _lssm_lib_schema0.FieldType<string, string>;
251
- isOptional: true;
252
- };
253
- stoppedAt: {
254
- type: _lssm_lib_schema0.FieldType<Date, string>;
255
- isOptional: false;
256
- };
257
- }>>;
258
- /**
259
- * Emitted when a flag is evaluated (for analytics).
260
- */
261
- declare const FlagEvaluatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
262
- flagId: {
263
- type: _lssm_lib_schema0.FieldType<string, string>;
264
- isOptional: false;
265
- };
266
- flagKey: {
267
- type: _lssm_lib_schema0.FieldType<string, string>;
268
- isOptional: false;
269
- };
270
- subjectType: {
271
- type: _lssm_lib_schema0.FieldType<string, string>;
272
- isOptional: false;
273
- };
274
- subjectId: {
275
- type: _lssm_lib_schema0.FieldType<string, string>;
276
- isOptional: false;
277
- };
278
- result: {
279
- type: _lssm_lib_schema0.FieldType<boolean, boolean>;
280
- isOptional: false;
281
- };
282
- variant: {
283
- type: _lssm_lib_schema0.FieldType<string, string>;
284
- isOptional: true;
285
- };
286
- reason: {
287
- type: _lssm_lib_schema0.FieldType<string, string>;
288
- isOptional: false;
289
- };
290
- evaluatedAt: {
291
- type: _lssm_lib_schema0.FieldType<Date, string>;
292
- isOptional: false;
293
- };
294
- }>>;
295
- /**
296
- * Emitted when a subject is assigned to an experiment variant.
297
- */
298
- declare const VariantAssignedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
299
- experimentId: {
300
- type: _lssm_lib_schema0.FieldType<string, string>;
301
- isOptional: false;
302
- };
303
- experimentKey: {
304
- type: _lssm_lib_schema0.FieldType<string, string>;
305
- isOptional: false;
306
- };
307
- subjectType: {
308
- type: _lssm_lib_schema0.FieldType<string, string>;
309
- isOptional: false;
310
- };
311
- subjectId: {
312
- type: _lssm_lib_schema0.FieldType<string, string>;
313
- isOptional: false;
314
- };
315
- variant: {
316
- type: _lssm_lib_schema0.FieldType<string, string>;
317
- isOptional: false;
318
- };
319
- bucket: {
320
- type: _lssm_lib_schema0.FieldType<number, number>;
321
- isOptional: false;
322
- };
323
- assignedAt: {
324
- type: _lssm_lib_schema0.FieldType<Date, string>;
325
- isOptional: false;
326
- };
327
- }>>;
328
- /**
329
- * All feature flag events.
330
- */
331
- declare const FeatureFlagEvents: {
332
- FlagCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
333
- flagId: {
334
- type: _lssm_lib_schema0.FieldType<string, string>;
335
- isOptional: false;
336
- };
337
- key: {
338
- type: _lssm_lib_schema0.FieldType<string, string>;
339
- isOptional: false;
340
- };
341
- name: {
342
- type: _lssm_lib_schema0.FieldType<string, string>;
343
- isOptional: false;
344
- };
345
- status: {
346
- type: _lssm_lib_schema0.FieldType<string, string>;
347
- isOptional: false;
348
- };
349
- orgId: {
350
- type: _lssm_lib_schema0.FieldType<string, string>;
351
- isOptional: true;
352
- };
353
- createdBy: {
354
- type: _lssm_lib_schema0.FieldType<string, string>;
355
- isOptional: true;
356
- };
357
- createdAt: {
358
- type: _lssm_lib_schema0.FieldType<Date, string>;
359
- isOptional: false;
360
- };
361
- }>>;
362
- FlagUpdatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
363
- flagId: {
364
- type: _lssm_lib_schema0.FieldType<string, string>;
365
- isOptional: false;
366
- };
367
- key: {
368
- type: _lssm_lib_schema0.FieldType<string, string>;
369
- isOptional: false;
370
- };
371
- changes: {
372
- type: _lssm_lib_schema0.FieldType<unknown, unknown>;
373
- isOptional: false;
374
- };
375
- updatedBy: {
376
- type: _lssm_lib_schema0.FieldType<string, string>;
377
- isOptional: true;
378
- };
379
- updatedAt: {
380
- type: _lssm_lib_schema0.FieldType<Date, string>;
381
- isOptional: false;
382
- };
383
- }>>;
384
- FlagDeletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
385
- flagId: {
386
- type: _lssm_lib_schema0.FieldType<string, string>;
387
- isOptional: false;
388
- };
389
- key: {
390
- type: _lssm_lib_schema0.FieldType<string, string>;
391
- isOptional: false;
392
- };
393
- deletedBy: {
394
- type: _lssm_lib_schema0.FieldType<string, string>;
395
- isOptional: true;
396
- };
397
- deletedAt: {
398
- type: _lssm_lib_schema0.FieldType<Date, string>;
399
- isOptional: false;
400
- };
401
- }>>;
402
- FlagToggledEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
403
- flagId: {
404
- type: _lssm_lib_schema0.FieldType<string, string>;
405
- isOptional: false;
406
- };
407
- key: {
408
- type: _lssm_lib_schema0.FieldType<string, string>;
409
- isOptional: false;
410
- };
411
- previousStatus: {
412
- type: _lssm_lib_schema0.FieldType<string, string>;
413
- isOptional: false;
414
- };
415
- newStatus: {
416
- type: _lssm_lib_schema0.FieldType<string, string>;
417
- isOptional: false;
418
- };
419
- toggledBy: {
420
- type: _lssm_lib_schema0.FieldType<string, string>;
421
- isOptional: true;
422
- };
423
- toggledAt: {
424
- type: _lssm_lib_schema0.FieldType<Date, string>;
425
- isOptional: false;
426
- };
427
- }>>;
428
- RuleCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
429
- ruleId: {
430
- type: _lssm_lib_schema0.FieldType<string, string>;
431
- isOptional: false;
432
- };
433
- flagId: {
434
- type: _lssm_lib_schema0.FieldType<string, string>;
435
- isOptional: false;
436
- };
437
- flagKey: {
438
- type: _lssm_lib_schema0.FieldType<string, string>;
439
- isOptional: false;
440
- };
441
- attribute: {
442
- type: _lssm_lib_schema0.FieldType<string, string>;
443
- isOptional: false;
444
- };
445
- operator: {
446
- type: _lssm_lib_schema0.FieldType<string, string>;
447
- isOptional: false;
448
- };
449
- createdAt: {
450
- type: _lssm_lib_schema0.FieldType<Date, string>;
451
- isOptional: false;
452
- };
453
- }>>;
454
- RuleDeletedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
455
- ruleId: {
456
- type: _lssm_lib_schema0.FieldType<string, string>;
457
- isOptional: false;
458
- };
459
- flagId: {
460
- type: _lssm_lib_schema0.FieldType<string, string>;
461
- isOptional: false;
462
- };
463
- flagKey: {
464
- type: _lssm_lib_schema0.FieldType<string, string>;
465
- isOptional: false;
466
- };
467
- deletedAt: {
468
- type: _lssm_lib_schema0.FieldType<Date, string>;
469
- isOptional: false;
470
- };
471
- }>>;
472
- ExperimentCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
473
- experimentId: {
474
- type: _lssm_lib_schema0.FieldType<string, string>;
475
- isOptional: false;
476
- };
477
- key: {
478
- type: _lssm_lib_schema0.FieldType<string, string>;
479
- isOptional: false;
480
- };
481
- name: {
482
- type: _lssm_lib_schema0.FieldType<string, string>;
483
- isOptional: false;
484
- };
485
- flagId: {
486
- type: _lssm_lib_schema0.FieldType<string, string>;
487
- isOptional: false;
488
- };
489
- variants: {
490
- type: _lssm_lib_schema0.FieldType<unknown, unknown>;
491
- isOptional: false;
492
- };
493
- createdBy: {
494
- type: _lssm_lib_schema0.FieldType<string, string>;
495
- isOptional: true;
496
- };
497
- createdAt: {
498
- type: _lssm_lib_schema0.FieldType<Date, string>;
499
- isOptional: false;
500
- };
501
- }>>;
502
- ExperimentStartedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
503
- experimentId: {
504
- type: _lssm_lib_schema0.FieldType<string, string>;
505
- isOptional: false;
506
- };
507
- key: {
508
- type: _lssm_lib_schema0.FieldType<string, string>;
509
- isOptional: false;
510
- };
511
- flagId: {
512
- type: _lssm_lib_schema0.FieldType<string, string>;
513
- isOptional: false;
514
- };
515
- variants: {
516
- type: _lssm_lib_schema0.FieldType<unknown, unknown>;
517
- isOptional: false;
518
- };
519
- audiencePercentage: {
520
- type: _lssm_lib_schema0.FieldType<number, number>;
521
- isOptional: false;
522
- };
523
- startedBy: {
524
- type: _lssm_lib_schema0.FieldType<string, string>;
525
- isOptional: true;
526
- };
527
- startedAt: {
528
- type: _lssm_lib_schema0.FieldType<Date, string>;
529
- isOptional: false;
530
- };
531
- }>>;
532
- ExperimentStoppedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
533
- experimentId: {
534
- type: _lssm_lib_schema0.FieldType<string, string>;
535
- isOptional: false;
536
- };
537
- key: {
538
- type: _lssm_lib_schema0.FieldType<string, string>;
539
- isOptional: false;
540
- };
541
- reason: {
542
- type: _lssm_lib_schema0.FieldType<string, string>;
543
- isOptional: false;
544
- };
545
- winningVariant: {
546
- type: _lssm_lib_schema0.FieldType<string, string>;
547
- isOptional: true;
548
- };
549
- stoppedBy: {
550
- type: _lssm_lib_schema0.FieldType<string, string>;
551
- isOptional: true;
552
- };
553
- stoppedAt: {
554
- type: _lssm_lib_schema0.FieldType<Date, string>;
555
- isOptional: false;
556
- };
557
- }>>;
558
- FlagEvaluatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
559
- flagId: {
560
- type: _lssm_lib_schema0.FieldType<string, string>;
561
- isOptional: false;
562
- };
563
- flagKey: {
564
- type: _lssm_lib_schema0.FieldType<string, string>;
565
- isOptional: false;
566
- };
567
- subjectType: {
568
- type: _lssm_lib_schema0.FieldType<string, string>;
569
- isOptional: false;
570
- };
571
- subjectId: {
572
- type: _lssm_lib_schema0.FieldType<string, string>;
573
- isOptional: false;
574
- };
575
- result: {
576
- type: _lssm_lib_schema0.FieldType<boolean, boolean>;
577
- isOptional: false;
578
- };
579
- variant: {
580
- type: _lssm_lib_schema0.FieldType<string, string>;
581
- isOptional: true;
582
- };
583
- reason: {
584
- type: _lssm_lib_schema0.FieldType<string, string>;
585
- isOptional: false;
586
- };
587
- evaluatedAt: {
588
- type: _lssm_lib_schema0.FieldType<Date, string>;
589
- isOptional: false;
590
- };
591
- }>>;
592
- VariantAssignedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
593
- experimentId: {
594
- type: _lssm_lib_schema0.FieldType<string, string>;
595
- isOptional: false;
596
- };
597
- experimentKey: {
598
- type: _lssm_lib_schema0.FieldType<string, string>;
599
- isOptional: false;
600
- };
601
- subjectType: {
602
- type: _lssm_lib_schema0.FieldType<string, string>;
603
- isOptional: false;
604
- };
605
- subjectId: {
606
- type: _lssm_lib_schema0.FieldType<string, string>;
607
- isOptional: false;
608
- };
609
- variant: {
610
- type: _lssm_lib_schema0.FieldType<string, string>;
611
- isOptional: false;
612
- };
613
- bucket: {
614
- type: _lssm_lib_schema0.FieldType<number, number>;
615
- isOptional: false;
616
- };
617
- assignedAt: {
618
- type: _lssm_lib_schema0.FieldType<Date, string>;
619
- isOptional: false;
620
- };
621
- }>>;
622
- };
623
- //#endregion
624
- export { ExperimentCreatedEvent, ExperimentStartedEvent, ExperimentStoppedEvent, FeatureFlagEvents, FlagCreatedEvent, FlagDeletedEvent, FlagEvaluatedEvent, FlagToggledEvent, FlagUpdatedEvent, RuleCreatedEvent, RuleDeletedEvent, VariantAssignedEvent };
@@ -1,11 +0,0 @@
1
- import { FeatureModuleSpec } from "@lssm/lib.contracts";
2
-
3
- //#region src/feature-flags.feature.d.ts
4
-
5
- /**
6
- * Feature Flags feature module that bundles flag management,
7
- * targeting rules, and A/B experiment capabilities.
8
- */
9
- declare const FeatureFlagsFeature: FeatureModuleSpec;
10
- //#endregion
11
- export { FeatureFlagsFeature };
package/dist/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { CreateExperimentContract, CreateFlagContract, CreateRuleContract, DeleteFlagContract, DeleteRuleContract, EvaluateFlagContract, EvaluationResultModel, ExperimentModel, FeatureFlagModel, GetExperimentContract, GetFlagContract, ListFlagsContract, StartExperimentContract, StopExperimentContract, TargetingRuleModel, ToggleFlagContract, UpdateFlagContract } from "./contracts/index.js";
2
- import { ExperimentAssignmentEntity, ExperimentEntity, ExperimentStatusEnum, FeatureFlagEntity, FlagEvaluationEntity, FlagStatusEnum, FlagTargetingRuleEntity, RuleOperatorEnum, featureFlagEntities, featureFlagsSchemaContribution } from "./entities/index.js";
3
- import { EvaluationContext, EvaluationLogger, EvaluationReason, EvaluationResult, Experiment, ExperimentVariant, FeatureFlag, FlagEvaluator, FlagEvaluatorOptions, FlagRepository, InMemoryFlagRepository, RuleOperator, TargetingRule, VariantConfig, evaluateRuleCondition, getSubjectId, hashToBucket } from "./evaluation/index.js";
4
- import { ExperimentCreatedEvent, ExperimentStartedEvent, ExperimentStoppedEvent, FeatureFlagEvents, FlagCreatedEvent, FlagDeletedEvent, FlagEvaluatedEvent, FlagToggledEvent, FlagUpdatedEvent, RuleCreatedEvent, RuleDeletedEvent, VariantAssignedEvent } from "./events.js";
5
- import { FeatureFlagsFeature } from "./feature-flags.feature.js";
6
- export { CreateExperimentContract, CreateFlagContract, CreateRuleContract, DeleteFlagContract, DeleteRuleContract, EvaluateFlagContract, EvaluationContext, EvaluationLogger, EvaluationReason, EvaluationResult, EvaluationResultModel, Experiment, ExperimentAssignmentEntity, ExperimentCreatedEvent, ExperimentEntity, ExperimentModel, ExperimentStartedEvent, ExperimentStatusEnum, ExperimentStoppedEvent, ExperimentVariant, FeatureFlag, FeatureFlagEntity, FeatureFlagEvents, FeatureFlagModel, FeatureFlagsFeature, FlagCreatedEvent, FlagDeletedEvent, FlagEvaluatedEvent, FlagEvaluationEntity, FlagEvaluator, FlagEvaluatorOptions, FlagRepository, FlagStatusEnum, FlagTargetingRuleEntity, FlagToggledEvent, FlagUpdatedEvent, GetExperimentContract, GetFlagContract, InMemoryFlagRepository, ListFlagsContract, RuleCreatedEvent, RuleDeletedEvent, RuleOperator, RuleOperatorEnum, StartExperimentContract, StopExperimentContract, TargetingRule, TargetingRuleModel, ToggleFlagContract, UpdateFlagContract, VariantAssignedEvent, VariantConfig, evaluateRuleCondition, featureFlagEntities, featureFlagsSchemaContribution, getSubjectId, hashToBucket };
@@ -1,2 +0,0 @@
1
- import "zod";
2
- import "graphql";
@@ -1,49 +0,0 @@
1
- import "zod";
2
- import { GraphQLScalarType } from "graphql";
3
-
4
- //#region ../schema/dist/FieldType.js
5
- /**
6
- * GraphQL scalar wrapper that carries zod and JSON Schema metadata.
7
- *
8
- * TInternal is the runtime representation; TExternal is the GraphQL output.
9
- */
10
- var FieldType = class extends GraphQLScalarType {
11
- zodSchema;
12
- jsonSchemaDef;
13
- constructor(config) {
14
- super(config);
15
- this.zodSchema = config.zod;
16
- this.jsonSchemaDef = config.jsonSchema;
17
- }
18
- /** Return the attached zod schema for validation. */
19
- getZod() {
20
- return this.zodSchema;
21
- }
22
- /** GraphQL scalar instance usable by Pothos or vanilla GraphQL. */
23
- getPothos() {
24
- return this;
25
- }
26
- /** Return the JSON Schema (evaluates factory if provided). */
27
- getJson() {
28
- return typeof this.jsonSchemaDef === "function" ? this.jsonSchemaDef() : this.jsonSchemaDef;
29
- }
30
- getJsonSchemaDef() {
31
- return this.jsonSchemaDef;
32
- }
33
- getJsonSchema() {
34
- const deepResolve = (v) => {
35
- const value = typeof v === "function" ? v() : v;
36
- if (Array.isArray(value)) return value.map((item) => deepResolve(item));
37
- if (value && typeof value === "object") {
38
- const obj = {};
39
- for (const [k, val] of Object.entries(value)) obj[k] = deepResolve(val);
40
- return obj;
41
- }
42
- return value;
43
- };
44
- return deepResolve(this.getJson());
45
- }
46
- };
47
-
48
- //#endregion
49
- export { FieldType };