@tryvitris/website-admin-contracts 1.6.0 → 1.7.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.
package/README.md CHANGED
@@ -3,5 +3,7 @@
3
3
  Validated installation manifests, roles, permissions and module contracts for `@tryvitris/website-admin-harness`. Node.js 24+. MIT licensed.
4
4
 
5
5
  The maintenance contract exports the stable admin package family and typed installed/locked/published-version reports and preparation plans. Its policy is prepare-and-test under existing publication permissions. It does not execute updates or create schedules; use the runtime maintenance CLI and its agent guide.
6
-
7
- The `./email-campaigns` entry exports validated contacts, evidence and preferences, bounded audience rules, structured templates, communication purposes, guided workflow steps, website events, account cost calculations, and workspace types. Explicit email permissions remain excluded from existing non-owner role defaults.
6
+
7
+ The `./email-campaigns` entry exports validated contacts, evidence and preferences, bounded audience rules, structured templates, communication purposes, guided workflow steps, website events, account cost calculations, and workspace types. Explicit email permissions remain excluded from existing non-owner role defaults.
8
+
9
+ Google Search Console contracts include performance requests, report provenance/pagination, connection status, supported types/dimensions and `search-console:manage` for connection and sitemap changes.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './email-campaigns.js';
2
+ export * from './search-console.js';
2
3
  export * from './billing.js';
3
4
  export * from './stripe-billing.js';
4
5
  export * from './client-portfolio.js';
@@ -9,7 +10,7 @@ export * from './pairing.js';
9
10
  export * from './signon.js';
10
11
  export declare const contractVersion = 1;
11
12
  export declare const coreSections: readonly ["overview", "leads", "analytics", "settings", "access", "activity"];
12
- export declare const permissions: readonly ["leads:read", "leads:write", "analytics:read", "settings:write", "access:read", "access:write", "activity:read", "tasks:read", "tasks:write", "appointments:read", "appointments:write", "availability:write", "scheduling:configure", "calendar-connections:manage", "clients:read", "client-changes:request", "client-releases:publish", "prospects:read", "prospects:write", "billing:read", "billing:customers:write", "billing:catalog:read", "billing:subscriptions:write", "billing:invoices:write", "billing:collect", "billing:connection:manage", "account-billing:read", "account-billing:manage", "email-campaigns:read", "email-reports:read", "email-contacts:read", "email-contacts:write", "email-contacts:export", "email-content:write", "email-campaigns:send", "email-automations:manage", "email-settings:manage"];
13
+ export declare const permissions: readonly ["leads:read", "leads:write", "analytics:read", "search-console:manage", "settings:write", "access:read", "access:write", "activity:read", "tasks:read", "tasks:write", "appointments:read", "appointments:write", "availability:write", "scheduling:configure", "calendar-connections:manage", "clients:read", "client-changes:request", "client-releases:publish", "prospects:read", "prospects:write", "billing:read", "billing:customers:write", "billing:catalog:read", "billing:subscriptions:write", "billing:invoices:write", "billing:collect", "billing:connection:manage", "account-billing:read", "account-billing:manage", "email-campaigns:read", "email-reports:read", "email-contacts:read", "email-contacts:write", "email-contacts:export", "email-content:write", "email-campaigns:send", "email-automations:manage", "email-settings:manage"];
13
14
  export type Permission = typeof permissions[number];
14
15
  export type Role = 'owner' | 'administrator' | 'editor' | 'analyst';
15
16
  export declare const roles: Record<Role, readonly Permission[]>;
@@ -75,6 +76,7 @@ export interface BootstrapResponse {
75
76
  emailLoginConfigured?: boolean;
76
77
  privateLocalSignIn?: boolean;
77
78
  webmasterEnabled?: boolean;
79
+ searchConsoleEnabled?: boolean;
78
80
  }
79
81
  export type DataSource = 'synthetic' | 'connected' | 'not-connected';
