@justins-home/api-services 1.2.5 → 1.2.8

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.d.mts CHANGED
@@ -73,6 +73,86 @@ declare const admin: {
73
73
  expires_at?: string | null;
74
74
  };
75
75
  }>;
76
+ dashboardStats: () => Promise<{
77
+ message?: string;
78
+ event?: string | null;
79
+ data?: {
80
+ system_scale?: {
81
+ total_users?: number;
82
+ active_landlords?: number;
83
+ total_properties?: number;
84
+ active_tenancies?: number;
85
+ };
86
+ operational_health?: {
87
+ inspections_this_month?: number;
88
+ overdue_inspections?: number;
89
+ open_maintenance?: number;
90
+ sla_24h?: number;
91
+ };
92
+ financial?: {
93
+ revenue_mtd?: number;
94
+ vacancy_rate?: number;
95
+ arrears_total?: number;
96
+ maintenance_ratio?: number;
97
+ };
98
+ };
99
+ }>;
100
+ planDistribution: () => Promise<{
101
+ message?: string;
102
+ event?: string | null;
103
+ data?: {
104
+ total?: number;
105
+ period?: string;
106
+ distribution?: {
107
+ plan?: string;
108
+ label?: string;
109
+ count?: number;
110
+ percentage?: number;
111
+ }[];
112
+ };
113
+ }>;
114
+ riskOverview: () => Promise<{
115
+ message?: string;
116
+ event?: string | null;
117
+ data?: {
118
+ score?: {
119
+ value?: number;
120
+ max?: number;
121
+ grade?: string;
122
+ };
123
+ trend?: {
124
+ month?: string;
125
+ score?: number;
126
+ }[];
127
+ breakdown?: {
128
+ compliant?: number;
129
+ warning?: number;
130
+ critical?: number;
131
+ };
132
+ insight?: {
133
+ message?: string;
134
+ highlight_value?: number;
135
+ highlight_label?: string;
136
+ type?: string;
137
+ };
138
+ };
139
+ }>;
140
+ activityFeed: () => Promise<{
141
+ message?: string;
142
+ event?: string | null;
143
+ data?: {
144
+ id?: string;
145
+ type?: string;
146
+ title?: string;
147
+ subtitle?: string;
148
+ meta?: {
149
+ listing?: string;
150
+ actor?: string;
151
+ };
152
+ timestamp?: string;
153
+ time_ago?: string;
154
+ }[];
155
+ }>;
76
156
  getSubmittedListing: () => Promise<{
77
157
  data?: {
78
158
  draft_name?: string;
@@ -2157,7 +2237,7 @@ declare const tenancy: {
2157
2237
  to_state?: string;
2158
2238
  changed_by_user_id?: number;
2159
2239
  changed_by_name?: string;
2160
- comment?: string | null;
2240
+ comment?: string;
2161
2241
  created_at?: string;
2162
2242
  }[];
2163
2243
  }>;
package/dist/index.d.ts CHANGED
@@ -73,6 +73,86 @@ declare const admin: {
73
73
  expires_at?: string | null;
74
74
  };
75
75
  }>;
