@wokuapp/sdk 0.5.0 → 0.6.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/README.md +7 -2
- package/dist/index.cjs +4 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -43
- package/dist/index.d.ts +13 -43
- package/dist/index.js +4 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -397,6 +397,11 @@ const pdf: Uint8Array = await woku.folders.pdf(folder.id, { lang: 'en' });
|
|
|
397
397
|
// 0 for the whole history), with the daily sums and the histogram of scores.
|
|
398
398
|
// Every type keeps its own scale: NPS -100..100, CSAT %, CES and stars 1-5.
|
|
399
399
|
const metrics = await woku.folders.metrics(folder.id, { days: 30 });
|
|
400
|
+
// Or a custom range of UTC days (both inclusive), as the admin custom period.
|
|
401
|
+
const september = await woku.folders.metrics(folder.id, {
|
|
402
|
+
from: '2026-09-01',
|
|
403
|
+
to: '2026-09-30',
|
|
404
|
+
});
|
|
400
405
|
for (const tool of metrics.tools) {
|
|
401
406
|
console.log(
|
|
402
407
|
tool.name,
|
|
@@ -493,8 +498,8 @@ await woku.npsTools.create(body, { idempotencyKey: 'my-key' });
|
|
|
493
498
|
|
|
494
499
|
`trackers`, `npsTools` / `csatTools` / `cesTools`, `nps` / `csat` / `ces`,
|
|
495
500
|
`wokus`, `forms`, `flows`, `actionPlans`, `actionPlanGroups`, `tickets`,
|
|
496
|
-
`ticketDestinations`, `dispatches`, `reports`, `company`, `
|
|
497
|
-
`
|
|
501
|
+
`ticketDestinations`, `dispatches`, `reports`, `company`, `journeys`,
|
|
502
|
+
`folders`, `tools`, `journeyFolders`.
|
|
498
503
|
|
|
499
504
|
## License
|
|
500
505
|
|
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ var FollowUps = class {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
// package.json
|
|
41
|
-
var version = "0.
|
|
41
|
+
var version = "0.6.0";
|
|
42
42
|
|
|
43
43
|
// src/core/errors.ts
|
|
44
44
|
var WokuError = class extends Error {
|
|
@@ -1577,20 +1577,6 @@ var Journeys = class {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
};
|
|
1579
1579
|
|
|
1580
|
-
// src/resources/quarantines.ts
|
|
1581
|
-
var Quarantines = class {
|
|
1582
|
-
constructor(client) {
|
|
1583
|
-
this.client = client;
|
|
1584
|
-
}
|
|
1585
|
-
/** Check whether a contact is quarantined. */
|
|
1586
|
-
check(params, opts) {
|
|
1587
|
-
return this.client.request("get", "/v1/quarantines/check", {
|
|
1588
|
-
...opts,
|
|
1589
|
-
query: { ...params, ...opts?.query }
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
};
|
|
1593
|
-
|
|
1594
1580
|
// src/resources/folders.ts
|
|
1595
1581
|
var Folders = class {
|
|
1596
1582
|
constructor(client) {
|
|
@@ -1666,8 +1652,9 @@ var Folders = class {
|
|
|
1666
1652
|
* subfolders for a period against the one before it, with the daily sums and
|
|
1667
1653
|
* the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
|
|
1668
1654
|
* history (every `previous` window is then empty). The period is the last
|
|
1669
|
-
* `days` calendar days in UTC, today included.
|
|
1670
|
-
*
|
|
1655
|
+
* `days` calendar days in UTC, today included. Or a custom range with `from`
|
|
1656
|
+
* and `to` (`YYYY-MM-DD` UTC days, both inclusive, up to 731 days), which
|
|
1657
|
+
* replaces `days`. Scales are never mixed across types.
|
|
1671
1658
|
*/
|
|
1672
1659
|
metrics(id, params, opts) {
|
|
1673
1660
|
return this.client.request(
|
|
@@ -1853,7 +1840,6 @@ var Woku = class {
|
|
|
1853
1840
|
this.folders = new Folders(this.client);
|
|
1854
1841
|
this.tools = new Tools(this.client);
|
|
1855
1842
|
this.journeyFolders = new JourneyFolders(this.client);
|
|
1856
|
-
this.quarantines = new Quarantines(this.client);
|
|
1857
1843
|
}
|
|
1858
1844
|
};
|
|
1859
1845
|
|