80
82
  export interface LeadRow {
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import { clientOnboardingPermissions } from "./client-onboarding.js";
4
4
  import { billingPermissions } from "./billing.js";
5
5
  import { emailCampaignPermissions } from "./email-campaigns.js";
6
6
  export * from "./email-campaigns.js";
7
+ export * from "./search-console.js";
7
8
  export * from "./billing.js";
8
9
  export * from "./stripe-billing.js";
9
10
  export * from "./client-portfolio.js";
@@ -14,7 +15,7 @@ export * from "./pairing.js";
14
15
  export * from "./signon.js";
15
16
  const contractVersion = 1;
16
17
  const coreSections = ["overview", "leads", "analytics", "settings", "access", "activity"];
17
- const permissions = ["leads:read", "leads:write", "analytics:read", "settings:write", "access:read", "access:write", "activity:read", "tasks:read", "tasks:write", ...schedulingPermissions, ...clientPortfolioPermissions, ...clientOnboardingPermissions, ...billingPermissions, ...emailCampaignPermissions];
18
+ const permissions = ["leads:read", "leads:write", "analytics:read", "search-console:manage", "settings:write", "access:read", "access:write", "activity:read", "tasks:read", "tasks:write", ...schedulingPermissions, ...clientPortfolioPermissions, ...clientOnboardingPermissions, ...billingPermissions, ...emailCampaignPermissions];
18
19
  const roles = {
19
20
  owner: permissions,
20
21
  administrator: permissions.filter((p) => p !== "access:write" && !clientPortfolioPermissions.includes(p) && !clientOnboardingPermissions.includes(p) && !billingPermissions.includes(p) && !emailCampaignPermissions.includes(p)),
@@ -0,0 +1,58 @@
1
+ export declare const searchTypes: readonly ["web", "image", "video", "news", "discover", "googleNews"];
2
+ export declare const searchDimensions: readonly ["date", "hour", "query", "page", "country", "device", "searchAppearance"];
3
+ export type SearchType = typeof searchTypes[number];
4
+ export interface SearchQuery {
5
+ startDate: string;
6
+ endDate: string;
7
+ type: SearchType;
8
+ dimensions: string[];
9
+ rowLimit: number;
10
+ startRow: number;
11
+ dataState: 'final' | 'all' | 'hourly_all';
12
+ dimensionFilterGroups?: {
13
+ groupType: 'and';
14
+ filters: {
15
+ dimension: string;
16
+ operator: string;
17
+ expression: string;
18
+ }[];
19
+ }[];
20
+ }
21
+ export interface SearchRow {
22
+ keys?: string[];
23
+ clicks: number;
24
+ impressions: number;
25
+ ctr: number;
26
+ position?: number;
27
+ }
28
+ export interface SearchReport {
29
+ source: 'google-search-console';
30
+ property: string;
31
+ timezone: 'America/Los_Angeles';
32
+ request: SearchQuery;
33
+ rows: SearchRow[];
34
+ fetchedAt: string;
35
+ nextStartRow: number | null;
36
+ responseAggregationType?: string;
37
+ metadata?: unknown;
38
+ persisted: boolean;
39
+ limitations: string[];
40
+ }
41
+ export interface SearchConsoleStatus {
42
+ configured: boolean;
43
+ connected: boolean;
44
+ property: string | null;
45
+ revision: number;
46
+ canSubmitSitemaps: boolean;
47
+ lastSyncedAt: string | null;
48
+ error: string | null;
49
+ }
50
+ export interface SearchConsoleAppSettings {
51
+ revision: number;
52
+ clientId: string;
53
+ clientSecretSet: boolean;
54
+ encryptionReady: boolean;
55
+ redirectUri: string;
56
+ source: 'admin' | 'environment' | 'not-configured';
57
+ }
58
+ export declare const searchLimitations: string[];
@@ -0,0 +1,13 @@
1
+ // packages/contracts/src/search-console.ts
2
+ var searchTypes = ["web", "image", "video", "news", "discover", "googleNews"];
3
+ var searchDimensions = ["date", "hour", "query", "page", "country", "device", "searchAppearance"];
4
+ var searchLimitations = [
5
+ "Google returns available top rows and omits anonymized queries. Query and page breakdowns need not add up to property totals.",
6
+ "Daily reports use Pacific time. Final data can lag; fresh and hourly data can be incomplete.",
7
+ "Search clicks and impressions are separate from website visits and enquiries. The API does not expose every Search Console report."
8
+ ];
9
+ export {
10
+ searchDimensions,
11
+ searchLimitations,
12
+ searchTypes
13
+ };
package/package.json CHANGED
@@ -1,50 +1,50 @@
1
- {
2
- "name": "@tryvitris/website-admin-contracts",
3
- "version": "1.6.0",
4
- "type": "module",
5
- "license": "MIT",
6
- "description": "Validated installation and module contracts for Cloudflare business admin apps",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "default": "./dist/index.js"
11
- },
12
- "./scheduling": {
13
- "types": "./dist/scheduling.d.ts",
14
- "default": "./dist/scheduling.js"
15
- },
16
- "./email-campaigns": {
17
- "types": "./dist/email-campaigns.d.ts",
18
- "default": "./dist/email-campaigns.js"
19
- }
20
- },
21
- "files": [
22
- "dist",
23
- "vitris-release.json"
24
- ],
25
- "publishConfig": {
26
- "access": "public",
27
- "tag": "latest"
28
- },
29
- "engines": {
30
- "node": ">=24"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/jackperrotta/website-admin-harness.git",
35
- "directory": "packages/contracts"
36
- },
37
- "homepage": "https://github.com/jackperrotta/website-admin-harness#readme",
38
- "bugs": {
39
- "url": "https://github.com/jackperrotta/website-admin-harness/issues"
40
- },
41
- "vitris": {
42
- "maintenance": {
43
- "version": 1,
44
- "policy": "prepare-and-test",
45
- "stableChannel": "latest",
46
- "command": "vitris-admin updates check --dir . --json",
47
- "schedule": "reuse-existing-daily-care"
48
- }
49
- }
50
- }
1
+ {
2
+ "name": "@tryvitris/website-admin-contracts",
3
+ "version": "1.7.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "Validated installation and module contracts for Cloudflare business admin apps",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./scheduling": {
13
+ "types": "./dist/scheduling.d.ts",
14
+ "default": "./dist/scheduling.js"
15
+ },
16
+ "./email-campaigns": {
17
+ "types": "./dist/email-campaigns.d.ts",
18
+ "default": "./dist/email-campaigns.js"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "vitris-release.json"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "tag": "latest"
28
+ },
29
+ "engines": {
30
+ "node": ">=24"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/jackperrotta/website-admin-harness.git",
35
+ "directory": "packages/contracts"
36
+ },
37
+ "homepage": "https://github.com/jackperrotta/website-admin-harness#readme",
38
+ "bugs": {
39
+ "url": "https://github.com/jackperrotta/website-admin-harness/issues"
40
+ },
41
+ "vitris": {
42
+ "maintenance": {
43
+ "version": 1,
44
+ "policy": "prepare-and-test",
45
+ "stableChannel": "latest",
46
+ "command": "vitris-admin updates check --dir . --json",
47
+ "schedule": "reuse-existing-daily-care"
48
+ }
49
+ }
50
+ }
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@tryvitris/website-admin-contracts",
4
- "version": "1.6.0",
5
- "title": "Customer email purposes audiences and workflows",
4
+ "version": "1.7.0",
5
+ "title": "Typed Google search reports and scoped connection management",
6
6
  "notesScope": "package",
