@zilfu/sdk 0.2.14 → 0.2.16
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.cjs +52 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +648 -1
- package/dist/index.d.ts +648 -1
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -861,6 +861,54 @@ var Accounts = class extends HeyApiClient {
|
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
863
|
};
|
|
864
|
+
var Analytics = class extends HeyApiClient {
|
|
865
|
+
/**
|
|
866
|
+
* List analytics summaries
|
|
867
|
+
*
|
|
868
|
+
* One compact row per account in the space — never merged — so a caller can
|
|
869
|
+
* see each account's collection health before drilling into one of them.
|
|
870
|
+
* Defaults to the last 7 days in the space timezone.
|
|
871
|
+
*/
|
|
872
|
+
list(options) {
|
|
873
|
+
return (options.client ?? this.client).get({
|
|
874
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
875
|
+
url: "/spaces/{space}/analytics",
|
|
876
|
+
...options
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* Get an account's analytics report
|
|
881
|
+
*
|
|
882
|
+
* The full report for one connected account: its metric catalogue, totals,
|
|
883
|
+
* interaction score, rates, publish-date series, audience history and best
|
|
884
|
+
* times. Individual posts have their own endpoint. Defaults to the last 7
|
|
885
|
+
* days in the space timezone.
|
|
886
|
+
*/
|
|
887
|
+
get(options) {
|
|
888
|
+
return (options.client ?? this.client).get({
|
|
889
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
890
|
+
url: "/spaces/{space}/accounts/{account}/analytics",
|
|
891
|
+
...options
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* List an account's posts with their metrics
|
|
896
|
+
*
|
|
897
|
+
* Every post the account published in the range, paginated, one row per
|
|
898
|
+
* post, with a column for each metric the platform declares. Order it by
|
|
899
|
+
* `sort` — `published_at`, `interactions` or any declared metric key — and
|
|
900
|
+
* `dir`; a key this account does not declare is a 422 naming the ones it
|
|
901
|
+
* does. Defaults to the last 7 days in the space timezone, newest first,
|
|
902
|
+
* 20 per page.
|
|
903
|
+
*/
|
|
904
|
+
posts(options) {
|
|
905
|
+
return (options.client ?? this.client).get({
|
|
906
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
907
|
+
url: "/spaces/{space}/accounts/{account}/analytics/posts",
|
|
908
|
+
...options
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
};
|
|
864
912
|
var ApiTokens = class extends HeyApiClient {
|
|
865
913
|
/**
|
|
866
914
|
* Create an API token
|
|
@@ -1528,6 +1576,10 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
|
|
|
1528
1576
|
get accounts() {
|
|
1529
1577
|
return this._accounts ??= new Accounts({ client: this.client });
|
|
1530
1578
|
}
|
|
1579
|
+
_analytics;
|
|
1580
|
+
get analytics() {
|
|
1581
|
+
return this._analytics ??= new Analytics({ client: this.client });
|
|
1582
|
+
}
|
|
1531
1583
|
_apiTokens;
|
|
1532
1584
|
get apiTokens() {
|
|
1533
1585
|
return this._apiTokens ??= new ApiTokens({ client: this.client });
|