@neopress/mcp 1.5.0 → 1.6.1
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/README.md +15 -2
- package/dist/bin.cjs +344 -20
- package/dist/http-bin.cjs +344 -20
- package/dist/index.d.ts +131 -0
- package/dist/index.js +344 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -198,11 +198,13 @@ interface SiteLayout {
|
|
|
198
198
|
draftTsx: string | null;
|
|
199
199
|
draftGlobalCss: string | null;
|
|
200
200
|
draftNotFoundTsx: string | null;
|
|
201
|
+
draftI18n: unknown;
|
|
201
202
|
prodTsx: string | null;
|
|
202
203
|
prodJs: string | null;
|
|
203
204
|
prodGlobalCss: string | null;
|
|
204
205
|
prodNotFoundTsx: string | null;
|
|
205
206
|
prodNotFoundJs: string | null;
|
|
207
|
+
prodI18n: unknown;
|
|
206
208
|
}
|
|
207
209
|
interface Headshot {
|
|
208
210
|
id: number;
|
|
@@ -289,6 +291,105 @@ interface SearchConsoleQueryResult {
|
|
|
289
291
|
};
|
|
290
292
|
error?: string;
|
|
291
293
|
}
|
|
294
|
+
type AnalyticsEventType = "custom" | "page" | "click" | "form" | "scroll" | "visibility" | "dwell" | "outbound";
|
|
295
|
+
/** `visibility` remains readable for historical definitions but cannot be created. */
|
|
296
|
+
type AnalyticsEventCreateType = Exclude<AnalyticsEventType, "visibility">;
|
|
297
|
+
type FunnelFilterField = "event.path" | "event.url" | "event.referrer" | "event.referrer_source" | "event.property" | "session.referrer" | "session.referrer_source" | "session.traffic_category" | "session.utm_source" | "session.utm_medium" | "session.utm_campaign" | "session.utm_content" | "session.utm_term";
|
|
298
|
+
type FunnelFilterOperator = "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "exists" | "not_exists" | "gt" | "gte" | "lt" | "lte";
|
|
299
|
+
type AnalyticsFunnelFilterCondition = {
|
|
300
|
+
kind: "condition";
|
|
301
|
+
field: FunnelFilterField;
|
|
302
|
+
operator: FunnelFilterOperator;
|
|
303
|
+
key?: string;
|
|
304
|
+
value?: string | number;
|
|
305
|
+
};
|
|
306
|
+
type AnalyticsFunnelFilterGroup = {
|
|
307
|
+
kind: "group";
|
|
308
|
+
op: "and" | "or";
|
|
309
|
+
children: AnalyticsFunnelFilterNode[];
|
|
310
|
+
};
|
|
311
|
+
type AnalyticsFunnelFilterNode = AnalyticsFunnelFilterGroup | AnalyticsFunnelFilterCondition;
|
|
312
|
+
type AnalyticsFunnelFilter = {
|
|
313
|
+
version: 1;
|
|
314
|
+
root: AnalyticsFunnelFilterGroup;
|
|
315
|
+
};
|
|
316
|
+
interface AnalyticsEventDefinition {
|
|
317
|
+
id: string;
|
|
318
|
+
chart_color: string | null;
|
|
319
|
+
name: string;
|
|
320
|
+
chart_visible: boolean;
|
|
321
|
+
is_pinned: boolean;
|
|
322
|
+
sort_order?: number | null;
|
|
323
|
+
event_type: AnalyticsEventType;
|
|
324
|
+
event_name: string;
|
|
325
|
+
path: string;
|
|
326
|
+
selector: string;
|
|
327
|
+
form_id: string;
|
|
328
|
+
scroll_depth: number;
|
|
329
|
+
dwell_seconds: number;
|
|
330
|
+
tracking_version: number;
|
|
331
|
+
created_at: string;
|
|
332
|
+
updated_at: string;
|
|
333
|
+
}
|
|
334
|
+
interface AnalyticsEventDefinitionInput {
|
|
335
|
+
/** Optional client UUID; reuse it with the same payload after an uncertain create response. */
|
|
336
|
+
id?: string;
|
|
337
|
+
name: string;
|
|
338
|
+
eventType: AnalyticsEventCreateType;
|
|
339
|
+
eventName?: string;
|
|
340
|
+
path?: string;
|
|
341
|
+
selector?: string;
|
|
342
|
+
formId?: string;
|
|
343
|
+
scrollDepth?: number;
|
|
344
|
+
dwellSeconds?: number;
|
|
345
|
+
}
|
|
346
|
+
type AnalyticsEventDefinitionUpdate = AnalyticsEventDefinitionInput | {
|
|
347
|
+
name: string;
|
|
348
|
+
};
|
|
349
|
+
interface AnalyticsEventDisplayUpdate {
|
|
350
|
+
chartVisible?: boolean;
|
|
351
|
+
pinned?: boolean;
|
|
352
|
+
chartColor?: string;
|
|
353
|
+
}
|
|
354
|
+
interface AnalyticsFunnelStepInput {
|
|
355
|
+
eventId: string;
|
|
356
|
+
path?: string;
|
|
357
|
+
filter?: AnalyticsFunnelFilter;
|
|
358
|
+
}
|
|
359
|
+
interface AnalyticsFunnelStep {
|
|
360
|
+
event_id: string;
|
|
361
|
+
path?: string;
|
|
362
|
+
filter?: AnalyticsFunnelFilter;
|
|
363
|
+
}
|
|
364
|
+
interface AnalyticsFunnelDefinition {
|
|
365
|
+
invalid?: true;
|
|
366
|
+
id: string;
|
|
367
|
+
name: string;
|
|
368
|
+
steps: AnalyticsFunnelStep[];
|
|
369
|
+
session_only: boolean;
|
|
370
|
+
window_minutes: number;
|
|
371
|
+
created_at: string;
|
|
372
|
+
updated_at: string;
|
|
373
|
+
}
|
|
374
|
+
interface AnalyticsTargets {
|
|
375
|
+
pages: Array<{
|
|
376
|
+
id: number;
|
|
377
|
+
name: string;
|
|
378
|
+
path: string;
|
|
379
|
+
locale: string;
|
|
380
|
+
}>;
|
|
381
|
+
forms: Array<{
|
|
382
|
+
id: number;
|
|
383
|
+
name: string;
|
|
384
|
+
}>;
|
|
385
|
+
}
|
|
386
|
+
interface AnalyticsFunnelDefinitionInput {
|
|
387
|
+
id?: string;
|
|
388
|
+
name: string;
|
|
389
|
+
steps: AnalyticsFunnelStepInput[];
|
|
390
|
+
windowMode: "session" | "time";
|
|
391
|
+
windowHours?: number;
|
|
392
|
+
}
|
|
292
393
|
//#endregion
|
|
293
394
|
//#region ../sdk/src/endpoints/pages.d.ts
|
|
294
395
|
interface PageListParams {
|
|
@@ -407,6 +508,8 @@ declare class EntriesEndpoint {
|
|
|
407
508
|
list(collectionId: number, params?: EntryListParams): Promise<PaginatedResponse<Entry>>;
|
|
408
509
|
get(entryId: number): Promise<Entry>;
|
|
409
510
|
create(collectionId: number, data: EntryCreateParams): Promise<Entry>;
|
|
511
|
+
/** Copy source content into a linked locale draft, or return its existing translation. */
|
|
512
|
+
createTranslation(entryId: number, locale: string): Promise<Entry>;
|
|
410
513
|
update(entryId: number, data: EntryUpdateParams): Promise<Entry>;
|
|
411
514
|
delete(entryId: number): Promise<void>;
|
|
412
515
|
revalidateReaderCache(entryId: number): Promise<void>;
|
|
@@ -549,6 +652,8 @@ declare class SiteEndpoint {
|
|
|
549
652
|
draftTsx?: string;
|
|
550
653
|
draftNotFoundTsx?: string;
|
|
551
654
|
draftGlobalCss?: string;
|
|
655
|
+
/** Replaces draft translations; null clears them, omission preserves them. */
|
|
656
|
+
draftI18n?: unknown;
|
|
552
657
|
}): Promise<SiteLayout>;
|
|
553
658
|
delete(): Promise<{
|
|
554
659
|
siteId: number;
|
|
@@ -616,6 +721,8 @@ declare class EntryReferencesEndpoint {
|
|
|
616
721
|
//#region ../sdk/src/endpoints/analytics.d.ts
|
|
617
722
|
declare class AnalyticsEndpoint {
|
|
618
723
|
private readonly client;
|
|
724
|
+
readonly events: AnalyticsEventsEndpoint;
|
|
725
|
+
readonly funnels: AnalyticsFunnelsEndpoint;
|
|
619
726
|
constructor(client: NeopressClient);
|
|
620
727
|
private get basePath();
|
|
621
728
|
query(params: AnalyticsQueryParams): Promise<AnalyticsQueryResult>;
|
|
@@ -626,6 +733,30 @@ declare class AnalyticsEndpoint {
|
|
|
626
733
|
formAnalytics(params?: AnalyticsDateRangeParams): Promise<AnalyticsQueryResult>;
|
|
627
734
|
crawlerSummary(params?: AnalyticsDateRangeParams): Promise<AnalyticsQueryResult>;
|
|
628
735
|
searchConsole(params: SearchConsoleQueryParams): Promise<SearchConsoleQueryResult>;
|
|
736
|
+
/** Page/form targets that can be referenced by an event definition. */
|
|
737
|
+
targets(): Promise<AnalyticsTargets>;
|
|
738
|
+
}
|
|
739
|
+
declare class AnalyticsEventsEndpoint {
|
|
740
|
+
private readonly client;
|
|
741
|
+
constructor(client: NeopressClient);
|
|
742
|
+
private get basePath();
|
|
743
|
+
list(): Promise<AnalyticsEventDefinition[]>;
|
|
744
|
+
get(eventId: string): Promise<AnalyticsEventDefinition>;
|
|
745
|
+
create(data: AnalyticsEventDefinitionInput): Promise<AnalyticsEventDefinition>;
|
|
746
|
+
update(eventId: string, data: AnalyticsEventDefinitionUpdate | {
|
|
747
|
+
display: AnalyticsEventDisplayUpdate;
|
|
748
|
+
}): Promise<AnalyticsEventDefinition>;
|
|
749
|
+
delete(eventId: string): Promise<void>;
|
|
750
|
+
}
|
|
751
|
+
declare class AnalyticsFunnelsEndpoint {
|
|
752
|
+
private readonly client;
|
|
753
|
+
constructor(client: NeopressClient);
|
|
754
|
+
private get basePath();
|
|
755
|
+
list(): Promise<AnalyticsFunnelDefinition[]>;
|
|
756
|
+
get(funnelId: string): Promise<AnalyticsFunnelDefinition>;
|
|
757
|
+
create(data: AnalyticsFunnelDefinitionInput): Promise<AnalyticsFunnelDefinition>;
|
|
758
|
+
update(funnelId: string, data: AnalyticsFunnelDefinitionInput): Promise<AnalyticsFunnelDefinition>;
|
|
759
|
+
delete(funnelId: string): Promise<void>;
|
|
629
760
|
}
|
|
630
761
|
//#endregion
|
|
631
762
|
//#region ../sdk/src/endpoints/templates.d.ts
|