7
7
  "notes": [
8
- "Adds typed, validated Cloudflare email settings, contact and permission evidence, segment rules, structured templates, campaign purposes, guided automation steps, website events, workspace responses, and per-account cost calculations.",
9
- "Adds explicit email permissions excluded from existing non-owner role defaults and identifies the optional compiled email workspace without exposing handlers or credentials in bootstrap metadata."
8
+ "Adds Search Console query/report/status types, supported search dimensions and types, provenance, Pacific timezone, Google partial-data metadata, pagination and source-limit disclosures.",
9
+ "Adds search-console:manage to owner and administrator role defaults, retains analyst read-only access through analytics:read, and identifies the optional connection separately from business navigation.",
10
+ "Adds the redacted owner application-settings response for in-admin OAuth setup, including revision, callback URL, credential presence and configuration source."
10
11
  ],
11
12
  "repository": "https://github.com/jackperrotta/website-admin-harness",
12
13
  "readmePath": "packages/contracts/README.md",
13
- "ref": "v1.6.0",
14
- "documentation": "# Website Admin Contracts\r\n\r\nValidated installation manifests, roles, permissions and module contracts for `@tryvitris/website-admin-harness`. Node.js 24+. MIT licensed.\r\n\r\nThe maintenance contract exports the stable admin package family and typed installed/locked/published-version reports and preparation plans. Its policy is prepare-and-test under existing publication permissions. It does not execute updates or create schedules; use the runtime maintenance CLI and its agent guide.\r\n\nThe `./email-campaigns` entry exports validated contacts, evidence and preferences, bounded audience rules, structured templates, communication purposes, guided workflow steps, website events, account cost calculations, and workspace types. Explicit email permissions remain excluded from existing non-owner role defaults.\n",
15
- "documentationSha256": "091ba91c28394499ae091ca75665e8e60b8b47fd07e71bb8fabc4a36fbae2073"
14
+ "ref": "v1.7.0",
15
+ "documentation": "# Website Admin Contracts\r\n\r\nValidated installation manifests, roles, permissions and module contracts for `@tryvitris/website-admin-harness`. Node.js 24+. MIT licensed.\r\n\r\nThe maintenance contract exports the stable admin package family and typed installed/locked/published-version reports and preparation plans. Its policy is prepare-and-test under existing publication permissions. It does not execute updates or create schedules; use the runtime maintenance CLI and its agent guide.\r\n\r\nThe `./email-campaigns` entry exports validated contacts, evidence and preferences, bounded audience rules, structured templates, communication purposes, guided workflow steps, website events, account cost calculations, and workspace types. Explicit email permissions remain excluded from existing non-owner role defaults.\r\n\r\nGoogle Search Console contracts include performance requests, report provenance/pagination, connection status, supported types/dimensions and `search-console:manage` for connection and sitemap changes.\r\n",
16
+ "documentationSha256": "9202d8eb80f8553185603d394b7790c26c1d5ab2de424d59640f4227b55e9a17"
16
17
  }