@zernio/node 0.2.727 → 0.2.728
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.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +14 -10
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@zernio/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.728",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@zernio/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.728",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -97,13 +97,17 @@ export const getAnalytics = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
97
97
|
* 1,600 connected accounts: about 1,599 per-account analytics calls an hour became
|
|
98
98
|
* about 205 delta calls an hour, a 7.8x reduction.
|
|
99
99
|
*
|
|
100
|
-
* **Bootstrap once, then stay in sync.**
|
|
101
|
-
* `
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
100
|
+
* **Bootstrap once, then stay in sync.** Take the cursor FIRST: call this endpoint
|
|
101
|
+
* with NO `cursor` and it answers with an empty `data` array plus the feed's current
|
|
102
|
+
* position in `nextCursor`. Then load your baseline from `GET /v1/analytics`, the
|
|
103
|
+
* historical endpoint, because this one is a rolling 7-day change log and cannot
|
|
104
|
+
* replay history. Then resume from the cursor you took before the baseline. Taking
|
|
105
|
+
* the cursor afterwards instead drops every change that lands while the baseline is
|
|
106
|
+
* loading: it is in neither the row you already read nor the feed you resume behind
|
|
107
|
+
* it. The overlap this order creates is safe, because metrics are absolute values
|
|
108
|
+
* rather than increments, so draining it leaves every post on its newest value.
|
|
109
|
+
* `nextCursor` is present on every response, empty pages included, so you always
|
|
110
|
+
* have something to advance with.
|
|
107
111
|
*
|
|
108
112
|
* **Ordering.** Entries come back oldest first, in the order the feed received
|
|
109
113
|
* them. That order is NOT `syncedAt`: `syncedAt` is stamped when an account's sync
|
|
@@ -133,9 +137,9 @@ export const getAnalytics = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
133
137
|
*
|
|
134
138
|
* **Retention is 7 days.** Changes older than that leave the feed. A cursor older
|
|
135
139
|
* than 6 days is rejected with a `400` (a day of margin, because expiry is lazy).
|
|
136
|
-
* Recover
|
|
137
|
-
*
|
|
138
|
-
* daily never reaches this.
|
|
140
|
+
* Recover the same way you bootstrapped: take a fresh cursor from a call to this
|
|
141
|
+
* endpoint with no `cursor`, then re-load from `GET /v1/analytics`, then resume
|
|
142
|
+
* from that cursor. A consumer that polls at least daily never reaches this.
|
|
139
143
|
*
|
|
140
144
|
* Pairs with the `analytics.synced` webhook, so changes can be read on notification
|
|
141
145
|
* instead of on a timer. That event carries no cursor of its own: keep using the
|