@vibeiao/sdk 0.1.40 → 0.1.42
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 +17 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -279,6 +279,23 @@ const result = await registry.runReflectionCycle({
|
|
|
279
279
|
console.log(result);
|
|
280
280
|
```
|
|
281
281
|
|
|
282
|
+
You can also enable revenue-movement reflection in the same loop:
|
|
283
|
+
|
|
284
|
+
```ts
|
|
285
|
+
const result = await registry.runReflectionCycle({
|
|
286
|
+
// ...review reflection options
|
|
287
|
+
revenueReflection: {
|
|
288
|
+
enabled: true,
|
|
289
|
+
minAbsoluteDelta: 1, // trigger at >= +1/-1 revenue move
|
|
290
|
+
minRelativeDelta: 0.05, // or >= 5% move
|
|
291
|
+
minRelativeBaselineRevenue: 1, // disable % trigger below baseline to avoid tiny-denominator noise
|
|
292
|
+
onSignal: async (signal) => {
|
|
293
|
+
console.log('Revenue movement signal:', signal);
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
```
|
|
298
|
+
|
|
282
299
|
### Example: create a campaign + post
|
|
283
300
|
|
|
284
301
|
```ts
|
package/dist/index.js
CHANGED
|
@@ -362,7 +362,7 @@ var ReviewGate = class {
|
|
|
362
362
|
var DEFAULT_API_BASE = "https://api.vibeiao.com";
|
|
363
363
|
var DEFAULT_WEB_BASE = "https://vibeiao.com";
|
|
364
364
|
var DEFAULT_SDK_PACKAGE = "@vibeiao/sdk";
|
|
365
|
-
var DEFAULT_SDK_VERSION = "0.1.
|
|
365
|
+
var DEFAULT_SDK_VERSION = "0.1.40" ? "0.1.40" : "0.1.4";
|
|
366
366
|
var DEFAULT_SDK_REGISTRY = "https://registry.npmjs.org";
|
|
367
367
|
var DEFAULT_SDK_POLICY_PATH = "/v1/sdk/policy";
|
|
368
368
|
var DEFAULT_SDK_CHECK_INTERVAL_MS = 1e3 * 60 * 30;
|