@apex-inc/mcp-server 0.27.3 → 0.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adoption-compose.d.ts +30 -0
- package/dist/adoption-compose.d.ts.map +1 -0
- package/dist/adoption-compose.js +69 -0
- package/dist/adoption-compose.js.map +1 -0
- package/dist/tools.d.ts +99 -73
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +47 -44
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
- package/skills/apex-adoption/SKILL.md +9 -6
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared body + preflight for adoption milestone MCP writes.
|
|
3
|
+
* New milestones default to enrollMode "future" so a 1-hour clock does not
|
|
4
|
+
* mail everyone who signed up last year.
|
|
5
|
+
*/
|
|
6
|
+
export type AdoptionWriteArgs = {
|
|
7
|
+
name?: string;
|
|
8
|
+
featureKey?: string;
|
|
9
|
+
adoptedWhenKind?: "event" | "trait";
|
|
10
|
+
eventName?: string;
|
|
11
|
+
traitPath?: string;
|
|
12
|
+
traitValue?: string;
|
|
13
|
+
traitOp?: "equals" | "not_equals" | "exists";
|
|
14
|
+
priority?: number;
|
|
15
|
+
order?: number;
|
|
16
|
+
gapDays?: number;
|
|
17
|
+
gapHours?: number;
|
|
18
|
+
gapKind?: "days_since_signup" | "event_not_fired";
|
|
19
|
+
sinceEventName?: string;
|
|
20
|
+
enrollMode?: "all" | "future";
|
|
21
|
+
active?: boolean;
|
|
22
|
+
nudgeJourneyId?: string;
|
|
23
|
+
celebrationJourneyId?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function milestoneWriteBody(args: AdoptionWriteArgs): Record<string, unknown>;
|
|
26
|
+
export declare function preflightAdoptionMilestone(args: {
|
|
27
|
+
eventName?: string;
|
|
28
|
+
adoptedWhenKind?: "event" | "trait";
|
|
29
|
+
}): Promise<string[]>;
|
|
30
|
+
//# sourceMappingURL=adoption-compose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adoption-compose.d.ts","sourceRoot":"","sources":["../src/adoption-compose.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,GAAG,iBAAiB,CAAC;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoCnF;AAED,wBAAsB,0BAA0B,CAAC,IAAI,EAAE;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACrC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCpB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared body + preflight for adoption milestone MCP writes.
|
|
3
|
+
* New milestones default to enrollMode "future" so a 1-hour clock does not
|
|
4
|
+
* mail everyone who signed up last year.
|
|
5
|
+
*/
|
|
6
|
+
import { apiGet } from "./api-client.js";
|
|
7
|
+
export function milestoneWriteBody(args) {
|
|
8
|
+
const hours = typeof args.gapHours === "number" && Number.isFinite(args.gapHours)
|
|
9
|
+
? args.gapHours
|
|
10
|
+
: undefined;
|
|
11
|
+
const gapPolicy = {
|
|
12
|
+
kind: args.gapKind === "event_not_fired" ? "event_not_fired" : "days_since_signup",
|
|
13
|
+
days: hours !== undefined ? 0 : (args.gapDays ?? 3),
|
|
14
|
+
...(hours !== undefined ? { hours } : {}),
|
|
15
|
+
...(args.sinceEventName ? { sinceEventName: args.sinceEventName } : {}),
|
|
16
|
+
};
|
|
17
|
+
const adoptedWhen = args.adoptedWhenKind === "trait"
|
|
18
|
+
? {
|
|
19
|
+
kind: "trait",
|
|
20
|
+
traitPath: args.traitPath,
|
|
21
|
+
traitOp: args.traitOp ?? "equals",
|
|
22
|
+
traitValue: args.traitValue,
|
|
23
|
+
}
|
|
24
|
+
: args.adoptedWhenKind === "event"
|
|
25
|
+
? { kind: "event", eventName: args.eventName }
|
|
26
|
+
: undefined;
|
|
27
|
+
return {
|
|
28
|
+
...(args.name !== undefined ? { name: args.name } : {}),
|
|
29
|
+
...(args.featureKey !== undefined ? { featureKey: args.featureKey } : {}),
|
|
30
|
+
...(args.priority !== undefined ? { priority: args.priority } : {}),
|
|
31
|
+
...(args.order !== undefined ? { order: args.order } : {}),
|
|
32
|
+
...(args.active !== undefined ? { active: args.active } : {}),
|
|
33
|
+
...(args.nudgeJourneyId !== undefined ? { nudgeJourneyId: args.nudgeJourneyId } : {}),
|
|
34
|
+
...(args.celebrationJourneyId !== undefined
|
|
35
|
+
? { celebrationJourneyId: args.celebrationJourneyId }
|
|
36
|
+
: {}),
|
|
37
|
+
...(args.enrollMode !== undefined ? { enrollMode: args.enrollMode } : {}),
|
|
38
|
+
gapPolicy,
|
|
39
|
+
...(adoptedWhen ? { adoptedWhen } : {}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export async function preflightAdoptionMilestone(args) {
|
|
43
|
+
const warnings = [];
|
|
44
|
+
const eventName = args.eventName?.trim();
|
|
45
|
+
if (args.adoptedWhenKind === "event" && eventName) {
|
|
46
|
+
try {
|
|
47
|
+
const listed = await apiGet("/api/adoption/milestones");
|
|
48
|
+
const dup = (listed?.data?.milestones ?? []).find((m) => m.adoptedWhen?.eventName === eventName);
|
|
49
|
+
if (dup) {
|
|
50
|
+
warnings.push(`Another milestone already uses ${eventName}: "${dup.name}" (${dup.id}). You will double-count adoption unless you reuse that row.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
/* best-effort */
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const catalog = await apiGet("/api/events/catalog");
|
|
58
|
+
const seen = (catalog?.events ?? []).some((e) => e.eventName === eventName);
|
|
59
|
+
if (!seen) {
|
|
60
|
+
warnings.push(`${eventName} has never been seen in this workspace. The milestone can be created, but nobody will adopt it until that event fires on an identified person.`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
/* best-effort */
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return warnings;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=adoption-compose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adoption-compose.js","sourceRoot":"","sources":["../src/adoption-compose.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAsBzC,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACxD,MAAM,KAAK,GACT,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjE,CAAC,CAAC,IAAI,CAAC,QAAQ;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AAM,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAC/C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,KAAK,SAAS,CAC9C,CAAC;YACF,IAAI,GAAG,EAAE,CAAC;gBACR,QAAQ,CAAC,IAAI,CACX,kCAAkC,SAAS,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,8DAA8D,CACpI,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,iBAAiB;QACnB,CAAC;QACD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,MAAM,CAEzB,qBAAqB,CAAC,CAAC;YAC1B,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;YAC5E,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,QAAQ,CAAC,IAAI,CACX,GAAG,SAAS,gJAAgJ,CAC7J,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,iBAAiB;QACnB,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type AdoptionWriteArgs } from "./adoption-compose.js";
|
|
2
3
|
declare function switchWorkspaceHandler(args: {
|
|
3
4
|
workspaceKey?: string;
|
|
4
5
|
projectKey?: string;
|
|
@@ -131,8 +132,8 @@ export declare const toolDefinitions: {
|
|
|
131
132
|
runtimeDays: z.ZodOptional<z.ZodNumber>;
|
|
132
133
|
preview: z.ZodOptional<z.ZodBoolean>;
|
|
133
134
|
}, "strip", z.ZodTypeAny, {
|
|
134
|
-
targetUrl: string;
|
|
135
135
|
name: string;
|
|
136
|
+
targetUrl: string;
|
|
136
137
|
controlContent: string;
|
|
137
138
|
variantContent: string;
|
|
138
139
|
surface?: "mobile" | "web" | undefined;
|
|
@@ -158,8 +159,8 @@ export declare const toolDefinitions: {
|
|
|
158
159
|
runtimeDays?: number | undefined;
|
|
159
160
|
preview?: boolean | undefined;
|
|
160
161
|
}, {
|
|
161
|
-
targetUrl: string;
|
|
162
162
|
name: string;
|
|
163
|
+
targetUrl: string;
|
|
163
164
|
controlContent: string;
|
|
164
165
|
variantContent: string;
|
|
165
166
|
surface?: "mobile" | "web" | undefined;
|
|
@@ -429,9 +430,9 @@ export declare const toolDefinitions: {
|
|
|
429
430
|
schema: z.ZodObject<{
|
|
430
431
|
status: z.ZodOptional<z.ZodEnum<["all", "running", "completed", "draft", "paused", "archived"]>>;
|
|
431
432
|
}, "strip", z.ZodTypeAny, {
|
|
432
|
-
status?: "
|
|
433
|
+
status?: "all" | "draft" | "paused" | "running" | "completed" | "archived" | undefined;
|
|
433
434
|
}, {
|
|
434
|
-
status?: "
|
|
435
|
+
status?: "all" | "draft" | "paused" | "running" | "completed" | "archived" | undefined;
|
|
435
436
|
}>;
|
|
436
437
|
handler: ({ status }: {
|
|
437
438
|
status?: string;
|
|
@@ -534,9 +535,9 @@ export declare const toolDefinitions: {
|
|
|
534
535
|
runtimeDays: z.ZodOptional<z.ZodNumber>;
|
|
535
536
|
}, "strip", z.ZodTypeAny, {
|
|
536
537
|
experimentId: string;
|
|
538
|
+
name?: string | undefined;
|
|
537
539
|
surface?: "mobile" | "web" | undefined;
|
|
538
540
|
targetUrl?: string | undefined;
|
|
539
|
-
name?: string | undefined;
|
|
540
541
|
predictionId?: string | undefined;
|
|
541
542
|
primaryMetricEvent?: string | undefined;
|
|
542
543
|
primaryMetricType?: "rate" | "count" | "revenue" | "duration" | undefined;
|
|
@@ -546,9 +547,9 @@ export declare const toolDefinitions: {
|
|
|
546
547
|
hypothesis?: string | undefined;
|
|
547
548
|
}, {
|
|
548
549
|
experimentId: string;
|
|
550
|
+
name?: string | undefined;
|
|
549
551
|
surface?: "mobile" | "web" | undefined;
|
|
550
552
|
targetUrl?: string | undefined;
|
|
551
|
-
name?: string | undefined;
|
|
552
553
|
predictionId?: string | undefined;
|
|
553
554
|
primaryMetricEvent?: string | undefined;
|
|
554
555
|
primaryMetricType?: "rate" | "count" | "revenue" | "duration" | undefined;
|
|
@@ -1604,7 +1605,7 @@ export declare const toolDefinitions: {
|
|
|
1604
1605
|
confirmLiveExperiment: z.ZodOptional<z.ZodBoolean>;
|
|
1605
1606
|
}, "strip", z.ZodTypeAny, {
|
|
1606
1607
|
communicationId: string;
|
|
1607
|
-
status?: "
|
|
1608
|
+
status?: "active" | "draft" | "paused" | undefined;
|
|
1608
1609
|
subject?: string | undefined;
|
|
1609
1610
|
slots?: Record<string, string> | undefined;
|
|
1610
1611
|
channels?: string[] | undefined;
|
|
@@ -1613,7 +1614,7 @@ export declare const toolDefinitions: {
|
|
|
1613
1614
|
confirmLiveExperiment?: boolean | undefined;
|
|
1614
1615
|
}, {
|
|
1615
1616
|
communicationId: string;
|
|
1616
|
-
status?: "
|
|
1617
|
+
status?: "active" | "draft" | "paused" | undefined;
|
|
1617
1618
|
subject?: string | undefined;
|
|
1618
1619
|
slots?: Record<string, string> | undefined;
|
|
1619
1620
|
channels?: string[] | undefined;
|
|
@@ -2375,15 +2376,15 @@ export declare const toolDefinitions: {
|
|
|
2375
2376
|
commVersion: z.ZodOptional<z.ZodNumber>;
|
|
2376
2377
|
channels: z.ZodOptional<z.ZodArray<z.ZodEnum<["email", "in_app_push", "mobile_push", "web_push"]>, "many">>;
|
|
2377
2378
|
}, "strip", z.ZodTypeAny, {
|
|
2378
|
-
journeyId: string;
|
|
2379
2379
|
kind: "wait" | "send";
|
|
2380
|
+
journeyId: string;
|
|
2380
2381
|
channels?: ("email" | "web_push" | "mobile_push" | "in_app_push")[] | undefined;
|
|
2381
2382
|
durationIso?: string | undefined;
|
|
2382
2383
|
commId?: string | undefined;
|
|
2383
2384
|
commVersion?: number | undefined;
|
|
2384
2385
|
}, {
|
|
2385
|
-
journeyId: string;
|
|
2386
2386
|
kind: "wait" | "send";
|
|
2387
|
+
journeyId: string;
|
|
2387
2388
|
channels?: ("email" | "web_push" | "mobile_push" | "in_app_push")[] | undefined;
|
|
2388
2389
|
durationIso?: string | undefined;
|
|
2389
2390
|
commId?: string | undefined;
|
|
@@ -2421,17 +2422,17 @@ export declare const toolDefinitions: {
|
|
|
2421
2422
|
event_name: z.ZodOptional<z.ZodString>;
|
|
2422
2423
|
window_days: z.ZodOptional<z.ZodNumber>;
|
|
2423
2424
|
}, "strip", z.ZodTypeAny, {
|
|
2424
|
-
kind: "
|
|
2425
|
+
kind: "event_not_fired" | "attribute" | "event_fired";
|
|
2425
2426
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
2426
2427
|
field_path?: string | undefined;
|
|
2427
|
-
operator?: "equals" | "not_equals" | "
|
|
2428
|
+
operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
|
|
2428
2429
|
event_name?: string | undefined;
|
|
2429
2430
|
window_days?: number | undefined;
|
|
2430
2431
|
}, {
|
|
2431
|
-
kind: "
|
|
2432
|
+
kind: "event_not_fired" | "attribute" | "event_fired";
|
|
2432
2433
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
2433
2434
|
field_path?: string | undefined;
|
|
2434
|
-
operator?: "equals" | "not_equals" | "
|
|
2435
|
+
operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
|
|
2435
2436
|
event_name?: string | undefined;
|
|
2436
2437
|
window_days?: number | undefined;
|
|
2437
2438
|
}>;
|
|
@@ -2441,10 +2442,10 @@ export declare const toolDefinitions: {
|
|
|
2441
2442
|
}, "strip", z.ZodTypeAny, {
|
|
2442
2443
|
journeyId: string;
|
|
2443
2444
|
condition: {
|
|
2444
|
-
kind: "
|
|
2445
|
+
kind: "event_not_fired" | "attribute" | "event_fired";
|
|
2445
2446
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
2446
2447
|
field_path?: string | undefined;
|
|
2447
|
-
operator?: "equals" | "not_equals" | "
|
|
2448
|
+
operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
|
|
2448
2449
|
event_name?: string | undefined;
|
|
2449
2450
|
window_days?: number | undefined;
|
|
2450
2451
|
};
|
|
@@ -2454,10 +2455,10 @@ export declare const toolDefinitions: {
|
|
|
2454
2455
|
}, {
|
|
2455
2456
|
journeyId: string;
|
|
2456
2457
|
condition: {
|
|
2457
|
-
kind: "
|
|
2458
|
+
kind: "event_not_fired" | "attribute" | "event_fired";
|
|
2458
2459
|
value?: string | number | boolean | (string | number | boolean)[] | undefined;
|
|
2459
2460
|
field_path?: string | undefined;
|
|
2460
|
-
operator?: "equals" | "not_equals" | "
|
|
2461
|
+
operator?: "equals" | "not_equals" | "exists" | "greater_than" | "less_than" | "in" | "not_exists" | undefined;
|
|
2461
2462
|
event_name?: string | undefined;
|
|
2462
2463
|
window_days?: number | undefined;
|
|
2463
2464
|
};
|
|
@@ -2863,11 +2864,11 @@ export declare const toolDefinitions: {
|
|
|
2863
2864
|
kind: z.ZodEnum<["website", "ios", "android", "server", "pos", "kiosk", "extension", "other"]>;
|
|
2864
2865
|
name: z.ZodString;
|
|
2865
2866
|
}, "strip", z.ZodTypeAny, {
|
|
2866
|
-
name: string;
|
|
2867
2867
|
kind: "other" | "ios" | "android" | "website" | "server" | "pos" | "kiosk" | "extension";
|
|
2868
|
-
}, {
|
|
2869
2868
|
name: string;
|
|
2869
|
+
}, {
|
|
2870
2870
|
kind: "other" | "ios" | "android" | "website" | "server" | "pos" | "kiosk" | "extension";
|
|
2871
|
+
name: string;
|
|
2871
2872
|
}>;
|
|
2872
2873
|
handler: ({ kind, name }: {
|
|
2873
2874
|
kind: string;
|
|
@@ -2970,29 +2971,29 @@ export declare const toolDefinitions: {
|
|
|
2970
2971
|
note: z.ZodOptional<z.ZodString>;
|
|
2971
2972
|
wired: z.ZodOptional<z.ZodBoolean>;
|
|
2972
2973
|
}, "strip", z.ZodTypeAny, {
|
|
2973
|
-
surface: "mobile" | "web" | "server";
|
|
2974
2974
|
name: string;
|
|
2975
|
+
surface: "mobile" | "web" | "server";
|
|
2975
2976
|
wired?: boolean | undefined;
|
|
2976
2977
|
note?: string | undefined;
|
|
2977
2978
|
}, {
|
|
2978
|
-
surface: "mobile" | "web" | "server";
|
|
2979
2979
|
name: string;
|
|
2980
|
+
surface: "mobile" | "web" | "server";
|
|
2980
2981
|
wired?: boolean | undefined;
|
|
2981
2982
|
note?: string | undefined;
|
|
2982
2983
|
}>, "many">;
|
|
2983
2984
|
summary: z.ZodOptional<z.ZodString>;
|
|
2984
2985
|
}, "strip", z.ZodTypeAny, {
|
|
2985
2986
|
events: {
|
|
2986
|
-
surface: "mobile" | "web" | "server";
|
|
2987
2987
|
name: string;
|
|
2988
|
+
surface: "mobile" | "web" | "server";
|
|
2988
2989
|
wired?: boolean | undefined;
|
|
2989
2990
|
note?: string | undefined;
|
|
2990
2991
|
}[];
|
|
2991
2992
|
summary?: string | undefined;
|
|
2992
2993
|
}, {
|
|
2993
2994
|
events: {
|
|
2994
|
-
surface: "mobile" | "web" | "server";
|
|
2995
2995
|
name: string;
|
|
2996
|
+
surface: "mobile" | "web" | "server";
|
|
2996
2997
|
wired?: boolean | undefined;
|
|
2997
2998
|
note?: string | undefined;
|
|
2998
2999
|
}[];
|
|
@@ -3023,15 +3024,15 @@ export declare const toolDefinitions: {
|
|
|
3023
3024
|
externalId: z.ZodString;
|
|
3024
3025
|
url: z.ZodOptional<z.ZodString>;
|
|
3025
3026
|
}, "strip", z.ZodTypeAny, {
|
|
3026
|
-
experimentId: string;
|
|
3027
3027
|
kind: "pr" | "issue";
|
|
3028
|
+
experimentId: string;
|
|
3028
3029
|
system: "github" | "github-issues" | "linear" | "jira" | "trello";
|
|
3029
3030
|
externalId: string;
|
|
3030
3031
|
url?: string | undefined;
|
|
3031
3032
|
repo?: string | undefined;
|
|
3032
3033
|
}, {
|
|
3033
|
-
experimentId: string;
|
|
3034
3034
|
kind: "pr" | "issue";
|
|
3035
|
+
experimentId: string;
|
|
3035
3036
|
system: "github" | "github-issues" | "linear" | "jira" | "trello";
|
|
3036
3037
|
externalId: string;
|
|
3037
3038
|
url?: string | undefined;
|
|
@@ -3393,17 +3394,17 @@ export declare const toolDefinitions: {
|
|
|
3393
3394
|
targetUrl: z.ZodOptional<z.ZodString>;
|
|
3394
3395
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
3395
3396
|
}, "strip", z.ZodTypeAny, {
|
|
3396
|
-
type: "form_submit" | "click" | "pageview" | "custom_event" | "file_download" | "engaged_time";
|
|
3397
3397
|
name: string;
|
|
3398
|
-
|
|
3398
|
+
type: "form_submit" | "click" | "pageview" | "custom_event" | "file_download" | "engaged_time";
|
|
3399
3399
|
eventName?: string | undefined;
|
|
3400
|
+
targetUrl?: string | undefined;
|
|
3400
3401
|
selector?: string | undefined;
|
|
3401
3402
|
isPrimary?: boolean | undefined;
|
|
3402
3403
|
}, {
|
|
3403
|
-
type: "form_submit" | "click" | "pageview" | "custom_event" | "file_download" | "engaged_time";
|
|
3404
3404
|
name: string;
|
|
3405
|
-
|
|
3405
|
+
type: "form_submit" | "click" | "pageview" | "custom_event" | "file_download" | "engaged_time";
|
|
3406
3406
|
eventName?: string | undefined;
|
|
3407
|
+
targetUrl?: string | undefined;
|
|
3407
3408
|
selector?: string | undefined;
|
|
3408
3409
|
isPrimary?: boolean | undefined;
|
|
3409
3410
|
}>;
|
|
@@ -3506,44 +3507,52 @@ export declare const toolDefinitions: {
|
|
|
3506
3507
|
eventName: z.ZodOptional<z.ZodString>;
|
|
3507
3508
|
traitPath: z.ZodOptional<z.ZodString>;
|
|
3508
3509
|
traitValue: z.ZodOptional<z.ZodString>;
|
|
3510
|
+
traitOp: z.ZodOptional<z.ZodEnum<["equals", "not_equals", "exists"]>>;
|
|
3509
3511
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
3510
3512
|
order: z.ZodOptional<z.ZodNumber>;
|
|
3511
3513
|
gapDays: z.ZodOptional<z.ZodNumber>;
|
|
3514
|
+
gapHours: z.ZodOptional<z.ZodNumber>;
|
|
3515
|
+
gapKind: z.ZodOptional<z.ZodEnum<["days_since_signup", "event_not_fired"]>>;
|
|
3516
|
+
sinceEventName: z.ZodOptional<z.ZodString>;
|
|
3517
|
+
enrollMode: z.ZodOptional<z.ZodEnum<["all", "future"]>>;
|
|
3512
3518
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
3513
3519
|
}, "strip", z.ZodTypeAny, {
|
|
3514
3520
|
name: string;
|
|
3515
3521
|
featureKey: string;
|
|
3516
3522
|
adoptedWhenKind: "event" | "trait";
|
|
3517
|
-
|
|
3523
|
+
sinceEventName?: string | undefined;
|
|
3518
3524
|
eventName?: string | undefined;
|
|
3519
3525
|
traitPath?: string | undefined;
|
|
3520
|
-
traitValue?: string | undefined;
|
|
3521
3526
|
priority?: number | undefined;
|
|
3522
3527
|
order?: number | undefined;
|
|
3528
|
+
active?: boolean | undefined;
|
|
3529
|
+
enrollMode?: "all" | "future" | undefined;
|
|
3530
|
+
traitValue?: string | undefined;
|
|
3531
|
+
traitOp?: "equals" | "not_equals" | "exists" | undefined;
|
|
3523
3532
|
gapDays?: number | undefined;
|
|
3533
|
+
gapHours?: number | undefined;
|
|
3534
|
+
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
3524
3535
|
}, {
|
|
3525
3536
|
name: string;
|
|
3526
3537
|
featureKey: string;
|
|
3527
3538
|
adoptedWhenKind: "event" | "trait";
|
|
3528
|
-
|
|
3539
|
+
sinceEventName?: string | undefined;
|
|
3529
3540
|
eventName?: string | undefined;
|
|
3530
3541
|
traitPath?: string | undefined;
|
|
3531
|
-
traitValue?: string | undefined;
|
|
3532
3542
|
priority?: number | undefined;
|
|
3533
3543
|
order?: number | undefined;
|
|
3544
|
+
active?: boolean | undefined;
|
|
3545
|
+
enrollMode?: "all" | "future" | undefined;
|
|
3546
|
+
traitValue?: string | undefined;
|
|
3547
|
+
traitOp?: "equals" | "not_equals" | "exists" | undefined;
|
|
3534
3548
|
gapDays?: number | undefined;
|
|
3549
|
+
gapHours?: number | undefined;
|
|
3550
|
+
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
3535
3551
|
}>;
|
|
3536
|
-
handler: (args: {
|
|
3552
|
+
handler: (args: AdoptionWriteArgs & {
|
|
3537
3553
|
name: string;
|
|
3538
3554
|
featureKey: string;
|
|
3539
3555
|
adoptedWhenKind: "event" | "trait";
|
|
3540
|
-
eventName?: string;
|
|
3541
|
-
traitPath?: string;
|
|
3542
|
-
traitValue?: string;
|
|
3543
|
-
priority?: number;
|
|
3544
|
-
order?: number;
|
|
3545
|
-
gapDays?: number;
|
|
3546
|
-
active?: boolean;
|
|
3547
3556
|
}) => Promise<{
|
|
3548
3557
|
content: {
|
|
3549
3558
|
type: "text";
|
|
@@ -3560,32 +3569,41 @@ export declare const toolDefinitions: {
|
|
|
3560
3569
|
order: z.ZodOptional<z.ZodNumber>;
|
|
3561
3570
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
3562
3571
|
gapDays: z.ZodOptional<z.ZodNumber>;
|
|
3572
|
+
gapHours: z.ZodOptional<z.ZodNumber>;
|
|
3573
|
+
gapKind: z.ZodOptional<z.ZodEnum<["days_since_signup", "event_not_fired"]>>;
|
|
3574
|
+
sinceEventName: z.ZodOptional<z.ZodString>;
|
|
3575
|
+
enrollMode: z.ZodOptional<z.ZodEnum<["all", "future"]>>;
|
|
3563
3576
|
nudgeJourneyId: z.ZodOptional<z.ZodString>;
|
|
3577
|
+
celebrationJourneyId: z.ZodOptional<z.ZodString>;
|
|
3564
3578
|
}, "strip", z.ZodTypeAny, {
|
|
3565
3579
|
milestoneId: string;
|
|
3580
|
+
sinceEventName?: string | undefined;
|
|
3566
3581
|
name?: string | undefined;
|
|
3567
|
-
active?: boolean | undefined;
|
|
3568
3582
|
priority?: number | undefined;
|
|
3569
3583
|
order?: number | undefined;
|
|
3570
|
-
|
|
3584
|
+
active?: boolean | undefined;
|
|
3571
3585
|
nudgeJourneyId?: string | undefined;
|
|
3586
|
+
celebrationJourneyId?: string | undefined;
|
|
3587
|
+
enrollMode?: "all" | "future" | undefined;
|
|
3588
|
+
gapDays?: number | undefined;
|
|
3589
|
+
gapHours?: number | undefined;
|
|
3590
|
+
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
3572
3591
|
}, {
|
|
3573
3592
|
milestoneId: string;
|
|
3593
|
+
sinceEventName?: string | undefined;
|
|
3574
3594
|
name?: string | undefined;
|
|
3575
|
-
active?: boolean | undefined;
|
|
3576
3595
|
priority?: number | undefined;
|
|
3577
3596
|
order?: number | undefined;
|
|
3578
|
-
|
|
3597
|
+
active?: boolean | undefined;
|
|
3579
3598
|
nudgeJourneyId?: string | undefined;
|
|
3599
|
+
celebrationJourneyId?: string | undefined;
|
|
3600
|
+
enrollMode?: "all" | "future" | undefined;
|
|
3601
|
+
gapDays?: number | undefined;
|
|
3602
|
+
gapHours?: number | undefined;
|
|
3603
|
+
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
3580
3604
|
}>;
|
|
3581
|
-
handler: (args: {
|
|
3605
|
+
handler: (args: AdoptionWriteArgs & {
|
|
3582
3606
|
milestoneId: string;
|
|
3583
|
-
name?: string;
|
|
3584
|
-
priority?: number;
|
|
3585
|
-
order?: number;
|
|
3586
|
-
active?: boolean;
|
|
3587
|
-
gapDays?: number;
|
|
3588
|
-
nudgeJourneyId?: string;
|
|
3589
3607
|
}) => Promise<{
|
|
3590
3608
|
content: {
|
|
3591
3609
|
type: "text";
|
|
@@ -3620,9 +3638,14 @@ export declare const toolDefinitions: {
|
|
|
3620
3638
|
eventName: z.ZodOptional<z.ZodString>;
|
|
3621
3639
|
traitPath: z.ZodOptional<z.ZodString>;
|
|
3622
3640
|
traitValue: z.ZodOptional<z.ZodString>;
|
|
3641
|
+
traitOp: z.ZodOptional<z.ZodEnum<["equals", "not_equals", "exists"]>>;
|
|
3623
3642
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
3624
3643
|
order: z.ZodOptional<z.ZodNumber>;
|
|
3625
3644
|
gapDays: z.ZodOptional<z.ZodNumber>;
|
|
3645
|
+
gapHours: z.ZodOptional<z.ZodNumber>;
|
|
3646
|
+
gapKind: z.ZodOptional<z.ZodEnum<["days_since_signup", "event_not_fired"]>>;
|
|
3647
|
+
sinceEventName: z.ZodOptional<z.ZodString>;
|
|
3648
|
+
enrollMode: z.ZodOptional<z.ZodEnum<["all", "future"]>>;
|
|
3626
3649
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
3627
3650
|
scaffold: z.ZodOptional<z.ZodEnum<["both", "celebration", "nudge", "none"]>>;
|
|
3628
3651
|
journeyName: z.ZodOptional<z.ZodString>;
|
|
@@ -3630,40 +3653,43 @@ export declare const toolDefinitions: {
|
|
|
3630
3653
|
name: string;
|
|
3631
3654
|
featureKey: string;
|
|
3632
3655
|
adoptedWhenKind: "event" | "trait";
|
|
3633
|
-
|
|
3656
|
+
sinceEventName?: string | undefined;
|
|
3634
3657
|
eventName?: string | undefined;
|
|
3635
3658
|
traitPath?: string | undefined;
|
|
3636
|
-
traitValue?: string | undefined;
|
|
3637
3659
|
priority?: number | undefined;
|
|
3638
3660
|
order?: number | undefined;
|
|
3661
|
+
active?: boolean | undefined;
|
|
3662
|
+
enrollMode?: "all" | "future" | undefined;
|
|
3663
|
+
traitValue?: string | undefined;
|
|
3664
|
+
traitOp?: "equals" | "not_equals" | "exists" | undefined;
|
|
3639
3665
|
gapDays?: number | undefined;
|
|
3666
|
+
gapHours?: number | undefined;
|
|
3667
|
+
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
3640
3668
|
scaffold?: "none" | "both" | "celebration" | "nudge" | undefined;
|
|
3641
3669
|
journeyName?: string | undefined;
|
|
3642
3670
|
}, {
|
|
3643
3671
|
name: string;
|
|
3644
3672
|
featureKey: string;
|
|
3645
3673
|
adoptedWhenKind: "event" | "trait";
|
|
3646
|
-
|
|
3674
|
+
sinceEventName?: string | undefined;
|
|
3647
3675
|
eventName?: string | undefined;
|
|
3648
3676
|
traitPath?: string | undefined;
|
|
3649
|
-
traitValue?: string | undefined;
|
|
3650
3677
|
priority?: number | undefined;
|
|
3651
3678
|
order?: number | undefined;
|
|
3679
|
+
active?: boolean | undefined;
|
|
3680
|
+
enrollMode?: "all" | "future" | undefined;
|
|
3681
|
+
traitValue?: string | undefined;
|
|
3682
|
+
traitOp?: "equals" | "not_equals" | "exists" | undefined;
|
|
3652
3683
|
gapDays?: number | undefined;
|
|
3684
|
+
gapHours?: number | undefined;
|
|
3685
|
+
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
3653
3686
|
scaffold?: "none" | "both" | "celebration" | "nudge" | undefined;
|
|
3654
3687
|
journeyName?: string | undefined;
|
|
3655
3688
|
}>;
|
|
3656
|
-
handler: (args: {
|
|
3689
|
+
handler: (args: AdoptionWriteArgs & {
|
|
3657
3690
|
name: string;
|
|
3658
3691
|
featureKey: string;
|
|
3659
3692
|
adoptedWhenKind: "event" | "trait";
|
|
3660
|
-
eventName?: string;
|
|
3661
|
-
traitPath?: string;
|
|
3662
|
-
traitValue?: string;
|
|
3663
|
-
priority?: number;
|
|
3664
|
-
order?: number;
|
|
3665
|
-
gapDays?: number;
|
|
3666
|
-
active?: boolean;
|
|
3667
3693
|
scaffold?: "both" | "celebration" | "nudge" | "none";
|
|
3668
3694
|
journeyName?: string;
|
|
3669
3695
|
}) => Promise<{
|
|
@@ -3813,15 +3839,15 @@ export declare const toolDefinitions: {
|
|
|
3813
3839
|
op: z.ZodOptional<z.ZodEnum<["is", "is_not", "exists"]>>;
|
|
3814
3840
|
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
3815
3841
|
}, "strip", z.ZodTypeAny, {
|
|
3816
|
-
value?: string | number | boolean | undefined;
|
|
3817
3842
|
event?: string | undefined;
|
|
3843
|
+
value?: string | number | boolean | undefined;
|
|
3818
3844
|
attribute?: string | undefined;
|
|
3819
3845
|
window_days?: number | undefined;
|
|
3820
3846
|
verb?: "has" | "hasnt" | undefined;
|
|
3821
3847
|
op?: "exists" | "is" | "is_not" | undefined;
|
|
3822
3848
|
}, {
|
|
3823
|
-
value?: string | number | boolean | undefined;
|
|
3824
3849
|
event?: string | undefined;
|
|
3850
|
+
value?: string | number | boolean | undefined;
|
|
3825
3851
|
attribute?: string | undefined;
|
|
3826
3852
|
window_days?: number | undefined;
|
|
3827
3853
|
verb?: "has" | "hasnt" | undefined;
|
|
@@ -3830,8 +3856,8 @@ export declare const toolDefinitions: {
|
|
|
3830
3856
|
}, "strip", z.ZodTypeAny, {
|
|
3831
3857
|
match: "all" | "any";
|
|
3832
3858
|
conditions: {
|
|
3833
|
-
value?: string | number | boolean | undefined;
|
|
3834
3859
|
event?: string | undefined;
|
|
3860
|
+
value?: string | number | boolean | undefined;
|
|
3835
3861
|
attribute?: string | undefined;
|
|
3836
3862
|
window_days?: number | undefined;
|
|
3837
3863
|
verb?: "has" | "hasnt" | undefined;
|
|
@@ -3840,8 +3866,8 @@ export declare const toolDefinitions: {
|
|
|
3840
3866
|
}, {
|
|
3841
3867
|
match: "all" | "any";
|
|
3842
3868
|
conditions: {
|
|
3843
|
-
value?: string | number | boolean | undefined;
|
|
3844
3869
|
event?: string | undefined;
|
|
3870
|
+
value?: string | number | boolean | undefined;
|
|
3845
3871
|
attribute?: string | undefined;
|
|
3846
3872
|
window_days?: number | undefined;
|
|
3847
3873
|
verb?: "has" | "hasnt" | undefined;
|
|
@@ -3853,8 +3879,8 @@ export declare const toolDefinitions: {
|
|
|
3853
3879
|
groups: {
|
|
3854
3880
|
match: "all" | "any";
|
|
3855
3881
|
conditions: {
|
|
3856
|
-
value?: string | number | boolean | undefined;
|
|
3857
3882
|
event?: string | undefined;
|
|
3883
|
+
value?: string | number | boolean | undefined;
|
|
3858
3884
|
attribute?: string | undefined;
|
|
3859
3885
|
window_days?: number | undefined;
|
|
3860
3886
|
verb?: "has" | "hasnt" | undefined;
|
|
@@ -3866,8 +3892,8 @@ export declare const toolDefinitions: {
|
|
|
3866
3892
|
groups: {
|
|
3867
3893
|
match: "all" | "any";
|
|
3868
3894
|
conditions: {
|
|
3869
|
-
value?: string | number | boolean | undefined;
|
|
3870
3895
|
event?: string | undefined;
|
|
3896
|
+
value?: string | number | boolean | undefined;
|
|
3871
3897
|
attribute?: string | undefined;
|
|
3872
3898
|
window_days?: number | undefined;
|
|
3873
3899
|
verb?: "has" | "hasnt" | undefined;
|
|
@@ -3885,8 +3911,8 @@ export declare const toolDefinitions: {
|
|
|
3885
3911
|
groups: {
|
|
3886
3912
|
match: "all" | "any";
|
|
3887
3913
|
conditions: {
|
|
3888
|
-
value?: string | number | boolean | undefined;
|
|
3889
3914
|
event?: string | undefined;
|
|
3915
|
+
value?: string | number | boolean | undefined;
|
|
3890
3916
|
attribute?: string | undefined;
|
|
3891
3917
|
window_days?: number | undefined;
|
|
3892
3918
|
verb?: "has" | "hasnt" | undefined;
|
|
@@ -3904,8 +3930,8 @@ export declare const toolDefinitions: {
|
|
|
3904
3930
|
groups: {
|
|
3905
3931
|
match: "all" | "any";
|
|
3906
3932
|
conditions: {
|
|
3907
|
-
value?: string | number | boolean | undefined;
|
|
3908
3933
|
event?: string | undefined;
|
|
3934
|
+
value?: string | number | boolean | undefined;
|
|
3909
3935
|
attribute?: string | undefined;
|
|
3910
3936
|
window_days?: number | undefined;
|
|
3911
3937
|
verb?: "has" | "hasnt" | undefined;
|