@gscdump/sdk 1.0.4 → 1.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/v1/index.d.mts +10 -2
- package/dist/v1/index.mjs +12 -3
- package/package.json +5 -5
package/dist/v1/index.d.mts
CHANGED
|
@@ -69,7 +69,7 @@ declare class GscdumpV1Error extends Error {
|
|
|
69
69
|
}
|
|
70
70
|
declare function isGscdumpV1Error(error: unknown): error is GscdumpV1Error;
|
|
71
71
|
interface GscdumpV1Client {
|
|
72
|
-
execute: <TId extends GscdumpV1OperationId>(operation: TId, input: GscdumpV1OperationInput<TId
|
|
72
|
+
execute: <TId extends GscdumpV1OperationId>(operation: TId, input: NoInfer<GscdumpV1OperationInput<TId>>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<TId>>;
|
|
73
73
|
getUserLifecycle: (input: GscdumpV1OperationInput<'partner.users.lifecycle.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.users.lifecycle.get'>>;
|
|
74
74
|
listAvailableSites: (input: GscdumpV1OperationInput<'partner.users.sites.available.list'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.users.sites.available.list'>>;
|
|
75
75
|
createSite: (input: GscdumpV1OperationInput<'partner.users.sites.create'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.users.sites.create'>>;
|
|
@@ -89,6 +89,14 @@ interface GscdumpV1Client {
|
|
|
89
89
|
queryKeywordSparklines: (input: GscdumpV1OperationInput<'partner.sites.keyword.sparklines.query'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.keyword.sparklines.query'>>;
|
|
90
90
|
getQueryTrend: (input: GscdumpV1OperationInput<'partner.sites.query.trend.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.query.trend.get'>>;
|
|
91
91
|
getPageTrend: (input: GscdumpV1OperationInput<'partner.sites.page.trend.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.page.trend.get'>>;
|
|
92
|
+
getContentVelocity: (input: GscdumpV1OperationInput<'partner.sites.content.velocity.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.content.velocity.get'>>;
|
|
93
|
+
getCtrCurve: (input: GscdumpV1OperationInput<'partner.sites.ctr.curve.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.ctr.curve.get'>>;
|
|
94
|
+
getDarkTraffic: (input: GscdumpV1OperationInput<'partner.sites.dark.traffic.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.dark.traffic.get'>>;
|
|
95
|
+
getDeviceGap: (input: GscdumpV1OperationInput<'partner.sites.device.gap.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.device.gap.get'>>;
|
|
96
|
+
getKeywordBreadth: (input: GscdumpV1OperationInput<'partner.sites.keyword.breadth.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.keyword.breadth.get'>>;
|
|
97
|
+
getPositionDistribution: (input: GscdumpV1OperationInput<'partner.sites.position.distribution.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.position.distribution.get'>>;
|
|
98
|
+
getTopAssociation: (input: GscdumpV1OperationInput<'partner.sites.top.association.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.top.association.get'>>;
|
|
99
|
+
getIndexPercent: (input: GscdumpV1OperationInput<'partner.sites.index.percent.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.index.percent.get'>>;
|
|
92
100
|
queryAnalyticsRows: (input: GscdumpV1OperationInput<'analytics.rows.query'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'analytics.rows.query'>>;
|
|
93
101
|
queryAnalyticsReport: (input: GscdumpV1OperationInput<'analytics.reports.query'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'analytics.reports.query'>>;
|
|
94
102
|
queryAnalyticsReportDetail: (input: GscdumpV1OperationInput<'analytics.reports.detail.query'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'analytics.reports.detail.query'>>;
|
|
@@ -98,7 +106,7 @@ interface GscdumpV1Client {
|
|
|
98
106
|
/** Create one framework-neutral client whose behavior is driven by the v1 registry. */
|
|
99
107
|
declare function createGscdumpV1Client(options: CreateGscdumpV1ClientOptions): GscdumpV1Client;
|
|
100
108
|
type MaybePromise<T> = T | Promise<T>;
|
|
101
|
-
declare const GSCDUMP_REALTIME_V1_SDK_VERSION: "1.0
|
|
109
|
+
declare const GSCDUMP_REALTIME_V1_SDK_VERSION: "1.1.0";
|
|
102
110
|
type GscdumpRealtimeV1TransportState = 'idle' | 'ticketing' | 'connecting' | 'handshaking' | 'replaying' | 'live' | 'waiting' | 'stopped' | 'terminal';
|
|
103
111
|
type GscdumpRealtimeV1Freshness = 'unknown' | 'stale' | 'applying' | 'fresh' | 'resyncing' | 'degraded';
|
|
104
112
|
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/index.mjs
CHANGED
|
@@ -257,7 +257,8 @@ function createGscdumpV1Client(options) {
|
|
|
257
257
|
const apiRoot = options.apiRoot ?? DEFAULT_API_ROOT;
|
|
258
258
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
259
259
|
if (typeof fetchImpl !== "function") throw new TypeError("createGscdumpV1Client requires a fetch implementation in this runtime.");
|
|
260
|
-
|
|
260
|
+
const execute = executeUntyped;
|
|
261
|
+
async function executeUntyped(operationId, input, executeOptions = {}) {
|
|
261
262
|
const entry = operations.get(operationId);
|
|
262
263
|
if (!entry) throw new GscdumpV1Error({
|
|
263
264
|
code: "request_validation",
|
|
@@ -381,6 +382,14 @@ function createGscdumpV1Client(options) {
|
|
|
381
382
|
queryKeywordSparklines: (input, executeOptions) => execute("partner.sites.keyword.sparklines.query", input, executeOptions),
|
|
382
383
|
getQueryTrend: (input, executeOptions) => execute("partner.sites.query.trend.get", input, executeOptions),
|
|
383
384
|
getPageTrend: (input, executeOptions) => execute("partner.sites.page.trend.get", input, executeOptions),
|
|
385
|
+
getContentVelocity: (input, executeOptions) => execute("partner.sites.content.velocity.get", input, executeOptions),
|
|
386
|
+
getCtrCurve: (input, executeOptions) => execute("partner.sites.ctr.curve.get", input, executeOptions),
|
|
387
|
+
getDarkTraffic: (input, executeOptions) => execute("partner.sites.dark.traffic.get", input, executeOptions),
|
|
388
|
+
getDeviceGap: (input, executeOptions) => execute("partner.sites.device.gap.get", input, executeOptions),
|
|
389
|
+
getKeywordBreadth: (input, executeOptions) => execute("partner.sites.keyword.breadth.get", input, executeOptions),
|
|
390
|
+
getPositionDistribution: (input, executeOptions) => execute("partner.sites.position.distribution.get", input, executeOptions),
|
|
391
|
+
getTopAssociation: (input, executeOptions) => execute("partner.sites.top.association.get", input, executeOptions),
|
|
392
|
+
getIndexPercent: (input, executeOptions) => execute("partner.sites.index.percent.get", input, executeOptions),
|
|
384
393
|
queryAnalyticsRows: (input, executeOptions) => execute("analytics.rows.query", input, executeOptions),
|
|
385
394
|
queryAnalyticsReport: (input, executeOptions) => execute("analytics.reports.query", input, executeOptions),
|
|
386
395
|
queryAnalyticsReportDetail: (input, executeOptions) => execute("analytics.reports.detail.query", input, executeOptions),
|
|
@@ -401,7 +410,7 @@ function utf8Size(value) {
|
|
|
401
410
|
}
|
|
402
411
|
return bytes;
|
|
403
412
|
}
|
|
404
|
-
const GSCDUMP_REALTIME_V1_SDK_VERSION = "1.0
|
|
413
|
+
const GSCDUMP_REALTIME_V1_SDK_VERSION = "1.1.0";
|
|
405
414
|
var GscdumpRealtimeV1Error = class extends Error {
|
|
406
415
|
tag = "GscdumpRealtimeV1Error";
|
|
407
416
|
code;
|
|
@@ -488,7 +497,7 @@ function createGscdumpRealtimeV1Client(options) {
|
|
|
488
497
|
const protocol = createGscdumpV1Protocol();
|
|
489
498
|
const runtime = options.runtime ?? defaultRuntime();
|
|
490
499
|
const cursorStore = options.cursorStore ?? createMemoryCursorStore();
|
|
491
|
-
const sdkVersion = options.sdkVersion ?? "1.0
|
|
500
|
+
const sdkVersion = options.sdkVersion ?? "1.1.0";
|
|
492
501
|
if (!sdkVersion) throw new TypeError("sdkVersion cannot be empty.");
|
|
493
502
|
let running = false;
|
|
494
503
|
let epoch = 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"description": "Consumer SDK for hosted gscdump.com integrations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -149,10 +149,10 @@
|
|
|
149
149
|
"date-fns": "^4.4.0",
|
|
150
150
|
"ofetch": "^1.5.1",
|
|
151
151
|
"zod": "^4.4.3",
|
|
152
|
-
"@gscdump/contracts": "^1.0
|
|
153
|
-
"@gscdump/analysis": "^1.0
|
|
154
|
-
"@gscdump/engine": "^1.0
|
|
155
|
-
"gscdump": "^1.0
|
|
152
|
+
"@gscdump/contracts": "^1.2.0",
|
|
153
|
+
"@gscdump/analysis": "^1.2.0",
|
|
154
|
+
"@gscdump/engine": "^1.2.0",
|
|
155
|
+
"gscdump": "^1.2.0"
|
|
156
156
|
},
|
|
157
157
|
"devDependencies": {
|
|
158
158
|
"typescript": "^6.0.3",
|