@haakco/custd-sdk 2.4.0 → 3.71.2

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 (183) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +586 -40
  3. package/dist/admin-accounting-evidence.d.ts +48 -0
  4. package/dist/admin-accounting-evidence.js +24 -0
  5. package/dist/admin-app-releases.d.ts +116 -0
  6. package/dist/admin-app-releases.js +8 -0
  7. package/dist/admin-apps.d.ts +120 -0
  8. package/dist/admin-apps.js +47 -0
  9. package/dist/admin-auth-project-domain.d.ts +125 -0
  10. package/dist/admin-auth-project-domain.js +37 -0
  11. package/dist/admin-auth-projects.d.ts +989 -0
  12. package/dist/admin-auth-projects.js +527 -0
  13. package/dist/admin-campaign-email.d.ts +120 -0
  14. package/dist/admin-campaign-email.js +64 -0
  15. package/dist/admin-client-setup.d.ts +22 -0
  16. package/dist/admin-client-setup.js +11 -1
  17. package/dist/admin-data-scopes.d.ts +93 -0
  18. package/dist/admin-data-scopes.js +154 -0
  19. package/dist/admin-email-relay.d.ts +66 -0
  20. package/dist/admin-email-relay.js +25 -0
  21. package/dist/admin-environment-policy.d.ts +32 -0
  22. package/dist/admin-environment-policy.js +26 -0
  23. package/dist/admin-error-issues.d.ts +91 -0
  24. package/dist/admin-error-issues.js +52 -0
  25. package/dist/admin-event-types.d.ts +57 -0
  26. package/dist/admin-event-types.js +28 -0
  27. package/dist/admin-impersonation.d.ts +48 -0
  28. package/dist/admin-impersonation.js +27 -0
  29. package/dist/admin-ingest-claims.d.ts +35 -0
  30. package/dist/admin-ingest-claims.js +26 -0
  31. package/dist/admin-managed-audit.d.ts +13 -0
  32. package/dist/admin-managed-audit.js +13 -0
  33. package/dist/admin-measurement-projects.d.ts +166 -0
  34. package/dist/admin-measurement-projects.js +120 -0
  35. package/dist/admin-notification-destinations.d.ts +31 -0
  36. package/dist/admin-notification-destinations.js +19 -0
  37. package/dist/admin-notification-webhooks.d.ts +64 -0
  38. package/dist/admin-notification-webhooks.js +42 -0
  39. package/dist/admin-oauth-client-admissions.d.ts +65 -0
  40. package/dist/admin-oauth-client-admissions.js +46 -0
  41. package/dist/admin-offboarding.d.ts +20 -6
  42. package/dist/admin-offboarding.js +27 -6
  43. package/dist/admin-predictions.d.ts +127 -8
  44. package/dist/admin-predictions.js +22 -12
  45. package/dist/admin-privacy-erasures.d.ts +24 -12
  46. package/dist/admin-privacy-erasures.js +3 -2
  47. package/dist/admin-retention.d.ts +72 -24
  48. package/dist/admin-retention.js +38 -13
  49. package/dist/admin-rls.d.ts +94 -0
  50. package/dist/admin-rls.js +33 -0
  51. package/dist/admin-sdk-usage.d.ts +41 -0
  52. package/dist/admin-sdk-usage.js +23 -0
  53. package/dist/admin-site-ai.d.ts +72 -0
  54. package/dist/admin-site-ai.js +1 -0
  55. package/dist/admin-site-analytics.d.ts +52 -0
  56. package/dist/admin-site-analytics.js +14 -0
  57. package/dist/admin-site-audit-pages.d.ts +76 -0
  58. package/dist/admin-site-audit-pages.js +27 -0
  59. package/dist/admin-site-campaign-links.d.ts +40 -0
  60. package/dist/admin-site-campaign-links.js +9 -0
  61. package/dist/admin-site-domains.d.ts +733 -0
  62. package/dist/admin-site-domains.js +768 -0
  63. package/dist/admin-site-export.d.ts +76 -0
  64. package/dist/admin-site-export.js +15 -0
  65. package/dist/admin-site-insights-tasks.d.ts +44 -0
  66. package/dist/admin-site-insights-tasks.js +28 -0
  67. package/dist/admin-site-insights.d.ts +527 -0
  68. package/dist/admin-site-insights.js +61 -0
  69. package/dist/admin-site-links.d.ts +87 -0
  70. package/dist/admin-site-links.js +16 -0
  71. package/dist/admin-site-monitors.d.ts +110 -0
  72. package/dist/admin-site-monitors.js +25 -0
  73. package/dist/admin-site-next-actions.d.ts +93 -0
  74. package/dist/admin-site-next-actions.js +36 -0
  75. package/dist/admin-site-page-queries.d.ts +63 -0
  76. package/dist/admin-site-page-queries.js +20 -0
  77. package/dist/admin-site-rankings.d.ts +98 -0
  78. package/dist/admin-site-rankings.js +46 -0
  79. package/dist/admin-site-regional-trends.d.ts +30 -0
  80. package/dist/admin-site-regional-trends.js +1 -0
  81. package/dist/admin-site-saved-reports.d.ts +45 -0
  82. package/dist/admin-site-saved-reports.js +13 -0
  83. package/dist/admin-site-search-pool.d.ts +77 -0
  84. package/dist/admin-site-search-pool.js +41 -0
  85. package/dist/admin-site-search-value.d.ts +97 -0
  86. package/dist/admin-site-search-value.js +29 -0
  87. package/dist/admin-site-status-page.d.ts +57 -0
  88. package/dist/admin-site-status-page.js +10 -0
  89. package/dist/admin-site-traffic.d.ts +145 -0
  90. package/dist/admin-site-traffic.js +32 -0
  91. package/dist/admin-site-web-data.d.ts +258 -0
  92. package/dist/admin-site-web-data.js +60 -0
  93. package/dist/admin-subject-exports.d.ts +58 -27
  94. package/dist/admin-subject-exports.js +32 -16
  95. package/dist/admin-support-access.d.ts +32 -0
  96. package/dist/admin-support-access.js +21 -0
  97. package/dist/admin-system.d.ts +283 -0
  98. package/dist/admin-system.js +65 -0
  99. package/dist/admin-tenant-storage.d.ts +22 -14
  100. package/dist/admin-tenant-storage.js +13 -14
  101. package/dist/admin-timeplans.d.ts +276 -2
  102. package/dist/admin-timeplans.js +54 -0
  103. package/dist/admin-uncertainty-models.d.ts +42 -0
  104. package/dist/admin-uncertainty-models.js +53 -0
  105. package/dist/admin-usage.d.ts +124 -0
  106. package/dist/admin-usage.js +169 -0
  107. package/dist/admin-users.d.ts +124 -0
  108. package/dist/admin-users.js +82 -0
  109. package/dist/admin-workflow-timings.d.ts +367 -0
  110. package/dist/admin-workflow-timings.js +117 -0
  111. package/dist/analytics-events.d.ts +82 -0
  112. package/dist/analytics-events.js +157 -0
  113. package/dist/analytics-reads.d.ts +81 -0
  114. package/dist/analytics-reads.js +5 -0
  115. package/dist/app-account.d.ts +84 -0
  116. package/dist/app-account.js +177 -0
  117. package/dist/app-alerts.d.ts +120 -0
  118. package/dist/app-alerts.js +44 -0
  119. package/dist/app-items.d.ts +786 -0
  120. package/dist/app-items.js +524 -0
  121. package/dist/app-live.d.ts +84 -0
  122. package/dist/app-live.js +228 -0
  123. package/dist/app-meetings.d.ts +95 -0
  124. package/dist/app-meetings.js +26 -0
  125. package/dist/app-models.d.ts +271 -0
  126. package/dist/app-models.js +83 -0
  127. package/dist/app-push.d.ts +64 -0
  128. package/dist/app-push.js +178 -0
  129. package/dist/backend-lifecycle.d.ts +2 -2
  130. package/dist/browser-manifest.json +5 -5
  131. package/dist/browser-script-BWnwDjAC.js +711 -0
  132. package/dist/browser-sign-in.d.ts +153 -0
  133. package/dist/browser-sign-in.js +410 -0
  134. package/dist/browser-tracker.d.ts +95 -0
  135. package/dist/browser-tracker.js +362 -40
  136. package/dist/browser-web-vitals.d.ts +22 -0
  137. package/dist/browser-web-vitals.js +116 -0
  138. package/dist/browser.d.ts +9 -0
  139. package/dist/browser.js +9 -0
  140. package/dist/download-stream.d.ts +16 -0
  141. package/dist/download-stream.js +55 -0
  142. package/dist/error-capture.d.ts +62 -0
  143. package/dist/error-capture.js +168 -0
  144. package/dist/hosted-app.d.ts +115 -0
  145. package/dist/hosted-app.js +275 -0
  146. package/dist/index.d.ts +1168 -154
  147. package/dist/index.js +682 -162
  148. package/dist/ingest-operations.d.ts +483 -0
  149. package/dist/ingest-operations.js +154 -0
  150. package/dist/measurement.d.ts +164 -0
  151. package/dist/measurement.js +104 -0
  152. package/dist/parsers.d.ts +149 -0
  153. package/dist/parsers.js +115 -0
  154. package/dist/public-reads.d.ts +79 -0
  155. package/dist/public-reads.js +57 -0
  156. package/dist/reporting-catalogue.d.ts +264 -0
  157. package/dist/reporting-catalogue.js +5 -0
  158. package/dist/response-lists.d.ts +16 -0
  159. package/dist/response-lists.generated.d.ts +7 -0
  160. package/dist/response-lists.generated.js +1927 -0
  161. package/dist/response-lists.js +70 -0
  162. package/dist/response-validation.d.ts +30 -0
  163. package/dist/response-validation.js +94 -0
  164. package/dist/schema-registry.d.ts +45 -0
  165. package/dist/schema-registry.js +9 -0
  166. package/dist/secure-url.d.ts +4 -0
  167. package/dist/secure-url.js +23 -0
  168. package/dist/site-ai-owner.d.ts +34 -0
  169. package/dist/site-ai-owner.js +99 -0
  170. package/dist/site-monitor-reports.d.ts +15 -0
  171. package/dist/site-monitor-reports.js +87 -0
  172. package/dist/testing/fake-custd.d.ts +150 -0
  173. package/dist/testing/fake-custd.js +842 -0
  174. package/dist/testing/fake-results.d.ts +30 -0
  175. package/dist/testing/fake-results.js +293 -0
  176. package/dist/testing.d.ts +2 -0
  177. package/dist/testing.js +3 -0
  178. package/dist/version.d.ts +2 -2
  179. package/dist/version.js +1 -1
  180. package/package.json +25 -14
  181. package/dist/browser-script-BvgjdZSO.js +0 -429
  182. package/dist/fixtures.d.ts +0 -10
  183. package/dist/fixtures.js +0 -57
