@madewithremy/admin 0.1.54 → 0.1.56

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/CHANGELOG.md CHANGED
@@ -4,6 +4,25 @@ What changed in `@madewithremy/admin`, newest first, each version under its own
4
4
 
5
5
  Versions before 0.1.44 aren't recorded here.
6
6
 
7
+ ## 0.1.56
8
+
9
+ ### New
10
+
11
+ - Prerendered snapshots are kept per host, so an app serving several sites has each site's own page at a path. `prerender pages` (`admin.prerender.pages`) lists each snapshot's `host` (null for one stored before snapshots were kept per host), `prerender view <path> [--host <h>]` (`admin.prerender.view({ path, host })`) shows one host's copy, the app's own URL by default, and answers with its `host` and the `status` crawlers get it with: 200, or the 4xx the page declared with `<meta name="prerender-status-code">`.
12
+ - `prerender invalidate` (`admin.prerender.invalidate`) takes full URLs as well as paths: a URL purges the page on that host only, a path on every host, as before.
13
+ - `analytics query` (`admin.analytics.query`) takes the new metrics `timeOnPage`, `scrollDepth`, `visitDuration` and `bounceRate` (averages, `null` when there's nothing to average), and the visit dimensions `entryPath`, `exitPath`, `visitReferrerHost`, `visitSourceCategory` and `visitUtmSource`…`visitUtmContent`. It also takes `prop:<key>` for a custom event's property, the filter-only `visitEvent`, and `orderBy` on `visits`.
14
+ - `analytics funnel '<json>'` (`admin.analytics.funnel`) counts visits through ordered steps (pages or events) and where they dropped off, optionally split. `analytics paths ['<json>']` (`admin.analytics.paths`) shows where visits went after a page and their commonest routes. Both follow a visitor across the apps sharing the host (mounts); `meta.apps` lists them.
15
+
16
+ ### Changed behavior
17
+
18
+ - Code reading `admin.prerender.pages()` should tell rows apart by host and path together: the same path on two hosts is two rows.
19
+
20
+ ## 0.1.55
21
+
22
+ ### Changed behavior
23
+
24
+ - `usage.summary` (`remy-admin usage summary`) leaves out all of Remy's own work on the app, not only its builds: testing it in the sandbox (`runMethod`, the preview, and the tasks those runs start) and the security assessment after each deploy count as building it. The summary is what the app costs to run live and in previews. A cost page that showed the gap between `groupBy: 'step'` and `groupBy: 'method'` as unattributed spend will see it shrink: past assessments leave the summary at once, and past sandbox runs as they age out of the window. What's left in the gap is spend no method drove, such as an agent or voice interface's own model calls and data-source ingestion.
25
+
7
26
  ## 0.1.54
8
27
 
9
28
  ### New
package/dist/index.d.ts CHANGED
@@ -330,13 +330,20 @@ declare namespace tasks {
330
330
  * customerApps/AppAnalytics/live/PresenceStore.ts — live DAO
331
331
  * customerApps/AppAnalytics/dao/CrawlerHitsDao.ts — crawlers DAO
332
332
  */
333
- /** The four measurable quantities the query engine can return per row. */
334
- type AnalyticsMetric = 'pageviews' | 'visitors' | 'visits' | 'events';
333
+ /** The counts the query engine can return per row. */
334
+ type AnalyticsCountMetric = 'pageviews' | 'visitors' | 'visits' | 'events';
335
+ /**
336
+ * The averages: seconds a page was actively read, % of the page scrolled,
337
+ * seconds a visit was actively read, % of visits that bounced. `null` in a
338
+ * row when there's nothing to average.
339
+ */
340
+ type AnalyticsAverageMetric = 'timeOnPage' | 'scrollDepth' | 'visitDuration' | 'bounceRate';
341
+ type AnalyticsMetric = AnalyticsCountMetric | AnalyticsAverageMetric;
335
342
  /** One row in a query result. `dimensions` contains the group-by key(s);
336
343
  * `metrics` contains only the requested-and-available metrics. */
337
344
  interface AnalyticsQueryResultRow {
338
345
  dimensions: Record<string, string>;
339
- metrics: Partial<Record<AnalyticsMetric, number>>;
346
+ metrics: Partial<Record<AnalyticsCountMetric, number>> & Partial<Record<AnalyticsAverageMetric, number | null>>;
340
347
  }
341
348
  /** Response shape for POST /insights/query. */
342
349
  interface AnalyticsQueryResult {
@@ -364,6 +371,55 @@ interface AnalyticsQueryResult {
364
371
  interface AnalyticsBatchResult {
365
372
  results: AnalyticsQueryResult[];
366
373
  }
374
+ /** A funnel step: a page opened, or a custom event fired. */
375
+ type AnalyticsFunnelStep = {
376
+ page: string;
377
+ match: 'is' | 'contains';
378
+ } | {
379
+ event: string;
380
+ props: Record<string, string>;
381
+ };
382
+ /** What a funnel or paths read reports about its window and the apps it read. */
383
+ interface AnalyticsVisitReadMeta {
384
+ window: {
385
+ requested: [string, string];
386
+ served: [string, string];
387
+ };
388
+ /** True when the window was cut: to retention, or to when visits were first recorded. */
389
+ clamped: boolean;
390
+ /** The apps whose visits answered: this one, and those sharing its host. */
391
+ apps: string[];
392
+ }
393
+ /** Response shape for POST /insights/funnel. */
394
+ interface AnalyticsFunnelResult {
395
+ steps: {
396
+ step: AnalyticsFunnelStep;
397
+ visits: number;
398
+ dropOff: number;
399
+ }[];
400
+ breakdown?: {
401
+ dimension: string;
402
+ groups: {
403
+ value: string | null;
404
+ visits: number[];
405
+ }[];
406
+ };
407
+ meta: AnalyticsVisitReadMeta;
408
+ }
409
+ /** Response shape for POST /insights/paths. */
410
+ interface AnalyticsPathsResult {
411
+ visits: number;
412
+ /** With `from`: the page opened next, or null where the visit ended. */
413
+ next?: {
414
+ path: string | null;
415
+ visits: number;
416
+ }[];
417
+ routes: {
418
+ paths: string[];
419
+ visits: number;
420
+ }[];
421
+ meta: AnalyticsVisitReadMeta;
422
+ }
367
423
  /** One ranked traffic source row, with category + vendor classification
368
424
  * applied server-side (UTM source values are classified the same way as
369
425
  * referrer hosts — ChatGPT/Perplexity often arrive tagged
@@ -604,18 +660,24 @@ interface CrawlersParams {
604
660
  *
605
661
  * The query body shape (all fields optional except `metrics`):
606
662
  * ```
607
- * metrics ["pageviews" | "visitors" | "visits" | "events", ...]
663
+ * metrics counts: "pageviews" | "visitors" | "visits" | "events"
664
+ * averages (null with nothing to average): "timeOnPage" (s)
665
+ * | "scrollDepth" (%) | "visitDuration" (s) | "bounceRate" (%)
608
666
  * dimensions at most ONE entity dimension OR "time" (not both):
609
667
  * path referrerHost sourceCategory country city deviceType
610
668
  * browser os language visitorType utmSource utmMedium
611
669
  * utmCampaign utmTerm utmContent eventName
670
+ * the visit's: entryPath exitPath visitReferrerHost
671
+ * visitSourceCategory visitUtmSource … visitUtmContent
672
+ * a custom event's property: prop:<key>
612
673
  * granularity required with "time": "5m" | "hour" | "day" | "week" | "month"
613
674
  * timezone IANA zone for day/week/month boundaries (default UTC)
614
675
  * filters [[op, dimension, [values...]], ...]
615
676
  * ops: "is" (any of) | "is_not" (none of) | "contains"
677
+ * plus the filter-only "visitEvent": the visit fired the event
616
678
  * dateRange "1h" | "24h" | "7d" | "30d" | "90d" | "all"
617
679
  * or ["<startISO>", "<endISO>"] (default "24h")
618
- * orderBy grouped only: [["pageviews" | "events", "asc" | "desc"]]
680
+ * orderBy grouped only: [["pageviews" | "events" | "visits", "asc" | "desc"]]
619
681
  * limit grouped only; default 25, max 1000
620
682
  * offset paging
621
683
  * releaseId optional release scope
@@ -650,6 +712,65 @@ declare function query$1(ctx: AdminContext, body: Record<string, unknown>): Prom
650
712
  * ]);
651
713
  */
652
714
  declare function batch(ctx: AdminContext, queries: unknown[] | undefined): Promise<AnalyticsBatchResult>;
715
+ /**
716
+ * How many visits went through ordered steps, and where they dropped off.
717
+ *
718
+ * The body (`steps` required):
719
+ * ```
720
+ * steps 2-8 of { "page": "/pricing", "match"?: "is" | "contains" }
721
+ * or { "event": "signup_start", "props"?: { "plan": "pro" } },
722
+ * each reached after the one before it within one visit
723
+ * breakdown optional split: entryPath exitPath visitReferrerHost
724
+ * visitSourceCategory visitUtm* visitorType deviceType country
725
+ * browser os (its 25 largest values)
726
+ * filters pick visits: a visit is in when any of its rows matches them all
727
+ * dateRange as for query (raw events: 90 days at most)
728
+ * releaseId optional release scope
729
+ * ```
730
+ *
731
+ * Follows a visitor across the apps sharing this one's host (the apps it
732
+ * mounts, the app it's mounted under), the ones the caller may open; `meta.apps`
733
+ * lists them. Visit-level reads start when the app's visits were first
734
+ * recorded, which `meta.clamped` and `meta.window.served` say.
735
+ *
736
+ * @throws AdminApiError `invalid_step` (400) for a malformed or missing step,
737
+ * `invalid_dimension` (400) for a breakdown a visit doesn't have once,
738
+ * `invalid_query_field` (400) for an unknown field.
739
+ *
740
+ * @example
741
+ * const { steps } = await admin.analytics.funnel({
742
+ * steps: [{ page: '/blog/', match: 'contains' }, { event: 'signup_start' }],
743
+ * dateRange: '30d',
744
+ * });
745
+ */
746
+ declare function funnel(ctx: AdminContext, body: Record<string, unknown>): Promise<AnalyticsFunnelResult>;
747
+ /**
748
+ * The routes visits took: where they went after a page, and the pages they
749
+ * commonly opened with.
750
+ *
751
+ * The body (all optional):
752
+ * ```
753
+ * from a path: the pages opened next after it (null = left there)
754
+ * depth 1-5 opening pages per route (default 3)
755
+ * limit 1-100 rows per list (default 10)
756
+ * filters pick visits, as for funnel
757
+ * dateRange as for query (raw events: 90 days at most)
758
+ * releaseId optional release scope
759
+ * ```
760
+ *
761
+ * A page reloaded or reopened in a row counts once. Follows a visitor across
762
+ * the apps sharing this one's host, as `funnel` does.
763
+ *
764
+ * @throws AdminApiError `invalid_query` (400) for a `depth` or `limit` out of
765
+ * range, `invalid_query_field` (400) for an unknown field.
766
+ *
767
+ * @example
768
+ * const { next, routes } = await admin.analytics.paths({
769
+ * from: '/pricing',
770
+ * dateRange: '7d',
771
+ * });
772
+ */
773
+ declare function paths(ctx: AdminContext, body: Record<string, unknown>): Promise<AnalyticsPathsResult>;
653
774
  /**
654
775
  * Ranked traffic sources: per-session first source (UTM > referrer > direct),
655
776
  * with category and vendor classification applied server-side.
@@ -717,11 +838,13 @@ type analytics_SourcesParams = SourcesParams;
717
838
  declare const analytics_aiSources: typeof aiSources;
718
839
  declare const analytics_batch: typeof batch;
719
840
  declare const analytics_crawlers: typeof crawlers;
841
+ declare const analytics_funnel: typeof funnel;
720
842
  declare const analytics_live: typeof live;
721
843
  declare const analytics_map: typeof map;
844
+ declare const analytics_paths: typeof paths;
722
845
  declare const analytics_sources: typeof sources;
723
846
  declare namespace analytics {
724
- export { analytics_aiSources as aiSources, analytics_batch as batch, analytics_crawlers as crawlers, analytics_live as live, analytics_map as map, query$1 as query, analytics_sources as sources };
847
+ export { analytics_aiSources as aiSources, analytics_batch as batch, analytics_crawlers as crawlers, analytics_funnel as funnel, analytics_live as live, analytics_map as map, analytics_paths as paths, query$1 as query, analytics_sources as sources };
725
848
  export type { analytics_AiSourcesParams as AiSourcesParams, analytics_CrawlersParams as CrawlersParams, analytics_MapParams as MapParams, analytics_SourcesParams as SourcesParams };
726
849
  }
727
850
 
@@ -7513,6 +7636,9 @@ declare namespace methods {
7513
7636
  */
7514
7637
  /** One stored snapshot entry as returned by the listing endpoint. */
7515
7638
  interface PrerenderPage {
7639
+ /** The host the page was rendered on, since one app can serve several
7640
+ * sites. Null for a page stored before snapshots were kept per host. */
7641
+ host: string | null;
7516
7642
  path: string;
7517
7643
  /** ISO timestamp of when the snapshot was last written. Optional — absent
7518
7644
  * if the object store did not return a LastModified header. */
@@ -7534,12 +7660,17 @@ interface PrerenderPagesResult {
7534
7660
  * Returns JSON (not text/html) so the snapshot HTML cannot execute in the
7535
7661
  * api origin; the dashboard renders it in a sandboxed iframe. */
7536
7662
  interface PrerenderViewResult {
7663
+ /** The host whose copy this is (the app's address when none was asked for). */
7664
+ host: string;
7537
7665
  path: string;
7538
7666
  html: string;
7667
+ /** The status crawlers are served it with: 200, or the 4xx the page
7668
+ * declared with `<meta name="prerender-status-code">`. */
7669
+ status: number;
7539
7670
  }
7540
7671
  /** Response shape for POST /prerender/invalidate.
7541
- * `purged` is the number of paths explicitly purged, or 'all' when the
7542
- * entire snapshot prefix was wiped (--all flag / no paths body). */
7672
+ * `purged` is the number of pages (paths or URLs) explicitly purged, or 'all'
7673
+ * when the entire snapshot prefix was wiped (--all flag / no paths body). */
7543
7674
  interface PrerenderInvalidateResult {
7544
7675
  purged: number | 'all';
7545
7676
  }
@@ -7571,11 +7702,18 @@ interface PrerenderPagesParams {
7571
7702
  interface PrerenderViewParams {
7572
7703
  /** App path to look up (e.g. `/u/abc123`). Must be non-empty. */
7573
7704
  path: string;
7705
+ /**
7706
+ * The host whose copy to show, for an app serving several sites (as `pages`
7707
+ * lists it). Omit for the copy on the app's address.
7708
+ */
7709
+ host?: string;
7574
7710
  }
7575
7711
  interface PrerenderInvalidateParams {
7576
7712
  /**
7577
- * Paths to purge. Omit (or pass undefined) to purge every snapshot
7578
- * (the `--all` flag). An explicit empty array is the same as --all.
7713
+ * Pages to purge: paths (`/u/abc`), purged on every host the app is served
7714
+ * on, or full URLs (`https://site-a.com/u/abc`), purged on that host only.
7715
+ * Omit (or pass undefined) to purge every snapshot (the `--all` flag). An
7716
+ * explicit empty array is the same as --all.
7579
7717
  */
7580
7718
  paths?: string[];
7581
7719
  }
@@ -7592,14 +7730,15 @@ interface PrerenderInvalidateParams {
7592
7730
  */
7593
7731
  declare function pages(ctx: AdminContext, params?: PrerenderPagesParams): Promise<PrerenderPagesResult>;
7594
7732
  /**
7595
- * Retrieve the stored snapshot HTML for a single path.
7733
+ * Retrieve the stored snapshot HTML for a single path, on one host, with the
7734
+ * status crawlers get it with (a page that declared a 4xx is stored as one).
7596
7735
  *
7597
7736
  * Returns JSON (not text/html) so the snapshot cannot execute in the API
7598
7737
  * origin; render the `html` field in a sandboxed iframe if displaying it.
7599
7738
  *
7600
7739
  * @throws AdminApiError `snapshot_not_found` (404) — no snapshot exists for
7601
- * that path (the path is cold; trigger a render via `prerender get`);
7602
- * `missing_path` (400) — `path` is empty.
7740
+ * that path on that host (the path is cold; trigger a render via
7741
+ * `prerender get`); `missing_path` (400) — `path` is empty.
7603
7742
  * @example
7604
7743
  * const { html } = await admin.prerender.view({ path: '/u/abc123' });
7605
7744
  */
@@ -7612,8 +7751,10 @@ declare function view(ctx: AdminContext, params: PrerenderViewParams): Promise<P
7612
7751
  * invalidated path will trigger a fresh render.
7613
7752
  *
7614
7753
  * @example
7615
- * // Purge a specific path:
7754
+ * // Purge a specific path, on every host:
7616
7755
  * await admin.prerender.invalidate({ paths: ['/u/abc123'] });
7756
+ * // Purge it on one site only:
7757
+ * await admin.prerender.invalidate({ paths: ['https://site-a.com/u/abc123'] });
7617
7758
  * // Purge all snapshots:
7618
7759
  * await admin.prerender.invalidate();
7619
7760
  */
@@ -8581,7 +8722,8 @@ interface UsageSummaryParams {
8581
8722
  }
8582
8723
  /**
8583
8724
  * The app's runtime spend over a window, broken down one way, in dollars.
8584
- * Builds (Remy's own work on the app) aren't counted.
8725
+ * Remy's own work on the app isn't counted: building it, testing it in the
8726
+ * sandbox, and its security assessments.
8585
8727
  *
8586
8728
  * In a method, needs the `usage.view` admin permission.
8587
8729
  *
@@ -9299,4 +9441,4 @@ declare class AdminTimeoutError extends Error {
9299
9441
  declare const admin: AdminClient;
9300
9442
 
9301
9443
  export { AdminApiError, AdminTimeoutError, admin, createAdminClient, admin as default };
9302
- export type { AdminClient, AdminClientOptions, AdminContext, AgentThreadDetail, AgentThreadListItem, AgentThreadsGetResult, AgentThreadsListResult, AgentToolCall, AgentTranscriptMessage, AgentTurnError, AnalyticsAiHostRow, AnalyticsAiSourcesResult, AnalyticsAiVendorRow, AnalyticsBatchResult, AnalyticsCrawlersOverviewResult, AnalyticsCrawlersRecentResult, AnalyticsCrawlersRecentRow, AnalyticsCrawlersResult, AnalyticsCrawlersTimeseriesBucket, AnalyticsCrawlersTimeseriesResult, AnalyticsLiveResult, AnalyticsMapPoint, AnalyticsMapResult, AnalyticsMetric, AnalyticsQueryResult, AnalyticsQueryResultRow, AnalyticsSourceRow, AnalyticsSourcesResult, AppCronJobStatus, AppCronJobStatusReason, AppCronRunState, AppEmailSuppression, AppSecretRow, AppsListPage, AppsListResult, BoughtDomain, CrashGroup, CrashOccurrenceRow, CrashesGetResult, CrashesListResult, CrashesOccurrencesResult, CrashesStatsBucket, CrashesStatsResult, CronJobDecorated, CronOverviewResult, CronRunResult, CronRunSummary, DashboardLiveRelease, DashboardReleaseMethod, DashboardResult, DataLiftFromDevResult, DataLiftFromLiveResult, DataSourceConnector, DataSourceConnectorCredentials, DataSourceConnectorDeletions, DataSourceConnectorGetResult, DataSourceConnectorPolicy, DataSourceConnectorResult, DataSourceInspectReport, DataSourceInspectResult, DataSourceJob, DataSourceJobGetResult, DataSourceJobManifestTokenResult, DataSourceJobPlan, DataSourceJobResult, DataSourceJobSource, DataSourceJobState, DataSourceJobsListResult, DataSourceMapDeployResult, DataSourceMapTestDocument, DataSourceMapTestOutcome, DataSourceMapTestResult, DataSourceMapper, DataSourceObjectSelection, DataSourceQuarantineResult, DataSourceQuarantinedObject, DataSourceReader, DataSourceReaderDeliveries, DataSourceReaderRetryResult, DataSourceReaderStatusResult, DataSourceReaderTestDocument, DataSourceReaderTestResult, DataSourceRemapResult, DataSourceRereadResult, DataSourceSyncResult, DataSourcesBuildProgress, DataSourcesChunkingConfig, DataSourcesChunkingStrategy, DataSourcesConfigResult, DataSourcesConfigUpdateResult, DataSourcesCountResult, DataSourcesCreateResult, DataSourcesDeleteResult, DataSourcesDictionaryPushResult, DataSourcesDictionaryReport, DataSourcesDictionaryStatus, DataSourcesDocument, DataSourcesDocumentConfirmResult, DataSourcesDocumentDeleteManyResult, DataSourcesDocumentDeleteResult, DataSourcesDocumentSelector, DataSourcesDocumentStatus, DataSourcesDocumentsResult, DataSourcesDropResult, DataSourcesEntitiesResult, DataSourcesHydrateResult, DataSourcesHydration, DataSourcesIndex, DataSourcesIngestConfig, DataSourcesIngestUpdate, DataSourcesLinkResult, DataSourcesListEntry, DataSourcesListResult, DataSourcesMigration, DataSourcesMoveResult, DataSourcesPassage, DataSourcesPassagesResult, DataSourcesPlacement, DataSourcesPromoteResult, DataSourcesRelink, DataSourcesRetrievalConfig, DataSourcesRetrievalUpdate, DataSourcesRevectorizeResult, DataSourcesSampleResult, DataSourcesSearchCitation, DataSourcesSearchResult, DataSourcesSearchResultItem, DataSourcesUploadTokenResult, DatasetFile, DbHistoryResult, DbQueryResult, DiagnosticsAuditEnvironment, DiagnosticsDashboardResult, DiagnosticsFinding, DiagnosticsLighthouseScores, DiagnosticsPayload, DiagnosticsReleaseResult, DiagnosticsRuntimeFindings, DomainsCheckResult, DomainsCustomAddResult, DomainsCustomCheckResult, DomainsCustomHostnameUiStatus, DomainsCustomHostnameView, DomainsCustomListResult, DomainsCustomRemoveResult, DomainsCustomRetryResult, DomainsDnsInstructions, DomainsGetResult, DomainsSetResult, EmailBatchLifecycle, EmailBatchResult, EmailBatchSummary, EmailBatchesResult, EmailDomainBase, EmailEffectiveSender, EmailInboxResult, EmailListResult, EmailMessageKind, EmailMessageResult, EmailMessageStatus, EmailSenderTier, EmailSendingStatusResult, EmailStatsResult, EmailSummary, EmailSuppressResult, EmailSuppressionsResult, EmailUnsuppressResult, EvalAggregates, EvalCompareResult, EvalExpectation, EvalQueriesAddResult, EvalQueriesListResult, EvalQuery, EvalQueryResult, EvalQueryStyle, EvalRetrieval, EvalRun, EvalRunResult, EvalRunState, EvalRunsListResult, EvalSet, EvalSetGetResult, EvalSetResult, EvalSetState, EvalSetsListResult, EventChannelActivity, EventsChannelsListResult, EventsPublishResult, EventsTailFrame, FilesDeleteResult, FilesFileMeta, FilesListEntry, FilesListResult, FilesLsResult, FilesScanBadge, FilesScanFlagged, FilesScanStore, FilesStatResult, FilesStoreSummaryEntry, FilesUploadUrlResult, FilesUrlResult, FrontendErrorType, InboundDnsInstructions, InboundEmailDomainAddResult, InboundEmailDomainCheckResult, InboundEmailDomainDeleteResult, InboundEmailDomainUiStatus, InboundEmailDomainVerifyResult, InboundEmailDomainView, InboundEmailDomainsListResult, InboxEmailPreview, IssueAuthorKind, IssueCommentRow, IssueEventType, IssueRow, IssueStatus, IssuesCommentResult, IssuesCreateResult, IssuesDeleteResult, IssuesGetResult, IssuesListResult, IssuesUpdateResult, JewelPairRow, JewelPairSummaryRow, JewelVerdict, JewelsDatasetSummary, JewelsDryrunResult, JewelsExportResult, JewelsGradeResult, JewelsGrading, JewelsOverviewResult, JewelsPairResult, JewelsPairsResult, JewelsQueueResult, JewelsResolveResult, JewelsRunResult, JewelsRunsResult, JewelsTimeseriesBucket, JewelsTimeseriesResult, JewelsTrainResult, LiftedDatabase, MethodsInvokeResult, OperationProgress, OutboundDnsInstructions, OutboundDnsRecord, OutboundEmailDomainAddResult, OutboundEmailDomainCheckResult, OutboundEmailDomainDeleteResult, OutboundEmailDomainUiStatus, OutboundEmailDomainVerifyResult, OutboundEmailDomainView, OutboundEmailDomainsListResult, PlatformSuppression, PrerenderGetResult, PrerenderInvalidateResult, PrerenderPage, PrerenderPagesResult, PrerenderViewResult, PreviewShareLink, PreviewShareListResult, PreviewShareResult, PreviewShareRevokeResult, RegisteredDomainConnection, RegisteredDomainOffer, RegisteredDomainQuote, RegisteredDomainRecordType, RegisteredDomainRecords, RegisteredDomainStatus, RegisteredDomainView, RegisteredDomainZoneRecord, RegisteredDomainsBuyResult, RegisteredDomainsContactResult, RegisteredDomainsContactSetResult, RegisteredDomainsListResult, RegisteredDomainsQuoteResult, RegisteredDomainsRecordDeleteResult, RegisteredDomainsRecordResult, RegisteredDomainsSearchResult, RegisteredDomainsZoneResult, RegistrantContact, ReleaseFailureFields, ReleaseFragment, ReleasesByCommitResult, ReleasesGetResult, ReleasesListResult, RequestsGetResult, RequestsListResult, RequestsListRow, RequestsStatsMethodBucket, RequestsStatsMethodResult, RequestsStatsSummaryBucket, RequestsStatsSummaryResult, SecretsDeleteResult, SecretsGetResult, SecretsListResult, SecretsSetResult, SettingsResult, SuppressionSource, TaskTraceOutcome, TaskTraceSummary, TaskTranscriptMessage, TaskTurnError, TasksGetResult, TasksListResult, TrainingLogEntry, TrainingRunRow, TrainingRunStatus, UsageGroup, UsageGroupBy, UsageSummaryResult, UserAuthProvider, UserListItem, UserRecord, UsersCreateApiKeyResult, UsersListResult, UsersRevokeApiKeyResult, UsersSetRoleResult, V2AppSettings, V2BuildLogEntry, V2BuildStats, V2CommitInfo, V2EmailMessage, V2ReleaseStatus, VoiceAvailableNumber, VoiceNumbersBuyResult, VoiceNumbersListResult, VoiceNumbersReleaseResult, VoiceNumbersSearchResult, VoiceNumbersSetNameResult, VoicePhoneNumberStatus, VoicePhoneNumberView, VoiceResolvedPolicy, VoiceSessionChannel, VoiceSessionCost, VoiceSessionCostLine, VoiceSessionDetail, VoiceSessionGetResult, VoiceSessionListItem, VoiceSessionSip, VoiceSessionSpeechEntry, VoiceSessionStatus, VoiceSessionToolEntry, VoiceSessionTranscriptEntry, VoiceSessionsListResult, VoiceSettingsCeilings, VoiceSettingsGetResult, VoiceSettingsOverrides, VoiceSettingsSetResult, WorkspaceApp, WorkspaceRegistrantContact };
9444
+ export type { AdminClient, AdminClientOptions, AdminContext, AgentThreadDetail, AgentThreadListItem, AgentThreadsGetResult, AgentThreadsListResult, AgentToolCall, AgentTranscriptMessage, AgentTurnError, AnalyticsAiHostRow, AnalyticsAiSourcesResult, AnalyticsAiVendorRow, AnalyticsAverageMetric, AnalyticsBatchResult, AnalyticsCountMetric, AnalyticsCrawlersOverviewResult, AnalyticsCrawlersRecentResult, AnalyticsCrawlersRecentRow, AnalyticsCrawlersResult, AnalyticsCrawlersTimeseriesBucket, AnalyticsCrawlersTimeseriesResult, AnalyticsFunnelResult, AnalyticsFunnelStep, AnalyticsLiveResult, AnalyticsMapPoint, AnalyticsMapResult, AnalyticsMetric, AnalyticsPathsResult, AnalyticsQueryResult, AnalyticsQueryResultRow, AnalyticsSourceRow, AnalyticsSourcesResult, AnalyticsVisitReadMeta, AppCronJobStatus, AppCronJobStatusReason, AppCronRunState, AppEmailSuppression, AppSecretRow, AppsListPage, AppsListResult, BoughtDomain, CrashGroup, CrashOccurrenceRow, CrashesGetResult, CrashesListResult, CrashesOccurrencesResult, CrashesStatsBucket, CrashesStatsResult, CronJobDecorated, CronOverviewResult, CronRunResult, CronRunSummary, DashboardLiveRelease, DashboardReleaseMethod, DashboardResult, DataLiftFromDevResult, DataLiftFromLiveResult, DataSourceConnector, DataSourceConnectorCredentials, DataSourceConnectorDeletions, DataSourceConnectorGetResult, DataSourceConnectorPolicy, DataSourceConnectorResult, DataSourceInspectReport, DataSourceInspectResult, DataSourceJob, DataSourceJobGetResult, DataSourceJobManifestTokenResult, DataSourceJobPlan, DataSourceJobResult, DataSourceJobSource, DataSourceJobState, DataSourceJobsListResult, DataSourceMapDeployResult, DataSourceMapTestDocument, DataSourceMapTestOutcome, DataSourceMapTestResult, DataSourceMapper, DataSourceObjectSelection, DataSourceQuarantineResult, DataSourceQuarantinedObject, DataSourceReader, DataSourceReaderDeliveries, DataSourceReaderRetryResult, DataSourceReaderStatusResult, DataSourceReaderTestDocument, DataSourceReaderTestResult, DataSourceRemapResult, DataSourceRereadResult, DataSourceSyncResult, DataSourcesBuildProgress, DataSourcesChunkingConfig, DataSourcesChunkingStrategy, DataSourcesConfigResult, DataSourcesConfigUpdateResult, DataSourcesCountResult, DataSourcesCreateResult, DataSourcesDeleteResult, DataSourcesDictionaryPushResult, DataSourcesDictionaryReport, DataSourcesDictionaryStatus, DataSourcesDocument, DataSourcesDocumentConfirmResult, DataSourcesDocumentDeleteManyResult, DataSourcesDocumentDeleteResult, DataSourcesDocumentSelector, DataSourcesDocumentStatus, DataSourcesDocumentsResult, DataSourcesDropResult, DataSourcesEntitiesResult, DataSourcesHydrateResult, DataSourcesHydration, DataSourcesIndex, DataSourcesIngestConfig, DataSourcesIngestUpdate, DataSourcesLinkResult, DataSourcesListEntry, DataSourcesListResult, DataSourcesMigration, DataSourcesMoveResult, DataSourcesPassage, DataSourcesPassagesResult, DataSourcesPlacement, DataSourcesPromoteResult, DataSourcesRelink, DataSourcesRetrievalConfig, DataSourcesRetrievalUpdate, DataSourcesRevectorizeResult, DataSourcesSampleResult, DataSourcesSearchCitation, DataSourcesSearchResult, DataSourcesSearchResultItem, DataSourcesUploadTokenResult, DatasetFile, DbHistoryResult, DbQueryResult, DiagnosticsAuditEnvironment, DiagnosticsDashboardResult, DiagnosticsFinding, DiagnosticsLighthouseScores, DiagnosticsPayload, DiagnosticsReleaseResult, DiagnosticsRuntimeFindings, DomainsCheckResult, DomainsCustomAddResult, DomainsCustomCheckResult, DomainsCustomHostnameUiStatus, DomainsCustomHostnameView, DomainsCustomListResult, DomainsCustomRemoveResult, DomainsCustomRetryResult, DomainsDnsInstructions, DomainsGetResult, DomainsSetResult, EmailBatchLifecycle, EmailBatchResult, EmailBatchSummary, EmailBatchesResult, EmailDomainBase, EmailEffectiveSender, EmailInboxResult, EmailListResult, EmailMessageKind, EmailMessageResult, EmailMessageStatus, EmailSenderTier, EmailSendingStatusResult, EmailStatsResult, EmailSummary, EmailSuppressResult, EmailSuppressionsResult, EmailUnsuppressResult, EvalAggregates, EvalCompareResult, EvalExpectation, EvalQueriesAddResult, EvalQueriesListResult, EvalQuery, EvalQueryResult, EvalQueryStyle, EvalRetrieval, EvalRun, EvalRunResult, EvalRunState, EvalRunsListResult, EvalSet, EvalSetGetResult, EvalSetResult, EvalSetState, EvalSetsListResult, EventChannelActivity, EventsChannelsListResult, EventsPublishResult, EventsTailFrame, FilesDeleteResult, FilesFileMeta, FilesListEntry, FilesListResult, FilesLsResult, FilesScanBadge, FilesScanFlagged, FilesScanStore, FilesStatResult, FilesStoreSummaryEntry, FilesUploadUrlResult, FilesUrlResult, FrontendErrorType, InboundDnsInstructions, InboundEmailDomainAddResult, InboundEmailDomainCheckResult, InboundEmailDomainDeleteResult, InboundEmailDomainUiStatus, InboundEmailDomainVerifyResult, InboundEmailDomainView, InboundEmailDomainsListResult, InboxEmailPreview, IssueAuthorKind, IssueCommentRow, IssueEventType, IssueRow, IssueStatus, IssuesCommentResult, IssuesCreateResult, IssuesDeleteResult, IssuesGetResult, IssuesListResult, IssuesUpdateResult, JewelPairRow, JewelPairSummaryRow, JewelVerdict, JewelsDatasetSummary, JewelsDryrunResult, JewelsExportResult, JewelsGradeResult, JewelsGrading, JewelsOverviewResult, JewelsPairResult, JewelsPairsResult, JewelsQueueResult, JewelsResolveResult, JewelsRunResult, JewelsRunsResult, JewelsTimeseriesBucket, JewelsTimeseriesResult, JewelsTrainResult, LiftedDatabase, MethodsInvokeResult, OperationProgress, OutboundDnsInstructions, OutboundDnsRecord, OutboundEmailDomainAddResult, OutboundEmailDomainCheckResult, OutboundEmailDomainDeleteResult, OutboundEmailDomainUiStatus, OutboundEmailDomainVerifyResult, OutboundEmailDomainView, OutboundEmailDomainsListResult, PlatformSuppression, PrerenderGetResult, PrerenderInvalidateResult, PrerenderPage, PrerenderPagesResult, PrerenderViewResult, PreviewShareLink, PreviewShareListResult, PreviewShareResult, PreviewShareRevokeResult, RegisteredDomainConnection, RegisteredDomainOffer, RegisteredDomainQuote, RegisteredDomainRecordType, RegisteredDomainRecords, RegisteredDomainStatus, RegisteredDomainView, RegisteredDomainZoneRecord, RegisteredDomainsBuyResult, RegisteredDomainsContactResult, RegisteredDomainsContactSetResult, RegisteredDomainsListResult, RegisteredDomainsQuoteResult, RegisteredDomainsRecordDeleteResult, RegisteredDomainsRecordResult, RegisteredDomainsSearchResult, RegisteredDomainsZoneResult, RegistrantContact, ReleaseFailureFields, ReleaseFragment, ReleasesByCommitResult, ReleasesGetResult, ReleasesListResult, RequestsGetResult, RequestsListResult, RequestsListRow, RequestsStatsMethodBucket, RequestsStatsMethodResult, RequestsStatsSummaryBucket, RequestsStatsSummaryResult, SecretsDeleteResult, SecretsGetResult, SecretsListResult, SecretsSetResult, SettingsResult, SuppressionSource, TaskTraceOutcome, TaskTraceSummary, TaskTranscriptMessage, TaskTurnError, TasksGetResult, TasksListResult, TrainingLogEntry, TrainingRunRow, TrainingRunStatus, UsageGroup, UsageGroupBy, UsageSummaryResult, UserAuthProvider, UserListItem, UserRecord, UsersCreateApiKeyResult, UsersListResult, UsersRevokeApiKeyResult, UsersSetRoleResult, V2AppSettings, V2BuildLogEntry, V2BuildStats, V2CommitInfo, V2EmailMessage, V2ReleaseStatus, VoiceAvailableNumber, VoiceNumbersBuyResult, VoiceNumbersListResult, VoiceNumbersReleaseResult, VoiceNumbersSearchResult, VoiceNumbersSetNameResult, VoicePhoneNumberStatus, VoicePhoneNumberView, VoiceResolvedPolicy, VoiceSessionChannel, VoiceSessionCost, VoiceSessionCostLine, VoiceSessionDetail, VoiceSessionGetResult, VoiceSessionListItem, VoiceSessionSip, VoiceSessionSpeechEntry, VoiceSessionStatus, VoiceSessionToolEntry, VoiceSessionTranscriptEntry, VoiceSessionsListResult, VoiceSettingsCeilings, VoiceSettingsGetResult, VoiceSettingsOverrides, VoiceSettingsSetResult, WorkspaceApp, WorkspaceRegistrantContact };
package/dist/index.js CHANGED
@@ -260,8 +260,10 @@ __export(analytics_exports, {
260
260
  aiSources: () => aiSources,
261
261
  batch: () => batch,
262
262
  crawlers: () => crawlers,
263
+ funnel: () => funnel,
263
264
  live: () => live,
264
265
  map: () => map,
266
+ paths: () => paths,
265
267
  query: () => query,
266
268
  sources: () => sources
267
269
  });
@@ -281,6 +283,22 @@ function batch(ctx, queries) {
281
283
  { queries }
282
284
  );
283
285
  }
286
+ function funnel(ctx, body) {
287
+ return call(
288
+ ctx,
289
+ "POST",
290
+ `/_internal/v2/apps/${ctx.appId}/insights/funnel`,
291
+ body
292
+ );
293
+ }
294
+ function paths(ctx, body) {
295
+ return call(
296
+ ctx,
297
+ "POST",
298
+ `/_internal/v2/apps/${ctx.appId}/insights/paths`,
299
+ body
300
+ );
301
+ }
284
302
  function sources(ctx, params = {}) {
285
303
  return call(
286
304
  ctx,
@@ -2758,7 +2776,7 @@ function view(ctx, params) {
2758
2776
  return call(
2759
2777
  ctx,
2760
2778
  "GET",
2761
- `/_internal/v2/apps/${ctx.appId}/prerender/pages/view${qs({ path: params.path })}`
2779
+ `/_internal/v2/apps/${ctx.appId}/prerender/pages/view${qs({ path: params.path, host: params.host })}`
2762
2780
  );
2763
2781
  }
2764
2782
  function invalidate(ctx, params = {}) {