76
+ dashboardStats: () => Promise<{
77
+ message?: string;
78
+ event?: string | null;
79
+ data?: {
80
+ system_scale?: {
81
+ total_users?: number;
82
+ active_landlords?: number;
83
+ total_properties?: number;
84
+ active_tenancies?: number;
85
+ };
86
+ operational_health?: {
87
+ inspections_this_month?: number;
88
+ overdue_inspections?: number;
89
+ open_maintenance?: number;
90
+ sla_24h?: number;
91
+ };
92
+ financial?: {
93
+ revenue_mtd?: number;
94
+ vacancy_rate?: number;
95
+ arrears_total?: number;
96
+ maintenance_ratio?: number;
97
+ };
98
+ };
99
+ }>;
100
+ planDistribution: () => Promise<{
101
+ message?: string;
102
+ event?: string | null;
103
+ data?: {
104
+ total?: number;
105
+ period?: string;
106
+ distribution?: {
107
+ plan?: string;
108
+ label?: string;
109
+ count?: number;
110
+ percentage?: number;
111
+ }[];
112
+ };
113
+ }>;
114
+ riskOverview: () => Promise<{
115
+ message?: string;
116
+ event?: string | null;
117
+ data?: {
118
+ score?: {
119
+ value?: number;
120
+ max?: number;
121
+ grade?: string;
122
+ };
123
+ trend?: {
124
+ month?: string;
125
+ score?: number;
126
+ }[];
127
+ breakdown?: {
128
+ compliant?: number;
129
+ warning?: number;
130
+ critical?: number;
131
+ };
132
+ insight?: {
133
+ message?: string;
134
+ highlight_value?: number;
135
+ highlight_label?: string;
136
+ type?: string;
137
+ };
138
+ };
139
+ }>;
140
+ activityFeed: () => Promise<{
141
+ message?: string;
142
+ event?: string | null;
143
+ data?: {
144
+ id?: string;
145
+ type?: string;
146
+ title?: string;
147
+ subtitle?: string;
148
+ meta?: {
149
+ listing?: string;
150
+ actor?: string;
151
+ };
152
+ timestamp?: string;
153
+ time_ago?: string;
154
+ }[];
155
+ }>;
76
156
  getSubmittedListing: () => Promise<{
77
157
  data?: {
78
158
  draft_name?: string;
@@ -2157,7 +2237,7 @@ declare const tenancy: {
2157
2237
  to_state?: string;
2158
2238
  changed_by_user_id?: number;
2159
2239
  changed_by_name?: string;
2160
- comment?: string | null;
2240
+ comment?: string;
2161
2241
  created_at?: string;
2162
2242
  }[];
2163
2243
  }>;
package/dist/index.js CHANGED
@@ -108,6 +108,18 @@ var admin = {
108
108
  basicLogin: (payload) => {
109
109
  return api.post("basicLoginAdmin", "/api/v1/portal/admin/login", payload);
110
110
  },
111
+ dashboardStats: () => {
112
+ return api.get("dashboardStatsAdmin", "/api/v1/portal/admin/dashboard/stats");
113
+ },
114
+ planDistribution: () => {
115
+ return api.get("planDistribution", "/api/v1/portal/admin/dashboard/plan-distribution");
116
+ },
117
+ riskOverview: () => {
118
+ return api.get("riskOverview", "/api/v1/portal/admin/dashboard/risk-overview");
119
+ },
120
+ activityFeed: () => {
121
+ return api.get("activityFeed", "/api/v1/portal/admin/dashboard/activity-feed");
122
+ },
111
123
  getSubmittedListing: () => {
112
124
  return api.get("getSubmittedListing", "/api/v1/portal/admin/listing/review");
113
125
  },
package/dist/index.mjs CHANGED
@@ -61,6 +61,18 @@ var admin = {
61
61
  basicLogin: (payload) => {
62
62
  return api.post("basicLoginAdmin", "/api/v1/portal/admin/login", payload);
63
63
  },
64
+ dashboardStats: () => {
65
+ return api.get("dashboardStatsAdmin", "/api/v1/portal/admin/dashboard/stats");
66
+ },
67
+ planDistribution: () => {
68
+ return api.get("planDistribution", "/api/v1/portal/admin/dashboard/plan-distribution");
69
+ },
70
+ riskOverview: () => {
71
+ return api.get("riskOverview", "/api/v1/portal/admin/dashboard/risk-overview");
72
+ },
73
+ activityFeed: () => {
74
+ return api.get("activityFeed", "/api/v1/portal/admin/dashboard/activity-feed");
75
+ },
64
76
  getSubmittedListing: () => {
65
77
  return api.get("getSubmittedListing", "/api/v1/portal/admin/listing/review");
66
78
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justins-home/api-services",
3
- "version": "1.2.5",
3
+ "version": "1.2.8",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,8 +16,8 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@justins-home/http-client": "1.1.1",
20
- "@justins-home/types": "1.1.1"
19
+ "@justins-home/http-client": "1.1.3",
20
+ "@justins-home/types": "1.1.3"
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public"