@zilfu/sdk 0.2.14 → 0.2.15

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