@gscdump/contracts 0.39.0 → 0.40.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.
- 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/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Shared protocol contracts for gscdump.com integrations.
|
|
4
4
|
|
|
5
|
-
> The executable
|
|
5
|
+
> The executable 18-operation public-v1 registry is exported from
|
|
6
6
|
> `@gscdump/contracts/v1`. Existing root route/endpoint exports still describe
|
|
7
7
|
> the legacy host during the release and cutover overlap. See the
|
|
8
8
|
> [v1 contract](../../docs/hosted-api-v1.md) and
|
|
@@ -23,7 +23,7 @@ and storage remains in gscdump.com.
|
|
|
23
23
|
|
|
24
24
|
## Public v1 bar
|
|
25
25
|
|
|
26
|
-
Each
|
|
26
|
+
Each public operation has one executable descriptor covering its
|
|
27
27
|
surface/version, method/path, query or mutation semantics, credential classes,
|
|
28
28
|
static scopes, ownership policy, request/response schemas, consistency,
|
|
29
29
|
idempotency, and errors. V1 has no schema-less descriptor and no two logical
|
|
@@ -821,9 +821,139 @@ declare const partnerEndpoints: {
|
|
|
821
821
|
indexingIneligibleReason: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
822
822
|
missing_indexing_scope: "missing_indexing_scope";
|
|
823
823
|
insufficient_gsc_permission: "insufficient_gsc_permission";
|
|
824
|
+
free_plan: "free_plan";
|
|
824
825
|
}>>;
|
|
825
826
|
indexingPermissionLevel: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
826
827
|
grantedScopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
828
|
+
site: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
|
|
829
|
+
siteId: import("zod").ZodString;
|
|
830
|
+
intId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
831
|
+
catalogSiteId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
832
|
+
externalSiteId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
833
|
+
requestedUrl: import("zod").ZodString;
|
|
834
|
+
gscPropertyUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
835
|
+
permissionLevel: import("zod").ZodNullable<import("zod").ZodString>;
|
|
836
|
+
property: import("zod").ZodObject<{
|
|
837
|
+
status: import("zod").ZodEnum<{
|
|
838
|
+
no_local_site: "no_local_site";
|
|
839
|
+
no_gsc_property: "no_gsc_property";
|
|
840
|
+
unverified_property: "unverified_property";
|
|
841
|
+
verified_candidate: "verified_candidate";
|
|
842
|
+
registered: "registered";
|
|
843
|
+
linked: "linked";
|
|
844
|
+
}>;
|
|
845
|
+
nextAction: import("zod").ZodEnum<{
|
|
846
|
+
none: "none";
|
|
847
|
+
create_site: "create_site";
|
|
848
|
+
verify_gsc_property: "verify_gsc_property";
|
|
849
|
+
choose_property: "choose_property";
|
|
850
|
+
register_site: "register_site";
|
|
851
|
+
}>;
|
|
852
|
+
}, import("zod/v4/core").$loose>;
|
|
853
|
+
analytics: import("zod").ZodObject<{
|
|
854
|
+
status: import("zod").ZodEnum<{
|
|
855
|
+
ready: "ready";
|
|
856
|
+
not_registered: "not_registered";
|
|
857
|
+
queued: "queued";
|
|
858
|
+
preparing: "preparing";
|
|
859
|
+
syncing: "syncing";
|
|
860
|
+
queryable_live: "queryable_live";
|
|
861
|
+
queryable_partial: "queryable_partial";
|
|
862
|
+
failed: "failed";
|
|
863
|
+
}>;
|
|
864
|
+
progress: import("zod").ZodObject<{
|
|
865
|
+
completed: import("zod").ZodNumber;
|
|
866
|
+
failed: import("zod").ZodNumber;
|
|
867
|
+
total: import("zod").ZodNumber;
|
|
868
|
+
percent: import("zod").ZodNumber;
|
|
869
|
+
}, import("zod/v4/core").$strip>;
|
|
870
|
+
queryable: import("zod").ZodBoolean;
|
|
871
|
+
sourceMode: import("zod").ZodEnum<{
|
|
872
|
+
none: "none";
|
|
873
|
+
live: "live";
|
|
874
|
+
d1: "d1";
|
|
875
|
+
r2: "r2";
|
|
876
|
+
mixed: "mixed";
|
|
877
|
+
}>;
|
|
878
|
+
syncedRange: import("zod").ZodObject<{
|
|
879
|
+
oldest: import("zod").ZodNullable<import("zod").ZodString>;
|
|
880
|
+
newest: import("zod").ZodNullable<import("zod").ZodString>;
|
|
881
|
+
}, import("zod/v4/core").$loose>;
|
|
882
|
+
nextAction: import("zod").ZodEnum<{
|
|
883
|
+
none: "none";
|
|
884
|
+
wait_for_sync: "wait_for_sync";
|
|
885
|
+
retry_sync: "retry_sync";
|
|
886
|
+
}>;
|
|
887
|
+
}, import("zod/v4/core").$loose>;
|
|
888
|
+
sitemaps: import("zod").ZodObject<{
|
|
889
|
+
status: import("zod").ZodEnum<{
|
|
890
|
+
ready: "ready";
|
|
891
|
+
syncing: "syncing";
|
|
892
|
+
failed: "failed";
|
|
893
|
+
unknown: "unknown";
|
|
894
|
+
discovering: "discovering";
|
|
895
|
+
none_found: "none_found";
|
|
896
|
+
auto_submitted: "auto_submitted";
|
|
897
|
+
}>;
|
|
898
|
+
discoveredCount: import("zod").ZodNumber;
|
|
899
|
+
nextAction: import("zod").ZodEnum<{
|
|
900
|
+
none: "none";
|
|
901
|
+
submit_sitemap: "submit_sitemap";
|
|
902
|
+
wait_for_sitemaps: "wait_for_sitemaps";
|
|
903
|
+
retry_sitemaps: "retry_sitemaps";
|
|
904
|
+
}>;
|
|
905
|
+
}, import("zod/v4/core").$loose>;
|
|
906
|
+
indexing: import("zod").ZodObject<{
|
|
907
|
+
status: import("zod").ZodEnum<{
|
|
908
|
+
ready: "ready";
|
|
909
|
+
failed: "failed";
|
|
910
|
+
discovering: "discovering";
|
|
911
|
+
not_requested: "not_requested";
|
|
912
|
+
missing_scope: "missing_scope";
|
|
913
|
+
insufficient_permission: "insufficient_permission";
|
|
914
|
+
waiting_for_sitemaps: "waiting_for_sitemaps";
|
|
915
|
+
checking: "checking";
|
|
916
|
+
budget_exhausted: "budget_exhausted";
|
|
917
|
+
no_urls: "no_urls";
|
|
918
|
+
}>;
|
|
919
|
+
eligible: import("zod").ZodBoolean;
|
|
920
|
+
reason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
921
|
+
progress: import("zod").ZodObject<{
|
|
922
|
+
completed: import("zod").ZodNumber;
|
|
923
|
+
failed: import("zod").ZodNumber;
|
|
924
|
+
total: import("zod").ZodNumber;
|
|
925
|
+
percent: import("zod").ZodNumber;
|
|
926
|
+
}, import("zod/v4/core").$strip>;
|
|
927
|
+
nextAction: import("zod").ZodEnum<{
|
|
928
|
+
reconnect_google: "reconnect_google";
|
|
929
|
+
none: "none";
|
|
930
|
+
wait_for_sitemaps: "wait_for_sitemaps";
|
|
931
|
+
fix_gsc_permission: "fix_gsc_permission";
|
|
932
|
+
wait_for_indexing: "wait_for_indexing";
|
|
933
|
+
retry_indexing: "retry_indexing";
|
|
934
|
+
}>;
|
|
935
|
+
}, import("zod/v4/core").$loose>;
|
|
936
|
+
latestError: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
937
|
+
code: import("zod").ZodEnum<{
|
|
938
|
+
missing_refresh_token: "missing_refresh_token";
|
|
939
|
+
missing_analytics_scope: "missing_analytics_scope";
|
|
940
|
+
missing_indexing_scope: "missing_indexing_scope";
|
|
941
|
+
token_refresh_failed: "token_refresh_failed";
|
|
942
|
+
permission_lost: "permission_lost";
|
|
943
|
+
insufficient_gsc_permission: "insufficient_gsc_permission";
|
|
944
|
+
gsc_property_not_found: "gsc_property_not_found";
|
|
945
|
+
gsc_property_unverified: "gsc_property_unverified";
|
|
946
|
+
user_database_not_provisioned: "user_database_not_provisioned";
|
|
947
|
+
sync_failed: "sync_failed";
|
|
948
|
+
sitemap_sync_failed: "sitemap_sync_failed";
|
|
949
|
+
indexing_failed: "indexing_failed";
|
|
950
|
+
}>;
|
|
951
|
+
message: import("zod").ZodString;
|
|
952
|
+
retryable: import("zod").ZodBoolean;
|
|
953
|
+
}, import("zod/v4/core").$strip>>;
|
|
954
|
+
lifecycleRevision: import("zod").ZodNumber;
|
|
955
|
+
updatedAt: import("zod").ZodString;
|
|
956
|
+
}, import("zod/v4/core").$loose>>>;
|
|
827
957
|
}, import("zod/v4/core").$loose>;
|
|
828
958
|
};
|
|
829
959
|
readonly bulkRegisterSites: {
|
|
@@ -874,6 +1004,7 @@ declare const partnerEndpoints: {
|
|
|
874
1004
|
indexingIneligibleReason: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
875
1005
|
missing_indexing_scope: "missing_indexing_scope";
|
|
876
1006
|
insufficient_gsc_permission: "insufficient_gsc_permission";
|
|
1007
|
+
free_plan: "free_plan";
|
|
877
1008
|
}>>;
|
|
878
1009
|
indexingPermissionLevel: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
879
1010
|
grantedScopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
@@ -1025,7 +1156,7 @@ declare const partnerEndpoints: {
|
|
|
1025
1156
|
syncStatus: import("zod").ZodString;
|
|
1026
1157
|
newestDateSynced: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1027
1158
|
oldestDateSynced: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1028
|
-
dataDelay: import("zod").ZodString
|
|
1159
|
+
dataDelay: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1029
1160
|
dataEndDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1030
1161
|
warnings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1031
1162
|
enrichment: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -1081,6 +1212,13 @@ declare const partnerEndpoints: {
|
|
|
1081
1212
|
ctr: import("zod").ZodNumber;
|
|
1082
1213
|
position: import("zod").ZodNumber;
|
|
1083
1214
|
}, import("zod/v4/core").$loose>>;
|
|
1215
|
+
previousDaily: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1216
|
+
date: import("zod").ZodString;
|
|
1217
|
+
clicks: import("zod").ZodNumber;
|
|
1218
|
+
impressions: import("zod").ZodNumber;
|
|
1219
|
+
ctr: import("zod").ZodNumber;
|
|
1220
|
+
position: import("zod").ZodNumber;
|
|
1221
|
+
}, import("zod/v4/core").$loose>>>;
|
|
1084
1222
|
totals: import("zod").ZodObject<{
|
|
1085
1223
|
clicks: import("zod").ZodNumber;
|
|
1086
1224
|
impressions: import("zod").ZodNumber;
|
|
@@ -1098,7 +1236,7 @@ declare const partnerEndpoints: {
|
|
|
1098
1236
|
syncStatus: import("zod").ZodString;
|
|
1099
1237
|
newestDateSynced: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1100
1238
|
oldestDateSynced: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1101
|
-
dataDelay: import("zod").ZodString
|
|
1239
|
+
dataDelay: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1102
1240
|
dataEndDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1103
1241
|
warnings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1104
1242
|
enrichment: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -1117,16 +1255,6 @@ declare const partnerEndpoints: {
|
|
|
1117
1255
|
path: (siteId: string) => string;
|
|
1118
1256
|
} & {
|
|
1119
1257
|
readonly query: import("zod").ZodObject<{
|
|
1120
|
-
preset: import("zod").ZodEnum<{
|
|
1121
|
-
"striking-distance": "striking-distance";
|
|
1122
|
-
opportunity: "opportunity";
|
|
1123
|
-
decay: "decay";
|
|
1124
|
-
"zero-click": "zero-click";
|
|
1125
|
-
"non-brand": "non-brand";
|
|
1126
|
-
"brand-only": "brand-only";
|
|
1127
|
-
"movers-rising": "movers-rising";
|
|
1128
|
-
"movers-declining": "movers-declining";
|
|
1129
|
-
}>;
|
|
1130
1258
|
startDate: import("zod").ZodString;
|
|
1131
1259
|
endDate: import("zod").ZodString;
|
|
1132
1260
|
prevStartDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1147,6 +1275,16 @@ declare const partnerEndpoints: {
|
|
|
1147
1275
|
discover: "discover";
|
|
1148
1276
|
googleNews: "googleNews";
|
|
1149
1277
|
}>>;
|
|
1278
|
+
preset: import("zod").ZodEnum<{
|
|
1279
|
+
"striking-distance": "striking-distance";
|
|
1280
|
+
opportunity: "opportunity";
|
|
1281
|
+
decay: "decay";
|
|
1282
|
+
"zero-click": "zero-click";
|
|
1283
|
+
"non-brand": "non-brand";
|
|
1284
|
+
"brand-only": "brand-only";
|
|
1285
|
+
"movers-rising": "movers-rising";
|
|
1286
|
+
"movers-declining": "movers-declining";
|
|
1287
|
+
}>;
|
|
1150
1288
|
}, import("zod/v4/core").$strip>;
|
|
1151
1289
|
readonly response: import("zod").ZodObject<{
|
|
1152
1290
|
preset: import("zod").ZodEnum<{
|
|
@@ -1161,23 +1299,17 @@ declare const partnerEndpoints: {
|
|
|
1161
1299
|
}>;
|
|
1162
1300
|
keywords: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
1163
1301
|
totalCount: import("zod").ZodNumber;
|
|
1164
|
-
summary: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown
|
|
1302
|
+
summary: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
|
|
1165
1303
|
meta: import("zod").ZodObject<{
|
|
1166
1304
|
siteUrl: import("zod").ZodString;
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
isDue: import("zod").ZodBoolean;
|
|
1176
|
-
}, import("zod/v4/core").$strip>>;
|
|
1177
|
-
backfill: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1178
|
-
percent: import("zod").ZodNumber;
|
|
1179
|
-
daysRemaining: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1180
|
-
}, import("zod/v4/core").$strip>>;
|
|
1305
|
+
params: import("zod").ZodObject<{
|
|
1306
|
+
brandTerms: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1307
|
+
startDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1308
|
+
endDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1309
|
+
prevStartDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1310
|
+
prevEndDate: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1311
|
+
}, import("zod/v4/core").$strip>;
|
|
1312
|
+
presetDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1181
1313
|
}, import("zod/v4/core").$loose>;
|
|
1182
1314
|
}, import("zod/v4/core").$loose>;
|
|
1183
1315
|
};
|
|
@@ -1192,8 +1324,11 @@ declare const partnerEndpoints: {
|
|
|
1192
1324
|
errors: import("zod").ZodNumber;
|
|
1193
1325
|
warnings: import("zod").ZodNumber;
|
|
1194
1326
|
isIndex: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1195
|
-
|
|
1327
|
+
contentHash: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1196
1328
|
lastDownloaded: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1329
|
+
lastError: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1330
|
+
isPending: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1331
|
+
fetchedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
1197
1332
|
}, import("zod/v4/core").$loose>>;
|
|
1198
1333
|
history: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1199
1334
|
date: import("zod").ZodString;
|
|
@@ -1210,6 +1345,7 @@ declare const partnerEndpoints: {
|
|
|
1210
1345
|
}, import("zod/v4/core").$loose>>>;
|
|
1211
1346
|
meta: import("zod").ZodObject<{
|
|
1212
1347
|
siteUrl: import("zod").ZodString;
|
|
1348
|
+
gscPropertyUrl: import("zod").ZodString;
|
|
1213
1349
|
syncStatus: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1214
1350
|
}, import("zod/v4/core").$loose>;
|
|
1215
1351
|
}, import("zod/v4/core").$loose>;
|
|
@@ -1327,9 +1463,9 @@ declare const partnerEndpoints: {
|
|
|
1327
1463
|
limit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1328
1464
|
offset: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1329
1465
|
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1466
|
+
pending: "pending";
|
|
1330
1467
|
indexed: "indexed";
|
|
1331
1468
|
not_indexed: "not_indexed";
|
|
1332
|
-
pending: "pending";
|
|
1333
1469
|
}>>;
|
|
1334
1470
|
issue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1335
1471
|
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { analyticsEndpointSchemas,
|
|
1
|
+
import { analyticsEndpointSchemas, partnerControlEndpointSchemas } from "./schemas.mjs";
|
|
2
|
+
import { analyticsRoutes, partnerRoutes } from "./routes.mjs";
|
|
2
3
|
function defineEndpoint(method, path, schema) {
|
|
3
4
|
return {
|
|
4
5
|
method,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const partnerRoutes = {
|
|
2
|
+
partner: {
|
|
3
|
+
users: {
|
|
4
|
+
byId: (userId) => `/partner/users/${encodeURIComponent(userId)}`,
|
|
5
|
+
lifecycle: (userId) => `/partner/users/${encodeURIComponent(userId)}/lifecycle`,
|
|
6
|
+
siteTeam: (userId, siteId) => `/partner/users/${encodeURIComponent(userId)}/sites/${encodeURIComponent(siteId)}`
|
|
7
|
+
},
|
|
8
|
+
sites: {
|
|
9
|
+
register: "/partner/sites/register",
|
|
10
|
+
bulkRegister: "/partner/sites/bulk-register"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
users: {
|
|
14
|
+
register: "/users/register",
|
|
15
|
+
tokens: (userId) => `/users/${encodeURIComponent(userId)}/tokens`,
|
|
16
|
+
status: (userId) => `/users/${encodeURIComponent(userId)}/status`,
|
|
17
|
+
lifecycle: (userId) => `/users/${encodeURIComponent(userId)}/lifecycle`,
|
|
18
|
+
sites: (userId) => `/users/${encodeURIComponent(userId)}/sites`,
|
|
19
|
+
availableSites: (userId) => `/users/${encodeURIComponent(userId)}/available-sites`,
|
|
20
|
+
siteTeam: (userId, siteId) => `/partner/users/${encodeURIComponent(userId)}/sites/${encodeURIComponent(siteId)}`
|
|
21
|
+
},
|
|
22
|
+
sites: {
|
|
23
|
+
register: "/sites/register",
|
|
24
|
+
bulkRegister: "/sites/bulk-register",
|
|
25
|
+
byId: (siteId) => `/sites/${encodeURIComponent(siteId)}`,
|
|
26
|
+
analysisSources: (siteId) => `/sites/${encodeURIComponent(siteId)}/analysis-sources`,
|
|
27
|
+
syncStatus: (siteId) => `/sites/${encodeURIComponent(siteId)}/sync-status`,
|
|
28
|
+
data: (siteId) => `/sites/${encodeURIComponent(siteId)}/data`,
|
|
29
|
+
dataDetail: (siteId) => `/sites/${encodeURIComponent(siteId)}/data/detail`,
|
|
30
|
+
analysis: (siteId) => `/sites/${encodeURIComponent(siteId)}/analysis`,
|
|
31
|
+
sitemaps: (siteId) => `/sites/${encodeURIComponent(siteId)}/sitemaps`,
|
|
32
|
+
sitemapChanges: (siteId) => `/sites/${encodeURIComponent(siteId)}/sitemaps/changes`,
|
|
33
|
+
indexing: (siteId) => `/sites/${encodeURIComponent(siteId)}/indexing`,
|
|
34
|
+
indexingUrls: (siteId) => `/sites/${encodeURIComponent(siteId)}/indexing/urls`,
|
|
35
|
+
indexingDiagnostics: (siteId) => `/sites/${encodeURIComponent(siteId)}/indexing/diagnostics`,
|
|
36
|
+
indexingInspect: (siteId) => `/sites/${encodeURIComponent(siteId)}/indexing/inspect`,
|
|
37
|
+
recoverPermission: (siteId) => `/sites/${encodeURIComponent(siteId)}/recover-permission`,
|
|
38
|
+
canonicalMismatches: (siteId) => `/sites/${encodeURIComponent(siteId)}/canonical-mismatches`,
|
|
39
|
+
topAssociation: (siteId) => `/sites/${encodeURIComponent(siteId)}/data/top-association`,
|
|
40
|
+
keywordSparklines: (siteId) => `/sites/${encodeURIComponent(siteId)}/data/keyword-sparklines`,
|
|
41
|
+
queryTrend: (siteId) => `/sites/${encodeURIComponent(siteId)}/data/query-trend`,
|
|
42
|
+
pageTrend: (siteId) => `/sites/${encodeURIComponent(siteId)}/data/page-trend`,
|
|
43
|
+
contentVelocity: (siteId) => `/sites/${encodeURIComponent(siteId)}/content-velocity`,
|
|
44
|
+
ctrCurve: (siteId) => `/sites/${encodeURIComponent(siteId)}/ctr-curve`,
|
|
45
|
+
darkTraffic: (siteId) => `/sites/${encodeURIComponent(siteId)}/dark-traffic`,
|
|
46
|
+
deviceGap: (siteId) => `/sites/${encodeURIComponent(siteId)}/device-gap`,
|
|
47
|
+
indexPercent: (siteId) => `/sites/${encodeURIComponent(siteId)}/index-percent`,
|
|
48
|
+
keywordBreadth: (siteId) => `/sites/${encodeURIComponent(siteId)}/keyword-breadth`,
|
|
49
|
+
positionDistribution: (siteId) => `/sites/${encodeURIComponent(siteId)}/position-distribution`
|
|
50
|
+
},
|
|
51
|
+
settings: { user: "/user/settings" },
|
|
52
|
+
teams: {
|
|
53
|
+
create: "/partner/teams",
|
|
54
|
+
byId: (teamId) => `/partner/teams/${encodeURIComponent(teamId)}`,
|
|
55
|
+
members: (teamId) => `/partner/teams/${encodeURIComponent(teamId)}/members`,
|
|
56
|
+
member: (teamId, userId) => `/partner/teams/${encodeURIComponent(teamId)}/members/${encodeURIComponent(userId)}`
|
|
57
|
+
},
|
|
58
|
+
realtime: {
|
|
59
|
+
partner: "/ws/partner",
|
|
60
|
+
user: "/ws/user"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const analyticsRoutes = {
|
|
64
|
+
whoami: "/api/__gsc/whoami",
|
|
65
|
+
sites: "/api/__gsc/sites",
|
|
66
|
+
site: {
|
|
67
|
+
sourceInfo: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/source-info`,
|
|
68
|
+
analysisSources: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/analysis-sources`,
|
|
69
|
+
analyze: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/analyze`,
|
|
70
|
+
rows: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/rows`,
|
|
71
|
+
rollup: (siteId, rollupId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/rollup/${encodeURIComponent(rollupId)}`,
|
|
72
|
+
backfill: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/backfill`,
|
|
73
|
+
sitemaps: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/sitemaps`,
|
|
74
|
+
sitemapHistory: (siteId, hash) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/sitemaps/${encodeURIComponent(hash)}`,
|
|
75
|
+
sitemapChanges: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/sitemaps/changes`,
|
|
76
|
+
inspections: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/inspections`,
|
|
77
|
+
inspectionHistory: (siteId, hash) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/inspections/${encodeURIComponent(hash)}`,
|
|
78
|
+
indexingUrls: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/indexing/urls`,
|
|
79
|
+
indexingDiagnostics: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/indexing/diagnostics`,
|
|
80
|
+
indexingInspect: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/indexing/inspect`,
|
|
81
|
+
countries: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/countries`,
|
|
82
|
+
searchAppearance: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/search-appearance`,
|
|
83
|
+
topAssociation: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/data/top-association`
|
|
84
|
+
},
|
|
85
|
+
syncProgress: "/api/sync-progress"
|
|
86
|
+
};
|
|
87
|
+
export { analyticsRoutes, partnerRoutes };
|