@capivv/mcp-server 0.2.0 → 0.5.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 (100) hide show
  1. package/dist/client.d.ts +48 -1
  2. package/dist/client.js +175 -0
  3. package/dist/tools/approve-change-request.d.ts +3 -0
  4. package/dist/tools/approve-change-request.js +16 -0
  5. package/dist/tools/archive-app.d.ts +3 -0
  6. package/dist/tools/archive-app.js +9 -0
  7. package/dist/tools/check-drift.d.ts +3 -0
  8. package/dist/tools/check-drift.js +21 -0
  9. package/dist/tools/create-experiment.d.ts +3 -0
  10. package/dist/tools/create-experiment.js +43 -0
  11. package/dist/tools/create-paywall.d.ts +3 -0
  12. package/dist/tools/create-paywall.js +18 -0
  13. package/dist/tools/create-pricing-strategy.d.ts +3 -0
  14. package/dist/tools/create-pricing-strategy.js +49 -0
  15. package/dist/tools/create-product.js +43 -8
  16. package/dist/tools/create-promotion.d.ts +3 -0
  17. package/dist/tools/create-promotion.js +35 -0
  18. package/dist/tools/create-rescue-flow.d.ts +3 -0
  19. package/dist/tools/create-rescue-flow.js +20 -0
  20. package/dist/tools/delete-app.d.ts +3 -0
  21. package/dist/tools/delete-app.js +9 -0
  22. package/dist/tools/delete-entitlement.d.ts +3 -0
  23. package/dist/tools/delete-entitlement.js +11 -0
  24. package/dist/tools/delete-paywall.d.ts +3 -0
  25. package/dist/tools/delete-paywall.js +16 -0
  26. package/dist/tools/delete-promotion.d.ts +3 -0
  27. package/dist/tools/delete-promotion.js +11 -0
  28. package/dist/tools/delete-rescue-flow.d.ts +3 -0
  29. package/dist/tools/delete-rescue-flow.js +11 -0
  30. package/dist/tools/get-entitlement.d.ts +3 -0
  31. package/dist/tools/get-entitlement.js +9 -0
  32. package/dist/tools/get-experiment-summary.d.ts +3 -0
  33. package/dist/tools/get-experiment-summary.js +9 -0
  34. package/dist/tools/get-offering.d.ts +3 -0
  35. package/dist/tools/get-offering.js +9 -0
  36. package/dist/tools/get-paywall-stats.d.ts +3 -0
  37. package/dist/tools/get-paywall-stats.js +6 -0
  38. package/dist/tools/get-product.d.ts +3 -0
  39. package/dist/tools/get-product.js +9 -0
  40. package/dist/tools/get-rescue-stats.d.ts +3 -0
  41. package/dist/tools/get-rescue-stats.js +12 -0
  42. package/dist/tools/get-rule.d.ts +3 -0
  43. package/dist/tools/get-rule.js +9 -0
  44. package/dist/tools/index.js +103 -0
  45. package/dist/tools/list-change-requests.d.ts +3 -0
  46. package/dist/tools/list-change-requests.js +14 -0
  47. package/dist/tools/list-paywalls.d.ts +3 -0
  48. package/dist/tools/list-paywalls.js +6 -0
  49. package/dist/tools/list-pricing-strategies.d.ts +3 -0
  50. package/dist/tools/list-pricing-strategies.js +8 -0
  51. package/dist/tools/list-promotions.d.ts +3 -0
  52. package/dist/tools/list-promotions.js +6 -0
  53. package/dist/tools/list-rescue-flows.d.ts +3 -0
  54. package/dist/tools/list-rescue-flows.js +6 -0
  55. package/dist/tools/list-rule-versions.d.ts +3 -0
  56. package/dist/tools/list-rule-versions.js +9 -0
  57. package/dist/tools/next-step.js +3 -3
  58. package/dist/tools/preview-pricing.d.ts +3 -0
  59. package/dist/tools/preview-pricing.js +13 -0
  60. package/dist/tools/push-prices-to-stores.d.ts +3 -0
  61. package/dist/tools/push-prices-to-stores.js +9 -0
  62. package/dist/tools/recompute-prices.d.ts +3 -0
  63. package/dist/tools/recompute-prices.js +24 -0
  64. package/dist/tools/resolve-drift.d.ts +3 -0
  65. package/dist/tools/resolve-drift.js +15 -0
  66. package/dist/tools/restore-app.d.ts +3 -0
  67. package/dist/tools/restore-app.js +9 -0
  68. package/dist/tools/revert-app-autopilot.d.ts +3 -0
  69. package/dist/tools/revert-app-autopilot.js +9 -0
  70. package/dist/tools/rollback-rule.d.ts +3 -0
  71. package/dist/tools/rollback-rule.js +10 -0
  72. package/dist/tools/run-app-autopilot.d.ts +3 -0
  73. package/dist/tools/run-app-autopilot.js +9 -0
  74. package/dist/tools/set-country-price-override.d.ts +3 -0
  75. package/dist/tools/set-country-price-override.js +13 -0
  76. package/dist/tools/setup-wizard.js +1 -1
  77. package/dist/tools/start-experiment.d.ts +3 -0
  78. package/dist/tools/start-experiment.js +9 -0
  79. package/dist/tools/stop-experiment.d.ts +3 -0
  80. package/dist/tools/stop-experiment.js +9 -0
  81. package/dist/tools/sync-suggestions-count.d.ts +3 -0
  82. package/dist/tools/sync-suggestions-count.js +6 -0
  83. package/dist/tools/trigger-sync.d.ts +3 -0
  84. package/dist/tools/trigger-sync.js +6 -0
  85. package/dist/tools/update-app.d.ts +3 -0
  86. package/dist/tools/update-app.js +19 -0
  87. package/dist/tools/update-entitlement.d.ts +3 -0
  88. package/dist/tools/update-entitlement.js +13 -0
  89. package/dist/tools/update-experiment.d.ts +3 -0
  90. package/dist/tools/update-experiment.js +22 -0
  91. package/dist/tools/update-offering.d.ts +3 -0
  92. package/dist/tools/update-offering.js +31 -0
  93. package/dist/tools/update-paywall.d.ts +3 -0
  94. package/dist/tools/update-paywall.js +23 -0
  95. package/dist/tools/update-promotion.d.ts +3 -0
  96. package/dist/tools/update-promotion.js +20 -0
  97. package/dist/tools/update-rescue-flow.d.ts +3 -0
  98. package/dist/tools/update-rescue-flow.js +27 -0
  99. package/dist/types.d.ts +302 -0
  100. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export function registerTriggerSyncTool(server, client) {
2
+ server.tool('capivv_trigger_sync', 'Force an immediate sync run for every connected store integration in the workspace. Useful right after creating products in App Store Connect or Google Play to surface them as drift suggestions without waiting for the worker\'s scheduled interval.', async () => {
3
+ const result = await client.triggerSync();
4
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
5
+ });
6
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdateAppTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdateAppTool(server, client) {
3
+ server.tool('capivv_update_app', 'Update an app by ID. Provide only the fields you want to change. Common uses: rename, fix a placeholder bundle_id, edit settings.', {
4
+ app_id: z.string().describe('App ID'),
5
+ name: z.string().optional().describe('New display name'),
6
+ bundle_id: z
7
+ .string()
8
+ .optional()
9
+ .describe('New bundle ID (use to fix a placeholder like com.example.myapp)'),
10
+ settings: z
11
+ .record(z.string(), z.unknown())
12
+ .optional()
13
+ .describe('Free-form settings JSON (merged into existing)'),
14
+ }, async (args) => {
15
+ const { app_id, ...rest } = args;
16
+ const app = await client.updateApp(app_id, rest);
17
+ return { content: [{ type: 'text', text: JSON.stringify(app, null, 2) }] };
18
+ });
19
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdateEntitlementTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdateEntitlementTool(server, client) {
3
+ server.tool('capivv_update_entitlement', 'Update an entitlement by ID. Provide only the fields you want to change.', {
4
+ entitlement_id: z.string().describe('Entitlement ID'),
5
+ identifier: z.string().optional().describe('New stable identifier'),
6
+ display_name: z.string().optional().describe('New display name'),
7
+ description: z.string().optional().describe('New description'),
8
+ }, async (args) => {
9
+ const { entitlement_id, ...rest } = args;
10
+ const ent = await client.updateEntitlement(entitlement_id, rest);
11
+ return { content: [{ type: 'text', text: JSON.stringify(ent, null, 2) }] };
12
+ });
13
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdateExperimentTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdateExperimentTool(server, client) {
3
+ server.tool('capivv_update_experiment', 'Update an experiment by ID. Provide only the fields you want to change. Use capivv_start_experiment / capivv_stop_experiment for status flips so audit logs and assignment freezing fire correctly.', {
4
+ experiment_id: z.string().describe('Experiment ID to update'),
5
+ name: z.string().optional().describe('New display name'),
6
+ description: z.string().optional().describe('New description'),
7
+ status: z
8
+ .string()
9
+ .optional()
10
+ .describe('New status (draft / running / paused / completed). Prefer start/stop tools.'),
11
+ target_metric: z.string().optional().describe('New target metric'),
12
+ start_date: z.string().optional().describe('New start timestamp (ISO 8601)'),
13
+ end_date: z.string().optional().describe('New end timestamp (ISO 8601)'),
14
+ sample_size_target: z.number().optional().describe('New sample size target'),
15
+ confidence_level: z.number().optional().describe('New confidence level'),
16
+ metadata: z.record(z.string(), z.unknown()).optional().describe('Free-form metadata'),
17
+ }, async (args) => {
18
+ const { experiment_id, ...rest } = args;
19
+ const exp = await client.updateExperiment(experiment_id, rest);
20
+ return { content: [{ type: 'text', text: JSON.stringify(exp, null, 2) }] };
21
+ });
22
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdateOfferingTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdateOfferingTool(server, client) {
3
+ server.tool('capivv_update_offering', 'Update an offering by ID. Provide only the fields you want to change. Pass `packages` to replace the package list (full replacement, not merge — include every package you want to keep).', {
4
+ offering_id: z.string().describe('Offering ID'),
5
+ display_name: z.string().optional().describe('New display name'),
6
+ description: z.string().optional().describe('New description'),
7
+ is_default: z
8
+ .boolean()
9
+ .optional()
10
+ .describe('Whether this is the default offering for its app'),
11
+ packages: z
12
+ .array(z.object({
13
+ identifier: z.string(),
14
+ product_id: z.string(),
15
+ display_name: z.string(),
16
+ description: z.string().optional(),
17
+ package_type: z.string().describe('monthly | annual | weekly | lifetime | custom'),
18
+ position: z.number(),
19
+ }))
20
+ .optional()
21
+ .describe('Replacement package list (full replacement, not merge)'),
22
+ metadata: z
23
+ .record(z.string(), z.unknown())
24
+ .optional()
25
+ .describe('Free-form metadata (replaces existing)'),
26
+ }, async (args) => {
27
+ const { offering_id, ...rest } = args;
28
+ const offering = await client.updateOffering(offering_id, rest);
29
+ return { content: [{ type: 'text', text: JSON.stringify(offering, null, 2) }] };
30
+ });
31
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdatePaywallTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdatePaywallTool(server, client) {
3
+ server.tool('capivv_update_paywall', 'Update a paywall by ID. Provide only the fields you want to change. Use this to attach a template, swap the config blob, or update metadata. Use capivv_list_paywalls to discover the paywall_id.', {
4
+ paywall_id: z.string().describe('Paywall ID to update'),
5
+ name: z.string().optional().describe('New display name'),
6
+ template: z
7
+ .string()
8
+ .optional()
9
+ .describe('Template identifier (e.g. "default", "minimal", "image_first")'),
10
+ config: z
11
+ .record(z.string(), z.unknown())
12
+ .optional()
13
+ .describe('Paywall configuration JSON (layout, copy, products to display, etc.)'),
14
+ metadata: z
15
+ .record(z.string(), z.unknown())
16
+ .optional()
17
+ .describe('Free-form metadata stored alongside the paywall'),
18
+ }, async (args) => {
19
+ const { paywall_id, ...rest } = args;
20
+ const paywall = await client.updatePaywall(paywall_id, rest);
21
+ return { content: [{ type: 'text', text: JSON.stringify(paywall, null, 2) }] };
22
+ });
23
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdatePromotionTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdatePromotionTool(server, client) {
3
+ server.tool('capivv_update_promotion', 'Update a promotion by ID. Provide only the fields you want to change. Use capivv_list_promotions to discover the promotion_id.', {
4
+ promotion_id: z.string().describe('Promotion ID to update'),
5
+ name: z.string().optional().describe('New display name'),
6
+ description: z.string().optional().describe('New description'),
7
+ discount_percent: z
8
+ .number()
9
+ .optional()
10
+ .describe('New percentage discount (0-100)'),
11
+ max_redemptions: z
12
+ .number()
13
+ .optional()
14
+ .describe('New redemption cap. Reduce only — increasing past current_redemptions is a no-op.'),
15
+ }, async (args) => {
16
+ const { promotion_id, ...rest } = args;
17
+ const promotion = await client.updatePromotion(promotion_id, rest);
18
+ return { content: [{ type: 'text', text: JSON.stringify(promotion, null, 2) }] };
19
+ });
20
+ }
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { CapivvClient } from '../client.js';
3
+ export declare function registerUpdateRescueFlowTool(server: McpServer, client: CapivvClient): void;
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export function registerUpdateRescueFlowTool(server, client) {
3
+ server.tool('capivv_update_rescue_flow', [
4
+ 'Update a rescue flow by ID. Provide only the fields you want to change.',
5
+ '`conditions` is an eligibility filter object (e.g. { product_ids: [...], min_tenure_days: 30 }).',
6
+ '`steps` is the offer ladder shown to the user during cancellation (e.g. [{ type: "discount", percent: 50 }, { type: "pause", months: 1 }]).',
7
+ 'Use capivv_list_rescue_flows to discover the rescue_flow_id.',
8
+ ].join(' '), {
9
+ rescue_flow_id: z.string().describe('Rescue flow ID to update'),
10
+ name: z.string().optional().describe('New display name'),
11
+ description: z.string().optional().describe('New description'),
12
+ priority: z.number().optional().describe('New priority'),
13
+ conditions: z
14
+ .record(z.string(), z.unknown())
15
+ .optional()
16
+ .describe('Eligibility filter object'),
17
+ steps: z
18
+ .record(z.string(), z.unknown())
19
+ .optional()
20
+ .describe('Offer ladder configuration'),
21
+ metadata: z.record(z.string(), z.unknown()).optional().describe('Free-form metadata'),
22
+ }, async (args) => {
23
+ const { rescue_flow_id, ...rest } = args;
24
+ const flow = await client.updateRescueFlow(rescue_flow_id, rest);
25
+ return { content: [{ type: 'text', text: JSON.stringify(flow, null, 2) }] };
26
+ });
27
+ }
package/dist/types.d.ts CHANGED
@@ -52,6 +52,22 @@ export interface Product {
52
52
  metadata: Record<string, unknown>;
53
53
  created_at: string;
54
54
  updated_at: string;
55
+ /**
56
+ * Present only when the create call also wrote to the connected store
57
+ * (App Store Connect / Google Play). Carries the store-side product ID
58
+ * and the snapped-price audit so the AI can communicate tier deltas.
59
+ */
60
+ store_create?: StoreCreateSummary;
61
+ }
62
+ export interface StoreCreateSummary {
63
+ store: 'apple' | 'google';
64
+ store_product_id: string;
65
+ snapped_prices: Array<{
66
+ currency: string;
67
+ requested_cents: number;
68
+ actual_cents: number;
69
+ price_point_id?: string;
70
+ }>;
55
71
  }
56
72
  export interface Entitlement {
57
73
  id: string;
@@ -217,4 +233,290 @@ export interface CreateProductRequest {
217
233
  amount_cents: number;
218
234
  is_default?: boolean;
219
235
  }>;
236
+ /**
237
+ * V8 Phase A: when true (default) and a store integration is connected
238
+ * for the app's platform, the API also creates the matching product in
239
+ * App Store Connect / Google Play. Send false to opt out.
240
+ */
241
+ also_create_in_store?: boolean;
242
+ /** Default product locale for store-side localizations. Defaults to "en-US". */
243
+ default_locale?: string;
244
+ }
245
+ export interface Paywall {
246
+ id: string;
247
+ name: string;
248
+ identifier: string;
249
+ paywall_type: string;
250
+ status: string;
251
+ template: string | null;
252
+ total_views: number;
253
+ total_conversions: number;
254
+ conversion_rate: number;
255
+ config: Record<string, unknown>;
256
+ generated_by?: string | null;
257
+ created_at: string;
258
+ }
259
+ export interface CreatePaywallRequest {
260
+ app_id: string;
261
+ name: string;
262
+ identifier: string;
263
+ paywall_type: string;
264
+ }
265
+ export interface UpdatePaywallRequest {
266
+ name?: string;
267
+ template?: string;
268
+ config?: Record<string, unknown>;
269
+ metadata?: Record<string, unknown>;
270
+ }
271
+ export interface PaywallStats {
272
+ total_views: number;
273
+ total_conversions: number;
274
+ average_conversion_rate: number;
275
+ }
276
+ export interface Promotion {
277
+ id: string;
278
+ name: string;
279
+ description: string | null;
280
+ campaign_type: string;
281
+ status: string;
282
+ discount_percent: number;
283
+ starts_at: string;
284
+ ends_at: string;
285
+ max_redemptions: number | null;
286
+ current_redemptions: number;
287
+ revenue_micros: number;
288
+ generated_by?: string | null;
289
+ created_at: string;
290
+ }
291
+ export interface CreatePromotionRequest {
292
+ name: string;
293
+ identifier?: string;
294
+ description?: string;
295
+ campaign_type: string;
296
+ discount_percent?: number;
297
+ starts_at?: string;
298
+ ends_at?: string;
299
+ max_redemptions?: number;
300
+ }
301
+ export interface UpdatePromotionRequest {
302
+ name?: string;
303
+ description?: string;
304
+ discount_percent?: number;
305
+ max_redemptions?: number;
306
+ }
307
+ export interface RescueFlow {
308
+ id: string;
309
+ name: string;
310
+ identifier: string;
311
+ description: string | null;
312
+ status: string;
313
+ priority: number;
314
+ conditions: Record<string, unknown>;
315
+ steps: Record<string, unknown>;
316
+ metadata: Record<string, unknown>;
317
+ generated_by?: string | null;
318
+ created_at: string;
319
+ }
320
+ export interface CreateRescueFlowRequest {
321
+ name: string;
322
+ identifier: string;
323
+ description?: string;
324
+ priority?: number;
325
+ }
326
+ export interface UpdateRescueFlowRequest {
327
+ name?: string;
328
+ description?: string;
329
+ priority?: number;
330
+ conditions?: Record<string, unknown>;
331
+ steps?: Record<string, unknown>;
332
+ metadata?: Record<string, unknown>;
333
+ }
334
+ export interface RescueStats {
335
+ total_rescue_attempts: number;
336
+ successful_rescues: number;
337
+ rescue_rate: number;
338
+ total_recovered_revenue_micros: number;
339
+ total_recovered_revenue_formatted: string;
340
+ }
341
+ export interface PricingStrategy {
342
+ id: string;
343
+ app_id: string;
344
+ name: string;
345
+ w_ppp?: number;
346
+ w_bigmac?: number;
347
+ w_fx_neutral?: number;
348
+ max_auto_change_pct?: number;
349
+ max_auto_decrease_pct?: number;
350
+ excluded_countries?: string[];
351
+ created_at: string;
352
+ updated_at: string;
353
+ }
354
+ export interface CreatePricingStrategyRequest {
355
+ app_id: string;
356
+ name: string;
357
+ w_ppp?: number;
358
+ w_bigmac?: number;
359
+ w_fx_neutral?: number;
360
+ tier1_min_aff?: number;
361
+ tier1_max_aff?: number;
362
+ tier2_min_aff?: number;
363
+ tier2_max_aff?: number;
364
+ tier3_min_aff?: number;
365
+ tier3_max_aff?: number;
366
+ tier4_min_aff?: number;
367
+ tier4_max_aff?: number;
368
+ anti_arbitrage_floor_factor?: number;
369
+ max_auto_change_pct?: number;
370
+ max_auto_decrease_pct?: number;
371
+ excluded_countries?: string[];
372
+ }
373
+ export interface PricingPreviewResult {
374
+ [key: string]: unknown;
375
+ }
376
+ export interface PricingRecomputeRequest {
377
+ product_id?: string;
378
+ strategy_id?: string;
379
+ reason?: string;
380
+ }
381
+ export interface PricingRecomputeResult {
382
+ prices_applied?: number;
383
+ approval_required?: number;
384
+ change_request_ids?: string[];
385
+ skipped?: number;
386
+ products_processed?: number;
387
+ }
388
+ export interface PricingPushResult {
389
+ pushed: number;
390
+ failed: number;
391
+ skipped: number;
392
+ }
393
+ export interface PricingChangeRequest {
394
+ id: string;
395
+ product_id: string;
396
+ app_id: string;
397
+ status: string;
398
+ country_code: string;
399
+ store: string;
400
+ currency: string;
401
+ old_amount_cents: number | null;
402
+ new_amount_cents: number;
403
+ delta_pct: number;
404
+ reason: string;
405
+ created_at: string;
406
+ }
407
+ export interface SetCountryPriceOverrideRequest {
408
+ product_id: string;
409
+ country_code: string;
410
+ store: string;
411
+ currency: string;
412
+ amount_cents: number;
413
+ }
414
+ export interface ExperimentWithVariants {
415
+ id: string;
416
+ name: string;
417
+ description: string | null;
418
+ status: string;
419
+ target_metric: string;
420
+ start_date: string | null;
421
+ end_date: string | null;
422
+ confidence_level: number;
423
+ variants: ExperimentVariant[];
424
+ generated_by?: string | null;
425
+ created_at: string;
426
+ }
427
+ export interface ExperimentVariant {
428
+ id: string;
429
+ name: string;
430
+ is_control: boolean;
431
+ traffic_percent: number;
432
+ sample_size: number;
433
+ conversion_count: number;
434
+ conversion_rate: number | null;
435
+ uplift_percent: number | null;
436
+ status: string;
437
+ p_value: number | null;
438
+ confidence_level: number | null;
439
+ confidence_interval_low: number | null;
440
+ confidence_interval_high: number | null;
441
+ is_statistically_significant: boolean;
442
+ recommendation: string | null;
443
+ z_score: number | null;
444
+ }
445
+ export interface CreateExperimentRequest {
446
+ name: string;
447
+ description?: string;
448
+ target_metric: string;
449
+ entity_type?: string;
450
+ entity_id?: string;
451
+ start_date?: string;
452
+ end_date?: string;
453
+ sample_size_target?: number;
454
+ confidence_level?: number;
455
+ metadata?: Record<string, unknown>;
456
+ variants: Array<{
457
+ name: string;
458
+ is_control: boolean;
459
+ traffic_percent: number;
460
+ config?: Record<string, unknown>;
461
+ }>;
462
+ }
463
+ export interface UpdateExperimentRequest {
464
+ name?: string;
465
+ description?: string;
466
+ status?: string;
467
+ target_metric?: string;
468
+ start_date?: string;
469
+ end_date?: string;
470
+ sample_size_target?: number;
471
+ confidence_level?: number;
472
+ metadata?: Record<string, unknown>;
473
+ }
474
+ export interface UpdateAppRequest {
475
+ name?: string;
476
+ bundle_id?: string;
477
+ settings?: Record<string, unknown>;
478
+ }
479
+ export interface UpdateEntitlementRequest {
480
+ identifier?: string;
481
+ display_name?: string;
482
+ description?: string;
483
+ }
484
+ export interface UpdateOfferingRequest {
485
+ display_name?: string;
486
+ description?: string;
487
+ is_default?: boolean;
488
+ packages?: Array<{
489
+ identifier: string;
490
+ product_id: string;
491
+ display_name: string;
492
+ description?: string;
493
+ package_type: string;
494
+ position: number;
495
+ }>;
496
+ metadata?: Record<string, unknown>;
497
+ }
498
+ export interface AutopilotRunResult {
499
+ [key: string]: unknown;
500
+ }
501
+ export interface SyncSuggestion {
502
+ id: string;
503
+ suggestion_type: string;
504
+ status: string;
505
+ store_product_id: string;
506
+ store_product_name?: string | null;
507
+ store_product_type?: string | null;
508
+ store_price?: string | null;
509
+ store_group_name?: string | null;
510
+ store_source: string;
511
+ product_id?: string | null;
512
+ diff_details: Record<string, unknown>;
513
+ resolved_at?: string | null;
514
+ created_at: string;
515
+ }
516
+ export interface SyncSuggestionsCount {
517
+ pending: number;
518
+ }
519
+ export interface TriggerSyncResult {
520
+ triggered: number;
521
+ message: string;
220
522
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capivv/mcp-server",
3
- "version": "0.2.0",
3
+ "version": "0.5.0",
4
4
  "description": "MCP server for managing Capivv subscription platform via AI assistants",
5
5
  "type": "module",
6
6
  "bin": {