@devdash/bofrid-api-types 0.1.5

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.
Files changed (163) hide show
  1. package/README.md +24 -0
  2. package/dist/app.d.ts +23 -0
  3. package/dist/dev.d.ts +6 -0
  4. package/dist/export-openapi.d.ts +9 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/lib/auth.d.ts +20 -0
  7. package/dist/lib/criipto-bankid.d.ts +45 -0
  8. package/dist/lib/datalake.d.ts +7 -0
  9. package/dist/lib/docs-filter.d.ts +15 -0
  10. package/dist/lib/email-action-token.d.ts +26 -0
  11. package/dist/lib/email-utm.d.ts +42 -0
  12. package/dist/lib/email.d.ts +94 -0
  13. package/dist/lib/env.d.ts +18 -0
  14. package/dist/lib/errors.d.ts +6 -0
  15. package/dist/lib/helpers.d.ts +6 -0
  16. package/dist/lib/logger.d.ts +25 -0
  17. package/dist/lib/markets.d.ts +1 -0
  18. package/dist/lib/org-number.d.ts +5 -0
  19. package/dist/lib/ownership.d.ts +47 -0
  20. package/dist/lib/pdf-watermark.d.ts +25 -0
  21. package/dist/lib/personnummer.d.ts +14 -0
  22. package/dist/lib/posthog.d.ts +51 -0
  23. package/dist/lib/premium.d.ts +13 -0
  24. package/dist/lib/profile-resolver.d.ts +14 -0
  25. package/dist/lib/redirect-state.d.ts +40 -0
  26. package/dist/lib/revalidate.d.ts +23 -0
  27. package/dist/lib/schemas.d.ts +21 -0
  28. package/dist/lib/sentry.d.ts +31 -0
  29. package/dist/lib/slug.d.ts +5 -0
  30. package/dist/lib/sms.d.ts +22 -0
  31. package/dist/lib/system-log.d.ts +31 -0
  32. package/dist/lib/webhook-events.d.ts +26 -0
  33. package/dist/lib/webhooks.d.ts +28 -0
  34. package/dist/middleware/auth-debug.d.ts +17 -0
  35. package/dist/middleware/auth.d.ts +19 -0
  36. package/dist/middleware/bibi-logger.d.ts +6 -0
  37. package/dist/middleware/cors.d.ts +1 -0
  38. package/dist/middleware/request-id.d.ts +10 -0
  39. package/dist/middleware/sentry-context.d.ts +8 -0
  40. package/dist/routes/activity-feed.d.ts +64 -0
  41. package/dist/routes/admin-bevakningar.d.ts +200 -0
  42. package/dist/routes/admin-companies.d.ts +381 -0
  43. package/dist/routes/admin-email-jobs.d.ts +257 -0
  44. package/dist/routes/admin-email-logs.d.ts +9 -0
  45. package/dist/routes/admin-fb-leads.d.ts +32 -0
  46. package/dist/routes/admin-import.d.ts +188 -0
  47. package/dist/routes/admin-login-history.d.ts +9 -0
  48. package/dist/routes/admin-marketing.d.ts +15 -0
  49. package/dist/routes/admin-metabase.d.ts +9 -0
  50. package/dist/routes/admin-notifications.d.ts +7 -0
  51. package/dist/routes/admin-paying-customers.d.ts +74 -0
  52. package/dist/routes/admin-sessions.d.ts +10 -0
  53. package/dist/routes/admin-stats.d.ts +380 -0
  54. package/dist/routes/admin-system-logs.d.ts +10 -0
  55. package/dist/routes/admin-users.d.ts +299 -0
  56. package/dist/routes/admin-webhooks.d.ts +276 -0
  57. package/dist/routes/api-keys.d.ts +123 -0
  58. package/dist/routes/applications.d.ts +385 -0
  59. package/dist/routes/auth.d.ts +15 -0
  60. package/dist/routes/billing.d.ts +369 -0
  61. package/dist/routes/bostadsmerit.d.ts +51 -0
  62. package/dist/routes/companies.d.ts +842 -0
  63. package/dist/routes/contact-reveals.d.ts +102 -0
  64. package/dist/routes/conversations/handlers/conversation.d.ts +5 -0
  65. package/dist/routes/conversations/handlers/initiate.d.ts +4 -0
  66. package/dist/routes/conversations/handlers/messages.d.ts +5 -0
  67. package/dist/routes/conversations/handlers/state.d.ts +5 -0
  68. package/dist/routes/conversations/helpers/access.d.ts +11 -0
  69. package/dist/routes/conversations/helpers/enrich-conversation.d.ts +58 -0
  70. package/dist/routes/conversations/helpers/identity.d.ts +43 -0
  71. package/dist/routes/conversations/helpers/notify-recipient.d.ts +10 -0
  72. package/dist/routes/conversations/helpers/reconcile-reveal.d.ts +10 -0
  73. package/dist/routes/conversations/helpers/scrub-contact.d.ts +1 -0
  74. package/dist/routes/conversations/index.d.ts +422 -0
  75. package/dist/routes/conversations/routes.d.ts +924 -0
  76. package/dist/routes/conversations/schemas.d.ts +216 -0
  77. package/dist/routes/cron.d.ts +27 -0
  78. package/dist/routes/documents.d.ts +493 -0
  79. package/dist/routes/email-actions.d.ts +8 -0
  80. package/dist/routes/fastighetslista.d.ts +94 -0
  81. package/dist/routes/geo.d.ts +518 -0
  82. package/dist/routes/geocoding.d.ts +192 -0
  83. package/dist/routes/health.d.ts +43 -0
  84. package/dist/routes/housing-history.d.ts +381 -0
  85. package/dist/routes/index.d.ts +15321 -0
  86. package/dist/routes/leads.d.ts +281 -0
  87. package/dist/routes/listing-helpers.d.ts +33 -0
  88. package/dist/routes/listing-publications.d.ts +636 -0
  89. package/dist/routes/listings.d.ts +1846 -0
  90. package/dist/routes/location-interests.d.ts +754 -0
  91. package/dist/routes/lookup.d.ts +109 -0
  92. package/dist/routes/mejl.d.ts +377 -0
  93. package/dist/routes/profiles.d.ts +281 -0
  94. package/dist/routes/properties.d.ts +1266 -0
  95. package/dist/routes/public-listings.d.ts +1137 -0
  96. package/dist/routes/public-profiles.d.ts +293 -0
  97. package/dist/routes/references.d.ts +695 -0
  98. package/dist/routes/search-partners.d.ts +4 -0
  99. package/dist/routes/site-config.d.ts +103 -0
  100. package/dist/routes/storage.d.ts +367 -0
  101. package/dist/routes/tenant-boost.d.ts +229 -0
  102. package/dist/routes/tenants.d.ts +336 -0
  103. package/dist/routes/track.d.ts +19 -0
  104. package/dist/routes/translate.d.ts +51 -0
  105. package/dist/routes/users.d.ts +517 -0
  106. package/dist/routes/verification.d.ts +175 -0
  107. package/dist/routes/webhooks.d.ts +9 -0
  108. package/dist/rpc.d.ts +11 -0
  109. package/dist/serve.d.ts +5 -0
  110. package/dist/services/activity-feed/activity-feed.service.d.ts +26 -0
  111. package/dist/services/applications/approval.service.d.ts +17 -0
  112. package/dist/services/auth/bankid-login.service.d.ts +40 -0
  113. package/dist/services/billing/constants.d.ts +2 -0
  114. package/dist/services/billing/contact-billing.service.d.ts +59 -0
  115. package/dist/services/billing/customer.service.d.ts +14 -0
  116. package/dist/services/billing/invoice-item.service.d.ts +49 -0
  117. package/dist/services/billing/invoice.service.d.ts +21 -0
  118. package/dist/services/billing/listing-upgrade-checkout.service.d.ts +45 -0
  119. package/dist/services/billing/purchase-receipt-email.d.ts +23 -0
  120. package/dist/services/billing/reveal-allowance.service.d.ts +33 -0
  121. package/dist/services/billing/stripe.d.ts +6 -0
  122. package/dist/services/billing/subscription.service.d.ts +21 -0
  123. package/dist/services/billing/types.d.ts +64 -0
  124. package/dist/services/billing/verify-session.service.d.ts +17 -0
  125. package/dist/services/billing/webhook.service.d.ts +8 -0
  126. package/dist/services/bostadsmerit/calculator.d.ts +51 -0
  127. package/dist/services/bostadsmerit/couple-calculator.d.ts +46 -0
  128. package/dist/services/bostadsmerit/tracker.service.d.ts +45 -0
  129. package/dist/services/chat-access/unlock-chat.service.d.ts +62 -0
  130. package/dist/services/conversations/upsert-conversation.d.ts +11 -0
  131. package/dist/services/email-jobs/email-job-sender.d.ts +7 -0
  132. package/dist/services/email-jobs/email-job.service.d.ts +67 -0
  133. package/dist/services/geo/bevakning-matching.service.d.ts +67 -0
  134. package/dist/services/geo/geo-listings.service.d.ts +38 -0
  135. package/dist/services/geo/geo.service.d.ts +233 -0
  136. package/dist/services/geo/geocode.service.d.ts +16 -0
  137. package/dist/services/geo/market-insights-by-coords.service.d.ts +67 -0
  138. package/dist/services/geo/market-insights.service.d.ts +44 -0
  139. package/dist/services/geo/market-overview.service.d.ts +42 -0
  140. package/dist/services/homii/image.d.ts +24 -0
  141. package/dist/services/homii/index.d.ts +12 -0
  142. package/dist/services/homii/location.d.ts +32 -0
  143. package/dist/services/homii/mapper.d.ts +41 -0
  144. package/dist/services/homii/types.d.ts +91 -0
  145. package/dist/services/leads/constants.d.ts +32 -0
  146. package/dist/services/leads/generate-leads.service.d.ts +38 -0
  147. package/dist/services/leads/matching.service.d.ts +55 -0
  148. package/dist/services/leads/tier.service.d.ts +6 -0
  149. package/dist/services/leads/types.d.ts +27 -0
  150. package/dist/services/listings/seo.service.d.ts +57 -0
  151. package/dist/services/listings/status.d.ts +37 -0
  152. package/dist/services/mejl/client.d.ts +38 -0
  153. package/dist/services/mrkoll/client.d.ts +95 -0
  154. package/dist/services/mrkoll/import.d.ts +38 -0
  155. package/dist/services/mrkoll/match.d.ts +35 -0
  156. package/dist/services/notifications/bibi-projects.d.ts +43 -0
  157. package/dist/services/notifications/bibi.d.ts +229 -0
  158. package/dist/services/profiles/bankid-verify.d.ts +23 -0
  159. package/dist/services/realtime.d.ts +14 -0
  160. package/dist/services/references/history-linker.d.ts +19 -0
  161. package/dist/services/tenant-boost/constants.d.ts +120 -0
  162. package/dist/services/tenant-boost/tenant-boost.service.d.ts +59 -0
  163. package/package.json +29 -0
