@gscdump/sdk 2.1.0 → 2.2.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/dist/archetype-compile.mjs +2 -1
- package/dist/period.mjs +4 -2
- package/dist/v1/http.d.mts +1 -0
- package/dist/v1/http.mjs +1 -0
- package/dist/v1/realtime.d.mts +1 -1
- package/dist/v1/realtime.mjs +2 -2
- package/package.json +4 -4
|
@@ -83,7 +83,8 @@ function builderStateToArchetype(siteId, state, opts = {}) {
|
|
|
83
83
|
}
|
|
84
84
|
if (dims.length === 2 && dims.includes("date")) {
|
|
85
85
|
if (matches.size > 0) return null;
|
|
86
|
-
|
|
86
|
+
const series = dims.find((d) => d !== "date");
|
|
87
|
+
return multiSeriesStackedDaily(siteId, range, series, {
|
|
87
88
|
searchType,
|
|
88
89
|
compareRange: cmp
|
|
89
90
|
});
|
package/dist/period.mjs
CHANGED
|
@@ -52,7 +52,8 @@ function startOfQuarter(date) {
|
|
|
52
52
|
return `${year}-${String(quarterMonth).padStart(2, "0")}-01`;
|
|
53
53
|
}
|
|
54
54
|
function startOfWeek(date) {
|
|
55
|
-
|
|
55
|
+
const day = (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).getUTCDay();
|
|
56
|
+
return addDays(date, -((day + 6) % 7));
|
|
56
57
|
}
|
|
57
58
|
function buildResultFromIso(start, end) {
|
|
58
59
|
const startDate = /* @__PURE__ */ new Date(`${start}T00:00:00`);
|
|
@@ -95,7 +96,8 @@ function periodToDateRange(period, stableDataOrOptions = true) {
|
|
|
95
96
|
};
|
|
96
97
|
return result;
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
+
const today = todayInTimezone(options.timezone, options.now);
|
|
100
|
+
const endIso = addDays(today, -(stableData ? 3 : 1));
|
|
99
101
|
const upstreamPreset = ROLLING_TO_UPSTREAM[period] ?? CALENDAR_TO_UPSTREAM[period];
|
|
100
102
|
if (upstreamPreset) {
|
|
101
103
|
const win = resolveWindow({
|
package/dist/v1/http.d.mts
CHANGED
|
@@ -73,6 +73,7 @@ interface GscdumpV1Client {
|
|
|
73
73
|
updateUserTokens: (input: GscdumpV1OperationInput<'partner.users.tokens.update'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.users.tokens.update'>>;
|
|
74
74
|
getSiteIndexing: (input: GscdumpV1OperationInput<'partner.sites.indexing.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.indexing.get'>>;
|
|
75
75
|
listSiteIndexingUrls: (input: GscdumpV1OperationInput<'partner.sites.indexing.urls.list'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.indexing.urls.list'>>;
|
|
76
|
+
listSiteBingIndexingEvidence: (input: GscdumpV1OperationInput<'partner.sites.indexing.bing.evidence.list'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.indexing.bing.evidence.list'>>;
|
|
76
77
|
listSiteIndexingTransitions: (input: GscdumpV1OperationInput<'partner.sites.indexing.transitions.list'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.indexing.transitions.list'>>;
|
|
77
78
|
getSiteIndexingDiagnostics: (input: GscdumpV1OperationInput<'partner.sites.indexing.diagnostics.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.indexing.diagnostics.get'>>;
|
|
78
79
|
getSiteSitemaps: (input: GscdumpV1OperationInput<'partner.sites.sitemaps.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.sitemaps.get'>>;
|
package/dist/v1/http.mjs
CHANGED
|
@@ -379,6 +379,7 @@ function createGscdumpV1Client(options) {
|
|
|
379
379
|
updateUserTokens: (input, executeOptions) => execute("partner.users.tokens.update", input, executeOptions),
|
|
380
380
|
getSiteIndexing: (input, executeOptions) => execute("partner.sites.indexing.get", input, executeOptions),
|
|
381
381
|
listSiteIndexingUrls: (input, executeOptions) => execute("partner.sites.indexing.urls.list", input, executeOptions),
|
|
382
|
+
listSiteBingIndexingEvidence: (input, executeOptions) => execute("partner.sites.indexing.bing.evidence.list", input, executeOptions),
|
|
382
383
|
listSiteIndexingTransitions: (input, executeOptions) => execute("partner.sites.indexing.transitions.list", input, executeOptions),
|
|
383
384
|
getSiteIndexingDiagnostics: (input, executeOptions) => execute("partner.sites.indexing.diagnostics.get", input, executeOptions),
|
|
384
385
|
getSiteSitemaps: (input, executeOptions) => execute("partner.sites.sitemaps.get", input, executeOptions),
|
package/dist/v1/realtime.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RealtimeV1Cursor, RealtimeV1Event, RealtimeV1StreamHead, RealtimeV1StreamId } from "@gscdump/contracts/v1/realtime";
|
|
2
2
|
type MaybePromise<T> = T | Promise<T>;
|
|
3
|
-
declare const GSCDUMP_REALTIME_V1_SDK_VERSION: "2.1.
|
|
3
|
+
declare const GSCDUMP_REALTIME_V1_SDK_VERSION: "2.1.2";
|
|
4
4
|
type GscdumpRealtimeV1TransportState = 'idle' | 'ticketing' | 'connecting' | 'handshaking' | 'replaying' | 'live' | 'waiting' | 'stopped' | 'terminal';
|
|
5
5
|
type GscdumpRealtimeV1Freshness = 'unknown' | 'stale' | 'applying' | 'fresh' | 'resyncing' | 'degraded';
|
|
6
6
|
type GscdumpRealtimeV1ErrorCode = 'cursor_store_failed' | 'effect_failed' | 'heartbeat_stale' | 'integration_failed' | 'protocol_error' | 'resync_failed' | 'runtime_unavailable' | 'socket_error' | 'ticket_invalid' | 'ticket_provider_failed' | 'upgrade_rejected';
|
package/dist/v1/realtime.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { utf8Size } from "../utf8.mjs";
|
|
2
2
|
import { GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_SUBPROTOCOL, REALTIME_V1_EVENT_NAMES, REALTIME_V1_RESOURCE_TYPES, createRealtimeV1Schemas } from "@gscdump/contracts/v1/realtime";
|
|
3
|
-
const GSCDUMP_REALTIME_V1_SDK_VERSION = "2.1.
|
|
3
|
+
const GSCDUMP_REALTIME_V1_SDK_VERSION = "2.1.2";
|
|
4
4
|
var GscdumpRealtimeV1Error = class extends Error {
|
|
5
5
|
tag = "GscdumpRealtimeV1Error";
|
|
6
6
|
code;
|
|
@@ -87,7 +87,7 @@ function createGscdumpRealtimeV1Client(options) {
|
|
|
87
87
|
const schemas = createRealtimeV1Schemas();
|
|
88
88
|
const runtime = options.runtime ?? defaultRuntime();
|
|
89
89
|
const cursorStore = options.cursorStore ?? createMemoryCursorStore();
|
|
90
|
-
const sdkVersion = options.sdkVersion ?? "2.1.
|
|
90
|
+
const sdkVersion = options.sdkVersion ?? "2.1.2";
|
|
91
91
|
if (!sdkVersion) throw new TypeError("sdkVersion cannot be empty.");
|
|
92
92
|
let running = false;
|
|
93
93
|
let epoch = 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"description": "Consumer SDK for hosted gscdump.com integrations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -146,9 +146,9 @@
|
|
|
146
146
|
"dependencies": {
|
|
147
147
|
"ofetch": "^1.5.1",
|
|
148
148
|
"zod": "^4.4.3",
|
|
149
|
-
"@gscdump/contracts": "^2.
|
|
150
|
-
"@gscdump/engine": "^2.
|
|
151
|
-
"gscdump": "^2.
|
|
149
|
+
"@gscdump/contracts": "^2.2.0",
|
|
150
|
+
"@gscdump/engine": "^2.2.0",
|
|
151
|
+
"gscdump": "^2.2.0"
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
154
|
"typescript": "^7.0.2",
|