@gscdump/contracts 0.39.0 → 0.40.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 +2 -2
- package/dist/_chunks/endpoints.d.mts +165 -29
- package/dist/_chunks/endpoints.mjs +2 -1
- package/dist/_chunks/routes.mjs +87 -0
- package/dist/_chunks/schemas.d.mts +612 -120
- package/dist/_chunks/schemas.mjs +193 -99
- package/dist/_chunks/types.d.mts +38 -159
- package/dist/analytics.d.mts +2 -2
- package/dist/analytics.mjs +2 -1
- package/dist/archetypes.d.mts +61 -1
- package/dist/archetypes.mjs +120 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/partner.d.mts +2 -2
- package/dist/partner.mjs +2 -2
- package/dist/v1/index.d.mts +4988 -410
- package/dist/v1/index.mjs +1319 -138
- package/package.json +1 -1
- package/dist/_chunks/onboarding.mjs +0 -130
package/package.json
CHANGED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
const GSCDUMP_ONBOARDING_CONTRACT_VERSION = "2026-05-11";
|
|
2
|
-
const GSCDUMP_REQUIRED_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters.readonly";
|
|
3
|
-
const GSCDUMP_WRITE_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters";
|
|
4
|
-
const GSCDUMP_OPTIONAL_INDEXING_SCOPE = "https://www.googleapis.com/auth/indexing";
|
|
5
|
-
const accountStatuses = [
|
|
6
|
-
"disconnected",
|
|
7
|
-
"oauth_received",
|
|
8
|
-
"scope_missing",
|
|
9
|
-
"refresh_missing",
|
|
10
|
-
"db_provisioning",
|
|
11
|
-
"ready",
|
|
12
|
-
"reauth_required"
|
|
13
|
-
];
|
|
14
|
-
const accountNextActions = [
|
|
15
|
-
"connect_google",
|
|
16
|
-
"reconnect_google",
|
|
17
|
-
"wait_for_provisioning",
|
|
18
|
-
"none"
|
|
19
|
-
];
|
|
20
|
-
const propertyStatuses = [
|
|
21
|
-
"no_local_site",
|
|
22
|
-
"no_gsc_property",
|
|
23
|
-
"unverified_property",
|
|
24
|
-
"verified_candidate",
|
|
25
|
-
"registered",
|
|
26
|
-
"linked"
|
|
27
|
-
];
|
|
28
|
-
const propertyNextActions = [
|
|
29
|
-
"create_site",
|
|
30
|
-
"verify_gsc_property",
|
|
31
|
-
"choose_property",
|
|
32
|
-
"register_site",
|
|
33
|
-
"none"
|
|
34
|
-
];
|
|
35
|
-
const analyticsStatuses = [
|
|
36
|
-
"not_registered",
|
|
37
|
-
"queued",
|
|
38
|
-
"preparing",
|
|
39
|
-
"syncing",
|
|
40
|
-
"queryable_live",
|
|
41
|
-
"queryable_partial",
|
|
42
|
-
"ready",
|
|
43
|
-
"failed"
|
|
44
|
-
];
|
|
45
|
-
const analyticsNextActions = [
|
|
46
|
-
"wait_for_sync",
|
|
47
|
-
"retry_sync",
|
|
48
|
-
"none"
|
|
49
|
-
];
|
|
50
|
-
const querySourceModes = [
|
|
51
|
-
"none",
|
|
52
|
-
"live",
|
|
53
|
-
"d1",
|
|
54
|
-
"r2",
|
|
55
|
-
"mixed"
|
|
56
|
-
];
|
|
57
|
-
const sitemapStatuses = [
|
|
58
|
-
"unknown",
|
|
59
|
-
"discovering",
|
|
60
|
-
"none_found",
|
|
61
|
-
"auto_submitted",
|
|
62
|
-
"syncing",
|
|
63
|
-
"ready",
|
|
64
|
-
"failed"
|
|
65
|
-
];
|
|
66
|
-
const sitemapNextActions = [
|
|
67
|
-
"submit_sitemap",
|
|
68
|
-
"wait_for_sitemaps",
|
|
69
|
-
"retry_sitemaps",
|
|
70
|
-
"none"
|
|
71
|
-
];
|
|
72
|
-
const indexingStatuses = [
|
|
73
|
-
"not_requested",
|
|
74
|
-
"missing_scope",
|
|
75
|
-
"insufficient_permission",
|
|
76
|
-
"waiting_for_sitemaps",
|
|
77
|
-
"discovering",
|
|
78
|
-
"checking",
|
|
79
|
-
"ready",
|
|
80
|
-
"budget_exhausted",
|
|
81
|
-
"no_urls",
|
|
82
|
-
"failed"
|
|
83
|
-
];
|
|
84
|
-
const indexingNextActions = [
|
|
85
|
-
"reconnect_google",
|
|
86
|
-
"fix_gsc_permission",
|
|
87
|
-
"wait_for_sitemaps",
|
|
88
|
-
"wait_for_indexing",
|
|
89
|
-
"retry_indexing",
|
|
90
|
-
"none"
|
|
91
|
-
];
|
|
92
|
-
const lifecycleWebhookEvents = [
|
|
93
|
-
"user.lifecycle.changed",
|
|
94
|
-
"site.lifecycle.changed",
|
|
95
|
-
"site.analytics.ready",
|
|
96
|
-
"site.indexing.ready",
|
|
97
|
-
"site.auth.failed",
|
|
98
|
-
"job.failed"
|
|
99
|
-
];
|
|
100
|
-
const lifecycleErrorCodes = [
|
|
101
|
-
"missing_refresh_token",
|
|
102
|
-
"missing_analytics_scope",
|
|
103
|
-
"missing_indexing_scope",
|
|
104
|
-
"token_refresh_failed",
|
|
105
|
-
"permission_lost",
|
|
106
|
-
"insufficient_gsc_permission",
|
|
107
|
-
"gsc_property_not_found",
|
|
108
|
-
"gsc_property_unverified",
|
|
109
|
-
"user_database_not_provisioned",
|
|
110
|
-
"sync_failed",
|
|
111
|
-
"sitemap_sync_failed",
|
|
112
|
-
"indexing_failed"
|
|
113
|
-
];
|
|
114
|
-
function parseGrantedScopes(scopes) {
|
|
115
|
-
if (!scopes) return [];
|
|
116
|
-
if (typeof scopes === "string") return scopes.split(/\s+/).map((scope) => scope.trim()).filter(Boolean);
|
|
117
|
-
return scopes.map((scope) => scope.trim()).filter(Boolean);
|
|
118
|
-
}
|
|
119
|
-
function hasGoogleScope(scopes, scope) {
|
|
120
|
-
const granted = parseGrantedScopes(scopes);
|
|
121
|
-
const suffix = scope.replace("https://www.googleapis.com/auth/", "");
|
|
122
|
-
return granted.includes(scope) || granted.includes(suffix);
|
|
123
|
-
}
|
|
124
|
-
function hasRequiredAnalyticsScope(scopes) {
|
|
125
|
-
return hasGoogleScope(scopes, "https://www.googleapis.com/auth/webmasters.readonly") || hasGoogleScope(scopes, "https://www.googleapis.com/auth/webmasters");
|
|
126
|
-
}
|
|
127
|
-
function hasOptionalIndexingScope(scopes) {
|
|
128
|
-
return hasGoogleScope(scopes, GSCDUMP_OPTIONAL_INDEXING_SCOPE);
|
|
129
|
-
}
|
|
130
|
-
export { GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, lifecycleWebhookEvents, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|