@@ -0,0 +1,61 @@
1
+ // Site Insights shapes served beside the site-domain routes: finding remedies,
2
+ // page facts and tools, search rows and URL inspections, a Site's project
3
+ // context, and the client report reads. SiteDomainAdminClient sends them.
4
+ // A measurement Custd did not take is absent, never 0.
5
+ /** A 400 on page tools: the URL is not on the domain's own host. */
6
+ export const SITE_PAGE_NOT_ON_DOMAIN_CODE = "site_page_not_on_domain";
7
+ /** A 404 on getPageFacts: no audit or recheck has read the page yet; ask for a page recheck. */
8
+ export const SITE_PAGE_NOT_READ_CODE = "site_page_not_read";
9
+ /** A 429 on requestPageRecheck: the domain's hourly page rechecks are used up. */
10
+ export const SITE_PAGE_RECHECK_LIMIT_CODE = "site_page_recheck_limit";
11
+ /** How many rechecks listPageRechecks reads in one call. */
12
+ export const SITE_PAGE_RECHECK_READ_LIMIT = 30;
13
+ /** A 422 on create without a siteUuid: no one Site holds the host; name the Site. */
14
+ export const SITE_CHOICE_REQUIRED_CODE = "site_choice_required";
15
+ /** A 400 on requestSearchInspection: the URL is not an http(s) URL on the domain's host. */
16
+ export const SITE_SEARCH_INSPECTION_URL_INVALID_CODE = "site_search_inspection_url_invalid";
17
+ /** A 409 on requestSearchInspection: the domain is not verified and connected to Google. */
18
+ export const SITE_SEARCH_INSPECTION_NOT_CONNECTED_CODE = "site_search_inspection_not_connected";
19
+ /** A 429 on requestSearchInspection: the tenant's daily URL inspections are used up. */
20
+ export const SITE_SEARCH_INSPECTION_LIMIT_CODE = "site_search_inspection_limit";
21
+ /** What a fix changes. A rule without a remedy shape carries no kind. */
22
+ export const SiteRemedyKind = {
23
+ Markup: "markup",
24
+ Setting: "setting",
25
+ Content: "content",
26
+ Server: "server",
27
+ };
28
+ /** The formats generated fix code comes in. */
29
+ export const SiteGeneratedFormat = {
30
+ HTML: "html",
31
+ RobotsTxt: "robots.txt",
32
+ /** One Apache line and one nginx line. */
33
+ Redirect: "redirect",
34
+ };
35
+ export const SitePageRecheckState = {
36
+ Queued: "queued",
37
+ Checked: "checked",
38
+ Failed: "failed",
39
+ };
40
+ /** How much of a page a checkPage draft is: the whole page, or only its body content. */
41
+ export const SitePageCheckScope = {
42
+ Page: "page",
43
+ Content: "content",
44
+ };
45
+ /** A 409 on enableIndexNow: verify the domain first. */
46
+ export const SITE_INDEXNOW_DOMAIN_UNVERIFIED_CODE = "site_indexnow_domain_unverified";
47
+ /** A 409 on verifyIndexNowKey or submitIndexNow: enable IndexNow for the domain first. */
48
+ export const SITE_INDEXNOW_NOT_ENABLED_CODE = "site_indexnow_not_enabled";
49
+ /** A 409 on submitIndexNow: host the key file and verify it first. */
50
+ export const SITE_INDEXNOW_KEY_UNVERIFIED_CODE = "site_indexnow_key_unverified";
51
+ /** A 400 on submitIndexNow: urls must be 1 to 100 distinct http(s) URLs on the domain's host. */
52
+ export const SITE_INDEXNOW_URLS_INVALID_CODE = "site_indexnow_urls_invalid";
53
+ /** A 429 on submitIndexNow: the tenant's daily IndexNow URLs are used up. */
54
+ export const SITE_INDEXNOW_LIMIT_CODE = "site_indexnow_limit";
55
+ /** An IndexNow submission's status. */
56
+ export const IndexNowSubmissionStatus = {
57
+ Queued: "queued",
58
+ Accepted: "accepted",
59
+ Rejected: "rejected",
60
+ Failed: "failed",
61
+ };
@@ -0,0 +1,87 @@
1
+ import type { SiteWebDomainRole } from "./admin-site-web-data.js";
2
+ /** Where a referring domain was seen. */
3
+ export declare const SiteLinkSource: {
4
+ readonly Bing: "bing";
5
+ readonly CommonCrawl: "commoncrawl";
6
+ readonly Crawl: "crawl";
7
+ };
8
+ export type SiteLinkSource = (typeof SiteLinkSource)[keyof typeof SiteLinkSource];
9
+ /** The state of one link source for the domain. */
10
+ export declare const SiteLinkSourceStatus: {
11
+ readonly Available: "available";
12
+ readonly Pending: "pending";
13
+ readonly Failed: "failed";
14
+ readonly Unavailable: "unavailable";
15
+ };
16
+ export type SiteLinkSourceStatus = (typeof SiteLinkSourceStatus)[keyof typeof SiteLinkSourceStatus];
17
+ /** One source's totals. referringDomains and links are absent when the source did not count them. */
18
+ export type SiteLinkSourceTotal = {
19
+ /** A SiteLinkSource value. */
20
+ source: SiteLinkSource;
21
+ /** A SiteLinkSourceStatus value. */
22
+ status: SiteLinkSourceStatus;
23
+ /** What the totals cover, in words. */
24
+ scope: string;
25
+ /** The day the source was read (YYYY-MM-DD), or the Common Crawl release. */
26
+ asOf?: string;
27
+ referringDomains?: number;
28
+ links?: number;
29
+ /** How many of the referring domains are listed. */
30
+ listed: number;
31
+ /** Every referring domain the source knows in scope is listed. */
32
+ complete: boolean;
33
+ lastFailure?: string;
34
+ };
35
+ /** The domain's place in a Common Crawl release. Every rank is absent when inGraph is false. */
36
+ export type SiteDomainAuthority = {
37
+ release: string;
38
+ /** The registrable domain the graph ranks. */
39
+ graphDomain: string;
40
+ inGraph: boolean;
41
+ /** Position by harmonic centrality, 1 is best. */
42
+ harmonicRank?: number;
43
+ harmonicCentrality?: number;
44
+ /** Position by PageRank, 1 is best. */
45
+ pageRankRank?: number;
46
+ pageRank?: number;
47
+ /** Host names the graph holds under the domain. */
48
+ hosts?: number;
49
+ };
50
+ /** One linking domain. bingLinks, crawlLinks and followed are absent when that source saw no link. */
51
+ export type SiteReferringDomain = {
52
+ domain: string;
53
+ /** SiteLinkSource values: the sources that saw it link. */
54
+ sources: string[];
55
+ bingLinks?: number;
56
+ crawlLinks?: number;
57
+ /** A crawled link from it is followed; absent without crawled links. */
58
+ followed?: boolean;
59
+ anchorText?: string;
60
+ harmonicRank?: number;
61
+ pageRankRank?: number;
62
+ };
63
+ /** A domain that linked in the previous release and no longer does. */
64
+ export type SiteLostReferringDomain = {
65
+ domain: string;
66
+ /** Its position in the previous release. */
67
+ harmonicRank?: number;
68
+ };
69
+ export type SiteLostLinks = {
70
+ /** A SiteLinkSourceStatus value: available, pending or unavailable. */
71
+ status: "available" | "pending" | "unavailable";
72
+ release?: string;
73
+ previousRelease?: string;
74
+ scope: string;
75
+ domains: SiteLostReferringDomain[];
76
+ };
77
+ export type SiteReferringDomains = {
78
+ siteUuid: string;
79
+ domain: string;
80
+ /** A SiteWebDomainRole value. */
81
+ role: SiteWebDomainRole;
82
+ sources: SiteLinkSourceTotal[];
83
+ /** Absent until a Common Crawl release is read for the domain. */
84
+ authority?: SiteDomainAuthority;
85
+ referringDomains: SiteReferringDomain[];
86
+ lost: SiteLostLinks;
87
+ };
@@ -0,0 +1,16 @@
1
+ // The domains linking to one of a Site's web domains, from Bing, Common Crawl's
2
+ // domain graph and Custd's own crawl. SiteDomainAdminClient sends the read. A
3
+ // count or rank a source did not report is absent, never 0.
4
+ /** Where a referring domain was seen. */
5
+ export const SiteLinkSource = {
6
+ Bing: "bing",
7
+ CommonCrawl: "commoncrawl",
8
+ Crawl: "crawl",
9
+ };
10
+ /** The state of one link source for the domain. */
11
+ export const SiteLinkSourceStatus = {
12
+ Available: "available",
13
+ Pending: "pending",
14
+ Failed: "failed",
15
+ Unavailable: "unavailable",
16
+ };
@@ -0,0 +1,110 @@
1
+ /** When a scheduled job must report: a five-field cron in an IANA timezone, plus a grace period. */
2
+ export type SiteHeartbeatSchedule = {
3
+ cron: string;
4
+ timezone: string;
5
+ graceMinutes: number;
6
+ };
7
+ /** A new heartbeat monitor. */
8
+ export type SiteHeartbeatCreateRequest = {
9
+ name: string;
10
+ schedule: SiteHeartbeatSchedule;
11
+ };
12
+ export declare const SITE_HEARTBEAT_OUTCOMES: {
13
+ readonly succeeded: "succeeded";
14
+ readonly failed: "failed";
15
+ };
16
+ export type SiteHeartbeatOutcome = (typeof SITE_HEARTBEAT_OUTCOMES)[keyof typeof SITE_HEARTBEAT_OUTCOMES];
17
+ export declare const SITE_HEARTBEAT_STATUSES: {
18
+ readonly pending: "pending";
19
+ readonly onTime: "on-time";
20
+ readonly late: "late";
21
+ readonly missed: "missed";
22
+ readonly failed: "failed";
23
+ };
24
+ export type SiteHeartbeatStatus = (typeof SITE_HEARTBEAT_STATUSES)[keyof typeof SITE_HEARTBEAT_STATUSES];
25
+ /** The scheduled occurrence a job reported and how it ended. */
26
+ export type SiteHeartbeatReport = {
27
+ scheduledFor: string;
28
+ outcome: SiteHeartbeatOutcome;
29
+ };
30
+ /** The first accepted report for an occurrence. */
31
+ export type SiteHeartbeatReceipt = {
32
+ report: SiteHeartbeatReport;
33
+ receivedAt: string;
34
+ };
35
+ /** A heartbeat monitor and its latest observed state. latest is absent before the first report. */
36
+ export type SiteHeartbeatMonitor = {
37
+ monitorUuid: string;
38
+ name: string;
39
+ schedule: SiteHeartbeatSchedule;
40
+ startedAt: string;
41
+ latest?: SiteHeartbeatReceipt;
42
+ nextExpectedAt: string;
43
+ status: SiteHeartbeatStatus;
44
+ };
45
+ /** The one-time write credential returned by create or rotate. Copy the token now; it is never shown again. */
46
+ export type SiteHeartbeatCredential = {
47
+ monitor: SiteHeartbeatMonitor;
48
+ token: string;
49
+ reportPath: string;
50
+ };
51
+ /** A domain's heartbeat monitors, without their tokens. */
52
+ export type SiteHeartbeatList = {
53
+ monitors: SiteHeartbeatMonitor[];
54
+ };
55
+ export declare const PRIVATE_UPTIME_STATUSES: {
56
+ readonly unknown: "unknown";
57
+ readonly up: "up";
58
+ readonly down: "down";
59
+ };
60
+ export type PrivateUptimeStatus = (typeof PRIVATE_UPTIME_STATUSES)[keyof typeof PRIVATE_UPTIME_STATUSES];
61
+ export declare const PRIVATE_UPTIME_FAILURES: {
62
+ readonly dns: "dns";
63
+ readonly connection: "connection";
64
+ readonly tls: "tls";
65
+ readonly timeout: "timeout";
66
+ };
67
+ export type PrivateUptimeFailure = (typeof PRIVATE_UPTIME_FAILURES)[keyof typeof PRIVATE_UPTIME_FAILURES];
68
+ /** One observation from the probe inside the monitored network. */
69
+ export type PrivateUptimeReport = {
70
+ reportUuid: string;
71
+ observedAt: string;
72
+ statusCode?: number;
73
+ responseMs: number;
74
+ failure?: PrivateUptimeFailure;
75
+ };
76
+ /** The private probe, its latest observation and any pending check request. */
77
+ export type PrivateUptimeMonitor = {
78
+ monitorUuid: string;
79
+ networkLabel: string;
80
+ latest?: PrivateUptimeReport;
81
+ requestedAt?: string;
82
+ status: PrivateUptimeStatus;
83
+ };
84
+ /** The one-time write credential returned by create or rotate. Copy the token now; it is never shown again. */
85
+ export type PrivateUptimeCredential = {
86
+ monitor: PrivateUptimeMonitor;
87
+ reportPath: string;
88
+ token: string;
89
+ };
90
+ /** The check queued for the private probe; requestedAt is absent when nothing is pending. */
91
+ export type PrivateUptimeWork = {
92
+ requestedAt?: string;
93
+ };
94
+ /** A one-off maintenance window. Reuse windowUuid when retrying the same request. */
95
+ export type SiteMaintenanceWindowRequest = {
96
+ windowUuid: string;
97
+ startsAt: string;
98
+ endsAt: string;
99
+ };
100
+ /** A scheduled or historical maintenance window. cancelledAt is set once it was cancelled. */
101
+ export type SiteMaintenanceWindow = {
102
+ windowUuid: string;
103
+ startsAt: string;
104
+ endsAt: string;
105
+ cancelledAt?: string;
106
+ };
107
+ /** A domain's current and historical maintenance windows. */
108
+ export type SiteMaintenanceWindows = {
109
+ windows: SiteMaintenanceWindow[];
110
+ };
@@ -0,0 +1,25 @@
1
+ // A domain's own monitors beside the public uptime check: scheduled-job heartbeats, a private
2
+ // uptime probe inside the customer's network, and maintenance windows that pause alerting.
3
+ // SiteDomainAdminClient sends the calls.
4
+ export const SITE_HEARTBEAT_OUTCOMES = {
5
+ succeeded: "succeeded",
6
+ failed: "failed",
7
+ };
8
+ export const SITE_HEARTBEAT_STATUSES = {
9
+ pending: "pending",
10
+ onTime: "on-time",
11
+ late: "late",
12
+ missed: "missed",
13
+ failed: "failed",
14
+ };
15
+ export const PRIVATE_UPTIME_STATUSES = {
16
+ unknown: "unknown",
17
+ up: "up",
18
+ down: "down",
19
+ };
20
+ export const PRIVATE_UPTIME_FAILURES = {
21
+ dns: "dns",
22
+ connection: "connection",
23
+ tls: "tls",
24
+ timeout: "timeout",
25
+ };
@@ -0,0 +1,93 @@
1
+ import type { SiteAIMode } from "./admin-site-ai.js";
2
+ /** A next-actions read returns at most this many actions. */
3
+ export declare const SITE_NEXT_ACTIONS_MAX = 3;
4
+ /**
5
+ * The kinds of SiteNextAction, in the order Custd ranks them. Custd may add kinds;
6
+ * show one this SDK does not name by its title and why.
7
+ */
8
+ export declare const SiteNextActionKind: {
9
+ readonly Verify: "verify";
10
+ readonly Outage: "outage";
11
+ readonly Certificate: "certificate";
12
+ readonly ReconnectSearch: "reconnect-search";
13
+ readonly Finding: "finding";
14
+ readonly FirstAuditPending: "first-audit-pending";
15
+ readonly ConnectSearch: "connect-search";
16
+ };
17
+ /** Where an action is done. Custd may add places. */
18
+ export declare const SiteNextActionPlace: {
19
+ readonly Ownership: "ownership";
20
+ readonly Uptime: "uptime";
21
+ readonly SearchSettings: "search-settings";
22
+ readonly Audit: "audit";
23
+ readonly Finding: "finding";
24
+ readonly Page: "page";
25
+ };
26
+ /** What Custd cannot check yet. */
27
+ export declare const SiteNotChecked: {
28
+ readonly Uptime: "uptime";
29
+ readonly Audit: "audit";
30
+ readonly Search: "search";
31
+ };
32
+ export type SiteNextActionTarget = {
33
+ /** A SiteNextActionPlace value. */
34
+ place: string;
35
+ /** A finding action's first finding. */
36
+ findingUuid?: string;
37
+ /** A finding action's first page; opens Page detail when place is page. */
38
+ pageUrl?: string;
39
+ };
40
+ export type SiteNextAction = {
41
+ /** A SiteNextActionKind value. */
42
+ kind: string;
43
+ title: string;
44
+ why: string;
45
+ /** high, medium, low or info. */
46
+ severity: "high" | "medium" | "low" | "info";
47
+ /** The pages a finding affects; 0 for an action about the whole site. */
48
+ affectedCount: number;
49
+ /** The rule of a finding action. */
50
+ rule?: string;
51
+ target: SiteNextActionTarget;
52
+ /** Check again (Verify now, or a one-page recheck) can confirm the fix at once. */
53
+ recheckable: boolean;
54
+ };
55
+ export type SiteNextActions = {
56
+ aiMode?: SiteAIMode;
57
+ domainUuid: string;
58
+ host: string;
59
+ /** unknown, up, failing, down or paused. */
60
+ status: "unknown" | "up" | "failing" | "down" | "paused";
61
+ /** One plain sentence: whether the site works and how much is left to do. */
62
+ headline: string;
63
+ /** The latest uptime check. */
64
+ checkedAt?: string;
65
+ /** SiteNotChecked values. */
66
+ notChecked: string[];
67
+ /** Every action the domain has; at most SITE_NEXT_ACTIONS_MAX are in actions. */
68
+ actionCount: number;
69
+ /** Most important first. */
70
+ actions: SiteNextAction[];
71
+ };
72
+ export type SiteFindingCounts = {
73
+ high: number;
74
+ medium: number;
75
+ low: number;
76
+ info: number;
77
+ };
78
+ export type SitePortfolioDomain = {
79
+ domainUuid: string;
80
+ siteUuid: string;
81
+ host: string;
82
+ status: "unknown" | "up" | "failing" | "down" | "paused";
83
+ headline: string;
84
+ checkedAt?: string;
85
+ actionCount: number;
86
+ openFindings: SiteFindingCounts;
87
+ /** Absent when there is nothing to do. */
88
+ firstAction?: SiteNextAction;
89
+ };
90
+ export type SitePortfolioSummary = {
91
+ /** Worst first: by the first action's rank, then by host. */
92
+ domains: SitePortfolioDomain[];
93
+ };
@@ -0,0 +1,36 @@
1
+ // What to do next: one domain's status and its most important actions, and the
2
+ // tenant's portfolio of domains, worst first. Custd ranks them once, in a fixed
3
+ // order that never depends on AI, so every product shows the same first action.
4
+ // SiteDomainAdminClient sends the calls. A site-bound credential reads only its
5
+ // own Site; a site_insights.read credential reads these two calls for every Site
6
+ // and nothing else.
7
+ /** A next-actions read returns at most this many actions. */
8
+ export const SITE_NEXT_ACTIONS_MAX = 3;
9
+ /**
10
+ * The kinds of SiteNextAction, in the order Custd ranks them. Custd may add kinds;
11
+ * show one this SDK does not name by its title and why.
12
+ */
13
+ export const SiteNextActionKind = {
14
+ Verify: "verify",
15
+ Outage: "outage",
16
+ Certificate: "certificate",
17
+ ReconnectSearch: "reconnect-search",
18
+ Finding: "finding",
19
+ FirstAuditPending: "first-audit-pending",
20
+ ConnectSearch: "connect-search",
21
+ };
22
+ /** Where an action is done. Custd may add places. */
23
+ export const SiteNextActionPlace = {
24
+ Ownership: "ownership",
25
+ Uptime: "uptime",
26
+ SearchSettings: "search-settings",
27
+ Audit: "audit",
28
+ Finding: "finding",
29
+ Page: "page",
30
+ };
31
+ /** What Custd cannot check yet. */
32
+ export const SiteNotChecked = {
33
+ Uptime: "uptime",
34
+ Audit: "audit",
35
+ Search: "search",
36
+ };
@@ -0,0 +1,63 @@
1
+ /** Why a page has ranking queries to show or not. */
2
+ export declare const SitePageQueriesState: {
3
+ readonly Available: "available";
4
+ readonly NotConnected: "not_connected";
5
+ readonly NotImported: "not_imported";
6
+ readonly NoQueries: "no_queries";
7
+ };
8
+ export type SitePageQueriesState = (typeof SitePageQueriesState)[keyof typeof SitePageQueriesState];
9
+ /** The shape a suggested title takes. */
10
+ export declare const SiteTitleTemplate: {
11
+ readonly General: "general";
12
+ readonly Guide: "guide";
13
+ };
14
+ export type SiteTitleTemplate = (typeof SiteTitleTemplate)[keyof typeof SiteTitleTemplate];
15
+ /** Where a page to link from mentions the query; newer values may appear. */
16
+ export declare const SitePageLinkSourceWhere: {
17
+ readonly Title: "title";
18
+ readonly Heading: "heading";
19
+ };
20
+ /** One query the page shows for, and whether the page's title, description or h1 contains it. */
21
+ export type SitePageQuery = {
22
+ query: string;
23
+ clicks: number;
24
+ impressions: number;
25
+ position: number;
26
+ inTitle: boolean;
27
+ inDescription: boolean;
28
+ inH1: boolean;
29
+ };
30
+ export type SiteTitleOption = {
31
+ title: string;
32
+ /** A SiteTitleTemplate value. */
33
+ template: SiteTitleTemplate;
34
+ query: string;
35
+ impressions: number;
36
+ };
37
+ /** A page on the site that mentions the query and could link to this one. */
38
+ export type SitePageLinkSource = {
39
+ url: string;
40
+ title: string;
41
+ query: string;
42
+ /** A SitePageLinkSourceWhere value. */
43
+ where: string;
44
+ };
45
+ /** The imported window the queries cover; from and to are YYYY-MM-DD. */
46
+ export type SitePageQueryWindow = {
47
+ provider: "google" | "bing";
48
+ from: string;
49
+ to: string;
50
+ importedAt: string;
51
+ };
52
+ export type SitePageSearchQueries = {
53
+ domainUuid: string;
54
+ url: string;
55
+ /** A SitePageQueriesState value. */
56
+ state: SitePageQueriesState;
57
+ /** Absent until a search import has covered the page. */
58
+ window?: SitePageQueryWindow;
59
+ maxQueries: number;
60
+ queries: SitePageQuery[];
61
+ titleOptions: SiteTitleOption[];
62
+ linkSources: SitePageLinkSource[];
63
+ };
@@ -0,0 +1,20 @@
1
+ // The searches one page shows for (Search Console's page and query dimensions
2
+ // together), with title options and pages to link from built from them.
3
+ // SiteDomainAdminClient.getPageSearchQueries sends the read.
4
+ /** Why a page has ranking queries to show or not. */
5
+ export const SitePageQueriesState = {
6
+ Available: "available",
7
+ NotConnected: "not_connected",
8
+ NotImported: "not_imported",
9
+ NoQueries: "no_queries",
10
+ };
11
+ /** The shape a suggested title takes. */
12
+ export const SiteTitleTemplate = {
13
+ General: "general",
14
+ Guide: "guide",
15
+ };
16
+ /** Where a page to link from mentions the query; newer values may appear. */
17
+ export const SitePageLinkSourceWhere = {
18
+ Title: "title",
19
+ Heading: "heading",
20
+ };
@@ -0,0 +1,98 @@
1
+ import type { SearchPoolAccess, SearchPoolBand } from "./admin-site-search-pool.js";
2
+ /** A 400 on trackKeyword or updateTrackedKeyword: keyword, country, device or notifyPosition is out of range. */
3
+ export declare const SITE_TRACKED_KEYWORD_INVALID_CODE = "site_tracked_keyword_invalid";
4
+ /** A 409 on trackKeyword: the Site tracks the most keywords; remove one first. */
5
+ export declare const SITE_TRACKED_KEYWORD_LIMIT_CODE = "site_tracked_keyword_limit";
6
+ /** A 409 on trackKeyword: the domain already tracks this keyword in this country and device. */
7
+ export declare const SITE_TRACKED_KEYWORD_DUPLICATE_CODE = "site_tracked_keyword_duplicate";
8
+ /** A 404 on updateTrackedKeyword or untrackKeyword: the domain does not track this keyword. */
9
+ export declare const SITE_TRACKED_KEYWORD_NOT_FOUND_CODE = "site_tracked_keyword_not_found";
10
+ /** A 400 on getRankings: days must be 1 to 90. */
11
+ export declare const SITE_RANKINGS_DAYS_INVALID_CODE = "site_rankings_days_invalid";
12
+ /** How many keywords one Site tracks. */
13
+ export declare const SITE_TRACKED_KEYWORDS_MAX = 50;
14
+ /** The alert position a keyword gets when trackKeyword omits notifyPosition. */
15
+ export declare const SITE_TRACKED_KEYWORD_DEFAULT_NOTIFY_POSITION = 10;
16
+ /** getRankings reads this many days when days is omitted. */
17
+ export declare const SITE_RANKINGS_DEFAULT_DAYS = 28;
18
+ /** The longest getRankings window. */
19
+ export declare const SITE_RANKINGS_MAX_DAYS = 90;
20
+ /** The country and device value that tracks every country or every device. */
21
+ export declare const SITE_TRACKED_KEYWORD_ALL = "all";
22
+ /** One day's rank state; newer values may appear. */
23
+ export declare const SiteRankState: {
24
+ readonly Ranking: "ranking";
25
+ readonly NotRanking: "not_ranking";
26
+ readonly NoData: "no_data";
27
+ };
28
+ export declare const SiteTrackedKeywordStatus: {
29
+ readonly Active: "active";
30
+ readonly Paused: "paused";
31
+ };
32
+ /** The devices a keyword can be tracked on, beside SITE_TRACKED_KEYWORD_ALL. */
33
+ export declare const SiteRankDevice: {
34
+ readonly Desktop: "desktop";
35
+ readonly Mobile: "mobile";
36
+ readonly Tablet: "tablet";
37
+ };
38
+ /** The state of the Search Console connection the ranks come from. */
39
+ export declare const SiteRankingsSource: {
40
+ readonly NotConnected: "not_connected";
41
+ readonly Pending: "pending";
42
+ readonly Active: "active";
43
+ readonly Failing: "failing";
44
+ readonly Revoked: "revoked";
45
+ };
46
+ export type SiteRankingsSource = (typeof SiteRankingsSource)[keyof typeof SiteRankingsSource];
47
+ /** One day of a keyword. rankingUrl and position are absent unless the state is ranking. */
48
+ export type SiteRankObservation = {
49
+ /** YYYY-MM-DD. */
50
+ day: string;
51
+ /** A SiteRankState value. */
52
+ state: string;
53
+ rankingUrl?: string;
54
+ position?: number;
55
+ clicks: number;
56
+ impressions: number;
57
+ };
58
+ export type SiteTrackedKeyword = {
59
+ keywordUuid: string;
60
+ keyword: string;
61
+ /** An ISO 3166-1 alpha-3 code such as zaf, or SITE_TRACKED_KEYWORD_ALL. */
62
+ country: string;
63
+ /** A SiteRankDevice value or SITE_TRACKED_KEYWORD_ALL. */
64
+ device: string;
65
+ /** A SiteTrackedKeywordStatus value. */
66
+ status: string;
67
+ notifyPosition: number;
68
+ createdAt: string;
69
+ /** The newest day in the window; no_data when nothing was read. */
70
+ latest: SiteRankObservation;
71
+ /** Every day of the window, oldest first. */
72
+ observations: SiteRankObservation[];
73
+ /** The shared search pool's band for the keyword; absent when not joined or below the pool's threshold. */
74
+ pool?: SearchPoolBand;
75
+ };
76
+ export type SiteRankings = {
77
+ /** A SiteRankingsSource value. */
78
+ source: SiteRankingsSource;
79
+ sourceFailure?: string;
80
+ /** A SearchPoolAccess value. */
81
+ pool: SearchPoolAccess;
82
+ from: string;
83
+ to: string;
84
+ maxKeywords: number;
85
+ keywords: SiteTrackedKeyword[];
86
+ };
87
+ /** country and device default to all, notifyPosition to SITE_TRACKED_KEYWORD_DEFAULT_NOTIFY_POSITION. */
88
+ export type SiteTrackKeywordRequest = {
89
+ keyword: string;
90
+ country?: string;
91
+ device?: string;
92
+ notifyPosition?: number;
93
+ };
94
+ /** paused is always sent (true stops tracking until resumed); an omitted notifyPosition keeps the stored one. */
95
+ export type SiteTrackedKeywordUpdate = {
96
+ paused: boolean;
97
+ notifyPosition?: number;
98
+ };
@@ -0,0 +1,46 @@
1
+ // The keywords a domain tracks and each day's Search Console rank for them.
2
+ // SiteDomainAdminClient sends them. A day the keyword did not rank has no position, never 0.
3
+ /** A 400 on trackKeyword or updateTrackedKeyword: keyword, country, device or notifyPosition is out of range. */
4
+ export const SITE_TRACKED_KEYWORD_INVALID_CODE = "site_tracked_keyword_invalid";
5
+ /** A 409 on trackKeyword: the Site tracks the most keywords; remove one first. */
6
+ export const SITE_TRACKED_KEYWORD_LIMIT_CODE = "site_tracked_keyword_limit";
7
+ /** A 409 on trackKeyword: the domain already tracks this keyword in this country and device. */
8
+ export const SITE_TRACKED_KEYWORD_DUPLICATE_CODE = "site_tracked_keyword_duplicate";
9
+ /** A 404 on updateTrackedKeyword or untrackKeyword: the domain does not track this keyword. */
10
+ export const SITE_TRACKED_KEYWORD_NOT_FOUND_CODE = "site_tracked_keyword_not_found";
11
+ /** A 400 on getRankings: days must be 1 to 90. */
12
+ export const SITE_RANKINGS_DAYS_INVALID_CODE = "site_rankings_days_invalid";
13
+ /** How many keywords one Site tracks. */
14
+ export const SITE_TRACKED_KEYWORDS_MAX = 50;
15
+ /** The alert position a keyword gets when trackKeyword omits notifyPosition. */
16
+ export const SITE_TRACKED_KEYWORD_DEFAULT_NOTIFY_POSITION = 10;
17
+ /** getRankings reads this many days when days is omitted. */
18
+ export const SITE_RANKINGS_DEFAULT_DAYS = 28;
19
+ /** The longest getRankings window. */
20
+ export const SITE_RANKINGS_MAX_DAYS = 90;
21
+ /** The country and device value that tracks every country or every device. */
22
+ export const SITE_TRACKED_KEYWORD_ALL = "all";
23
+ /** One day's rank state; newer values may appear. */
24
+ export const SiteRankState = {
25
+ Ranking: "ranking",
26
+ NotRanking: "not_ranking",
27
+ NoData: "no_data",
28
+ };
29
+ export const SiteTrackedKeywordStatus = {
30
+ Active: "active",
31
+ Paused: "paused",
32
+ };
33
+ /** The devices a keyword can be tracked on, beside SITE_TRACKED_KEYWORD_ALL. */
34
+ export const SiteRankDevice = {
35
+ Desktop: "desktop",
36
+ Mobile: "mobile",
37
+ Tablet: "tablet",
38
+ };
39
+ /** The state of the Search Console connection the ranks come from. */
40
+ export const SiteRankingsSource = {
41
+ NotConnected: "not_connected",
42
+ Pending: "pending",
43
+ Active: "active",
44
+ Failing: "failing",
45
+ Revoked: "revoked",
46
+ };