@gscdump/sdk 0.35.2 → 0.35.4
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/dist/index.d.mts +6 -1
- package/dist/index.mjs +2 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -317,7 +317,12 @@ interface GscDailySummary {
|
|
|
317
317
|
impressions: number;
|
|
318
318
|
}>;
|
|
319
319
|
}
|
|
320
|
-
/**
|
|
320
|
+
/**
|
|
321
|
+
* Fill `sum_position` from `(position - 1) * impressions` when the row only
|
|
322
|
+
* carries `position`. GSC positions are 1-based and 0/absent is a no-data
|
|
323
|
+
* sentinel — the old `Math.max(1, …)` clamp synthesized rank #1 (sum 0 with
|
|
324
|
+
* full impression weight) for such rows instead of contributing nothing.
|
|
325
|
+
*/
|
|
321
326
|
declare function coerceRowMetrics<T extends {
|
|
322
327
|
impressions: number;
|
|
323
328
|
sum_position?: number;
|
package/dist/index.mjs
CHANGED
|
@@ -985,9 +985,10 @@ const GSC_COLUMN_OPTIONS = [
|
|
|
985
985
|
}
|
|
986
986
|
];
|
|
987
987
|
function coerceRowMetrics(row) {
|
|
988
|
+
const position = row.position ?? 0;
|
|
988
989
|
return {
|
|
989
990
|
...row,
|
|
990
|
-
sum_position: row.sum_position ?? (
|
|
991
|
+
sum_position: row.sum_position ?? (position > 0 ? (position - 1) * row.impressions : 0)
|
|
991
992
|
};
|
|
992
993
|
}
|
|
993
994
|
function summarizeDailyRows(raw) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.35.
|
|
4
|
+
"version": "0.35.4",
|
|
5
5
|
"description": "Consumer SDK for hosted gscdump.com integrations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"date-fns": "^4.4.0",
|
|
45
45
|
"ofetch": "^1.5.1",
|
|
46
46
|
"zod": "^4.4.3",
|
|
47
|
-
"@gscdump/analysis": "0.35.
|
|
48
|
-
"
|
|
49
|
-
"@gscdump/
|
|
50
|
-
"gscdump": "0.35.
|
|
47
|
+
"@gscdump/analysis": "0.35.4",
|
|
48
|
+
"gscdump": "0.35.4",
|
|
49
|
+
"@gscdump/contracts": "0.35.4",
|
|
50
|
+
"@gscdump/engine": "0.35.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"typescript": "^6.0.3",
|