@@ -0,0 +1,188 @@
1
+ /**
2
+ * Admin bulk-import endpoint for properties (+ optional listings).
3
+ *
4
+ * POST /admin/companies/{id}/import-properties
5
+ * - Bypasses ownership checks: sets landlordId = company owner, companyId = company.id
6
+ * - Optionally creates listings with chosen status (draft / submitted / active)
7
+ * - No notification emails sent
8
+ */
9
+ import { OpenAPIHono } from "@hono/zod-openapi";
10
+ import type { AppBindings } from "../app";
11
+ export declare const adminImportApp: OpenAPIHono<AppBindings, {
12
+ "/admin/companies/:id/import-properties": {
13
+ $post: {
14
+ input: {
15
+ param: {
16
+ id: string;
17
+ };
18
+ } & {
19
+ json: {
20
+ rows: {
21
+ street: string;
22
+ description?: string | undefined;
23
+ streetNumber?: string | undefined;
24
+ postalCode?: string | undefined;
25
+ city?: string | undefined;
26
+ municipality?: string | undefined;
27
+ neighborhood?: string | undefined;
28
+ propertyType?: string | undefined;
29
+ legalTenure?: string | undefined;
30
+ furnishingStatus?: string | undefined;
31
+ propertySize?: number | undefined;
32
+ totalRooms?: number | undefined;
33
+ floor?: number | undefined;
34
+ maxOccupancy?: number | undefined;
35
+ petsAllowed?: string | undefined;
36
+ amenities?: string[] | undefined;
37
+ objektNummer?: string | undefined;
38
+ lagenhetsnummer?: string | undefined;
39
+ baseMonthlyRent?: number | undefined;
40
+ deposit?: number | undefined;
41
+ rentalStart?: string | undefined;
42
+ rentalEnd?: string | undefined;
43
+ extensionPossible?: boolean | undefined;
44
+ imageUrls?: string[] | undefined;
45
+ }[];
46
+ listingStatus?: "active" | "draft" | "submitted" | undefined;
47
+ createListings?: boolean | undefined;
48
+ };
49
+ };
50
+ output: {
51
+ results: {
52
+ error: string | null;
53
+ propertyId: string | null;
54
+ listingId: string | null;
55
+ rowIndex: number;
56
+ }[];
57
+ };
58
+ outputFormat: "json";
59
+ status: 200;
60
+ } | {
61
+ input: {
62
+ param: {
63
+ id: string;
64
+ };
65
+ } & {
66
+ json: {
67
+ rows: {
68
+ street: string;
69
+ description?: string | undefined;
70
+ streetNumber?: string | undefined;
71
+ postalCode?: string | undefined;
72
+ city?: string | undefined;
73
+ municipality?: string | undefined;
74
+ neighborhood?: string | undefined;
75
+ propertyType?: string | undefined;
76
+ legalTenure?: string | undefined;
77
+ furnishingStatus?: string | undefined;
78
+ propertySize?: number | undefined;
79
+ totalRooms?: number | undefined;
80
+ floor?: number | undefined;
81
+ maxOccupancy?: number | undefined;
82
+ petsAllowed?: string | undefined;
83
+ amenities?: string[] | undefined;
84
+ objektNummer?: string | undefined;
85
+ lagenhetsnummer?: string | undefined;
86
+ baseMonthlyRent?: number | undefined;
87
+ deposit?: number | undefined;
88
+ rentalStart?: string | undefined;
89
+ rentalEnd?: string | undefined;
90
+ extensionPossible?: boolean | undefined;
91
+ imageUrls?: string[] | undefined;
92
+ }[];
93
+ listingStatus?: "active" | "draft" | "submitted" | undefined;
94
+ createListings?: boolean | undefined;
95
+ };
96
+ };
97
+ output: {
98
+ error: string;
99
+ };
100
+ outputFormat: "json";
101
+ status: 401;
102
+ } | {
103
+ input: {
104
+ param: {
105
+ id: string;
106
+ };
107
+ } & {
108
+ json: {
109
+ rows: {
110
+ street: string;
111
+ description?: string | undefined;
112
+ streetNumber?: string | undefined;
113
+ postalCode?: string | undefined;
114
+ city?: string | undefined;
115
+ municipality?: string | undefined;
116
+ neighborhood?: string | undefined;
117
+ propertyType?: string | undefined;
118
+ legalTenure?: string | undefined;
119
+ furnishingStatus?: string | undefined;
120
+ propertySize?: number | undefined;
121
+ totalRooms?: number | undefined;
122
+ floor?: number | undefined;
123
+ maxOccupancy?: number | undefined;
124
+ petsAllowed?: string | undefined;
125
+ amenities?: string[] | undefined;
126
+ objektNummer?: string | undefined;
127
+ lagenhetsnummer?: string | undefined;
128
+ baseMonthlyRent?: number | undefined;
129
+ deposit?: number | undefined;
130
+ rentalStart?: string | undefined;
131
+ rentalEnd?: string | undefined;
132
+ extensionPossible?: boolean | undefined;
133
+ imageUrls?: string[] | undefined;
134
+ }[];
135
+ listingStatus?: "active" | "draft" | "submitted" | undefined;
136
+ createListings?: boolean | undefined;
137
+ };
138
+ };
139
+ output: {
140
+ error: string;
141
+ };
142
+ outputFormat: "json";
143
+ status: 403;
144
+ } | {
145
+ input: {
146
+ param: {
147
+ id: string;
148
+ };
149
+ } & {
150
+ json: {
151
+ rows: {
152
+ street: string;
153
+ description?: string | undefined;
154
+ streetNumber?: string | undefined;
155
+ postalCode?: string | undefined;
156
+ city?: string | undefined;
157
+ municipality?: string | undefined;
158
+ neighborhood?: string | undefined;
159
+ propertyType?: string | undefined;
160
+ legalTenure?: string | undefined;
161
+ furnishingStatus?: string | undefined;
162
+ propertySize?: number | undefined;
163
+ totalRooms?: number | undefined;
164
+ floor?: number | undefined;
165
+ maxOccupancy?: number | undefined;
166
+ petsAllowed?: string | undefined;
167
+ amenities?: string[] | undefined;
168
+ objektNummer?: string | undefined;
169
+ lagenhetsnummer?: string | undefined;
170
+ baseMonthlyRent?: number | undefined;
171
+ deposit?: number | undefined;
172
+ rentalStart?: string | undefined;
173
+ rentalEnd?: string | undefined;
174
+ extensionPossible?: boolean | undefined;
175
+ imageUrls?: string[] | undefined;
176
+ }[];
177
+ listingStatus?: "active" | "draft" | "submitted" | undefined;
178
+ createListings?: boolean | undefined;
179
+ };
180
+ };
181
+ output: {
182
+ error: string;
183
+ };
184
+ outputFormat: "json";
185
+ status: 404;
186
+ };
187
+ };
188
+ }, "/">;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Admin login history routes — view auth funnel data.
3
+ *
4
+ * All routes require auth + admin.
5
+ */
6
+ import { OpenAPIHono } from "@hono/zod-openapi";
7
+ import type { AppBindings } from "../app";
8
+ declare const app: OpenAPIHono<AppBindings, {}, "/">;
9
+ export { app as adminLoginHistoryApp };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Admin Marketing Email routes.
3
+ *
4
+ * Allows admins to compose and send marketing emails to tenants, landlords, or all users.
5
+ * Uses the bulk email batch system (Gmail API → Resend fallback).
6
+ *
7
+ * Routes:
8
+ * GET /admin/marketing/recipients — count recipients by audience filter
9
+ * POST /admin/marketing/preview — render email HTML preview
10
+ * POST /admin/marketing/send — send campaign to all matching recipients
11
+ */
12
+ import { OpenAPIHono } from "@hono/zod-openapi";
13
+ import type { AppBindings } from "../app";
14
+ declare const app: OpenAPIHono<AppBindings, {}, "/">;
15
+ export { app as adminMarketingApp };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Admin Metabase routes.
3
+ *
4
+ * Provides a signed embed URL for the Metabase admin dashboard.
5
+ * Uses static embedding with JWT-signed tokens.
6
+ */
7
+ import { OpenAPIHono } from "@hono/zod-openapi";
8
+ import type { AppBindings } from "../app";
9
+ export declare const adminMetabaseApp: OpenAPIHono<AppBindings, {}, "/">;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Admin notification channels — ntfy topics & Discord webhook config.
3
+ */
4
+ import { OpenAPIHono } from "@hono/zod-openapi";
5
+ import type { AppBindings } from "../app";
6
+ declare const app: OpenAPIHono<AppBindings, {}, "/">;
7
+ export { app as adminNotificationsApp };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Admin paying customers routes.
3
+ *
4
+ * Lists users who have made payments (Stripe customers with paid invoices,
5
+ * tenant boost subscriptions, or contact reveal purchases).
6
+ */
7
+ import { OpenAPIHono } from "@hono/zod-openapi";
8
+ import type { AppBindings } from "../app";
9
+ export declare const adminPayingCustomersApp: OpenAPIHono<AppBindings, {
10
+ "/admin/paying-customers": {
11
+ $get: {
12
+ input: {
13
+ query: {
14
+ sort?: "displayName" | "createdAt" | "totalPaidOre" | "lastPaidAt" | undefined;
15
+ limit?: number | undefined;
16
+ order?: "asc" | "desc" | undefined;
17
+ offset?: number | undefined;
18
+ q?: string | undefined;
19
+ };
20
+ };
21
+ output: {
22
+ total: number;
23
+ totalRevenueOre: number;
24
+ customers: {
25
+ email: string | null;
26
+ id: string;
27
+ displayName: string;
28
+ profilePictureUrl: string | null;
29
+ businessType: string | null;
30
+ stripeCustomerId: string | null;
31
+ isLandlord: boolean;
32
+ createdAt: string;
33
+ isBoosted: boolean;
34
+ companyName: string | null;
35
+ totalPaidOre: number;
36
+ lastPaidAt: string | null;
37
+ invoiceCount: number;
38
+ }[];
39
+ };
40
+ outputFormat: "json";
41
+ status: 200;
42
+ } | {
43
+ input: {
44
+ query: {
45
+ sort?: "displayName" | "createdAt" | "totalPaidOre" | "lastPaidAt" | undefined;
46
+ limit?: number | undefined;
47
+ order?: "asc" | "desc" | undefined;
48
+ offset?: number | undefined;
49
+ q?: string | undefined;
50
+ };
51
+ };
52
+ output: {
53
+ error: string;
54
+ };
55
+ outputFormat: "json";
56
+ status: 401;
57
+ } | {
58
+ input: {
59
+ query: {
60
+ sort?: "displayName" | "createdAt" | "totalPaidOre" | "lastPaidAt" | undefined;
61
+ limit?: number | undefined;
62
+ order?: "asc" | "desc" | undefined;
63
+ offset?: number | undefined;
64
+ q?: string | undefined;
65
+ };
66
+ };
67
+ output: {
68
+ error: string;
69
+ };
70
+ outputFormat: "json";
71
+ status: 403;
72
+ };
73
+ };
74
+ }, "/">;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Admin session management routes.
3
+ *
4
+ * Provides endpoint to purge all sessions (force re-authentication).
5
+ * All routes are protected by authMiddleware + adminMiddleware.
6
+ */
7
+ import { OpenAPIHono } from "@hono/zod-openapi";
8
+ import type { AppBindings } from "../app";
9
+ declare const app: OpenAPIHono<AppBindings, {}, "/">;
10
+ export { app as adminSessionsApp };
@@ -0,0 +1,380 @@
1
+ /**
2
+ * Admin dashboard statistics routes.
3
+ *
4
+ * Provides aggregate counts and recent activity
5
+ * for the admin dashboard. All routes require auth + admin.
6
+ *
7
+ * Both endpoints accept `?period=week|month|quarter|year` (default: month).
8
+ */
9
+ import { OpenAPIHono } from "@hono/zod-openapi";
10
+ import type { AppBindings } from "../app";
11
+ export declare const adminStatsApp: OpenAPIHono<AppBindings, {
12
+ "/admin/stats": {
13
+ $get: {
14
+ input: {
15
+ query: {
16
+ period?: "year" | "week" | "month" | "quarter" | undefined;
17
+ };
18
+ };
19
+ output: {
20
+ properties: {
21
+ total: number;
22
+ };
23
+ documents: {
24
+ pending: number;
25
+ rejected: number;
26
+ total: number;
27
+ approved: number;
28
+ };
29
+ applications: {
30
+ pending: number;
31
+ rejected: number;
32
+ total: number;
33
+ accepted: number;
34
+ withdrawn: number;
35
+ periodCount: number;
36
+ todayCount: number;
37
+ yesterdayCount: number;
38
+ awaitingReview: number;
39
+ };
40
+ listings: {
41
+ draft: number;
42
+ pendingReview: number;
43
+ archived: number;
44
+ published: number;
45
+ rented: number;
46
+ deleted: number;
47
+ total: number;
48
+ };
49
+ landlords: {
50
+ total: number;
51
+ withProperty: number;
52
+ withPublishedListing: number;
53
+ };
54
+ messages: {
55
+ todayCount: number;
56
+ };
57
+ companies: {
58
+ total: number;
59
+ };
60
+ users: {
61
+ total: number;
62
+ periodCount: number;
63
+ };
64
+ recentApplications: {
65
+ status: string;
66
+ id: string;
67
+ createdAt: string;
68
+ tenantId: string;
69
+ propertyStreet: string | null;
70
+ propertyStreetNumber: string | null;
71
+ propertyCity: string | null;
72
+ tenantName: string;
73
+ tenantAvatar: string | null;
74
+ tenantScore: number | null;
75
+ }[];
76
+ period: "year" | "week" | "month" | "quarter";
77
+ periodDays: number;
78
+ dailySignups: {
79
+ date: string;
80
+ count: number;
81
+ }[];
82
+ dailyApplications: {
83
+ date: string;
84
+ count: number;
85
+ }[];
86
+ dailyListings: {
87
+ date: string;
88
+ draft: number;
89
+ published: number;
90
+ }[];
91
+ recentUsers: {
92
+ id: string;
93
+ displayName: string;
94
+ profilePictureUrl: string | null;
95
+ businessType: string | null;
96
+ companyId: string | null;
97
+ isLandlord: boolean;
98
+ createdAt: string;
99
+ }[];
100
+ };
101
+ outputFormat: "json";
102
+ status: 200;
103
+ } | {
104
+ input: {
105
+ query: {
106
+ period?: "year" | "week" | "month" | "quarter" | undefined;
107
+ };
108
+ };
109
+ output: {
110
+ error: string;
111
+ };
112
+ outputFormat: "json";
113
+ status: 401;
114
+ } | {
115
+ input: {
116
+ query: {
117
+ period?: "year" | "week" | "month" | "quarter" | undefined;
118
+ };
119
+ };
120
+ output: {
121
+ error: string;
122
+ };
123
+ outputFormat: "json";
124
+ status: 403;
125
+ };
126
+ };
127
+ } & {
128
+ "/admin/applications": {
129
+ $get: {
130
+ input: {
131
+ query: {
132
+ period?: "year" | "week" | "month" | "quarter" | undefined;
133
+ };
134
+ };
135
+ output: {
136
+ error: string;
137
+ };
138
+ outputFormat: "json";
139
+ status: 401;
140
+ } | {
141
+ input: {
142
+ query: {
143
+ period?: "year" | "week" | "month" | "quarter" | undefined;
144
+ };
145
+ };
146
+ output: {
147
+ error: string;
148
+ };
149
+ outputFormat: "json";
150
+ status: 403;
151
+ } | {
152
+ input: {
153
+ query: {
154
+ period?: "year" | "week" | "month" | "quarter" | undefined;
155
+ };
156
+ };
157
+ output: {
158
+ message: string | null;
159
+ status: string;
160
+ id: string;
161
+ createdAt: string;
162
+ propertyType: string | null;
163
+ listingId: string;
164
+ tenantId: string;
165
+ adminApproved: boolean;
166
+ reminderSentAt: string | null;
167
+ propertyStreet: string | null;
168
+ propertyStreetNumber: string | null;
169
+ propertyCity: string | null;
170
+ propertyRent: number | null;
171
+ tenantEmail: string | null;
172
+ tenantTitle: string | null;
173
+ tenantAbout: string | null;
174
+ tenantName: string;
175
+ tenantAvatar: string | null;
176
+ tenantScore: number | null;
177
+ tenantAuthProvider: string | null;
178
+ tenantDocumentCount: number;
179
+ tenantHasCreditReport: boolean;
180
+ tenantHasCriminalRecord: boolean;
181
+ tenantHasIncomeDoc: boolean;
182
+ tenantHasIdDoc: boolean;
183
+ tenantHasPersonnummer: boolean;
184
+ }[];
185
+ outputFormat: "json";
186
+ status: 200;
187
+ };
188
+ };
189
+ } & {
190
+ "/admin/applications/:id/review": {
191
+ $patch: {
192
+ input: {
193
+ param: {
194
+ id: string;
195
+ };
196
+ } & {
197
+ json: {
198
+ decision: "approve" | "reject";
199
+ };
200
+ };
201
+ output: {
202
+ error: string;
203
+ };
204
+ outputFormat: "json";
205
+ status: 401;
206
+ } | {
207
+ input: {
208
+ param: {
209
+ id: string;
210
+ };
211
+ } & {
212
+ json: {
213
+ decision: "approve" | "reject";
214
+ };
215
+ };
216
+ output: {
217
+ error: string;
218
+ };
219
+ outputFormat: "json";
220
+ status: 403;
221
+ } | {
222
+ input: {
223
+ param: {
224
+ id: string;
225
+ };
226
+ } & {
227
+ json: {
228
+ decision: "approve" | "reject";
229
+ };
230
+ };
231
+ output: {
232
+ success: boolean;
233
+ id: string;
234
+ leadCreationFailed?: boolean | undefined;
235
+ };
236
+ outputFormat: "json";
237
+ status: 200;
238
+ } | {
239
+ input: {
240
+ param: {
241
+ id: string;
242
+ };
243
+ } & {
244
+ json: {
245
+ decision: "approve" | "reject";
246
+ };
247
+ };
248
+ output: {
249
+ error: string;
250
+ };
251
+ outputFormat: "json";
252
+ status: 400;
253
+ } | {
254
+ input: {
255
+ param: {
256
+ id: string;
257
+ };
258
+ } & {
259
+ json: {
260
+ decision: "approve" | "reject";
261
+ };
262
+ };
263
+ output: {
264
+ error: string;
265
+ };
266
+ outputFormat: "json";
267
+ status: 404;
268
+ };
269
+ };
270
+ } & {
271
+ "/admin/applications/:id/send-reminder": {
272
+ $post: {
273
+ input: {
274
+ param: {
275
+ id: string;
276
+ };
277
+ };
278
+ output: {
279
+ error: string;
280
+ };
281
+ outputFormat: "json";
282
+ status: 401;
283
+ } | {
284
+ input: {
285
+ param: {
286
+ id: string;
287
+ };
288
+ };
289
+ output: {
290
+ error: string;
291
+ };
292
+ outputFormat: "json";
293
+ status: 403;
294
+ } | {
295
+ input: {
296
+ param: {
297
+ id: string;
298
+ };
299
+ };
300
+ output: {
301
+ error: string;
302
+ };
303
+ outputFormat: "json";
304
+ status: 400;
305
+ } | {
306
+ input: {
307
+ param: {
308
+ id: string;
309
+ };
310
+ };
311
+ output: {
312
+ error: string;
313
+ };
314
+ outputFormat: "json";
315
+ status: 404;
316
+ } | {
317
+ input: {
318
+ param: {
319
+ id: string;
320
+ };
321
+ };
322
+ output: {
323
+ success: boolean;
324
+ id: string;
325
+ };
326
+ outputFormat: "json";
327
+ status: 200;
328
+ };
329
+ };
330
+ } & {
331
+ "/admin/applications/bulk-send-reminder": {
332
+ $post: {
333
+ input: {
334
+ json: {
335
+ ids: string[];
336
+ };
337
+ };
338
+ output: {
339
+ error: string;
340
+ };
341
+ outputFormat: "json";
342
+ status: 401;
343
+ } | {
344
+ input: {
345
+ json: {
346
+ ids: string[];
347
+ };
348
+ };
349
+ output: {
350
+ error: string;
351
+ };
352
+ outputFormat: "json";
353
+ status: 403;
354
+ } | {
355
+ input: {
356
+ json: {
357
+ ids: string[];
358
+ };
359
+ };
360
+ output: {
361
+ error: string;
362
+ };
363
+ outputFormat: "json";
364
+ status: 400;
365
+ } | {
366
+ input: {
367
+ json: {
368
+ ids: string[];
369
+ };
370
+ };
371
+ output: {
372
+ sent: number;
373
+ total: number;
374
+ failed: number;
375
+ };
376
+ outputFormat: "json";
377
+ status: 200;
378
+ };
379
+ };
380
+ }, "/">;