@contractspec/lib.feature-flags 1.44.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 (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +173 -0
  3. package/dist/contracts/index.d.ts +1010 -0
  4. package/dist/contracts/index.d.ts.map +1 -0
  5. package/dist/contracts/index.js +908 -0
  6. package/dist/contracts/index.js.map +1 -0
  7. package/dist/contracts/src/app-config/lifecycle.d.ts +1 -0
  8. package/dist/contracts/src/app-config/runtime.d.ts +13 -0
  9. package/dist/contracts/src/app-config/spec.d.ts +8 -0
  10. package/dist/contracts/src/app-config/validation.d.ts +8 -0
  11. package/dist/contracts/src/capabilities/capabilities.d.ts +19 -0
  12. package/dist/contracts/src/capabilities/capabilities.d.ts.map +1 -0
  13. package/dist/contracts/src/capabilities/index.d.ts +2 -0
  14. package/dist/contracts/src/capabilities/openbanking.d.ts +1 -0
  15. package/dist/contracts/src/client/index.d.ts +1 -0
  16. package/dist/contracts/src/client/react/drivers/rn-reusables.d.ts +1 -0
  17. package/dist/contracts/src/client/react/drivers/shadcn.d.ts +1 -0
  18. package/dist/contracts/src/client/react/feature-render.d.ts +3 -0
  19. package/dist/contracts/src/client/react/form-render.d.ts +4 -0
  20. package/dist/contracts/src/client/react/index.d.ts +4 -0
  21. package/dist/contracts/src/contract-registry/index.d.ts +2 -0
  22. package/dist/contracts/src/contract-registry/schemas.d.ts +2 -0
  23. package/dist/contracts/src/contract-registry/types.d.ts +1 -0
  24. package/dist/contracts/src/data-views/index.d.ts +3 -0
  25. package/dist/contracts/src/data-views/registry.d.ts +2 -0
  26. package/dist/contracts/src/data-views/spec.d.ts +2 -0
  27. package/dist/contracts/src/data-views/types.d.ts +2 -0
  28. package/dist/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.d.ts +1 -0
  29. package/dist/contracts/src/docs/index.d.ts +25 -0
  30. package/dist/contracts/src/docs/presentations.d.ts +2 -0
  31. package/dist/contracts/src/docs/registry.d.ts +10 -0
  32. package/dist/contracts/src/docs/registry.d.ts.map +1 -0
  33. package/dist/contracts/src/docs/tech/auth/better-auth-nextjs.docblock.d.ts +1 -0
  34. package/dist/contracts/src/docs/tech/contracts/openapi-export.docblock.d.ts +1 -0
  35. package/dist/contracts/src/docs/tech/contracts/openapi-import.docblock.d.ts +1 -0
  36. package/dist/contracts/src/docs/tech/lifecycle-stage-system.docblock.d.ts +1 -0
  37. package/dist/contracts/src/docs/tech/llm/llm-integration.docblock.d.ts +1 -0
  38. package/dist/contracts/src/docs/tech/mcp-endpoints.docblock.d.ts +1 -0
  39. package/dist/contracts/src/docs/tech/presentation-runtime.docblock.d.ts +1 -0
  40. package/dist/contracts/src/docs/tech/schema/README.docblock.d.ts +1 -0
  41. package/dist/contracts/src/docs/tech/studio/learning-events.docblock.d.ts +1 -0
  42. package/dist/contracts/src/docs/tech/studio/learning-journeys.docblock.d.ts +1 -0
  43. package/dist/contracts/src/docs/tech/studio/platform-admin-panel.docblock.d.ts +1 -0
  44. package/dist/contracts/src/docs/tech/studio/project-access-teams.docblock.d.ts +1 -0
  45. package/dist/contracts/src/docs/tech/studio/project-routing.docblock.d.ts +1 -0
  46. package/dist/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.d.ts +1 -0
  47. package/dist/contracts/src/docs/tech/studio/team-invitations.docblock.d.ts +1 -0
  48. package/dist/contracts/src/docs/tech/studio/workspace-ops.docblock.d.ts +1 -0
  49. package/dist/contracts/src/docs/tech/studio/workspaces.docblock.d.ts +1 -0
  50. package/dist/contracts/src/docs/tech/telemetry-ingest.docblock.d.ts +1 -0
  51. package/dist/contracts/src/docs/tech/templates/runtime.docblock.d.ts +1 -0
  52. package/dist/contracts/src/docs/tech/vscode-extension.docblock.d.ts +1 -0
  53. package/dist/contracts/src/events.d.ts +25 -0
  54. package/dist/contracts/src/events.d.ts.map +1 -0
  55. package/dist/contracts/src/experiments/evaluator.d.ts +2 -0
  56. package/dist/contracts/src/experiments/spec-resolver.d.ts +4 -0
  57. package/dist/contracts/src/experiments/spec.d.ts +12 -0
  58. package/dist/contracts/src/experiments/spec.d.ts.map +1 -0
  59. package/dist/contracts/src/features/index.d.ts +4 -0
  60. package/dist/contracts/src/features/install.d.ts +6 -0
  61. package/dist/contracts/src/features/registry.d.ts +2 -0
  62. package/dist/contracts/src/features/types.d.ts +86 -0
  63. package/dist/contracts/src/features/types.d.ts.map +1 -0
  64. package/dist/contracts/src/features/validation.d.ts +2 -0
  65. package/dist/contracts/src/forms/forms.d.ts +3 -0
  66. package/dist/contracts/src/forms/index.d.ts +1 -0
  67. package/dist/contracts/src/index.d.ts +50 -0
  68. package/dist/contracts/src/install.d.ts +7 -0
  69. package/dist/contracts/src/integrations/connection.d.ts +1 -0
  70. package/dist/contracts/src/integrations/index.d.ts +6 -0
  71. package/dist/contracts/src/integrations/openbanking/contracts/accounts.d.ts +4 -0
  72. package/dist/contracts/src/integrations/openbanking/contracts/balances.d.ts +4 -0
  73. package/dist/contracts/src/integrations/openbanking/contracts/index.d.ts +5 -0
  74. package/dist/contracts/src/integrations/openbanking/contracts/transactions.d.ts +4 -0
  75. package/dist/contracts/src/integrations/openbanking/guards.d.ts +1 -0
  76. package/dist/contracts/src/integrations/openbanking/models.d.ts +1 -0
  77. package/dist/contracts/src/integrations/openbanking/openbanking.feature.d.ts +1 -0
  78. package/dist/contracts/src/integrations/operations.d.ts +4 -0
  79. package/dist/contracts/src/integrations/providers/elevenlabs.d.ts +1 -0
  80. package/dist/contracts/src/integrations/providers/gcs-storage.d.ts +1 -0
  81. package/dist/contracts/src/integrations/providers/gmail.d.ts +1 -0
  82. package/dist/contracts/src/integrations/providers/google-calendar.d.ts +1 -0
  83. package/dist/contracts/src/integrations/providers/index.d.ts +11 -0
  84. package/dist/contracts/src/integrations/providers/mistral.d.ts +1 -0
  85. package/dist/contracts/src/integrations/providers/postmark.d.ts +1 -0
  86. package/dist/contracts/src/integrations/providers/powens.d.ts +1 -0
  87. package/dist/contracts/src/integrations/providers/qdrant.d.ts +1 -0
  88. package/dist/contracts/src/integrations/providers/registry.d.ts +1 -0
  89. package/dist/contracts/src/integrations/providers/stripe.d.ts +1 -0
  90. package/dist/contracts/src/integrations/providers/twilio-sms.d.ts +1 -0
  91. package/dist/contracts/src/integrations/spec.d.ts +2 -0
  92. package/dist/contracts/src/jsonschema.d.ts +4 -0
  93. package/dist/contracts/src/knowledge/index.d.ts +2 -0
  94. package/dist/contracts/src/knowledge/operations.d.ts +4 -0
  95. package/dist/contracts/src/knowledge/spaces/email-threads.d.ts +1 -0
  96. package/dist/contracts/src/knowledge/spaces/financial-docs.d.ts +1 -0
  97. package/dist/contracts/src/knowledge/spaces/financial-overview.d.ts +1 -0
  98. package/dist/contracts/src/knowledge/spaces/index.d.ts +6 -0
  99. package/dist/contracts/src/knowledge/spaces/product-canon.d.ts +1 -0
  100. package/dist/contracts/src/knowledge/spaces/support-faq.d.ts +1 -0
  101. package/dist/contracts/src/knowledge/spaces/uploaded-docs.d.ts +1 -0
  102. package/dist/contracts/src/knowledge/spec.d.ts +2 -0
  103. package/dist/contracts/src/llm/exporters.d.ts +7 -0
  104. package/dist/contracts/src/llm/index.d.ts +3 -0
  105. package/dist/contracts/src/llm/prompts.d.ts +2 -0
  106. package/dist/contracts/src/llm/types.d.ts +5 -0
  107. package/dist/contracts/src/migrations.d.ts +1 -0
  108. package/dist/contracts/src/model-registry.d.ts +1 -0
  109. package/dist/contracts/src/onboarding-base.d.ts +2 -0
  110. package/dist/contracts/src/openapi.d.ts +1 -0
  111. package/dist/contracts/src/operations/index.d.ts +2 -0
  112. package/dist/contracts/src/operations/operation.d.ts +170 -0
  113. package/dist/contracts/src/operations/operation.d.ts.map +1 -0
  114. package/dist/contracts/src/operations/registry.d.ts +6 -0
  115. package/dist/contracts/src/ownership.d.ts +61 -0
  116. package/dist/contracts/src/ownership.d.ts.map +1 -0
  117. package/dist/contracts/src/policy/engine.d.ts +3 -0
  118. package/dist/contracts/src/policy/index.d.ts +4 -0
  119. package/dist/contracts/src/policy/opa-adapter.d.ts +3 -0
  120. package/dist/contracts/src/policy/registry.d.ts +2 -0
  121. package/dist/contracts/src/policy/spec.d.ts +11 -0
  122. package/dist/contracts/src/policy/spec.d.ts.map +1 -0
  123. package/dist/contracts/src/presentations/index.d.ts +3 -0
  124. package/dist/contracts/src/presentations/presentations.d.ts +9 -0
  125. package/dist/contracts/src/presentations/presentations.d.ts.map +1 -0
  126. package/dist/contracts/src/presentations/registry.d.ts +2 -0
  127. package/dist/contracts/src/presentations/transform-engine.d.ts +2 -0
  128. package/dist/contracts/src/prompt.d.ts +1 -0
  129. package/dist/contracts/src/promptRegistry.d.ts +2 -0
  130. package/dist/contracts/src/regenerator/adapters.d.ts +1 -0
  131. package/dist/contracts/src/regenerator/executor.d.ts +1 -0
  132. package/dist/contracts/src/regenerator/index.d.ts +6 -0
  133. package/dist/contracts/src/regenerator/service.d.ts +2 -0
  134. package/dist/contracts/src/regenerator/sinks.d.ts +2 -0
  135. package/dist/contracts/src/regenerator/types.d.ts +3 -0
  136. package/dist/contracts/src/regenerator/utils.d.ts +1 -0
  137. package/dist/contracts/src/registry-utils.d.ts +1 -0
  138. package/dist/contracts/src/registry.d.ts +3 -0
  139. package/dist/contracts/src/resources.d.ts +19 -0
  140. package/dist/contracts/src/resources.d.ts.map +1 -0
  141. package/dist/contracts/src/schema-to-markdown.d.ts +1 -0
  142. package/dist/contracts/src/server/graphql-pothos.d.ts +7 -0
  143. package/dist/contracts/src/server/index.d.ts +7 -0
  144. package/dist/contracts/src/server/mcp/createMcpServer.d.ts +5 -0
  145. package/dist/contracts/src/server/mcp/mcpTypes.d.ts +2 -0
  146. package/dist/contracts/src/server/provider-mcp.d.ts +1 -0
  147. package/dist/contracts/src/server/rest-elysia.d.ts +3 -0
  148. package/dist/contracts/src/server/rest-express.d.ts +3 -0
  149. package/dist/contracts/src/server/rest-generic.d.ts +2 -0
  150. package/dist/contracts/src/server/rest-next-app.d.ts +3 -0
  151. package/dist/contracts/src/server/rest-next-pages.d.ts +3 -0
  152. package/dist/contracts/src/telemetry/anomaly.d.ts +2 -0
  153. package/dist/contracts/src/telemetry/index.d.ts +3 -0
  154. package/dist/contracts/src/telemetry/spec.d.ts +1 -0
  155. package/dist/contracts/src/telemetry/tracker.d.ts +2 -0
  156. package/dist/contracts/src/tests/index.d.ts +2 -0
  157. package/dist/contracts/src/tests/runner.d.ts +3 -0
  158. package/dist/contracts/src/tests/spec.d.ts +11 -0
  159. package/dist/contracts/src/tests/spec.d.ts.map +1 -0
  160. package/dist/contracts/src/themes.d.ts +1 -0
  161. package/dist/contracts/src/types.d.ts +5 -0
  162. package/dist/contracts/src/workflow/adapters/db-adapter.d.ts +1 -0
  163. package/dist/contracts/src/workflow/adapters/file-adapter.d.ts +1 -0
  164. package/dist/contracts/src/workflow/adapters/index.d.ts +3 -0
  165. package/dist/contracts/src/workflow/adapters/memory-store.d.ts +1 -0
  166. package/dist/contracts/src/workflow/index.d.ts +5 -0
  167. package/dist/contracts/src/workflow/overview.docblock.d.ts +1 -0
  168. package/dist/contracts/src/workflow/runner.d.ts +5 -0
  169. package/dist/contracts/src/workflow/spec.d.ts +5 -0
  170. package/dist/contracts/src/workflow/state.d.ts +1 -0
  171. package/dist/contracts/src/workflow/validation.d.ts +3 -0
  172. package/dist/contracts/src/workspace-config/contractsrc-schema.d.ts +1 -0
  173. package/dist/contracts/src/workspace-config/index.d.ts +1 -0
  174. package/dist/contracts/src/workspace-config/workspace-config.docblock.d.ts +1 -0
  175. package/dist/docs/feature-flags.docblock.d.ts +1 -0
  176. package/dist/docs/feature-flags.docblock.js +76 -0
  177. package/dist/docs/feature-flags.docblock.js.map +1 -0
  178. package/dist/docs/index.d.ts +1 -0
  179. package/dist/docs/index.js +1 -0
  180. package/dist/entities/index.d.ts +201 -0
  181. package/dist/entities/index.d.ts.map +1 -0
  182. package/dist/entities/index.js +325 -0
  183. package/dist/entities/index.js.map +1 -0
  184. package/dist/evaluation/index.d.ts +163 -0
  185. package/dist/evaluation/index.d.ts.map +1 -0
  186. package/dist/evaluation/index.js +221 -0
  187. package/dist/evaluation/index.js.map +1 -0
  188. package/dist/events.d.ts +628 -0
  189. package/dist/events.d.ts.map +1 -0
  190. package/dist/events.js +536 -0
  191. package/dist/events.js.map +1 -0
  192. package/dist/feature-flags.feature.d.ts +13 -0
  193. package/dist/feature-flags.feature.d.ts.map +1 -0
  194. package/dist/feature-flags.feature.js +141 -0
  195. package/dist/feature-flags.feature.js.map +1 -0
  196. package/dist/index.d.ts +6 -0
  197. package/dist/index.js +8 -0
  198. package/dist/schema/src/EnumType.d.ts +36 -0
  199. package/dist/schema/src/EnumType.d.ts.map +1 -0
  200. package/dist/schema/src/FieldType.d.ts +30 -0
  201. package/dist/schema/src/FieldType.d.ts.map +1 -0
  202. package/dist/schema/src/GraphQLSchemaType.d.ts +2 -0
  203. package/dist/schema/src/JsonSchemaType.d.ts +2 -0
  204. package/dist/schema/src/ScalarTypeEnum.d.ts +1 -0
  205. package/dist/schema/src/SchemaModel.d.ts +70 -0
  206. package/dist/schema/src/SchemaModel.d.ts.map +1 -0
  207. package/dist/schema/src/SchemaModelType.d.ts +38 -0
  208. package/dist/schema/src/SchemaModelType.d.ts.map +1 -0
  209. package/dist/schema/src/ZodSchemaType.d.ts +2 -0
  210. package/dist/schema/src/entity/defineEntity.d.ts +1 -0
  211. package/dist/schema/src/entity/generator.d.ts +1 -0
  212. package/dist/schema/src/entity/index.d.ts +3 -0
  213. package/dist/schema/src/entity/types.d.ts +146 -0
  214. package/dist/schema/src/entity/types.d.ts.map +1 -0
  215. package/dist/schema/src/index.d.ts +10 -0
  216. package/package.json +68 -0
@@ -0,0 +1,1010 @@
1
+ import { FieldType } from "../schema/src/FieldType.js";
2
+ import { SchemaModel } from "../schema/src/SchemaModel.js";
3
+ import "../schema/src/index.js";
4
+ import { OperationSpec } from "./src/operations/operation.js";
5
+ import "./src/index.js";
6
+
7
+ //#region src/contracts/index.d.ts
8
+ declare const FeatureFlagModel: SchemaModel<{
9
+ id: {
10
+ type: FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ key: {
14
+ type: FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ name: {
18
+ type: FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ description: {
22
+ type: FieldType<string, string>;
23
+ isOptional: true;
24
+ };
25
+ status: {
26
+ type: FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ defaultValue: {
30
+ type: FieldType<boolean, boolean>;
31
+ isOptional: false;
32
+ };
33
+ variants: {
34
+ type: FieldType<unknown, unknown>;
35
+ isOptional: true;
36
+ };
37
+ orgId: {
38
+ type: FieldType<string, string>;
39
+ isOptional: true;
40
+ };
41
+ tags: {
42
+ type: FieldType<unknown, unknown>;
43
+ isOptional: true;
44
+ };
45
+ createdAt: {
46
+ type: FieldType<Date, string>;
47
+ isOptional: false;
48
+ };
49
+ updatedAt: {
50
+ type: FieldType<Date, string>;
51
+ isOptional: false;
52
+ };
53
+ }>;
54
+ declare const TargetingRuleModel: SchemaModel<{
55
+ id: {
56
+ type: FieldType<string, string>;
57
+ isOptional: false;
58
+ };
59
+ flagId: {
60
+ type: FieldType<string, string>;
61
+ isOptional: false;
62
+ };
63
+ name: {
64
+ type: FieldType<string, string>;
65
+ isOptional: true;
66
+ };
67
+ priority: {
68
+ type: FieldType<number, number>;
69
+ isOptional: false;
70
+ };
71
+ enabled: {
72
+ type: FieldType<boolean, boolean>;
73
+ isOptional: false;
74
+ };
75
+ attribute: {
76
+ type: FieldType<string, string>;
77
+ isOptional: false;
78
+ };
79
+ operator: {
80
+ type: FieldType<string, string>;
81
+ isOptional: false;
82
+ };
83
+ value: {
84
+ type: FieldType<unknown, unknown>;
85
+ isOptional: false;
86
+ };
87
+ rolloutPercentage: {
88
+ type: FieldType<number, number>;
89
+ isOptional: true;
90
+ };
91
+ serveValue: {
92
+ type: FieldType<boolean, boolean>;
93
+ isOptional: true;
94
+ };
95
+ serveVariant: {
96
+ type: FieldType<string, string>;
97
+ isOptional: true;
98
+ };
99
+ }>;
100
+ declare const ExperimentModel: SchemaModel<{
101
+ id: {
102
+ type: FieldType<string, string>;
103
+ isOptional: false;
104
+ };
105
+ key: {
106
+ type: FieldType<string, string>;
107
+ isOptional: false;
108
+ };
109
+ name: {
110
+ type: FieldType<string, string>;
111
+ isOptional: false;
112
+ };
113
+ description: {
114
+ type: FieldType<string, string>;
115
+ isOptional: true;
116
+ };
117
+ hypothesis: {
118
+ type: FieldType<string, string>;
119
+ isOptional: true;
120
+ };
121
+ flagId: {
122
+ type: FieldType<string, string>;
123
+ isOptional: false;
124
+ };
125
+ status: {
126
+ type: FieldType<string, string>;
127
+ isOptional: false;
128
+ };
129
+ variants: {
130
+ type: FieldType<unknown, unknown>;
131
+ isOptional: false;
132
+ };
133
+ metrics: {
134
+ type: FieldType<unknown, unknown>;
135
+ isOptional: true;
136
+ };
137
+ audiencePercentage: {
138
+ type: FieldType<number, number>;
139
+ isOptional: false;
140
+ };
141
+ startedAt: {
142
+ type: FieldType<Date, string>;
143
+ isOptional: true;
144
+ };
145
+ endedAt: {
146
+ type: FieldType<Date, string>;
147
+ isOptional: true;
148
+ };
149
+ winningVariant: {
150
+ type: FieldType<string, string>;
151
+ isOptional: true;
152
+ };
153
+ results: {
154
+ type: FieldType<unknown, unknown>;
155
+ isOptional: true;
156
+ };
157
+ createdAt: {
158
+ type: FieldType<Date, string>;
159
+ isOptional: false;
160
+ };
161
+ }>;
162
+ declare const EvaluationResultModel: SchemaModel<{
163
+ enabled: {
164
+ type: FieldType<boolean, boolean>;
165
+ isOptional: false;
166
+ };
167
+ variant: {
168
+ type: FieldType<string, string>;
169
+ isOptional: true;
170
+ };
171
+ reason: {
172
+ type: FieldType<string, string>;
173
+ isOptional: false;
174
+ };
175
+ ruleId: {
176
+ type: FieldType<string, string>;
177
+ isOptional: true;
178
+ };
179
+ experimentId: {
180
+ type: FieldType<string, string>;
181
+ isOptional: true;
182
+ };
183
+ }>;
184
+ /**
185
+ * Create a feature flag.
186
+ */
187
+ declare const CreateFlagContract: OperationSpec<SchemaModel<{
188
+ key: {
189
+ type: FieldType<string, string>;
190
+ isOptional: false;
191
+ };
192
+ name: {
193
+ type: FieldType<string, string>;
194
+ isOptional: false;
195
+ };
196
+ description: {
197
+ type: FieldType<string, string>;
198
+ isOptional: true;
199
+ };
200
+ defaultValue: {
201
+ type: FieldType<boolean, boolean>;
202
+ isOptional: true;
203
+ };
204
+ variants: {
205
+ type: FieldType<unknown, unknown>;
206
+ isOptional: true;
207
+ };
208
+ orgId: {
209
+ type: FieldType<string, string>;
210
+ isOptional: true;
211
+ };
212
+ tags: {
213
+ type: FieldType<unknown, unknown>;
214
+ isOptional: true;
215
+ };
216
+ }>, SchemaModel<{
217
+ id: {
218
+ type: FieldType<string, string>;
219
+ isOptional: false;
220
+ };
221
+ key: {
222
+ type: FieldType<string, string>;
223
+ isOptional: false;
224
+ };
225
+ name: {
226
+ type: FieldType<string, string>;
227
+ isOptional: false;
228
+ };
229
+ description: {
230
+ type: FieldType<string, string>;
231
+ isOptional: true;
232
+ };
233
+ status: {
234
+ type: FieldType<string, string>;
235
+ isOptional: false;
236
+ };
237
+ defaultValue: {
238
+ type: FieldType<boolean, boolean>;
239
+ isOptional: false;
240
+ };
241
+ variants: {
242
+ type: FieldType<unknown, unknown>;
243
+ isOptional: true;
244
+ };
245
+ orgId: {
246
+ type: FieldType<string, string>;
247
+ isOptional: true;
248
+ };
249
+ tags: {
250
+ type: FieldType<unknown, unknown>;
251
+ isOptional: true;
252
+ };
253
+ createdAt: {
254
+ type: FieldType<Date, string>;
255
+ isOptional: false;
256
+ };
257
+ updatedAt: {
258
+ type: FieldType<Date, string>;
259
+ isOptional: false;
260
+ };
261
+ }>, undefined>;
262
+ /**
263
+ * Update a feature flag.
264
+ */
265
+ declare const UpdateFlagContract: OperationSpec<SchemaModel<{
266
+ flagId: {
267
+ type: FieldType<string, string>;
268
+ isOptional: false;
269
+ };
270
+ name: {
271
+ type: FieldType<string, string>;
272
+ isOptional: true;
273
+ };
274
+ description: {
275
+ type: FieldType<string, string>;
276
+ isOptional: true;
277
+ };
278
+ defaultValue: {
279
+ type: FieldType<boolean, boolean>;
280
+ isOptional: true;
281
+ };
282
+ variants: {
283
+ type: FieldType<unknown, unknown>;
284
+ isOptional: true;
285
+ };
286
+ tags: {
287
+ type: FieldType<unknown, unknown>;
288
+ isOptional: true;
289
+ };
290
+ }>, SchemaModel<{
291
+ id: {
292
+ type: FieldType<string, string>;
293
+ isOptional: false;
294
+ };
295
+ key: {
296
+ type: FieldType<string, string>;
297
+ isOptional: false;
298
+ };
299
+ name: {
300
+ type: FieldType<string, string>;
301
+ isOptional: false;
302
+ };
303
+ description: {
304
+ type: FieldType<string, string>;
305
+ isOptional: true;
306
+ };
307
+ status: {
308
+ type: FieldType<string, string>;
309
+ isOptional: false;
310
+ };
311
+ defaultValue: {
312
+ type: FieldType<boolean, boolean>;
313
+ isOptional: false;
314
+ };
315
+ variants: {
316
+ type: FieldType<unknown, unknown>;
317
+ isOptional: true;
318
+ };
319
+ orgId: {
320
+ type: FieldType<string, string>;
321
+ isOptional: true;
322
+ };
323
+ tags: {
324
+ type: FieldType<unknown, unknown>;
325
+ isOptional: true;
326
+ };
327
+ createdAt: {
328
+ type: FieldType<Date, string>;
329
+ isOptional: false;
330
+ };
331
+ updatedAt: {
332
+ type: FieldType<Date, string>;
333
+ isOptional: false;
334
+ };
335
+ }>, undefined>;
336
+ /**
337
+ * Delete a feature flag.
338
+ */
339
+ declare const DeleteFlagContract: OperationSpec<SchemaModel<{
340
+ flagId: {
341
+ type: FieldType<string, string>;
342
+ isOptional: false;
343
+ };
344
+ }>, SchemaModel<{
345
+ success: {
346
+ type: FieldType<boolean, boolean>;
347
+ isOptional: false;
348
+ };
349
+ }>, undefined>;
350
+ /**
351
+ * Toggle a feature flag status.
352
+ */
353
+ declare const ToggleFlagContract: OperationSpec<SchemaModel<{
354
+ flagId: {
355
+ type: FieldType<string, string>;
356
+ isOptional: false;
357
+ };
358
+ status: {
359
+ type: FieldType<string, string>;
360
+ isOptional: false;
361
+ };
362
+ }>, SchemaModel<{
363
+ id: {
364
+ type: FieldType<string, string>;
365
+ isOptional: false;
366
+ };
367
+ key: {
368
+ type: FieldType<string, string>;
369
+ isOptional: false;
370
+ };
371
+ name: {
372
+ type: FieldType<string, string>;
373
+ isOptional: false;
374
+ };
375
+ description: {
376
+ type: FieldType<string, string>;
377
+ isOptional: true;
378
+ };
379
+ status: {
380
+ type: FieldType<string, string>;
381
+ isOptional: false;
382
+ };
383
+ defaultValue: {
384
+ type: FieldType<boolean, boolean>;
385
+ isOptional: false;
386
+ };
387
+ variants: {
388
+ type: FieldType<unknown, unknown>;
389
+ isOptional: true;
390
+ };
391
+ orgId: {
392
+ type: FieldType<string, string>;
393
+ isOptional: true;
394
+ };
395
+ tags: {
396
+ type: FieldType<unknown, unknown>;
397
+ isOptional: true;
398
+ };
399
+ createdAt: {
400
+ type: FieldType<Date, string>;
401
+ isOptional: false;
402
+ };
403
+ updatedAt: {
404
+ type: FieldType<Date, string>;
405
+ isOptional: false;
406
+ };
407
+ }>, undefined>;
408
+ /**
409
+ * Get a feature flag by key.
410
+ */
411
+ declare const GetFlagContract: OperationSpec<SchemaModel<{
412
+ key: {
413
+ type: FieldType<string, string>;
414
+ isOptional: false;
415
+ };
416
+ orgId: {
417
+ type: FieldType<string, string>;
418
+ isOptional: true;
419
+ };
420
+ }>, SchemaModel<{
421
+ id: {
422
+ type: FieldType<string, string>;
423
+ isOptional: false;
424
+ };
425
+ key: {
426
+ type: FieldType<string, string>;
427
+ isOptional: false;
428
+ };
429
+ name: {
430
+ type: FieldType<string, string>;
431
+ isOptional: false;
432
+ };
433
+ description: {
434
+ type: FieldType<string, string>;
435
+ isOptional: true;
436
+ };
437
+ status: {
438
+ type: FieldType<string, string>;
439
+ isOptional: false;
440
+ };
441
+ defaultValue: {
442
+ type: FieldType<boolean, boolean>;
443
+ isOptional: false;
444
+ };
445
+ variants: {
446
+ type: FieldType<unknown, unknown>;
447
+ isOptional: true;
448
+ };
449
+ orgId: {
450
+ type: FieldType<string, string>;
451
+ isOptional: true;
452
+ };
453
+ tags: {
454
+ type: FieldType<unknown, unknown>;
455
+ isOptional: true;
456
+ };
457
+ createdAt: {
458
+ type: FieldType<Date, string>;
459
+ isOptional: false;
460
+ };
461
+ updatedAt: {
462
+ type: FieldType<Date, string>;
463
+ isOptional: false;
464
+ };
465
+ }>, undefined>;
466
+ /**
467
+ * List feature flags.
468
+ */
469
+ declare const ListFlagsContract: OperationSpec<SchemaModel<{
470
+ orgId: {
471
+ type: FieldType<string, string>;
472
+ isOptional: true;
473
+ };
474
+ status: {
475
+ type: FieldType<string, string>;
476
+ isOptional: true;
477
+ };
478
+ tags: {
479
+ type: FieldType<unknown, unknown>;
480
+ isOptional: true;
481
+ };
482
+ limit: {
483
+ type: FieldType<number, number>;
484
+ isOptional: true;
485
+ };
486
+ offset: {
487
+ type: FieldType<number, number>;
488
+ isOptional: true;
489
+ };
490
+ }>, SchemaModel<{
491
+ flags: {
492
+ type: SchemaModel<{
493
+ id: {
494
+ type: FieldType<string, string>;
495
+ isOptional: false;
496
+ };
497
+ key: {
498
+ type: FieldType<string, string>;
499
+ isOptional: false;
500
+ };
501
+ name: {
502
+ type: FieldType<string, string>;
503
+ isOptional: false;
504
+ };
505
+ description: {
506
+ type: FieldType<string, string>;
507
+ isOptional: true;
508
+ };
509
+ status: {
510
+ type: FieldType<string, string>;
511
+ isOptional: false;
512
+ };
513
+ defaultValue: {
514
+ type: FieldType<boolean, boolean>;
515
+ isOptional: false;
516
+ };
517
+ variants: {
518
+ type: FieldType<unknown, unknown>;
519
+ isOptional: true;
520
+ };
521
+ orgId: {
522
+ type: FieldType<string, string>;
523
+ isOptional: true;
524
+ };
525
+ tags: {
526
+ type: FieldType<unknown, unknown>;
527
+ isOptional: true;
528
+ };
529
+ createdAt: {
530
+ type: FieldType<Date, string>;
531
+ isOptional: false;
532
+ };
533
+ updatedAt: {
534
+ type: FieldType<Date, string>;
535
+ isOptional: false;
536
+ };
537
+ }>;
538
+ isArray: true;
539
+ isOptional: false;
540
+ };
541
+ total: {
542
+ type: FieldType<number, number>;
543
+ isOptional: false;
544
+ };
545
+ }>, undefined>;
546
+ /**
547
+ * Evaluate a feature flag.
548
+ */
549
+ declare const EvaluateFlagContract: OperationSpec<SchemaModel<{
550
+ key: {
551
+ type: FieldType<string, string>;
552
+ isOptional: false;
553
+ };
554
+ context: {
555
+ type: FieldType<unknown, unknown>;
556
+ isOptional: false;
557
+ };
558
+ }>, SchemaModel<{
559
+ enabled: {
560
+ type: FieldType<boolean, boolean>;
561
+ isOptional: false;
562
+ };
563
+ variant: {
564
+ type: FieldType<string, string>;
565
+ isOptional: true;
566
+ };
567
+ reason: {
568
+ type: FieldType<string, string>;
569
+ isOptional: false;
570
+ };
571
+ ruleId: {
572
+ type: FieldType<string, string>;
573
+ isOptional: true;
574
+ };
575
+ experimentId: {
576
+ type: FieldType<string, string>;
577
+ isOptional: true;
578
+ };
579
+ }>, undefined>;
580
+ /**
581
+ * Create a targeting rule.
582
+ */
583
+ declare const CreateRuleContract: OperationSpec<SchemaModel<{
584
+ flagId: {
585
+ type: FieldType<string, string>;
586
+ isOptional: false;
587
+ };
588
+ name: {
589
+ type: FieldType<string, string>;
590
+ isOptional: true;
591
+ };
592
+ priority: {
593
+ type: FieldType<number, number>;
594
+ isOptional: true;
595
+ };
596
+ attribute: {
597
+ type: FieldType<string, string>;
598
+ isOptional: false;
599
+ };
600
+ operator: {
601
+ type: FieldType<string, string>;
602
+ isOptional: false;
603
+ };
604
+ value: {
605
+ type: FieldType<unknown, unknown>;
606
+ isOptional: false;
607
+ };
608
+ rolloutPercentage: {
609
+ type: FieldType<number, number>;
610
+ isOptional: true;
611
+ };
612
+ serveValue: {
613
+ type: FieldType<boolean, boolean>;
614
+ isOptional: true;
615
+ };
616
+ serveVariant: {
617
+ type: FieldType<string, string>;
618
+ isOptional: true;
619
+ };
620
+ }>, SchemaModel<{
621
+ id: {
622
+ type: FieldType<string, string>;
623
+ isOptional: false;
624
+ };
625
+ flagId: {
626
+ type: FieldType<string, string>;
627
+ isOptional: false;
628
+ };
629
+ name: {
630
+ type: FieldType<string, string>;
631
+ isOptional: true;
632
+ };
633
+ priority: {
634
+ type: FieldType<number, number>;
635
+ isOptional: false;
636
+ };
637
+ enabled: {
638
+ type: FieldType<boolean, boolean>;
639
+ isOptional: false;
640
+ };
641
+ attribute: {
642
+ type: FieldType<string, string>;
643
+ isOptional: false;
644
+ };
645
+ operator: {
646
+ type: FieldType<string, string>;
647
+ isOptional: false;
648
+ };
649
+ value: {
650
+ type: FieldType<unknown, unknown>;
651
+ isOptional: false;
652
+ };
653
+ rolloutPercentage: {
654
+ type: FieldType<number, number>;
655
+ isOptional: true;
656
+ };
657
+ serveValue: {
658
+ type: FieldType<boolean, boolean>;
659
+ isOptional: true;
660
+ };
661
+ serveVariant: {
662
+ type: FieldType<string, string>;
663
+ isOptional: true;
664
+ };
665
+ }>, undefined>;
666
+ /**
667
+ * Delete a targeting rule.
668
+ */
669
+ declare const DeleteRuleContract: OperationSpec<SchemaModel<{
670
+ ruleId: {
671
+ type: FieldType<string, string>;
672
+ isOptional: false;
673
+ };
674
+ }>, SchemaModel<{
675
+ success: {
676
+ type: FieldType<boolean, boolean>;
677
+ isOptional: false;
678
+ };
679
+ }>, undefined>;
680
+ /**
681
+ * Create an experiment.
682
+ */
683
+ declare const CreateExperimentContract: OperationSpec<SchemaModel<{
684
+ key: {
685
+ type: FieldType<string, string>;
686
+ isOptional: false;
687
+ };
688
+ name: {
689
+ type: FieldType<string, string>;
690
+ isOptional: false;
691
+ };
692
+ description: {
693
+ type: FieldType<string, string>;
694
+ isOptional: true;
695
+ };
696
+ hypothesis: {
697
+ type: FieldType<string, string>;
698
+ isOptional: true;
699
+ };
700
+ flagId: {
701
+ type: FieldType<string, string>;
702
+ isOptional: false;
703
+ };
704
+ variants: {
705
+ type: FieldType<unknown, unknown>;
706
+ isOptional: false;
707
+ };
708
+ metrics: {
709
+ type: FieldType<unknown, unknown>;
710
+ isOptional: true;
711
+ };
712
+ audiencePercentage: {
713
+ type: FieldType<number, number>;
714
+ isOptional: true;
715
+ };
716
+ scheduledStartAt: {
717
+ type: FieldType<Date, string>;
718
+ isOptional: true;
719
+ };
720
+ scheduledEndAt: {
721
+ type: FieldType<Date, string>;
722
+ isOptional: true;
723
+ };
724
+ orgId: {
725
+ type: FieldType<string, string>;
726
+ isOptional: true;
727
+ };
728
+ }>, SchemaModel<{
729
+ id: {
730
+ type: FieldType<string, string>;
731
+ isOptional: false;
732
+ };
733
+ key: {
734
+ type: FieldType<string, string>;
735
+ isOptional: false;
736
+ };
737
+ name: {
738
+ type: FieldType<string, string>;
739
+ isOptional: false;
740
+ };
741
+ description: {
742
+ type: FieldType<string, string>;
743
+ isOptional: true;
744
+ };
745
+ hypothesis: {
746
+ type: FieldType<string, string>;
747
+ isOptional: true;
748
+ };
749
+ flagId: {
750
+ type: FieldType<string, string>;
751
+ isOptional: false;
752
+ };
753
+ status: {
754
+ type: FieldType<string, string>;
755
+ isOptional: false;
756
+ };
757
+ variants: {
758
+ type: FieldType<unknown, unknown>;
759
+ isOptional: false;
760
+ };
761
+ metrics: {
762
+ type: FieldType<unknown, unknown>;
763
+ isOptional: true;
764
+ };
765
+ audiencePercentage: {
766
+ type: FieldType<number, number>;
767
+ isOptional: false;
768
+ };
769
+ startedAt: {
770
+ type: FieldType<Date, string>;
771
+ isOptional: true;
772
+ };
773
+ endedAt: {
774
+ type: FieldType<Date, string>;
775
+ isOptional: true;
776
+ };
777
+ winningVariant: {
778
+ type: FieldType<string, string>;
779
+ isOptional: true;
780
+ };
781
+ results: {
782
+ type: FieldType<unknown, unknown>;
783
+ isOptional: true;
784
+ };
785
+ createdAt: {
786
+ type: FieldType<Date, string>;
787
+ isOptional: false;
788
+ };
789
+ }>, undefined>;
790
+ /**
791
+ * Start an experiment.
792
+ */
793
+ declare const StartExperimentContract: OperationSpec<SchemaModel<{
794
+ experimentId: {
795
+ type: FieldType<string, string>;
796
+ isOptional: false;
797
+ };
798
+ }>, SchemaModel<{
799
+ id: {
800
+ type: FieldType<string, string>;
801
+ isOptional: false;
802
+ };
803
+ key: {
804
+ type: FieldType<string, string>;
805
+ isOptional: false;
806
+ };
807
+ name: {
808
+ type: FieldType<string, string>;
809
+ isOptional: false;
810
+ };
811
+ description: {
812
+ type: FieldType<string, string>;
813
+ isOptional: true;
814
+ };
815
+ hypothesis: {
816
+ type: FieldType<string, string>;
817
+ isOptional: true;
818
+ };
819
+ flagId: {
820
+ type: FieldType<string, string>;
821
+ isOptional: false;
822
+ };
823
+ status: {
824
+ type: FieldType<string, string>;
825
+ isOptional: false;
826
+ };
827
+ variants: {
828
+ type: FieldType<unknown, unknown>;
829
+ isOptional: false;
830
+ };
831
+ metrics: {
832
+ type: FieldType<unknown, unknown>;
833
+ isOptional: true;
834
+ };
835
+ audiencePercentage: {
836
+ type: FieldType<number, number>;
837
+ isOptional: false;
838
+ };
839
+ startedAt: {
840
+ type: FieldType<Date, string>;
841
+ isOptional: true;
842
+ };
843
+ endedAt: {
844
+ type: FieldType<Date, string>;
845
+ isOptional: true;
846
+ };
847
+ winningVariant: {
848
+ type: FieldType<string, string>;
849
+ isOptional: true;
850
+ };
851
+ results: {
852
+ type: FieldType<unknown, unknown>;
853
+ isOptional: true;
854
+ };
855
+ createdAt: {
856
+ type: FieldType<Date, string>;
857
+ isOptional: false;
858
+ };
859
+ }>, undefined>;
860
+ /**
861
+ * Stop an experiment.
862
+ */
863
+ declare const StopExperimentContract: OperationSpec<SchemaModel<{
864
+ experimentId: {
865
+ type: FieldType<string, string>;
866
+ isOptional: false;
867
+ };
868
+ reason: {
869
+ type: FieldType<string, string>;
870
+ isOptional: false;
871
+ };
872
+ winningVariant: {
873
+ type: FieldType<string, string>;
874
+ isOptional: true;
875
+ };
876
+ }>, SchemaModel<{
877
+ id: {
878
+ type: FieldType<string, string>;
879
+ isOptional: false;
880
+ };
881
+ key: {
882
+ type: FieldType<string, string>;
883
+ isOptional: false;
884
+ };
885
+ name: {
886
+ type: FieldType<string, string>;
887
+ isOptional: false;
888
+ };
889
+ description: {
890
+ type: FieldType<string, string>;
891
+ isOptional: true;
892
+ };
893
+ hypothesis: {
894
+ type: FieldType<string, string>;
895
+ isOptional: true;
896
+ };
897
+ flagId: {
898
+ type: FieldType<string, string>;
899
+ isOptional: false;
900
+ };
901
+ status: {
902
+ type: FieldType<string, string>;
903
+ isOptional: false;
904
+ };
905
+ variants: {
906
+ type: FieldType<unknown, unknown>;
907
+ isOptional: false;
908
+ };
909
+ metrics: {
910
+ type: FieldType<unknown, unknown>;
911
+ isOptional: true;
912
+ };
913
+ audiencePercentage: {
914
+ type: FieldType<number, number>;
915
+ isOptional: false;
916
+ };
917
+ startedAt: {
918
+ type: FieldType<Date, string>;
919
+ isOptional: true;
920
+ };
921
+ endedAt: {
922
+ type: FieldType<Date, string>;
923
+ isOptional: true;
924
+ };
925
+ winningVariant: {
926
+ type: FieldType<string, string>;
927
+ isOptional: true;
928
+ };
929
+ results: {
930
+ type: FieldType<unknown, unknown>;
931
+ isOptional: true;
932
+ };
933
+ createdAt: {
934
+ type: FieldType<Date, string>;
935
+ isOptional: false;
936
+ };
937
+ }>, undefined>;
938
+ /**
939
+ * Get an experiment.
940
+ */
941
+ declare const GetExperimentContract: OperationSpec<SchemaModel<{
942
+ experimentId: {
943
+ type: FieldType<string, string>;
944
+ isOptional: false;
945
+ };
946
+ }>, SchemaModel<{
947
+ id: {
948
+ type: FieldType<string, string>;
949
+ isOptional: false;
950
+ };
951
+ key: {
952
+ type: FieldType<string, string>;
953
+ isOptional: false;
954
+ };
955
+ name: {
956
+ type: FieldType<string, string>;
957
+ isOptional: false;
958
+ };
959
+ description: {
960
+ type: FieldType<string, string>;
961
+ isOptional: true;
962
+ };
963
+ hypothesis: {
964
+ type: FieldType<string, string>;
965
+ isOptional: true;
966
+ };
967
+ flagId: {
968
+ type: FieldType<string, string>;
969
+ isOptional: false;
970
+ };
971
+ status: {
972
+ type: FieldType<string, string>;
973
+ isOptional: false;
974
+ };
975
+ variants: {
976
+ type: FieldType<unknown, unknown>;
977
+ isOptional: false;
978
+ };
979
+ metrics: {
980
+ type: FieldType<unknown, unknown>;
981
+ isOptional: true;
982
+ };
983
+ audiencePercentage: {
984
+ type: FieldType<number, number>;
985
+ isOptional: false;
986
+ };
987
+ startedAt: {
988
+ type: FieldType<Date, string>;
989
+ isOptional: true;
990
+ };
991
+ endedAt: {
992
+ type: FieldType<Date, string>;
993
+ isOptional: true;
994
+ };
995
+ winningVariant: {
996
+ type: FieldType<string, string>;
997
+ isOptional: true;
998
+ };
999
+ results: {
1000
+ type: FieldType<unknown, unknown>;
1001
+ isOptional: true;
1002
+ };
1003
+ createdAt: {
1004
+ type: FieldType<Date, string>;
1005
+ isOptional: false;
1006
+ };
1007
+ }>, undefined>;
1008
+ //#endregion
1009
+ export { CreateExperimentContract, CreateFlagContract, CreateRuleContract, DeleteFlagContract, DeleteRuleContract, EvaluateFlagContract, EvaluationResultModel, ExperimentModel, FeatureFlagModel, GetExperimentContract, GetFlagContract, ListFlagsContract, StartExperimentContract, StopExperimentContract, TargetingRuleModel, ToggleFlagContract, UpdateFlagContract };
1010
+ //# sourceMappingURL=index.d.ts.map