@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,385 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
2
+ import type { AppBindings } from "../app";
3
+ export declare const applicationsApp: OpenAPIHono<AppBindings, {
4
+ "/applications": {
5
+ $post: {
6
+ input: {
7
+ json: {
8
+ listingId: string;
9
+ message?: string | null | undefined;
10
+ partnerId?: string | undefined;
11
+ };
12
+ };
13
+ output: {
14
+ error: string;
15
+ };
16
+ outputFormat: "json";
17
+ status: 401;
18
+ } | {
19
+ input: {
20
+ json: {
21
+ listingId: string;
22
+ message?: string | null | undefined;
23
+ partnerId?: string | undefined;
24
+ };
25
+ };
26
+ output: {
27
+ error: string;
28
+ };
29
+ outputFormat: "json";
30
+ status: 404;
31
+ } | {
32
+ input: {
33
+ json: {
34
+ listingId: string;
35
+ message?: string | null | undefined;
36
+ partnerId?: string | undefined;
37
+ };
38
+ };
39
+ output: {
40
+ error: string;
41
+ };
42
+ outputFormat: "json";
43
+ status: 400;
44
+ } | {
45
+ input: {
46
+ json: {
47
+ listingId: string;
48
+ message?: string | null | undefined;
49
+ partnerId?: string | undefined;
50
+ };
51
+ };
52
+ output: {
53
+ error: string;
54
+ };
55
+ outputFormat: "json";
56
+ status: 403;
57
+ } | {
58
+ input: {
59
+ json: {
60
+ listingId: string;
61
+ message?: string | null | undefined;
62
+ partnerId?: string | undefined;
63
+ };
64
+ };
65
+ output: {
66
+ error: string;
67
+ };
68
+ outputFormat: "json";
69
+ status: 409;
70
+ } | {
71
+ input: {
72
+ json: {
73
+ listingId: string;
74
+ message?: string | null | undefined;
75
+ partnerId?: string | undefined;
76
+ };
77
+ };
78
+ output: {
79
+ message: string | null;
80
+ status: string;
81
+ id: string;
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ listingId: string;
85
+ partnerId: string | null;
86
+ tenantId: string;
87
+ adminApproved: boolean;
88
+ adminReviewedBy: string | null;
89
+ adminReviewedAt: string | null;
90
+ revealedAt: string | null;
91
+ revealReason: string | null;
92
+ viewedAt: string | null;
93
+ viewedCount: number;
94
+ reminderSentAt: string | null;
95
+ };
96
+ outputFormat: "json";
97
+ status: 201;
98
+ };
99
+ };
100
+ } & {
101
+ "/applications": {
102
+ $get: {
103
+ input: {
104
+ query: {
105
+ role?: "tenant" | "landlord" | undefined;
106
+ };
107
+ };
108
+ output: {
109
+ error: string;
110
+ };
111
+ outputFormat: "json";
112
+ status: 401;
113
+ } | {
114
+ input: {
115
+ query: {
116
+ role?: "tenant" | "landlord" | undefined;
117
+ };
118
+ };
119
+ output: {
120
+ message: string | null;
121
+ status: string;
122
+ id: string;
123
+ createdAt: string;
124
+ updatedAt: string;
125
+ listingId: string;
126
+ partnerId: string | null;
127
+ tenantId: string;
128
+ adminApproved: boolean;
129
+ revealedAt: string | null;
130
+ revealReason: string | null;
131
+ viewedAt: string | null;
132
+ viewedCount: number;
133
+ reminderSentAt: string | null;
134
+ tenant?: {
135
+ email: string | null;
136
+ displayName: string | null;
137
+ firstName: string | null;
138
+ profilePictureUrl: string | null;
139
+ phone: string | null;
140
+ description?: string | null | undefined;
141
+ title?: string | null | undefined;
142
+ age?: number | null | undefined;
143
+ about?: string | null | undefined;
144
+ idVerifiedAt?: string | null | undefined;
145
+ documents?: {
146
+ id: string;
147
+ category: string;
148
+ }[] | undefined;
149
+ documentCategories?: string[] | undefined;
150
+ landlordReferenceCount?: number | undefined;
151
+ landlordReferences?: {
152
+ signerName: string | null;
153
+ signerPhone: string | null;
154
+ signerComment: string | null;
155
+ housingStreet: string | null;
156
+ housingCity: string | null;
157
+ }[] | undefined;
158
+ lastActiveAt?: string | null | undefined;
159
+ applicationsThisWeek?: number | undefined;
160
+ } | undefined;
161
+ listing?: {
162
+ street: string | null;
163
+ streetNumber: string | null;
164
+ city: string | null;
165
+ propertyType: string | null;
166
+ propertySize: number | null;
167
+ totalRooms: number | null;
168
+ baseMonthlyRent: number | null;
169
+ thumbnailUrl: string | null;
170
+ listingStatus: string | null;
171
+ } | undefined;
172
+ missingDocs?: string[] | undefined;
173
+ }[];
174
+ outputFormat: "json";
175
+ status: 200;
176
+ };
177
+ };
178
+ } & {
179
+ "/applications/:id": {
180
+ $patch: {
181
+ input: {
182
+ param: {
183
+ id: string;
184
+ };
185
+ } & {
186
+ json: {
187
+ status: "rejected" | "accepted" | "withdrawn";
188
+ };
189
+ };
190
+ output: {
191
+ error: string;
192
+ };
193
+ outputFormat: "json";
194
+ status: 401;
195
+ } | {
196
+ input: {
197
+ param: {
198
+ id: string;
199
+ };
200
+ } & {
201
+ json: {
202
+ status: "rejected" | "accepted" | "withdrawn";
203
+ };
204
+ };
205
+ output: {
206
+ error: string;
207
+ };
208
+ outputFormat: "json";
209
+ status: 404;
210
+ } | {
211
+ input: {
212
+ param: {
213
+ id: string;
214
+ };
215
+ } & {
216
+ json: {
217
+ status: "rejected" | "accepted" | "withdrawn";
218
+ };
219
+ };
220
+ output: {
221
+ error: string;
222
+ };
223
+ outputFormat: "json";
224
+ status: 400;
225
+ } | {
226
+ input: {
227
+ param: {
228
+ id: string;
229
+ };
230
+ } & {
231
+ json: {
232
+ status: "rejected" | "accepted" | "withdrawn";
233
+ };
234
+ };
235
+ output: {
236
+ error: string;
237
+ };
238
+ outputFormat: "json";
239
+ status: 403;
240
+ } | {
241
+ input: {
242
+ param: {
243
+ id: string;
244
+ };
245
+ } & {
246
+ json: {
247
+ status: "rejected" | "accepted" | "withdrawn";
248
+ };
249
+ };
250
+ output: {
251
+ message: string | null;
252
+ status: string;
253
+ id: string;
254
+ createdAt: string;
255
+ updatedAt: string;
256
+ listingId: string;
257
+ partnerId: string | null;
258
+ tenantId: string;
259
+ adminApproved: boolean;
260
+ adminReviewedBy: string | null;
261
+ adminReviewedAt: string | null;
262
+ revealedAt: string | null;
263
+ revealReason: string | null;
264
+ viewedAt: string | null;
265
+ viewedCount: number;
266
+ reminderSentAt: string | null;
267
+ };
268
+ outputFormat: "json";
269
+ status: 200;
270
+ };
271
+ };
272
+ } & {
273
+ "/applications/:id/reveal": {
274
+ $post: {
275
+ input: {
276
+ param: {
277
+ id: string;
278
+ };
279
+ };
280
+ output: {
281
+ error: string;
282
+ };
283
+ outputFormat: "json";
284
+ status: 401;
285
+ } | {
286
+ input: {
287
+ param: {
288
+ id: string;
289
+ };
290
+ };
291
+ output: {
292
+ error: string;
293
+ };
294
+ outputFormat: "json";
295
+ status: 404;
296
+ } | {
297
+ input: {
298
+ param: {
299
+ id: string;
300
+ };
301
+ };
302
+ output: {
303
+ error: string;
304
+ };
305
+ outputFormat: "json";
306
+ status: 400;
307
+ } | {
308
+ input: {
309
+ param: {
310
+ id: string;
311
+ };
312
+ };
313
+ output: {
314
+ error: string;
315
+ };
316
+ outputFormat: "json";
317
+ status: 403;
318
+ } | {
319
+ input: {
320
+ param: {
321
+ id: string;
322
+ };
323
+ };
324
+ output: {
325
+ revealedAt: string;
326
+ conversationId: string;
327
+ tenant: {
328
+ email: string | null;
329
+ phone: string | null;
330
+ };
331
+ };
332
+ outputFormat: "json";
333
+ status: 200;
334
+ };
335
+ };
336
+ } & {
337
+ "/applications/:id/view": {
338
+ $post: {
339
+ input: {
340
+ param: {
341
+ id: string;
342
+ };
343
+ };
344
+ output: {
345
+ error: string;
346
+ };
347
+ outputFormat: "json";
348
+ status: 401;
349
+ } | {
350
+ input: {
351
+ param: {
352
+ id: string;
353
+ };
354
+ };
355
+ output: {
356
+ error: string;
357
+ };
358
+ outputFormat: "json";
359
+ status: 404;
360
+ } | {
361
+ input: {
362
+ param: {
363
+ id: string;
364
+ };
365
+ };
366
+ output: {
367
+ error: string;
368
+ };
369
+ outputFormat: "json";
370
+ status: 403;
371
+ } | {
372
+ input: {
373
+ param: {
374
+ id: string;
375
+ };
376
+ };
377
+ output: {
378
+ viewedAt: string;
379
+ viewedCount: number;
380
+ };
381
+ outputFormat: "json";
382
+ status: 200;
383
+ };
384
+ };
385
+ }, "/">;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Auth routes — BankID redirect verification endpoints.
3
+ *
4
+ * Magic link / session / sign-out are handled by Better Auth on the web app
5
+ * (apps/web/src/app/api/auth/[...all]/route.ts via toNextJsHandler).
6
+ *
7
+ * The API still needs a Better Auth instance for session validation in
8
+ * middleware (auth.api.getSession) and for the catch-all fallback below.
9
+ *
10
+ * NOTE: These routes use plain Hono (not zod-openapi) because BankID
11
+ * endpoints are internal-use only (called by the web app, not public API).
12
+ */
13
+ import { Hono } from "hono";
14
+ import type { AppBindings } from "../app";
15
+ export declare const authApp: Hono<AppBindings, import("hono/types").BlankSchema, "/">;