@wasto/sdk 1.0.3
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 +2562 -0
- package/dist/index.d.ts +2562 -0
- package/dist/index.js +2566 -0
- package/dist/index.mjs +2405 -0
- package/package.json +30 -0
- package/src/client.ts +692 -0
- package/src/dashboard-apps.ts +350 -0
- package/src/dto/cms-app-settings.ts +91 -0
- package/src/enums.ts +298 -0
- package/src/free-tier.ts +56 -0
- package/src/index.ts +35 -0
- package/src/opening-hours/constants.ts +48 -0
- package/src/opening-hours/convert.ts +276 -0
- package/src/opening-hours/format.ts +99 -0
- package/src/opening-hours/index.ts +9 -0
- package/src/opening-hours/is-open-now.ts +38 -0
- package/src/opening-hours/resolve.ts +71 -0
- package/src/opening-hours/time.ts +74 -0
- package/src/opening-hours/timezone.ts +34 -0
- package/src/opening-hours/types.ts +53 -0
- package/src/opening-hours/validate.ts +182 -0
- package/src/roi/calculations.ts +732 -0
- package/src/roi/index.ts +1 -0
- package/src/types/asset-bookings.types.ts +19 -0
- package/src/types/asset-interventions.types.ts +24 -0
- package/src/types/assets.types.ts +68 -0
- package/src/types/auth.types.ts +37 -0
- package/src/types/blog-posts.types.ts +19 -0
- package/src/types/calendar-pdf.types.ts +24 -0
- package/src/types/calendo-events.types.ts +64 -0
- package/src/types/challenges.types.ts +30 -0
- package/src/types/chatbot.types.ts +82 -0
- package/src/types/cities.types.ts +27 -0
- package/src/types/city-groups.types.ts +46 -0
- package/src/types/cms.types.ts +87 -0
- package/src/types/field-reports.types.ts +66 -0
- package/src/types/free-tier.types.ts +54 -0
- package/src/types/index.ts +32 -0
- package/src/types/iot.types.ts +31 -0
- package/src/types/maintenance.types.ts +44 -0
- package/src/types/mapso.types.ts +146 -0
- package/src/types/notifications.types.ts +68 -0
- package/src/types/onboarding.types.ts +117 -0
- package/src/types/operational-zones.types.ts +70 -0
- package/src/types/pagination.types.ts +33 -0
- package/src/types/providers.types.ts +29 -0
- package/src/types/quiz-questions.types.ts +59 -0
- package/src/types/recycling-points.types.ts +47 -0
- package/src/types/roi.types.ts +60 -0
- package/src/types/surveys.types.ts +103 -0
- package/src/types/tickets.types.ts +65 -0
- package/src/types/users.types.ts +30 -0
- package/src/types/waste-collection-places-query.types.ts +4 -0
- package/src/types/waste-collection-places.types.ts +33 -0
- package/src/types/waste-types.types.ts +21 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2562 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enums aligned with Prisma schema (no @prisma/client dependency).
|
|
3
|
+
* Use these in DTOs and types so the SDK can be used from browser/frontend.
|
|
4
|
+
*/
|
|
5
|
+
declare enum UserRole {
|
|
6
|
+
ADMIN = "ADMIN",
|
|
7
|
+
GESTIONNAIRE_COLLECTIVITE = "GESTIONNAIRE_COLLECTIVITE",
|
|
8
|
+
USER = "USER"
|
|
9
|
+
}
|
|
10
|
+
declare enum CityGroupType {
|
|
11
|
+
AGGLOMERATION = "AGGLOMERATION",
|
|
12
|
+
COMMUNAUTE = "COMMUNAUTE",
|
|
13
|
+
METROPOLE = "METROPOLE",
|
|
14
|
+
SYNDICAT = "SYNDICAT",
|
|
15
|
+
AUTRE = "AUTRE"
|
|
16
|
+
}
|
|
17
|
+
declare enum CityStatus {
|
|
18
|
+
NON_ACTIF = "NON_ACTIF",
|
|
19
|
+
INCOMPLET = "INCOMPLET",
|
|
20
|
+
ACTIF = "ACTIF",
|
|
21
|
+
MAINTENANCE = "MAINTENANCE"
|
|
22
|
+
}
|
|
23
|
+
declare enum RecipientGroupType {
|
|
24
|
+
CITY = "CITY",
|
|
25
|
+
CITY_GROUP = "CITY_GROUP",
|
|
26
|
+
ZONE = "ZONE"
|
|
27
|
+
}
|
|
28
|
+
declare enum NotificationStatus {
|
|
29
|
+
DRAFT = "DRAFT",
|
|
30
|
+
SCHEDULED = "SCHEDULED",
|
|
31
|
+
SENT = "SENT",
|
|
32
|
+
ARCHIVED = "ARCHIVED"
|
|
33
|
+
}
|
|
34
|
+
declare enum NotificationDeliveryStatus {
|
|
35
|
+
PENDING = "PENDING",
|
|
36
|
+
SENT = "SENT",
|
|
37
|
+
FAILED = "FAILED"
|
|
38
|
+
}
|
|
39
|
+
declare enum CmsSiteType {
|
|
40
|
+
SITE = "SITE",
|
|
41
|
+
APP = "APP"
|
|
42
|
+
}
|
|
43
|
+
declare enum CmsMenuLinkType {
|
|
44
|
+
PAGE = "PAGE",
|
|
45
|
+
EXTERNAL = "EXTERNAL",
|
|
46
|
+
COMPONENT = "COMPONENT"
|
|
47
|
+
}
|
|
48
|
+
declare enum ChatMessageRole {
|
|
49
|
+
USER = "USER",
|
|
50
|
+
ASSISTANT = "ASSISTANT",
|
|
51
|
+
AGENT = "AGENT"
|
|
52
|
+
}
|
|
53
|
+
declare enum ChatStatus {
|
|
54
|
+
OPEN = "OPEN",
|
|
55
|
+
WAITING_AGENT = "WAITING_AGENT",
|
|
56
|
+
RESOLVED = "RESOLVED",
|
|
57
|
+
CLOSED = "CLOSED"
|
|
58
|
+
}
|
|
59
|
+
declare enum PermissionAction {
|
|
60
|
+
READ = "READ",
|
|
61
|
+
WRITE = "WRITE"
|
|
62
|
+
}
|
|
63
|
+
declare enum PermissionResource {
|
|
64
|
+
USERS = "USERS",
|
|
65
|
+
CITIES = "CITIES",
|
|
66
|
+
CITY_GROUPS = "CITY_GROUPS",
|
|
67
|
+
BLOG_POSTS = "BLOG_POSTS",
|
|
68
|
+
CHALLENGES = "CHALLENGES",
|
|
69
|
+
SERIES = "SERIES",
|
|
70
|
+
BADGES = "BADGES",
|
|
71
|
+
NOTIFICATIONS = "NOTIFICATIONS",
|
|
72
|
+
RECIPIENT_GROUPS = "RECIPIENT_GROUPS",
|
|
73
|
+
WASTE_TYPES = "WASTE_TYPES",
|
|
74
|
+
WASTE_COLLECTION_PLACES = "WASTE_COLLECTION_PLACES",
|
|
75
|
+
RECYCLING_POINTS = "RECYCLING_POINTS",
|
|
76
|
+
QUIZ_QUESTIONS = "QUIZ_QUESTIONS",
|
|
77
|
+
CHAT_CONVERSATIONS = "CHAT_CONVERSATIONS",
|
|
78
|
+
ANALYTICS = "ANALYTICS",
|
|
79
|
+
ASSETS = "ASSETS",
|
|
80
|
+
IOT_DEVICES = "IOT_DEVICES",
|
|
81
|
+
SURVEYS = "SURVEYS",
|
|
82
|
+
TICKETS = "TICKETS",
|
|
83
|
+
TICKET_FORMS = "TICKET_FORMS",
|
|
84
|
+
PROVIDERS = "PROVIDERS",
|
|
85
|
+
CMS_SITES = "CMS_SITES",
|
|
86
|
+
CMS_PAGES = "CMS_PAGES",
|
|
87
|
+
CMS_MEDIA = "CMS_MEDIA",
|
|
88
|
+
CALENDO_EVENTS = "CALENDO_EVENTS",
|
|
89
|
+
MAPSO_EVENTS = "MAPSO_EVENTS",
|
|
90
|
+
FIELD_REPORTS = "FIELD_REPORTS"
|
|
91
|
+
}
|
|
92
|
+
declare enum TerritoryActionType {
|
|
93
|
+
AWARENESS = "AWARENESS",
|
|
94
|
+
CONTROLS = "CONTROLS",
|
|
95
|
+
EQUIPMENT = "EQUIPMENT",
|
|
96
|
+
WASTO_APP = "WASTO_APP",
|
|
97
|
+
TRAINING = "TRAINING",
|
|
98
|
+
OTHER = "OTHER"
|
|
99
|
+
}
|
|
100
|
+
declare enum TerritoryActionStatus {
|
|
101
|
+
PLANNED = "PLANNED",
|
|
102
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
103
|
+
COMPLETED = "COMPLETED",
|
|
104
|
+
CANCELLED = "CANCELLED"
|
|
105
|
+
}
|
|
106
|
+
declare enum AssetType {
|
|
107
|
+
BENNE = "BENNE",
|
|
108
|
+
BORNE_VERRE = "BORNE_VERRE",
|
|
109
|
+
BORNE_TEMPORAIRE = "BORNE_TEMPORAIRE",
|
|
110
|
+
EPHEMERE = "EPHEMERE",
|
|
111
|
+
LOCATION = "LOCATION",
|
|
112
|
+
VEHICULE = "VEHICULE",
|
|
113
|
+
CAMION = "CAMION"
|
|
114
|
+
}
|
|
115
|
+
declare enum AssetStatus {
|
|
116
|
+
DISPONIBLE = "DISPONIBLE",
|
|
117
|
+
EN_LOCATION = "EN_LOCATION",
|
|
118
|
+
EN_MAINTENANCE = "EN_MAINTENANCE",
|
|
119
|
+
HORS_SERVICE = "HORS_SERVICE"
|
|
120
|
+
}
|
|
121
|
+
declare enum BookingStatus {
|
|
122
|
+
PENDING = "PENDING",
|
|
123
|
+
CONFIRMED = "CONFIRMED",
|
|
124
|
+
CANCELLED = "CANCELLED"
|
|
125
|
+
}
|
|
126
|
+
declare enum SurveyStatus {
|
|
127
|
+
DRAFT = "DRAFT",
|
|
128
|
+
ACTIVE = "ACTIVE",
|
|
129
|
+
ARCHIVED = "ARCHIVED"
|
|
130
|
+
}
|
|
131
|
+
declare enum SurveyMode {
|
|
132
|
+
FIELD = "FIELD",
|
|
133
|
+
ONLINE = "ONLINE",
|
|
134
|
+
PHONE = "PHONE"
|
|
135
|
+
}
|
|
136
|
+
declare enum QuestionType {
|
|
137
|
+
TEXT = "TEXT",
|
|
138
|
+
NUMBER = "NUMBER",
|
|
139
|
+
CHOICE = "CHOICE",
|
|
140
|
+
MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
|
|
141
|
+
RATING = "RATING",
|
|
142
|
+
DATE = "DATE",
|
|
143
|
+
LOCATION = "LOCATION",
|
|
144
|
+
PHOTO = "PHOTO",
|
|
145
|
+
YES_NO = "YES_NO"
|
|
146
|
+
}
|
|
147
|
+
declare enum ResponseStatus {
|
|
148
|
+
DRAFT = "DRAFT",
|
|
149
|
+
SUBMITTED = "SUBMITTED",
|
|
150
|
+
SYNCED = "SYNCED"
|
|
151
|
+
}
|
|
152
|
+
declare enum TicketFormStatus {
|
|
153
|
+
DRAFT = "DRAFT",
|
|
154
|
+
ACTIVE = "ACTIVE",
|
|
155
|
+
ARCHIVED = "ARCHIVED"
|
|
156
|
+
}
|
|
157
|
+
declare enum TicketStatus {
|
|
158
|
+
OUVERT = "OUVERT",
|
|
159
|
+
EN_COURS = "EN_COURS",
|
|
160
|
+
RESOLU = "RESOLU",
|
|
161
|
+
FERME = "FERME"
|
|
162
|
+
}
|
|
163
|
+
declare enum FieldReportFormStatus {
|
|
164
|
+
DRAFT = "DRAFT",
|
|
165
|
+
ACTIVE = "ACTIVE",
|
|
166
|
+
ARCHIVED = "ARCHIVED"
|
|
167
|
+
}
|
|
168
|
+
declare enum FieldReportStatus {
|
|
169
|
+
OUVERT = "OUVERT",
|
|
170
|
+
EN_COURS = "EN_COURS",
|
|
171
|
+
RESOLU = "RESOLU",
|
|
172
|
+
FERME = "FERME"
|
|
173
|
+
}
|
|
174
|
+
declare enum ProviderType {
|
|
175
|
+
LOCATION_ASSETS = "LOCATION_ASSETS",
|
|
176
|
+
ANIMATION_CHALLENGE = "ANIMATION_CHALLENGE",
|
|
177
|
+
MAINTENANCE = "MAINTENANCE",
|
|
178
|
+
AUTRE = "AUTRE"
|
|
179
|
+
}
|
|
180
|
+
declare enum InterventionType {
|
|
181
|
+
MAINTENANCE = "MAINTENANCE",
|
|
182
|
+
INDISPO = "INDISPO",
|
|
183
|
+
CONTROLE = "CONTROLE",
|
|
184
|
+
OTHER = "OTHER"
|
|
185
|
+
}
|
|
186
|
+
declare enum InterventionStatus {
|
|
187
|
+
PLANNED = "PLANNED",
|
|
188
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
189
|
+
DONE = "DONE",
|
|
190
|
+
CANCELLED = "CANCELLED"
|
|
191
|
+
}
|
|
192
|
+
declare enum AssetEventType {
|
|
193
|
+
LOCATION_CHANGE = "LOCATION_CHANGE",
|
|
194
|
+
STATUS_CHANGE = "STATUS_CHANGE",
|
|
195
|
+
MAINTENANCE = "MAINTENANCE",
|
|
196
|
+
INSPECTION = "INSPECTION",
|
|
197
|
+
OTHER = "OTHER"
|
|
198
|
+
}
|
|
199
|
+
declare enum CalendoEventType {
|
|
200
|
+
CONCERT = "CONCERT",
|
|
201
|
+
ANIMATION = "ANIMATION",
|
|
202
|
+
EXPOSITION = "EXPOSITION",
|
|
203
|
+
OTHER = "OTHER"
|
|
204
|
+
}
|
|
205
|
+
declare enum CalendoEventStatus {
|
|
206
|
+
DRAFT = "DRAFT",
|
|
207
|
+
PUBLISHED = "PUBLISHED",
|
|
208
|
+
CANCELLED = "CANCELLED",
|
|
209
|
+
SOLD_OUT = "SOLD_OUT"
|
|
210
|
+
}
|
|
211
|
+
declare enum CalendoTicketSaleStatus {
|
|
212
|
+
CONFIRMED = "CONFIRMED",
|
|
213
|
+
CANCELLED = "CANCELLED",
|
|
214
|
+
REFUNDED = "REFUNDED"
|
|
215
|
+
}
|
|
216
|
+
declare enum MapEventType {
|
|
217
|
+
FAIR = "FAIR",
|
|
218
|
+
MARKET = "MARKET",
|
|
219
|
+
FESTIVAL = "FESTIVAL",
|
|
220
|
+
PERMANENT = "PERMANENT",
|
|
221
|
+
OTHER = "OTHER"
|
|
222
|
+
}
|
|
223
|
+
declare enum MapEventStatus {
|
|
224
|
+
DRAFT = "DRAFT",
|
|
225
|
+
PUBLISHED = "PUBLISHED",
|
|
226
|
+
ARCHIVED = "ARCHIVED"
|
|
227
|
+
}
|
|
228
|
+
declare enum MapPoiCategory {
|
|
229
|
+
ATTRACTION_STAND = "ATTRACTION_STAND",
|
|
230
|
+
TOILET = "TOILET",
|
|
231
|
+
SECURITY = "SECURITY",
|
|
232
|
+
FOOD = "FOOD",
|
|
233
|
+
WATER_FOUNTAIN = "WATER_FOUNTAIN",
|
|
234
|
+
WASTO_RECYCLING = "WASTO_RECYCLING",
|
|
235
|
+
WASTO_BIOWASTE = "WASTO_BIOWASTE",
|
|
236
|
+
WASTO_RETURN = "WASTO_RETURN",
|
|
237
|
+
TRAVAUX = "TRAVAUX"
|
|
238
|
+
}
|
|
239
|
+
declare enum MapZoneType {
|
|
240
|
+
PARKING_PROVISOIRE = "PARKING_PROVISOIRE",
|
|
241
|
+
ZONE_INTERDITE = "ZONE_INTERDITE",
|
|
242
|
+
AUTRE = "AUTRE"
|
|
243
|
+
}
|
|
244
|
+
declare enum MapPoiStatus {
|
|
245
|
+
ACTIVE = "ACTIVE",
|
|
246
|
+
MAINTENANCE = "MAINTENANCE",
|
|
247
|
+
CLOSED = "CLOSED"
|
|
248
|
+
}
|
|
249
|
+
declare enum OperationalZoneType {
|
|
250
|
+
TRAVAUX = "TRAVAUX",
|
|
251
|
+
PARKING_PROVISOIRE = "PARKING_PROVISOIRE",
|
|
252
|
+
ZONE_INTERDITE = "ZONE_INTERDITE",
|
|
253
|
+
AUTRE = "AUTRE"
|
|
254
|
+
}
|
|
255
|
+
declare enum OperationalZoneStatus {
|
|
256
|
+
DRAFT = "DRAFT",
|
|
257
|
+
ACTIVE = "ACTIVE",
|
|
258
|
+
ARCHIVED = "ARCHIVED"
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Catalogue des sections Wast-O.
|
|
263
|
+
* @deprecated Préférer WASTO_SECTIONS pour les libellés UI ; DASHBOARD_APPS reste pour l'API permissions.
|
|
264
|
+
*/
|
|
265
|
+
declare enum DashboardAppSlug {
|
|
266
|
+
WORKSPACE = "WORKSPACE",
|
|
267
|
+
WASTO = "WASTO",
|
|
268
|
+
APPSO = "APPSO",
|
|
269
|
+
CALENDO = "CALENDO",
|
|
270
|
+
ACTO = "ACTO",
|
|
271
|
+
ASSISTO = "ASSISTO",
|
|
272
|
+
PLAYO = "PLAYO",
|
|
273
|
+
MAPSO = "MAPSO",
|
|
274
|
+
IAGO = "IAGO",
|
|
275
|
+
PEDAGO = "PEDAGO",
|
|
276
|
+
MARKETO = "MARKETO"
|
|
277
|
+
}
|
|
278
|
+
type DashboardAppDefinition = {
|
|
279
|
+
slug: DashboardAppSlug;
|
|
280
|
+
/** Clé utilisée dans les URLs (ex. `wasto`, `appso`) */
|
|
281
|
+
key: string;
|
|
282
|
+
label: string;
|
|
283
|
+
dashboardPath: string;
|
|
284
|
+
isDevOnly?: boolean;
|
|
285
|
+
};
|
|
286
|
+
type WastoSectionDefinition = {
|
|
287
|
+
slug: DashboardAppSlug;
|
|
288
|
+
key: string;
|
|
289
|
+
label: string;
|
|
290
|
+
sectionLabel: string;
|
|
291
|
+
dashboardPath: string;
|
|
292
|
+
isDevOnly?: boolean;
|
|
293
|
+
};
|
|
294
|
+
declare const WASTO_SECTIONS: WastoSectionDefinition[];
|
|
295
|
+
declare const DASHBOARD_APPS: DashboardAppDefinition[];
|
|
296
|
+
declare const WASTO_SECTION_BY_KEY: Record<string, WastoSectionDefinition>;
|
|
297
|
+
declare const DASHBOARD_APP_BY_SLUG: Record<DashboardAppSlug, DashboardAppDefinition>;
|
|
298
|
+
declare const DASHBOARD_APP_BY_KEY: Record<string, DashboardAppDefinition>;
|
|
299
|
+
/** Apps activées par défaut si le groupement n'a aucune configuration explicite. */
|
|
300
|
+
declare const DEFAULT_ENABLED_DASHBOARD_APP_SLUGS: DashboardAppSlug[];
|
|
301
|
+
/**
|
|
302
|
+
* Preset self-serve / compte gratuit (mode restreint).
|
|
303
|
+
* WORKSPACE + WASTO (référentiel, calendriers, planche) + APPSO (PWA light tri+calendrier).
|
|
304
|
+
* Hors scope / hors nav : Analyses & ROI, Annonces, Centres de tri, Points de collecte,
|
|
305
|
+
* Engagement (PLAYO), ACTO, IAGO, PEDAGO, MAPSO, CALENDO, invite membres.
|
|
306
|
+
*/
|
|
307
|
+
declare const FREE_SELF_SERVE_DASHBOARD_APP_SLUGS: DashboardAppSlug[];
|
|
308
|
+
/** Normalise slug API (`WORKSPACE`) ou clé URL (`workspace`) vers DashboardAppSlug. */
|
|
309
|
+
declare function normalizeDashboardAppSlug(value: string): DashboardAppSlug | null;
|
|
310
|
+
/**
|
|
311
|
+
* True si la whitelist explicite du groupement est limitée au preset free
|
|
312
|
+
* (aucune app hors FREE_SELF_SERVE, hors extras legacy). Aucune ligne / defaults plein → false.
|
|
313
|
+
* Accepte slugs (`WORKSPACE`) ou clés (`workspace`).
|
|
314
|
+
*/
|
|
315
|
+
declare function isFreeSelfServeAppAccess(enabledSlugs: ReadonlyArray<string>): boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Résout les apps actives à partir des lignes `city_group_app_access`.
|
|
318
|
+
* - Aucune ligne → defaults « plein » (compat collectivités existantes).
|
|
319
|
+
* - Au moins une ligne → **whitelist stricte** des `enabled: true` (mode restreint possible).
|
|
320
|
+
*/
|
|
321
|
+
declare function resolveEnabledDashboardAppSlugs(rows: ReadonlyArray<{
|
|
322
|
+
appSlug: string;
|
|
323
|
+
enabled: boolean;
|
|
324
|
+
}>): DashboardAppSlug[];
|
|
325
|
+
declare function dashboardAppSlugToKey(slug: DashboardAppSlug): string;
|
|
326
|
+
declare function dashboardAppKeyToSlug(key: string): DashboardAppSlug | null;
|
|
327
|
+
/** Domaine racine des landings Wast-O (ex. `wasto.localhost` en dev). */
|
|
328
|
+
declare const WASTO_LANDINGS_DOMAIN = "wasto.localhost";
|
|
329
|
+
/** Hôte de l’index des landings (catalogue de toutes les apps). */
|
|
330
|
+
declare const WASTO_LANDINGS_INDEX_HOST = "apps.wasto.localhost";
|
|
331
|
+
/** Hôtes Traefik déjà réservés sous `*.wasto.localhost` (hors landings par module). */
|
|
332
|
+
declare const WASTO_RESERVED_SUBDOMAINS: Set<string>;
|
|
333
|
+
declare function isDashboardAppLandingHost(host: string): boolean;
|
|
334
|
+
declare function dashboardAppKeyFromLandingHost(host: string): string | null;
|
|
335
|
+
type ResolveLandingUrlOptions = {
|
|
336
|
+
/** Domaine racine (défaut : `wasto.localhost`). */
|
|
337
|
+
domain?: string;
|
|
338
|
+
/** Protocole (défaut : `http` en dev, `https` si `NODE_ENV=production`). */
|
|
339
|
+
protocol?: string;
|
|
340
|
+
};
|
|
341
|
+
/** URL publique de la landing d’un module (ex. `http://acto.wasto.localhost`). */
|
|
342
|
+
declare function resolveDashboardAppLandingUrl(key: string, options?: ResolveLandingUrlOptions): string | null;
|
|
343
|
+
/** URL de l’index des landings Wast-O (ex. `http://apps.wasto.localhost`). */
|
|
344
|
+
declare function resolveWastoLandingsIndexUrl(options?: ResolveLandingUrlOptions): string;
|
|
345
|
+
|
|
346
|
+
/** Ressources soumises à un quota numérique en offre gratuite. */
|
|
347
|
+
type FreeTierResource = 'cmsApps' | 'cmsPages' | 'blogPosts' | 'cmsMedia' | 'wasteTypes' | 'collectionPlaces' | 'printCalendarTemplates';
|
|
348
|
+
/** Fonctionnalités désactivées en offre gratuite (feature gate). */
|
|
349
|
+
type FreeTierFeature = 'challenges' | 'roi' | 'notifications' | 'recyclingPoints' | 'assets' | 'nativeStorePublication' | 'inviteMembers';
|
|
350
|
+
type FreeTierErrorCode = 'FREE_TIER_LIMIT' | 'FREE_TIER_FEATURE';
|
|
351
|
+
type FreeTierUsageItem = {
|
|
352
|
+
resource: FreeTierResource;
|
|
353
|
+
used: number;
|
|
354
|
+
/** `null` = illimité (compte payant). */
|
|
355
|
+
limit: number | null;
|
|
356
|
+
canCreate: boolean;
|
|
357
|
+
/** Octets utilisés (cmsMedia uniquement). */
|
|
358
|
+
usedBytes?: number;
|
|
359
|
+
/** Limite en octets (cmsMedia uniquement). */
|
|
360
|
+
limitBytes?: number | null;
|
|
361
|
+
};
|
|
362
|
+
type FreeTierFeatureItem = {
|
|
363
|
+
feature: FreeTierFeature;
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
};
|
|
366
|
+
type FreeTierUsageSnapshot = {
|
|
367
|
+
cityGroupId: string;
|
|
368
|
+
freeTier: boolean;
|
|
369
|
+
resources: FreeTierUsageItem[];
|
|
370
|
+
features: FreeTierFeatureItem[];
|
|
371
|
+
};
|
|
372
|
+
type FreeTierErrorPayload = {
|
|
373
|
+
code: FreeTierErrorCode;
|
|
374
|
+
resource?: FreeTierResource;
|
|
375
|
+
feature?: FreeTierFeature;
|
|
376
|
+
used?: number;
|
|
377
|
+
limit?: number;
|
|
378
|
+
message: string;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
/** Quotas numériques offre gratuite — valeurs ajustables sans changer la logique. */
|
|
382
|
+
declare const FREE_TIER_LIMITS: {
|
|
383
|
+
readonly cmsApps: 1;
|
|
384
|
+
readonly cmsPages: 5;
|
|
385
|
+
readonly blogPosts: 10;
|
|
386
|
+
readonly cmsMedia: 50;
|
|
387
|
+
readonly cmsMediaBytesMb: 50;
|
|
388
|
+
readonly wasteTypes: 15;
|
|
389
|
+
readonly collectionPlaces: 10;
|
|
390
|
+
readonly printCalendarTemplates: 3;
|
|
391
|
+
};
|
|
392
|
+
/** Feature gates offre gratuite — `false` = bloqué. */
|
|
393
|
+
declare const FREE_TIER_FEATURES: Record<FreeTierFeature, boolean>;
|
|
394
|
+
declare const FREE_TIER_RESOURCES: readonly FreeTierResource[];
|
|
395
|
+
declare const FREE_TIER_FEATURE_KEYS: readonly FreeTierFeature[];
|
|
396
|
+
declare function getFreeTierLimit(resource: FreeTierResource): number;
|
|
397
|
+
declare function getFreeTierMediaBytesLimit(): number;
|
|
398
|
+
declare function isFreeTierFeatureEnabled(feature: FreeTierFeature): boolean;
|
|
399
|
+
|
|
400
|
+
declare const DEFAULT_PAGE = 1;
|
|
401
|
+
declare const DEFAULT_PAGE_SIZE = 20;
|
|
402
|
+
declare const MAX_PAGE_SIZE = 100;
|
|
403
|
+
interface PaginationQuery {
|
|
404
|
+
page?: number;
|
|
405
|
+
pageSize?: number;
|
|
406
|
+
}
|
|
407
|
+
interface PaginationMeta {
|
|
408
|
+
page: number;
|
|
409
|
+
pageSize: number;
|
|
410
|
+
total: number;
|
|
411
|
+
totalPages: number;
|
|
412
|
+
}
|
|
413
|
+
interface PaginatedResponse<T> {
|
|
414
|
+
data: T[];
|
|
415
|
+
meta: PaginationMeta;
|
|
416
|
+
}
|
|
417
|
+
declare function buildPaginationMeta(page: number, pageSize: number, total: number): PaginationMeta;
|
|
418
|
+
|
|
419
|
+
interface LoginRequest {
|
|
420
|
+
email: string;
|
|
421
|
+
password: string;
|
|
422
|
+
}
|
|
423
|
+
interface RegisterRequest {
|
|
424
|
+
email: string;
|
|
425
|
+
password: string;
|
|
426
|
+
firstName?: string;
|
|
427
|
+
lastName?: string;
|
|
428
|
+
}
|
|
429
|
+
interface ForgotPasswordRequest {
|
|
430
|
+
email: string;
|
|
431
|
+
}
|
|
432
|
+
interface ResetPasswordRequest {
|
|
433
|
+
token: string;
|
|
434
|
+
password: string;
|
|
435
|
+
}
|
|
436
|
+
interface AcceptInviteRequest {
|
|
437
|
+
token: string;
|
|
438
|
+
password: string;
|
|
439
|
+
firstName?: string;
|
|
440
|
+
lastName?: string;
|
|
441
|
+
}
|
|
442
|
+
interface LoginResponse {
|
|
443
|
+
access_token: string;
|
|
444
|
+
user?: unknown;
|
|
445
|
+
}
|
|
446
|
+
interface LoginTwoFactorChallenge {
|
|
447
|
+
requiresTwoFactor: true;
|
|
448
|
+
pendingToken: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
interface CreateUserRequest {
|
|
452
|
+
email: string;
|
|
453
|
+
password: string;
|
|
454
|
+
firstName?: string;
|
|
455
|
+
lastName?: string;
|
|
456
|
+
role?: UserRole;
|
|
457
|
+
cityId?: string;
|
|
458
|
+
cityGroupId?: string;
|
|
459
|
+
}
|
|
460
|
+
interface InviteUserRequest {
|
|
461
|
+
email: string;
|
|
462
|
+
firstName?: string;
|
|
463
|
+
lastName?: string;
|
|
464
|
+
role?: UserRole;
|
|
465
|
+
cityId?: string;
|
|
466
|
+
cityGroupId?: string;
|
|
467
|
+
}
|
|
468
|
+
interface UpdateUserRequest {
|
|
469
|
+
email?: string;
|
|
470
|
+
password?: string;
|
|
471
|
+
firstName?: string;
|
|
472
|
+
lastName?: string;
|
|
473
|
+
role?: UserRole;
|
|
474
|
+
cityId?: string;
|
|
475
|
+
cityGroupId?: string;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
interface CreateCityRequest {
|
|
479
|
+
name: string;
|
|
480
|
+
country: string;
|
|
481
|
+
population?: number;
|
|
482
|
+
status?: CityStatus;
|
|
483
|
+
outOfTheBins?: string;
|
|
484
|
+
presentationOfBins?: string;
|
|
485
|
+
returnOfBins?: string;
|
|
486
|
+
respectOfCalendar?: string;
|
|
487
|
+
holidays?: string;
|
|
488
|
+
logoMediaId?: string | null;
|
|
489
|
+
}
|
|
490
|
+
interface UpdateCityRequest {
|
|
491
|
+
name?: string;
|
|
492
|
+
country?: string;
|
|
493
|
+
population?: number;
|
|
494
|
+
status?: CityStatus;
|
|
495
|
+
outOfTheBins?: string;
|
|
496
|
+
presentationOfBins?: string;
|
|
497
|
+
returnOfBins?: string;
|
|
498
|
+
respectOfCalendar?: string;
|
|
499
|
+
holidays?: string;
|
|
500
|
+
logoMediaId?: string | null;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
interface CreateCityGroupRequest {
|
|
504
|
+
name: string;
|
|
505
|
+
type: CityGroupType;
|
|
506
|
+
code?: string;
|
|
507
|
+
siren?: string;
|
|
508
|
+
cityIds?: string[];
|
|
509
|
+
}
|
|
510
|
+
interface UpdateCityGroupRequest {
|
|
511
|
+
name?: string;
|
|
512
|
+
type?: CityGroupType;
|
|
513
|
+
code?: string;
|
|
514
|
+
siren?: string;
|
|
515
|
+
cityIds?: string[];
|
|
516
|
+
}
|
|
517
|
+
interface CityGroupDashboardAppAccessItem {
|
|
518
|
+
slug: DashboardAppSlug;
|
|
519
|
+
key: string;
|
|
520
|
+
label: string;
|
|
521
|
+
dashboardPath: string;
|
|
522
|
+
isDevOnly?: boolean;
|
|
523
|
+
enabled: boolean;
|
|
524
|
+
}
|
|
525
|
+
interface CityGroupDashboardAppsResponse {
|
|
526
|
+
cityGroupId: string;
|
|
527
|
+
apps: CityGroupDashboardAppAccessItem[];
|
|
528
|
+
/** Slugs activés (clés Prisma) — vide si configuration explicite absente côté API */
|
|
529
|
+
enabledSlugs: DashboardAppSlug[];
|
|
530
|
+
}
|
|
531
|
+
interface SetCityGroupDashboardAppsRequest {
|
|
532
|
+
enabledSlugs: DashboardAppSlug[];
|
|
533
|
+
}
|
|
534
|
+
interface AccessibleCityGroup {
|
|
535
|
+
id: string;
|
|
536
|
+
name: string;
|
|
537
|
+
type: CityGroupType;
|
|
538
|
+
code?: string | null;
|
|
539
|
+
enabledDashboardAppSlugs?: DashboardAppSlug[];
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
interface CreateWasteTypeDetailRequest {
|
|
543
|
+
material: string;
|
|
544
|
+
description?: string;
|
|
545
|
+
instructions?: string;
|
|
546
|
+
imageUrl?: string;
|
|
547
|
+
imageBase64?: string;
|
|
548
|
+
}
|
|
549
|
+
interface CreateWasteTypeRequest {
|
|
550
|
+
name: string;
|
|
551
|
+
description?: string;
|
|
552
|
+
instructions?: string;
|
|
553
|
+
color?: string;
|
|
554
|
+
colorLight?: string;
|
|
555
|
+
icon?: string;
|
|
556
|
+
imageUrl?: string;
|
|
557
|
+
imageBase64?: string;
|
|
558
|
+
details?: CreateWasteTypeDetailRequest[];
|
|
559
|
+
rules?: string[];
|
|
560
|
+
cityIds?: string[];
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
interface CreateAttachedLocationRequest {
|
|
564
|
+
name: string;
|
|
565
|
+
reference?: string;
|
|
566
|
+
latitude?: number;
|
|
567
|
+
longitude?: number;
|
|
568
|
+
/** Optional link to a city street (secteur / calendrier). */
|
|
569
|
+
streetId?: string;
|
|
570
|
+
}
|
|
571
|
+
interface CreateWasteCollectionDayRequest {
|
|
572
|
+
wasteTypeId: string;
|
|
573
|
+
name: string;
|
|
574
|
+
description?: string;
|
|
575
|
+
biweekly?: boolean;
|
|
576
|
+
startDate?: string;
|
|
577
|
+
}
|
|
578
|
+
interface CreateWasteCollectionExceptionRequest {
|
|
579
|
+
wasteTypeId: string;
|
|
580
|
+
dateFrom: string;
|
|
581
|
+
dateTo: string;
|
|
582
|
+
name: string;
|
|
583
|
+
description?: string;
|
|
584
|
+
}
|
|
585
|
+
interface CreateWasteCollectionPlaceRequest {
|
|
586
|
+
cityId: string;
|
|
587
|
+
name: string;
|
|
588
|
+
reference?: string;
|
|
589
|
+
attachedLocations?: CreateAttachedLocationRequest[];
|
|
590
|
+
wasteCollectionDays?: CreateWasteCollectionDayRequest[];
|
|
591
|
+
wasteCollectionExceptions?: CreateWasteCollectionExceptionRequest[];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
interface LocateWasteCollectionPlacesQuery {
|
|
595
|
+
lat: number;
|
|
596
|
+
lon: number;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
declare const WEEKDAYS: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
600
|
+
type Weekday = (typeof WEEKDAYS)[number];
|
|
601
|
+
type TimeSlot = {
|
|
602
|
+
open: string;
|
|
603
|
+
close: string;
|
|
604
|
+
};
|
|
605
|
+
type OpeningHoursRule = {
|
|
606
|
+
days: Weekday[];
|
|
607
|
+
slots: TimeSlot[];
|
|
608
|
+
};
|
|
609
|
+
type OpeningHoursExceptionClosed = {
|
|
610
|
+
date: string;
|
|
611
|
+
closed: true;
|
|
612
|
+
label?: string;
|
|
613
|
+
};
|
|
614
|
+
type OpeningHoursExceptionOpen = {
|
|
615
|
+
date: string;
|
|
616
|
+
closed: false;
|
|
617
|
+
slots: TimeSlot[];
|
|
618
|
+
label?: string;
|
|
619
|
+
};
|
|
620
|
+
type OpeningHoursException = OpeningHoursExceptionClosed | OpeningHoursExceptionOpen;
|
|
621
|
+
/** Horaires structurés persistés en UTC+0 */
|
|
622
|
+
type OpeningHours = {
|
|
623
|
+
version: 1;
|
|
624
|
+
storage: 'utc';
|
|
625
|
+
rules: OpeningHoursRule[];
|
|
626
|
+
exceptions?: OpeningHoursException[];
|
|
627
|
+
};
|
|
628
|
+
type HoursInputMode = 'structured' | 'text';
|
|
629
|
+
type WeeklyHoursRow = {
|
|
630
|
+
day: Weekday;
|
|
631
|
+
label: string;
|
|
632
|
+
closed: boolean;
|
|
633
|
+
slots: TimeSlot[];
|
|
634
|
+
};
|
|
635
|
+
type OpeningHoursValidationResult = {
|
|
636
|
+
ok: true;
|
|
637
|
+
value: OpeningHours;
|
|
638
|
+
} | {
|
|
639
|
+
ok: false;
|
|
640
|
+
errors: string[];
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
interface CreateRecyclingPointRequest {
|
|
644
|
+
cityId: string;
|
|
645
|
+
name: string;
|
|
646
|
+
type: string;
|
|
647
|
+
acceptedWasteTypes: string[];
|
|
648
|
+
latitude?: number;
|
|
649
|
+
longitude?: number;
|
|
650
|
+
/** @deprecated Prefer longitude (alias X = longitude). */
|
|
651
|
+
coordinateX?: number;
|
|
652
|
+
/** @deprecated Prefer latitude (alias Y = latitude). */
|
|
653
|
+
coordinateY?: number;
|
|
654
|
+
address?: string;
|
|
655
|
+
hours?: string;
|
|
656
|
+
phone?: string;
|
|
657
|
+
details?: RecyclingPointDetails;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
type RecyclingPointDetails = {
|
|
661
|
+
address?: string;
|
|
662
|
+
hours?: string;
|
|
663
|
+
phone?: string;
|
|
664
|
+
hoursMode?: HoursInputMode;
|
|
665
|
+
openingHours?: OpeningHours;
|
|
666
|
+
[key: string]: unknown;
|
|
667
|
+
};
|
|
668
|
+
interface RecyclingPoint {
|
|
669
|
+
id: string;
|
|
670
|
+
cityId?: string | null;
|
|
671
|
+
name: string;
|
|
672
|
+
type: string;
|
|
673
|
+
acceptedWasteTypes: string[];
|
|
674
|
+
latitude?: number | null;
|
|
675
|
+
longitude?: number | null;
|
|
676
|
+
/** @deprecated Prefer longitude. */
|
|
677
|
+
coordinateX?: number | null;
|
|
678
|
+
/** @deprecated Prefer latitude. */
|
|
679
|
+
coordinateY?: number | null;
|
|
680
|
+
address?: string | null;
|
|
681
|
+
hours?: string | null;
|
|
682
|
+
phone?: string | null;
|
|
683
|
+
details?: RecyclingPointDetails | null;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
type QuizQuestionKind = 'waste_bin' | 'ab_image' | 'mcq';
|
|
687
|
+
type QuizAbImageChoice = {
|
|
688
|
+
id: string;
|
|
689
|
+
imageUrl: string;
|
|
690
|
+
label?: string;
|
|
691
|
+
};
|
|
692
|
+
type QuizAbImageOptions = {
|
|
693
|
+
choices: [QuizAbImageChoice, QuizAbImageChoice];
|
|
694
|
+
correctChoiceId: string;
|
|
695
|
+
};
|
|
696
|
+
type QuizMcqChoice = {
|
|
697
|
+
id: string;
|
|
698
|
+
text: string;
|
|
699
|
+
};
|
|
700
|
+
type QuizMcqOptions = {
|
|
701
|
+
choices: QuizMcqChoice[];
|
|
702
|
+
correctChoiceId: string;
|
|
703
|
+
};
|
|
704
|
+
type QuizQuestionOptions = QuizAbImageOptions | QuizMcqOptions;
|
|
705
|
+
/** Détail référentiel lié à une explication (WasteTypeDetail). */
|
|
706
|
+
type QuizExplanationDetail = {
|
|
707
|
+
id: string;
|
|
708
|
+
material: string;
|
|
709
|
+
description?: string | null;
|
|
710
|
+
instructions?: string | null;
|
|
711
|
+
imageUrl?: string | null;
|
|
712
|
+
wasteType?: {
|
|
713
|
+
id: string;
|
|
714
|
+
name: string;
|
|
715
|
+
} | null;
|
|
716
|
+
};
|
|
717
|
+
interface CreateQuizQuestionRequest {
|
|
718
|
+
/** @deprecated Ignored — city is taken from `serie.challenge.cityId`. */
|
|
719
|
+
cityId?: string;
|
|
720
|
+
/** Required for `waste_bin`; optional for `ab_image`. */
|
|
721
|
+
wasteTypeId?: string;
|
|
722
|
+
materialId?: string;
|
|
723
|
+
material: string;
|
|
724
|
+
question: string;
|
|
725
|
+
imageUrl?: string;
|
|
726
|
+
imageBase64?: string;
|
|
727
|
+
/** Required for `waste_bin`; optional for `ab_image`. */
|
|
728
|
+
correctWasteTypeId?: string;
|
|
729
|
+
/** Required: question belongs to a series (city = that series' challenge city). */
|
|
730
|
+
serieId: string;
|
|
731
|
+
order?: number;
|
|
732
|
+
/** Defaults to `waste_bin` (legacy). */
|
|
733
|
+
kind?: QuizQuestionKind;
|
|
734
|
+
/** Typed payload for non-waste_bin kinds. */
|
|
735
|
+
options?: QuizQuestionOptions;
|
|
736
|
+
/** Free-text explanation shown after answering (takes priority over detail). */
|
|
737
|
+
explanationText?: string | null;
|
|
738
|
+
/** Link to a référentiel WasteTypeDetail for explanation. */
|
|
739
|
+
explanationDetailId?: string | null;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
interface CreateCmsSiteRequest {
|
|
743
|
+
name: string;
|
|
744
|
+
slug: string;
|
|
745
|
+
type?: CmsSiteType;
|
|
746
|
+
domain?: string;
|
|
747
|
+
cityGroupId?: string;
|
|
748
|
+
settings?: Record<string, unknown>;
|
|
749
|
+
}
|
|
750
|
+
interface UpdateCmsSiteRequest {
|
|
751
|
+
name?: string;
|
|
752
|
+
slug?: string;
|
|
753
|
+
type?: CmsSiteType;
|
|
754
|
+
domain?: string;
|
|
755
|
+
cityGroupId?: string;
|
|
756
|
+
settings?: Record<string, unknown>;
|
|
757
|
+
}
|
|
758
|
+
interface CreateCmsPageRequest {
|
|
759
|
+
siteId: string;
|
|
760
|
+
title: string;
|
|
761
|
+
slug: string;
|
|
762
|
+
path: string;
|
|
763
|
+
content: Record<string, unknown>;
|
|
764
|
+
published?: boolean;
|
|
765
|
+
publishedAt?: string;
|
|
766
|
+
seoMetadata?: Record<string, unknown>;
|
|
767
|
+
layoutId?: string;
|
|
768
|
+
}
|
|
769
|
+
interface UpdateCmsPageRequest {
|
|
770
|
+
siteId?: string;
|
|
771
|
+
title?: string;
|
|
772
|
+
slug?: string;
|
|
773
|
+
path?: string;
|
|
774
|
+
content?: Record<string, unknown>;
|
|
775
|
+
published?: boolean;
|
|
776
|
+
publishedAt?: string;
|
|
777
|
+
seoMetadata?: Record<string, unknown>;
|
|
778
|
+
layoutId?: string;
|
|
779
|
+
}
|
|
780
|
+
interface CreateCmsLayoutRequest {
|
|
781
|
+
siteId: string;
|
|
782
|
+
name: string;
|
|
783
|
+
description?: string;
|
|
784
|
+
type: CmsSiteType;
|
|
785
|
+
structure: Record<string, unknown>;
|
|
786
|
+
isDefault?: boolean;
|
|
787
|
+
}
|
|
788
|
+
interface UpdateCmsLayoutRequest {
|
|
789
|
+
siteId?: string;
|
|
790
|
+
name?: string;
|
|
791
|
+
description?: string;
|
|
792
|
+
type?: CmsSiteType;
|
|
793
|
+
structure?: Record<string, unknown>;
|
|
794
|
+
isDefault?: boolean;
|
|
795
|
+
}
|
|
796
|
+
interface CreateCmsMenuItemRequest {
|
|
797
|
+
label: string;
|
|
798
|
+
icon?: string;
|
|
799
|
+
order: number;
|
|
800
|
+
linkType: CmsMenuLinkType;
|
|
801
|
+
pageId?: string;
|
|
802
|
+
externalUrl?: string;
|
|
803
|
+
componentId?: string;
|
|
804
|
+
parentId?: string;
|
|
805
|
+
metadata?: Record<string, unknown>;
|
|
806
|
+
}
|
|
807
|
+
interface CreateCmsMenuRequest {
|
|
808
|
+
siteId: string;
|
|
809
|
+
name: string;
|
|
810
|
+
location?: string;
|
|
811
|
+
items?: CreateCmsMenuItemRequest[];
|
|
812
|
+
}
|
|
813
|
+
interface UpdateCmsMenuRequest {
|
|
814
|
+
siteId?: string;
|
|
815
|
+
name?: string;
|
|
816
|
+
location?: string;
|
|
817
|
+
items?: CreateCmsMenuItemRequest[];
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
interface CreateAssetRequest {
|
|
821
|
+
uniqueIdentifier: string;
|
|
822
|
+
type: AssetType;
|
|
823
|
+
status?: AssetStatus;
|
|
824
|
+
name: string;
|
|
825
|
+
description?: string;
|
|
826
|
+
capacity?: number;
|
|
827
|
+
dimensions?: {
|
|
828
|
+
length?: number;
|
|
829
|
+
width?: number;
|
|
830
|
+
height?: number;
|
|
831
|
+
};
|
|
832
|
+
cityId?: string;
|
|
833
|
+
cityGroupId?: string;
|
|
834
|
+
locationStartDate?: string;
|
|
835
|
+
locationEndDate?: string;
|
|
836
|
+
wasteTypeIds?: string[];
|
|
837
|
+
fuelType?: string;
|
|
838
|
+
consumptionRate?: number;
|
|
839
|
+
consumptionUnit?: string;
|
|
840
|
+
color?: string;
|
|
841
|
+
ownedById?: string;
|
|
842
|
+
isBookable?: boolean;
|
|
843
|
+
}
|
|
844
|
+
interface UpdateAssetRequest {
|
|
845
|
+
uniqueIdentifier?: string;
|
|
846
|
+
type?: AssetType;
|
|
847
|
+
status?: AssetStatus;
|
|
848
|
+
name?: string;
|
|
849
|
+
description?: string;
|
|
850
|
+
capacity?: number;
|
|
851
|
+
dimensions?: {
|
|
852
|
+
length?: number;
|
|
853
|
+
width?: number;
|
|
854
|
+
height?: number;
|
|
855
|
+
};
|
|
856
|
+
cityId?: string;
|
|
857
|
+
cityGroupId?: string;
|
|
858
|
+
locationStartDate?: string;
|
|
859
|
+
locationEndDate?: string;
|
|
860
|
+
wasteTypeIds?: string[];
|
|
861
|
+
fuelType?: string;
|
|
862
|
+
consumptionRate?: number;
|
|
863
|
+
consumptionUnit?: string;
|
|
864
|
+
color?: string;
|
|
865
|
+
ownedById?: string;
|
|
866
|
+
isBookable?: boolean;
|
|
867
|
+
}
|
|
868
|
+
interface CreateAssetEventRequest {
|
|
869
|
+
eventType: AssetEventType;
|
|
870
|
+
title: string;
|
|
871
|
+
description?: string;
|
|
872
|
+
latitude?: number;
|
|
873
|
+
longitude?: number;
|
|
874
|
+
metadata?: Record<string, unknown>;
|
|
875
|
+
}
|
|
876
|
+
interface UpdateAssetStatusRequest {
|
|
877
|
+
status: AssetStatus;
|
|
878
|
+
latitude?: number;
|
|
879
|
+
longitude?: number;
|
|
880
|
+
notes?: string;
|
|
881
|
+
}
|
|
882
|
+
interface CreateAssetConsumptionRecordRequest {
|
|
883
|
+
periodStart: string;
|
|
884
|
+
periodEnd: string;
|
|
885
|
+
value: number;
|
|
886
|
+
unit: string;
|
|
887
|
+
source: 'IOT' | 'MANUAL';
|
|
888
|
+
metadata?: Record<string, unknown>;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
interface CreateAssetBookingRequest {
|
|
892
|
+
assetId: string;
|
|
893
|
+
startDate: string;
|
|
894
|
+
endDate?: string;
|
|
895
|
+
notes?: string;
|
|
896
|
+
}
|
|
897
|
+
interface UpdateAssetBookingRequest {
|
|
898
|
+
startDate?: string;
|
|
899
|
+
endDate?: string;
|
|
900
|
+
status?: BookingStatus;
|
|
901
|
+
notes?: string;
|
|
902
|
+
}
|
|
903
|
+
interface CancelAssetBookingRequest {
|
|
904
|
+
reason?: string;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
interface CreateAssetInterventionRequest {
|
|
908
|
+
assetId?: string;
|
|
909
|
+
type: InterventionType;
|
|
910
|
+
plannedStart: string;
|
|
911
|
+
plannedEnd: string;
|
|
912
|
+
title?: string;
|
|
913
|
+
description?: string;
|
|
914
|
+
assigneeId?: string;
|
|
915
|
+
notes?: string;
|
|
916
|
+
}
|
|
917
|
+
interface UpdateAssetInterventionRequest {
|
|
918
|
+
assetId?: string;
|
|
919
|
+
type?: InterventionType;
|
|
920
|
+
status?: InterventionStatus;
|
|
921
|
+
plannedStart?: string;
|
|
922
|
+
plannedEnd?: string;
|
|
923
|
+
title?: string;
|
|
924
|
+
description?: string;
|
|
925
|
+
assigneeId?: string;
|
|
926
|
+
notes?: string;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
interface CreateChallengeRequest {
|
|
930
|
+
name: string;
|
|
931
|
+
description?: string;
|
|
932
|
+
cityId?: string;
|
|
933
|
+
imageUrl?: string;
|
|
934
|
+
imageBase64?: string;
|
|
935
|
+
enabled?: boolean;
|
|
936
|
+
startDate?: string;
|
|
937
|
+
endDate?: string;
|
|
938
|
+
order?: number;
|
|
939
|
+
requiredChallengeId?: string;
|
|
940
|
+
}
|
|
941
|
+
interface CreateSerieRequest {
|
|
942
|
+
challengeId: string;
|
|
943
|
+
name: string;
|
|
944
|
+
description?: string;
|
|
945
|
+
imageUrl?: string;
|
|
946
|
+
imageBase64?: string;
|
|
947
|
+
order?: number;
|
|
948
|
+
}
|
|
949
|
+
interface CreateBadgeRequest {
|
|
950
|
+
challengeId: string;
|
|
951
|
+
name: string;
|
|
952
|
+
description?: string;
|
|
953
|
+
imageUrl?: string;
|
|
954
|
+
imageBase64?: string;
|
|
955
|
+
icon?: string;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
interface CreateBlogPostRequest {
|
|
959
|
+
cityGroupId: string;
|
|
960
|
+
title: string;
|
|
961
|
+
content: string;
|
|
962
|
+
published?: boolean;
|
|
963
|
+
publishedAt?: string;
|
|
964
|
+
/** ID d’un média CMS (image de couverture) */
|
|
965
|
+
coverMediaId?: string | null;
|
|
966
|
+
}
|
|
967
|
+
interface UpdateBlogPostRequest {
|
|
968
|
+
cityGroupId?: string;
|
|
969
|
+
title?: string;
|
|
970
|
+
content?: string;
|
|
971
|
+
published?: boolean;
|
|
972
|
+
publishedAt?: string;
|
|
973
|
+
/** ID d’un média CMS (image de couverture). `null` pour retirer. */
|
|
974
|
+
coverMediaId?: string | null;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
interface CreateNotificationRequest {
|
|
978
|
+
title: string;
|
|
979
|
+
body: string;
|
|
980
|
+
data?: Record<string, unknown>;
|
|
981
|
+
recipientGroupId: string;
|
|
982
|
+
scheduledAt?: string;
|
|
983
|
+
/** Envoyer une notification push (défaut: true) */
|
|
984
|
+
sendPush?: boolean;
|
|
985
|
+
/** Afficher en modale dans l'app (défaut: false) */
|
|
986
|
+
showAsModal?: boolean;
|
|
987
|
+
/** Média CMS affiché dans la modale */
|
|
988
|
+
imageMediaId?: string | null;
|
|
989
|
+
}
|
|
990
|
+
interface UpdateNotificationRequest {
|
|
991
|
+
title?: string;
|
|
992
|
+
body?: string;
|
|
993
|
+
data?: Record<string, unknown>;
|
|
994
|
+
recipientGroupId?: string;
|
|
995
|
+
scheduledAt?: string;
|
|
996
|
+
sendPush?: boolean;
|
|
997
|
+
showAsModal?: boolean;
|
|
998
|
+
imageMediaId?: string | null;
|
|
999
|
+
}
|
|
1000
|
+
interface CreateRecipientGroupRequest {
|
|
1001
|
+
name: string;
|
|
1002
|
+
description?: string;
|
|
1003
|
+
type: RecipientGroupType;
|
|
1004
|
+
/** Requis pour CITY_GROUP (tout le groupement) */
|
|
1005
|
+
cityGroupId?: string;
|
|
1006
|
+
/** Requis non vide pour CITY */
|
|
1007
|
+
cityIds?: string[];
|
|
1008
|
+
/** Requis non vide pour ZONE (lieux de collecte) */
|
|
1009
|
+
wasteCollectionPlaceIds?: string[];
|
|
1010
|
+
/** @deprecated Prefer cityIds */
|
|
1011
|
+
cityId?: string;
|
|
1012
|
+
/** @deprecated Prefer wasteCollectionPlaceIds */
|
|
1013
|
+
wasteCollectionPlaceId?: string;
|
|
1014
|
+
/** @deprecated Legacy operational zone targeting */
|
|
1015
|
+
operationalZoneId?: string;
|
|
1016
|
+
}
|
|
1017
|
+
interface UpdateRecipientGroupRequest {
|
|
1018
|
+
name?: string;
|
|
1019
|
+
description?: string;
|
|
1020
|
+
type?: RecipientGroupType;
|
|
1021
|
+
cityGroupId?: string;
|
|
1022
|
+
cityIds?: string[];
|
|
1023
|
+
wasteCollectionPlaceIds?: string[];
|
|
1024
|
+
/** @deprecated Prefer cityIds */
|
|
1025
|
+
cityId?: string;
|
|
1026
|
+
/** @deprecated Prefer wasteCollectionPlaceIds */
|
|
1027
|
+
wasteCollectionPlaceId?: string;
|
|
1028
|
+
/** @deprecated Legacy operational zone targeting */
|
|
1029
|
+
operationalZoneId?: string;
|
|
1030
|
+
}
|
|
1031
|
+
/** Annonce modale active pour l'app mobile */
|
|
1032
|
+
interface PublicAnnouncement {
|
|
1033
|
+
id: string;
|
|
1034
|
+
title: string;
|
|
1035
|
+
body: string;
|
|
1036
|
+
imageUrl?: string | null;
|
|
1037
|
+
sentAt?: string | null;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
interface CreateProviderRequest {
|
|
1041
|
+
name: string;
|
|
1042
|
+
description?: string;
|
|
1043
|
+
type?: ProviderType;
|
|
1044
|
+
email?: string;
|
|
1045
|
+
phone?: string;
|
|
1046
|
+
address?: string;
|
|
1047
|
+
siret?: string;
|
|
1048
|
+
siren?: string;
|
|
1049
|
+
website?: string;
|
|
1050
|
+
cityGroupIds?: string[];
|
|
1051
|
+
cityIds?: string[];
|
|
1052
|
+
}
|
|
1053
|
+
interface UpdateProviderRequest {
|
|
1054
|
+
name?: string;
|
|
1055
|
+
description?: string;
|
|
1056
|
+
type?: ProviderType;
|
|
1057
|
+
email?: string;
|
|
1058
|
+
phone?: string;
|
|
1059
|
+
address?: string;
|
|
1060
|
+
siret?: string;
|
|
1061
|
+
siren?: string;
|
|
1062
|
+
website?: string;
|
|
1063
|
+
cityGroupIds?: string[];
|
|
1064
|
+
cityIds?: string[];
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
interface CreateSurveySubCohortRequest {
|
|
1068
|
+
name: string;
|
|
1069
|
+
description?: string;
|
|
1070
|
+
order?: number;
|
|
1071
|
+
responsibleUserIds?: string[];
|
|
1072
|
+
attachedLocationIds?: string[];
|
|
1073
|
+
}
|
|
1074
|
+
interface CreateSurveyCohortRequest {
|
|
1075
|
+
name: string;
|
|
1076
|
+
description?: string;
|
|
1077
|
+
order?: number;
|
|
1078
|
+
subCohorts?: CreateSurveySubCohortRequest[];
|
|
1079
|
+
}
|
|
1080
|
+
interface UpdateSurveySubCohortRequest {
|
|
1081
|
+
name?: string;
|
|
1082
|
+
description?: string;
|
|
1083
|
+
order?: number;
|
|
1084
|
+
responsibleUserIds?: string[];
|
|
1085
|
+
attachedLocationIds?: string[];
|
|
1086
|
+
}
|
|
1087
|
+
interface UpdateSurveyCohortRequest {
|
|
1088
|
+
name?: string;
|
|
1089
|
+
description?: string;
|
|
1090
|
+
order?: number;
|
|
1091
|
+
subCohorts?: UpdateSurveySubCohortRequest[];
|
|
1092
|
+
}
|
|
1093
|
+
interface CreateSurveyQuestionRequest {
|
|
1094
|
+
type: QuestionType;
|
|
1095
|
+
question: string;
|
|
1096
|
+
description?: string;
|
|
1097
|
+
required?: boolean;
|
|
1098
|
+
order?: number;
|
|
1099
|
+
options?: unknown;
|
|
1100
|
+
minValue?: number;
|
|
1101
|
+
maxValue?: number;
|
|
1102
|
+
}
|
|
1103
|
+
interface UpdateSurveyQuestionRequest {
|
|
1104
|
+
type?: QuestionType;
|
|
1105
|
+
question?: string;
|
|
1106
|
+
description?: string;
|
|
1107
|
+
required?: boolean;
|
|
1108
|
+
order?: number;
|
|
1109
|
+
options?: unknown;
|
|
1110
|
+
minValue?: number;
|
|
1111
|
+
maxValue?: number;
|
|
1112
|
+
}
|
|
1113
|
+
interface CreateSurveyAnswerRequest {
|
|
1114
|
+
questionId: string;
|
|
1115
|
+
value: unknown;
|
|
1116
|
+
photoUrl?: string;
|
|
1117
|
+
}
|
|
1118
|
+
interface CreateSurveyResponseRequest {
|
|
1119
|
+
answers: CreateSurveyAnswerRequest[];
|
|
1120
|
+
latitude?: number;
|
|
1121
|
+
longitude?: number;
|
|
1122
|
+
metadata?: Record<string, unknown>;
|
|
1123
|
+
subCohortId?: string;
|
|
1124
|
+
attachedLocationId?: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* Client-generated UUID for offline / multi-tab idempotent submit.
|
|
1127
|
+
*/
|
|
1128
|
+
clientSubmissionId?: string;
|
|
1129
|
+
}
|
|
1130
|
+
interface UpdateSurveyResponseRequest {
|
|
1131
|
+
answers?: CreateSurveyAnswerRequest[];
|
|
1132
|
+
latitude?: number;
|
|
1133
|
+
longitude?: number;
|
|
1134
|
+
metadata?: Record<string, unknown>;
|
|
1135
|
+
}
|
|
1136
|
+
interface CreateSurveyRequest {
|
|
1137
|
+
title: string;
|
|
1138
|
+
description?: string;
|
|
1139
|
+
status?: SurveyStatus;
|
|
1140
|
+
mode?: SurveyMode;
|
|
1141
|
+
cityId?: string;
|
|
1142
|
+
cityGroupId?: string;
|
|
1143
|
+
campaignTag?: string;
|
|
1144
|
+
questions?: CreateSurveyQuestionRequest[];
|
|
1145
|
+
cohorts?: CreateSurveyCohortRequest[];
|
|
1146
|
+
}
|
|
1147
|
+
interface UpdateSurveyRequest {
|
|
1148
|
+
title?: string;
|
|
1149
|
+
description?: string;
|
|
1150
|
+
status?: SurveyStatus;
|
|
1151
|
+
mode?: SurveyMode;
|
|
1152
|
+
cityId?: string;
|
|
1153
|
+
cityGroupId?: string;
|
|
1154
|
+
campaignTag?: string;
|
|
1155
|
+
questions?: CreateSurveyQuestionRequest[];
|
|
1156
|
+
cohorts?: UpdateSurveyCohortRequest[];
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
interface TicketValueRequest {
|
|
1160
|
+
fieldId: string;
|
|
1161
|
+
value: unknown;
|
|
1162
|
+
photoUrl?: string;
|
|
1163
|
+
}
|
|
1164
|
+
interface CreateTicketRequest {
|
|
1165
|
+
ticketFormId: string;
|
|
1166
|
+
values: TicketValueRequest[];
|
|
1167
|
+
deviceId?: string;
|
|
1168
|
+
conversationId?: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface UpdateTicketRequest {
|
|
1171
|
+
status?: TicketStatus;
|
|
1172
|
+
assignedToId?: string;
|
|
1173
|
+
values?: TicketValueRequest[];
|
|
1174
|
+
}
|
|
1175
|
+
interface CreateTicketFieldRequest {
|
|
1176
|
+
type: QuestionType;
|
|
1177
|
+
label: string;
|
|
1178
|
+
description?: string;
|
|
1179
|
+
required?: boolean;
|
|
1180
|
+
order?: number;
|
|
1181
|
+
options?: unknown;
|
|
1182
|
+
minValue?: number;
|
|
1183
|
+
maxValue?: number;
|
|
1184
|
+
}
|
|
1185
|
+
interface CreateTicketFormRequest {
|
|
1186
|
+
title: string;
|
|
1187
|
+
description?: string;
|
|
1188
|
+
status?: TicketFormStatus;
|
|
1189
|
+
isPublic?: boolean;
|
|
1190
|
+
cityId?: string;
|
|
1191
|
+
cityGroupId?: string;
|
|
1192
|
+
fields?: CreateTicketFieldRequest[];
|
|
1193
|
+
}
|
|
1194
|
+
interface UpdateTicketFormRequest {
|
|
1195
|
+
title?: string;
|
|
1196
|
+
description?: string;
|
|
1197
|
+
status?: TicketFormStatus;
|
|
1198
|
+
isPublic?: boolean;
|
|
1199
|
+
cityId?: string;
|
|
1200
|
+
cityGroupId?: string;
|
|
1201
|
+
fields?: CreateTicketFieldRequest[];
|
|
1202
|
+
}
|
|
1203
|
+
interface AssignTicketRequest {
|
|
1204
|
+
assignedToId: string;
|
|
1205
|
+
}
|
|
1206
|
+
interface UpdateTicketStatusRequest {
|
|
1207
|
+
status: TicketStatus;
|
|
1208
|
+
}
|
|
1209
|
+
interface CreateTicketFromChatRequest {
|
|
1210
|
+
conversationId: string;
|
|
1211
|
+
ticketFormId: string;
|
|
1212
|
+
values?: TicketValueRequest[];
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
interface FieldReportValueRequest {
|
|
1216
|
+
fieldId: string;
|
|
1217
|
+
value: unknown;
|
|
1218
|
+
photoUrl?: string;
|
|
1219
|
+
}
|
|
1220
|
+
interface CreateFieldReportRequest {
|
|
1221
|
+
formId: string;
|
|
1222
|
+
values: FieldReportValueRequest[];
|
|
1223
|
+
latitude?: number;
|
|
1224
|
+
longitude?: number;
|
|
1225
|
+
cityId?: string;
|
|
1226
|
+
cityGroupId?: string;
|
|
1227
|
+
}
|
|
1228
|
+
interface UpdateFieldReportRequest {
|
|
1229
|
+
status?: FieldReportStatus;
|
|
1230
|
+
assignedToId?: string | null;
|
|
1231
|
+
values?: FieldReportValueRequest[];
|
|
1232
|
+
latitude?: number;
|
|
1233
|
+
longitude?: number;
|
|
1234
|
+
}
|
|
1235
|
+
interface UpdateFieldReportStatusRequest {
|
|
1236
|
+
status: FieldReportStatus;
|
|
1237
|
+
}
|
|
1238
|
+
interface CreateFieldReportFieldRequest {
|
|
1239
|
+
type: QuestionType;
|
|
1240
|
+
label: string;
|
|
1241
|
+
description?: string;
|
|
1242
|
+
required?: boolean;
|
|
1243
|
+
order?: number;
|
|
1244
|
+
options?: unknown;
|
|
1245
|
+
minValue?: number;
|
|
1246
|
+
maxValue?: number;
|
|
1247
|
+
}
|
|
1248
|
+
interface UpdateFieldReportFieldRequest extends CreateFieldReportFieldRequest {
|
|
1249
|
+
id?: string;
|
|
1250
|
+
}
|
|
1251
|
+
interface CreateFieldReportFormRequest {
|
|
1252
|
+
title: string;
|
|
1253
|
+
description?: string;
|
|
1254
|
+
status?: FieldReportFormStatus;
|
|
1255
|
+
cityId?: string;
|
|
1256
|
+
cityGroupId?: string;
|
|
1257
|
+
fields?: CreateFieldReportFieldRequest[];
|
|
1258
|
+
}
|
|
1259
|
+
interface UpdateFieldReportFormRequest {
|
|
1260
|
+
title?: string;
|
|
1261
|
+
description?: string;
|
|
1262
|
+
status?: FieldReportFormStatus;
|
|
1263
|
+
cityId?: string;
|
|
1264
|
+
cityGroupId?: string;
|
|
1265
|
+
fields?: UpdateFieldReportFieldRequest[];
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
interface CreateCalendoEventRequest {
|
|
1269
|
+
title: string;
|
|
1270
|
+
description?: string;
|
|
1271
|
+
type?: CalendoEventType;
|
|
1272
|
+
status?: CalendoEventStatus;
|
|
1273
|
+
venue: string;
|
|
1274
|
+
startDate: string;
|
|
1275
|
+
endDate?: string;
|
|
1276
|
+
cityId?: string;
|
|
1277
|
+
cityGroupId?: string;
|
|
1278
|
+
ticketingEnabled?: boolean;
|
|
1279
|
+
capacity?: number;
|
|
1280
|
+
priceCents?: number;
|
|
1281
|
+
}
|
|
1282
|
+
interface UpdateCalendoEventRequest {
|
|
1283
|
+
title?: string;
|
|
1284
|
+
description?: string;
|
|
1285
|
+
type?: CalendoEventType;
|
|
1286
|
+
status?: CalendoEventStatus;
|
|
1287
|
+
venue?: string;
|
|
1288
|
+
startDate?: string;
|
|
1289
|
+
endDate?: string | null;
|
|
1290
|
+
cityId?: string | null;
|
|
1291
|
+
cityGroupId?: string | null;
|
|
1292
|
+
ticketingEnabled?: boolean;
|
|
1293
|
+
capacity?: number | null;
|
|
1294
|
+
priceCents?: number | null;
|
|
1295
|
+
}
|
|
1296
|
+
interface CreateCalendoTicketSaleRequest {
|
|
1297
|
+
quantity?: number;
|
|
1298
|
+
purchaserName?: string;
|
|
1299
|
+
purchaserEmail?: string;
|
|
1300
|
+
notes?: string;
|
|
1301
|
+
}
|
|
1302
|
+
interface UpdateCalendoTicketSaleRequest {
|
|
1303
|
+
status?: CalendoTicketSaleStatus;
|
|
1304
|
+
notes?: string;
|
|
1305
|
+
}
|
|
1306
|
+
interface CalendoTicketingOverview {
|
|
1307
|
+
eventsOnSale: number;
|
|
1308
|
+
totalSold: number;
|
|
1309
|
+
totalRevenueCents: number;
|
|
1310
|
+
events: Array<{
|
|
1311
|
+
id: string;
|
|
1312
|
+
title: string;
|
|
1313
|
+
venue: string;
|
|
1314
|
+
startDate: string;
|
|
1315
|
+
status: CalendoEventStatus;
|
|
1316
|
+
capacity: number | null;
|
|
1317
|
+
soldCount: number;
|
|
1318
|
+
priceCents: number | null;
|
|
1319
|
+
revenueCents: number;
|
|
1320
|
+
}>;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
interface CreateMapEventRequest {
|
|
1324
|
+
title: string;
|
|
1325
|
+
description?: string;
|
|
1326
|
+
type?: MapEventType;
|
|
1327
|
+
status?: MapEventStatus;
|
|
1328
|
+
startDate?: string;
|
|
1329
|
+
endDate?: string;
|
|
1330
|
+
centerLatitude?: number;
|
|
1331
|
+
centerLongitude?: number;
|
|
1332
|
+
defaultZoom?: number;
|
|
1333
|
+
perimeterGeoJson?: Record<string, unknown> | null;
|
|
1334
|
+
cityId?: string;
|
|
1335
|
+
cityGroupId?: string;
|
|
1336
|
+
}
|
|
1337
|
+
interface UpdateMapEventRequest {
|
|
1338
|
+
title?: string;
|
|
1339
|
+
description?: string;
|
|
1340
|
+
type?: MapEventType;
|
|
1341
|
+
status?: MapEventStatus;
|
|
1342
|
+
startDate?: string | null;
|
|
1343
|
+
endDate?: string | null;
|
|
1344
|
+
centerLatitude?: number | null;
|
|
1345
|
+
centerLongitude?: number | null;
|
|
1346
|
+
defaultZoom?: number | null;
|
|
1347
|
+
perimeterGeoJson?: Record<string, unknown> | null;
|
|
1348
|
+
cityId?: string | null;
|
|
1349
|
+
cityGroupId?: string | null;
|
|
1350
|
+
}
|
|
1351
|
+
interface CreateMapPoiRequest {
|
|
1352
|
+
name: string;
|
|
1353
|
+
description?: string;
|
|
1354
|
+
category: MapPoiCategory;
|
|
1355
|
+
status?: MapPoiStatus;
|
|
1356
|
+
latitude: number;
|
|
1357
|
+
longitude: number;
|
|
1358
|
+
openingHours?: string;
|
|
1359
|
+
tags?: string[];
|
|
1360
|
+
sortOrder?: number;
|
|
1361
|
+
dateFrom?: string;
|
|
1362
|
+
dateTo?: string;
|
|
1363
|
+
streetIds?: string[];
|
|
1364
|
+
}
|
|
1365
|
+
interface UpdateMapPoiRequest {
|
|
1366
|
+
name?: string;
|
|
1367
|
+
description?: string;
|
|
1368
|
+
category?: MapPoiCategory;
|
|
1369
|
+
status?: MapPoiStatus;
|
|
1370
|
+
latitude?: number;
|
|
1371
|
+
longitude?: number;
|
|
1372
|
+
openingHours?: string | null;
|
|
1373
|
+
tags?: string[];
|
|
1374
|
+
sortOrder?: number;
|
|
1375
|
+
dateFrom?: string | null;
|
|
1376
|
+
dateTo?: string | null;
|
|
1377
|
+
streetIds?: string[];
|
|
1378
|
+
}
|
|
1379
|
+
interface CreateMapZoneRequest {
|
|
1380
|
+
name: string;
|
|
1381
|
+
type: MapZoneType;
|
|
1382
|
+
geoJson: Record<string, unknown>;
|
|
1383
|
+
color?: string;
|
|
1384
|
+
description?: string;
|
|
1385
|
+
dateFrom?: string;
|
|
1386
|
+
dateTo?: string;
|
|
1387
|
+
streetIds?: string[];
|
|
1388
|
+
}
|
|
1389
|
+
interface UpdateMapZoneRequest {
|
|
1390
|
+
name?: string;
|
|
1391
|
+
type?: MapZoneType;
|
|
1392
|
+
geoJson?: Record<string, unknown>;
|
|
1393
|
+
color?: string;
|
|
1394
|
+
description?: string;
|
|
1395
|
+
dateFrom?: string | null;
|
|
1396
|
+
dateTo?: string | null;
|
|
1397
|
+
streetIds?: string[];
|
|
1398
|
+
}
|
|
1399
|
+
interface MapZoneSummary {
|
|
1400
|
+
id: string;
|
|
1401
|
+
mapEventId: string;
|
|
1402
|
+
name: string;
|
|
1403
|
+
type: MapZoneType;
|
|
1404
|
+
geoJson: Record<string, unknown>;
|
|
1405
|
+
color?: string | null;
|
|
1406
|
+
description?: string | null;
|
|
1407
|
+
dateFrom?: string | null;
|
|
1408
|
+
dateTo?: string | null;
|
|
1409
|
+
streets?: Array<{
|
|
1410
|
+
street: {
|
|
1411
|
+
id: string;
|
|
1412
|
+
name: string;
|
|
1413
|
+
};
|
|
1414
|
+
}>;
|
|
1415
|
+
createdAt: string;
|
|
1416
|
+
updatedAt: string;
|
|
1417
|
+
}
|
|
1418
|
+
interface MapPoiSummary {
|
|
1419
|
+
id: string;
|
|
1420
|
+
mapEventId: string;
|
|
1421
|
+
name: string;
|
|
1422
|
+
description?: string | null;
|
|
1423
|
+
category: MapPoiCategory;
|
|
1424
|
+
status: MapPoiStatus;
|
|
1425
|
+
latitude: number;
|
|
1426
|
+
longitude: number;
|
|
1427
|
+
openingHours?: string | null;
|
|
1428
|
+
tags: string[];
|
|
1429
|
+
dateFrom?: string | null;
|
|
1430
|
+
dateTo?: string | null;
|
|
1431
|
+
streets?: Array<{
|
|
1432
|
+
street: {
|
|
1433
|
+
id: string;
|
|
1434
|
+
name: string;
|
|
1435
|
+
};
|
|
1436
|
+
}>;
|
|
1437
|
+
sortOrder: number;
|
|
1438
|
+
createdAt: string;
|
|
1439
|
+
updatedAt: string;
|
|
1440
|
+
}
|
|
1441
|
+
interface MapEventSummary {
|
|
1442
|
+
id: string;
|
|
1443
|
+
title: string;
|
|
1444
|
+
description?: string | null;
|
|
1445
|
+
type: MapEventType;
|
|
1446
|
+
status: MapEventStatus;
|
|
1447
|
+
startDate?: string | null;
|
|
1448
|
+
endDate?: string | null;
|
|
1449
|
+
centerLatitude?: number | null;
|
|
1450
|
+
centerLongitude?: number | null;
|
|
1451
|
+
defaultZoom?: number | null;
|
|
1452
|
+
perimeterGeoJson?: Record<string, unknown> | null;
|
|
1453
|
+
cityId?: string | null;
|
|
1454
|
+
cityGroupId?: string | null;
|
|
1455
|
+
city?: {
|
|
1456
|
+
id: string;
|
|
1457
|
+
name: string;
|
|
1458
|
+
} | null;
|
|
1459
|
+
cityGroup?: {
|
|
1460
|
+
id: string;
|
|
1461
|
+
name: string;
|
|
1462
|
+
} | null;
|
|
1463
|
+
pois?: MapPoiSummary[];
|
|
1464
|
+
zones?: MapZoneSummary[];
|
|
1465
|
+
_count?: {
|
|
1466
|
+
pois: number;
|
|
1467
|
+
zones?: number;
|
|
1468
|
+
};
|
|
1469
|
+
createdAt: string;
|
|
1470
|
+
updatedAt: string;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
interface OperationalZoneStreetLink {
|
|
1474
|
+
street: {
|
|
1475
|
+
id: string;
|
|
1476
|
+
name: string;
|
|
1477
|
+
latitude?: number | null;
|
|
1478
|
+
longitude?: number | null;
|
|
1479
|
+
};
|
|
1480
|
+
}
|
|
1481
|
+
interface OperationalZone {
|
|
1482
|
+
id: string;
|
|
1483
|
+
name: string;
|
|
1484
|
+
type: OperationalZoneType;
|
|
1485
|
+
status: OperationalZoneStatus;
|
|
1486
|
+
geoJson: Record<string, unknown>;
|
|
1487
|
+
color?: string | null;
|
|
1488
|
+
description?: string | null;
|
|
1489
|
+
dateFrom?: string | null;
|
|
1490
|
+
dateTo?: string | null;
|
|
1491
|
+
cityId: string;
|
|
1492
|
+
city?: {
|
|
1493
|
+
id: string;
|
|
1494
|
+
name: string;
|
|
1495
|
+
};
|
|
1496
|
+
wasteCollectionPlaceId?: string | null;
|
|
1497
|
+
wasteCollectionPlace?: {
|
|
1498
|
+
id: string;
|
|
1499
|
+
name: string;
|
|
1500
|
+
reference?: string | null;
|
|
1501
|
+
} | null;
|
|
1502
|
+
wasteTypeId?: string | null;
|
|
1503
|
+
wasteType?: {
|
|
1504
|
+
id: string;
|
|
1505
|
+
name: string;
|
|
1506
|
+
color?: string | null;
|
|
1507
|
+
} | null;
|
|
1508
|
+
syncCalendarException?: boolean;
|
|
1509
|
+
collectionExceptionId?: string | null;
|
|
1510
|
+
collectionException?: {
|
|
1511
|
+
id: string;
|
|
1512
|
+
name: string;
|
|
1513
|
+
dateFrom: string;
|
|
1514
|
+
dateTo: string;
|
|
1515
|
+
} | null;
|
|
1516
|
+
streets?: OperationalZoneStreetLink[];
|
|
1517
|
+
createdAt?: string;
|
|
1518
|
+
updatedAt?: string;
|
|
1519
|
+
}
|
|
1520
|
+
interface CreateOperationalZoneRequest {
|
|
1521
|
+
name: string;
|
|
1522
|
+
type: OperationalZoneType;
|
|
1523
|
+
status?: OperationalZoneStatus;
|
|
1524
|
+
geoJson: Record<string, unknown>;
|
|
1525
|
+
color?: string;
|
|
1526
|
+
description?: string;
|
|
1527
|
+
dateFrom?: string;
|
|
1528
|
+
dateTo?: string;
|
|
1529
|
+
cityId: string;
|
|
1530
|
+
streetIds?: string[];
|
|
1531
|
+
wasteCollectionPlaceId?: string;
|
|
1532
|
+
wasteTypeId?: string;
|
|
1533
|
+
syncCalendarException?: boolean;
|
|
1534
|
+
}
|
|
1535
|
+
interface UpdateOperationalZoneRequest {
|
|
1536
|
+
name?: string;
|
|
1537
|
+
type?: OperationalZoneType;
|
|
1538
|
+
status?: OperationalZoneStatus;
|
|
1539
|
+
geoJson?: Record<string, unknown>;
|
|
1540
|
+
color?: string;
|
|
1541
|
+
description?: string;
|
|
1542
|
+
dateFrom?: string | null;
|
|
1543
|
+
dateTo?: string | null;
|
|
1544
|
+
streetIds?: string[];
|
|
1545
|
+
wasteCollectionPlaceId?: string | null;
|
|
1546
|
+
wasteTypeId?: string | null;
|
|
1547
|
+
syncCalendarException?: boolean;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
interface CreateMaintenanceTypeRequest {
|
|
1551
|
+
name: string;
|
|
1552
|
+
description?: string;
|
|
1553
|
+
downtimeHours: number;
|
|
1554
|
+
recommendedFrequency?: number;
|
|
1555
|
+
estimatedCost?: number;
|
|
1556
|
+
instructions?: string;
|
|
1557
|
+
isActive?: boolean;
|
|
1558
|
+
}
|
|
1559
|
+
interface UpdateMaintenanceTypeRequest {
|
|
1560
|
+
name?: string;
|
|
1561
|
+
description?: string;
|
|
1562
|
+
downtimeHours?: number;
|
|
1563
|
+
recommendedFrequency?: number;
|
|
1564
|
+
estimatedCost?: number;
|
|
1565
|
+
instructions?: string;
|
|
1566
|
+
isActive?: boolean;
|
|
1567
|
+
}
|
|
1568
|
+
interface MaintenanceProgramItemRequest {
|
|
1569
|
+
maintenanceTypeId: string;
|
|
1570
|
+
frequencyDays: number;
|
|
1571
|
+
order?: number;
|
|
1572
|
+
}
|
|
1573
|
+
interface CreateMaintenanceProgramRequest {
|
|
1574
|
+
name: string;
|
|
1575
|
+
description?: string;
|
|
1576
|
+
items: MaintenanceProgramItemRequest[];
|
|
1577
|
+
isActive?: boolean;
|
|
1578
|
+
}
|
|
1579
|
+
interface UpdateMaintenanceProgramRequest {
|
|
1580
|
+
name?: string;
|
|
1581
|
+
description?: string;
|
|
1582
|
+
items?: MaintenanceProgramItemRequest[];
|
|
1583
|
+
isActive?: boolean;
|
|
1584
|
+
}
|
|
1585
|
+
interface AssignProgramRequest {
|
|
1586
|
+
programId: string;
|
|
1587
|
+
startDate: string;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
interface CreateIotDeviceRequest {
|
|
1591
|
+
name: string;
|
|
1592
|
+
deviceId: string;
|
|
1593
|
+
assetId?: string;
|
|
1594
|
+
clientCert: string;
|
|
1595
|
+
clientKey: string;
|
|
1596
|
+
enabled?: boolean;
|
|
1597
|
+
}
|
|
1598
|
+
interface UpdateIotDeviceRequest {
|
|
1599
|
+
name?: string;
|
|
1600
|
+
deviceId?: string;
|
|
1601
|
+
assetId?: string;
|
|
1602
|
+
clientCert?: string;
|
|
1603
|
+
clientKey?: string;
|
|
1604
|
+
enabled?: boolean;
|
|
1605
|
+
}
|
|
1606
|
+
interface IotWebhookPayloadRequest {
|
|
1607
|
+
deviceId: string;
|
|
1608
|
+
eventType: 'position' | 'consumption' | 'alert';
|
|
1609
|
+
latitude?: number;
|
|
1610
|
+
longitude?: number;
|
|
1611
|
+
value?: number;
|
|
1612
|
+
unit?: string;
|
|
1613
|
+
periodStart?: string;
|
|
1614
|
+
periodEnd?: string;
|
|
1615
|
+
title?: string;
|
|
1616
|
+
description?: string;
|
|
1617
|
+
metadata?: Record<string, unknown>;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
interface CreateConversationRequest {
|
|
1621
|
+
deviceId: string;
|
|
1622
|
+
cityId?: string;
|
|
1623
|
+
/** Scope collectivité entière (sans picker ville). */
|
|
1624
|
+
cityGroupId?: string;
|
|
1625
|
+
}
|
|
1626
|
+
interface SetConversationLocationRequest {
|
|
1627
|
+
cityId: string;
|
|
1628
|
+
placeId?: string;
|
|
1629
|
+
}
|
|
1630
|
+
interface AssignConversationRequest {
|
|
1631
|
+
agentId: string;
|
|
1632
|
+
}
|
|
1633
|
+
interface UpdateConversationStatusRequest {
|
|
1634
|
+
status: ChatStatus;
|
|
1635
|
+
}
|
|
1636
|
+
interface SendMessageRequest {
|
|
1637
|
+
content: string;
|
|
1638
|
+
actionOptionId?: string;
|
|
1639
|
+
/** Lieu / secteur sélectionné (filtre calendrier RAG). */
|
|
1640
|
+
placeId?: string;
|
|
1641
|
+
}
|
|
1642
|
+
/** Détail matériau d’une fiche type de déchet (référentiel). */
|
|
1643
|
+
interface ChatWasteTypeDetail {
|
|
1644
|
+
id: string;
|
|
1645
|
+
material: string;
|
|
1646
|
+
description?: string | null;
|
|
1647
|
+
instructions?: string | null;
|
|
1648
|
+
imageUrl?: string | null;
|
|
1649
|
+
}
|
|
1650
|
+
/** Fiche WasteType renvoyée par le chat (même source que console / app). */
|
|
1651
|
+
interface ChatWasteTypeFiche {
|
|
1652
|
+
id: string;
|
|
1653
|
+
name: string;
|
|
1654
|
+
description?: string | null;
|
|
1655
|
+
instructions?: string | null;
|
|
1656
|
+
color?: string | null;
|
|
1657
|
+
colorLight?: string | null;
|
|
1658
|
+
icon?: string | null;
|
|
1659
|
+
imageUrl?: string | null;
|
|
1660
|
+
rules: string[];
|
|
1661
|
+
details: ChatWasteTypeDetail[];
|
|
1662
|
+
matchedMaterial?: string;
|
|
1663
|
+
}
|
|
1664
|
+
interface ChatLink {
|
|
1665
|
+
id: string;
|
|
1666
|
+
label: string;
|
|
1667
|
+
url: string;
|
|
1668
|
+
}
|
|
1669
|
+
interface ChatActionOption {
|
|
1670
|
+
id: string;
|
|
1671
|
+
label: string;
|
|
1672
|
+
nextStep?: string;
|
|
1673
|
+
}
|
|
1674
|
+
interface ChatAction {
|
|
1675
|
+
type: 'action';
|
|
1676
|
+
id: string;
|
|
1677
|
+
message: string;
|
|
1678
|
+
options: ChatActionOption[];
|
|
1679
|
+
}
|
|
1680
|
+
interface ChatTextResponse {
|
|
1681
|
+
type: 'text';
|
|
1682
|
+
content: string;
|
|
1683
|
+
links?: ChatLink[];
|
|
1684
|
+
/** Fiches types de déchets du référentiel (affichage card UI). */
|
|
1685
|
+
wasteTypes?: ChatWasteTypeFiche[];
|
|
1686
|
+
}
|
|
1687
|
+
type ChatResponse = ChatTextResponse | ChatAction;
|
|
1688
|
+
|
|
1689
|
+
interface UpsertTerritoryEconomicsRequest {
|
|
1690
|
+
cityId?: string;
|
|
1691
|
+
cityGroupId?: string;
|
|
1692
|
+
fiscalYear?: number;
|
|
1693
|
+
annualTonnageOmr: number;
|
|
1694
|
+
errorRatePercent: number;
|
|
1695
|
+
costPerBadTonne?: number;
|
|
1696
|
+
tgapEurPerTonne?: number;
|
|
1697
|
+
householdCount?: number | null;
|
|
1698
|
+
population?: number | null;
|
|
1699
|
+
wastoAnnualCostEur?: number;
|
|
1700
|
+
citeoSupportGainEur?: number;
|
|
1701
|
+
notes?: string | null;
|
|
1702
|
+
/** Si true, fige la baseline (avant) sur les valeurs courantes. */
|
|
1703
|
+
lockBaseline?: boolean;
|
|
1704
|
+
annualBilanConfirmed?: boolean;
|
|
1705
|
+
dataSource?: 'MANUAL' | 'SINOE' | 'IMPORT';
|
|
1706
|
+
}
|
|
1707
|
+
interface ImportTerritoryYearRequest {
|
|
1708
|
+
fiscalYear: number;
|
|
1709
|
+
annualTonnageOmr: number;
|
|
1710
|
+
errorRatePercent?: number;
|
|
1711
|
+
costPerBadTonne?: number;
|
|
1712
|
+
citeoSupportGainEur?: number;
|
|
1713
|
+
population?: number | null;
|
|
1714
|
+
householdCount?: number | null;
|
|
1715
|
+
notes?: string | null;
|
|
1716
|
+
}
|
|
1717
|
+
interface ImportTerritoryHistoryRequest {
|
|
1718
|
+
cityGroupId: string;
|
|
1719
|
+
years: ImportTerritoryYearRequest[];
|
|
1720
|
+
/** Si true, marque dataSource=SINOE. */
|
|
1721
|
+
fromSinoe?: boolean;
|
|
1722
|
+
}
|
|
1723
|
+
interface CreateTerritoryActionRequest {
|
|
1724
|
+
name: string;
|
|
1725
|
+
description?: string;
|
|
1726
|
+
type?: TerritoryActionType;
|
|
1727
|
+
status?: TerritoryActionStatus;
|
|
1728
|
+
zoneLabel?: string;
|
|
1729
|
+
startDate?: string;
|
|
1730
|
+
endDate?: string;
|
|
1731
|
+
budgetCapexEur?: number;
|
|
1732
|
+
budgetOpexEur?: number;
|
|
1733
|
+
expectedErrorReductionPercent?: number;
|
|
1734
|
+
measuredErrorReductionPercent?: number | null;
|
|
1735
|
+
challengeId?: string | null;
|
|
1736
|
+
surveyId?: string | null;
|
|
1737
|
+
order?: number;
|
|
1738
|
+
}
|
|
1739
|
+
interface UpdateTerritoryActionRequest extends Partial<CreateTerritoryActionRequest> {
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
interface CalendarPdfSector {
|
|
1743
|
+
id: string;
|
|
1744
|
+
name: string;
|
|
1745
|
+
label: string | null;
|
|
1746
|
+
cityId: string;
|
|
1747
|
+
cityName: string;
|
|
1748
|
+
}
|
|
1749
|
+
interface StreetSectorMatch {
|
|
1750
|
+
streetId: string;
|
|
1751
|
+
streetName: string;
|
|
1752
|
+
cityId: string;
|
|
1753
|
+
cityName: string;
|
|
1754
|
+
sectors: CalendarPdfSector[];
|
|
1755
|
+
}
|
|
1756
|
+
interface SearchStreetSectorsQuery {
|
|
1757
|
+
q: string;
|
|
1758
|
+
cityGroupId?: string;
|
|
1759
|
+
}
|
|
1760
|
+
interface SearchStreetSectorsResponse {
|
|
1761
|
+
data: StreetSectorMatch[];
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
/**
|
|
1765
|
+
* Contrats API onboarding self-serve (compte gratuit → collectivité → mode restreint → PWA light).
|
|
1766
|
+
* Routes : `POST /onboarding/bootstrap-city-group`, `POST /onboarding/request-join`,
|
|
1767
|
+
* `GET /onboarding/search-city-groups`, `GET /onboarding/search-sinoe`,
|
|
1768
|
+
* `POST /onboarding/bootstrap-pwa-light`, `POST /onboarding/sync-restricted-access`.
|
|
1769
|
+
*/
|
|
1770
|
+
/** Étapes du parcours post-inscription (console). */
|
|
1771
|
+
type OnboardingStepId = 'account' | 'collectivite' | 'restricted' | 'pwa_light' | 'done';
|
|
1772
|
+
type BootstrapCityGroupRequest = {
|
|
1773
|
+
/** Nom du groupement (ex. « CA du Pays de … »). */
|
|
1774
|
+
name: string;
|
|
1775
|
+
type?: CityGroupType;
|
|
1776
|
+
/** Code / SIREN optionnels pour dédoublonnage. */
|
|
1777
|
+
code?: string | null;
|
|
1778
|
+
siren?: string | null;
|
|
1779
|
+
/** Première commune rattachée (minimale). */
|
|
1780
|
+
city?: {
|
|
1781
|
+
name: string;
|
|
1782
|
+
country?: string;
|
|
1783
|
+
codeInsee?: string | null;
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
type BootstrapCityGroupResponse = {
|
|
1787
|
+
cityGroupId: string;
|
|
1788
|
+
cityId?: string | null;
|
|
1789
|
+
/** Apps activées (= preset free / restreint). */
|
|
1790
|
+
enabledDashboardAppSlugs: DashboardAppSlug[];
|
|
1791
|
+
/** Membership créateur : GESTIONNAIRE + authorizations. */
|
|
1792
|
+
membershipId: string;
|
|
1793
|
+
/** Prochaine étape console recommandée. */
|
|
1794
|
+
nextStep: OnboardingStepId;
|
|
1795
|
+
};
|
|
1796
|
+
type OnboardingCityGroupSearchHit = {
|
|
1797
|
+
id: string;
|
|
1798
|
+
name: string;
|
|
1799
|
+
type: CityGroupType;
|
|
1800
|
+
code?: string | null;
|
|
1801
|
+
siren?: string | null;
|
|
1802
|
+
citiesCount: number;
|
|
1803
|
+
};
|
|
1804
|
+
/**
|
|
1805
|
+
* Hit ADEME / SINOE (Data Fair flux collecte) pour le sélecteur onboarding.
|
|
1806
|
+
* `codeActeur` = `c_acteur` SINOE (pas un SIREN légal) — stocké en `CityGroup.code` au create.
|
|
1807
|
+
*/
|
|
1808
|
+
type OnboardingSinoeSearchHit = {
|
|
1809
|
+
id: string;
|
|
1810
|
+
name: string;
|
|
1811
|
+
codeActeur: string;
|
|
1812
|
+
departement?: string | null;
|
|
1813
|
+
codeDepartement?: string | null;
|
|
1814
|
+
region?: string | null;
|
|
1815
|
+
population?: number | null;
|
|
1816
|
+
year: number;
|
|
1817
|
+
typologie?: string | null;
|
|
1818
|
+
/** CityGroup Wasto déjà présent (match code/siren = codeActeur). */
|
|
1819
|
+
existingCityGroup?: OnboardingCityGroupSearchHit | null;
|
|
1820
|
+
};
|
|
1821
|
+
type RequestJoinCityGroupRequest = {
|
|
1822
|
+
cityGroupId: string;
|
|
1823
|
+
};
|
|
1824
|
+
type RequestJoinCityGroupResponse = {
|
|
1825
|
+
membershipId: string;
|
|
1826
|
+
cityGroupId: string;
|
|
1827
|
+
/** MVP : false — en attente d’acceptation par un gestionnaire. */
|
|
1828
|
+
isAccepted: boolean;
|
|
1829
|
+
nextStep: OnboardingStepId;
|
|
1830
|
+
/** TODO produit : workflow d’approbation / notification gestionnaire. */
|
|
1831
|
+
note?: string;
|
|
1832
|
+
};
|
|
1833
|
+
type PwaLightBootstrapRequest = {
|
|
1834
|
+
cityGroupId: string;
|
|
1835
|
+
/** Slug public PWA (unique). */
|
|
1836
|
+
slug: string;
|
|
1837
|
+
name?: string;
|
|
1838
|
+
/** Publier immédiatement (`pwaPublished`). Défaut true. */
|
|
1839
|
+
publish?: boolean;
|
|
1840
|
+
};
|
|
1841
|
+
type PwaLightBootstrapResponse = {
|
|
1842
|
+
cmsAppId: string;
|
|
1843
|
+
slug: string;
|
|
1844
|
+
/** Écrans light : tri + calendrier (hors carte / défis sur free). */
|
|
1845
|
+
screens: ReadonlyArray<'tri' | 'calendrier' | 'carte' | 'defis'>;
|
|
1846
|
+
previewPath: string;
|
|
1847
|
+
pwaPublished: boolean;
|
|
1848
|
+
};
|
|
1849
|
+
type SyncRestrictedAccessRequest = {
|
|
1850
|
+
cityGroupId: string;
|
|
1851
|
+
};
|
|
1852
|
+
type SyncRestrictedAccessResponse = {
|
|
1853
|
+
cityGroupId: string;
|
|
1854
|
+
enabledDashboardAppSlugs: DashboardAppSlug[];
|
|
1855
|
+
membershipAuthorizations: string[];
|
|
1856
|
+
};
|
|
1857
|
+
/** Preset appliqué au bootstrap self-serve. */
|
|
1858
|
+
declare const ONBOARDING_RESTRICTED_APP_SLUGS: readonly DashboardAppSlug[];
|
|
1859
|
+
|
|
1860
|
+
/**
|
|
1861
|
+
* Moteur ROI déchets — partagé simulateur landing / API / console.
|
|
1862
|
+
* Ordres de grandeur pédagogiques (non contractuels).
|
|
1863
|
+
*/
|
|
1864
|
+
declare const ROI_DEFAULTS: {
|
|
1865
|
+
readonly annualTonnage: 12000;
|
|
1866
|
+
readonly errorRatePercent: 25;
|
|
1867
|
+
readonly costPerBadTonne: 300;
|
|
1868
|
+
/** Habitants par foyer (proxy si householdCount absent). */
|
|
1869
|
+
readonly peoplePerHousehold: 2.2;
|
|
1870
|
+
};
|
|
1871
|
+
/** Coefficients Citeo outre-mer (barème pédagogique MVP). */
|
|
1872
|
+
declare const CITEO_DOM_MULTIPLIERS: {
|
|
1873
|
+
readonly lightPackaging: 2.3;
|
|
1874
|
+
readonly glass: 1.9;
|
|
1875
|
+
readonly paper: 4.3;
|
|
1876
|
+
readonly communication: 1.25;
|
|
1877
|
+
readonly ambassadors: 1.25;
|
|
1878
|
+
/** Facteur composite simplifié pour majorer un soutien Citeo agrégé saisi. */
|
|
1879
|
+
readonly compositeSupport: 2.3;
|
|
1880
|
+
};
|
|
1881
|
+
/** Départements / préfixes INSEE DOM-COM (métropole exclue). */
|
|
1882
|
+
declare const DOM_INSEE_PREFIXES: readonly ["971", "972", "973", "974", "976"];
|
|
1883
|
+
/**
|
|
1884
|
+
* Trajectoire TGAP enfouissement (€/t) — barème pédagogique MVP.
|
|
1885
|
+
* 2025: 65, 2026: 69, puis +4 €/an jusqu'à 85 €/t en 2030.
|
|
1886
|
+
*/
|
|
1887
|
+
declare const TGAP_LANDFILL_EUR_PER_TONNE: Readonly<Record<number, number>>;
|
|
1888
|
+
declare function currentFiscalYear(now?: Date): number;
|
|
1889
|
+
declare function getTgapEurPerTonne(fiscalYear: number): number;
|
|
1890
|
+
/**
|
|
1891
|
+
* Ajuste le coût / t mal orientée quand la TGAP change d'année.
|
|
1892
|
+
* On conserve le « reste » (traitement hors TGAP) et on y ajoute la nouvelle TGAP.
|
|
1893
|
+
*/
|
|
1894
|
+
declare function adjustCostPerBadTonneForTgap(opts: {
|
|
1895
|
+
previousCostPerBadTonne: number;
|
|
1896
|
+
previousTgapEurPerTonne: number;
|
|
1897
|
+
nextTgapEurPerTonne: number;
|
|
1898
|
+
}): number;
|
|
1899
|
+
type AnnualRoiPoint = {
|
|
1900
|
+
fiscalYear: number;
|
|
1901
|
+
tonnageOmr: number;
|
|
1902
|
+
errorRatePercent: number;
|
|
1903
|
+
costPerBadTonne: number;
|
|
1904
|
+
tgapEurPerTonne: number;
|
|
1905
|
+
/** GEC réel (snapshot / actions de l'année). */
|
|
1906
|
+
realGecEur: number;
|
|
1907
|
+
/** GEC BAU : même tonnage/erreur de référence, TGAP/coût de l'année, sans réduction d'erreur. */
|
|
1908
|
+
bauGecEur: number;
|
|
1909
|
+
cenEur: number | null;
|
|
1910
|
+
hasSnapshot: boolean;
|
|
1911
|
+
annualBilanConfirmed: boolean;
|
|
1912
|
+
};
|
|
1913
|
+
/**
|
|
1914
|
+
* Série BAU vs réel pour le graphique pluriannuel.
|
|
1915
|
+
* `reference` = première année connue (baseline historique).
|
|
1916
|
+
*/
|
|
1917
|
+
declare function buildBauVsRealSeries(opts: {
|
|
1918
|
+
fromYear: number;
|
|
1919
|
+
toYear: number;
|
|
1920
|
+
reference: {
|
|
1921
|
+
tonnageOmr: number;
|
|
1922
|
+
errorRatePercent: number;
|
|
1923
|
+
costPerBadTonne: number;
|
|
1924
|
+
tgapEurPerTonne: number;
|
|
1925
|
+
};
|
|
1926
|
+
years: Array<{
|
|
1927
|
+
fiscalYear: number;
|
|
1928
|
+
tonnageOmr: number;
|
|
1929
|
+
errorRatePercent: number;
|
|
1930
|
+
costPerBadTonne: number;
|
|
1931
|
+
tgapEurPerTonne: number;
|
|
1932
|
+
gecEur: number;
|
|
1933
|
+
cenEur: number | null;
|
|
1934
|
+
annualBilanConfirmed?: boolean;
|
|
1935
|
+
}>;
|
|
1936
|
+
}): AnnualRoiPoint[];
|
|
1937
|
+
/** Scénarios pédagogiques alignés lead magnet landing. */
|
|
1938
|
+
declare const ROI_SCENARIO_DEFS: ({
|
|
1939
|
+
id: "awareness";
|
|
1940
|
+
label: string;
|
|
1941
|
+
errorReductionFactor: number;
|
|
1942
|
+
costBase: number;
|
|
1943
|
+
costPerTonne: number;
|
|
1944
|
+
} | {
|
|
1945
|
+
id: "controls";
|
|
1946
|
+
label: string;
|
|
1947
|
+
errorReductionFactor: number;
|
|
1948
|
+
costBase: number;
|
|
1949
|
+
costPerTonne: number;
|
|
1950
|
+
} | {
|
|
1951
|
+
id: "wasto";
|
|
1952
|
+
label: string;
|
|
1953
|
+
errorReductionFactor: number;
|
|
1954
|
+
costBase: number;
|
|
1955
|
+
costPerTonne: number;
|
|
1956
|
+
})[];
|
|
1957
|
+
type ImpactConfidenceLevel = 1 | 2 | 3;
|
|
1958
|
+
type ImpactConfidence = {
|
|
1959
|
+
level: ImpactConfidenceLevel;
|
|
1960
|
+
label: string;
|
|
1961
|
+
tone: 'low' | 'medium' | 'high';
|
|
1962
|
+
message: string;
|
|
1963
|
+
/** Facteur 0–1 appliqué à la réduction d'erreur pour le calcul. */
|
|
1964
|
+
impactFactor: number;
|
|
1965
|
+
};
|
|
1966
|
+
type RoiActionInput = {
|
|
1967
|
+
budgetCapexEur: number;
|
|
1968
|
+
budgetOpexEur: number;
|
|
1969
|
+
/** Réduction relative 0–100 (ex. 12 = −12 %). */
|
|
1970
|
+
errorReductionPercent: number;
|
|
1971
|
+
status?: string;
|
|
1972
|
+
name?: string;
|
|
1973
|
+
id?: string;
|
|
1974
|
+
type?: string;
|
|
1975
|
+
};
|
|
1976
|
+
type RoiEconomicsInput = {
|
|
1977
|
+
annualTonnageOmr: number;
|
|
1978
|
+
errorRatePercent: number;
|
|
1979
|
+
costPerBadTonne: number;
|
|
1980
|
+
citeoSupportGainEur?: number;
|
|
1981
|
+
wastoAnnualCostEur?: number;
|
|
1982
|
+
/** Taux d'erreur baseline figé (sinon = errorRatePercent courant). */
|
|
1983
|
+
baselineErrorRatePercent?: number | null;
|
|
1984
|
+
baselineAnnualTonnageOmr?: number | null;
|
|
1985
|
+
/** Si true, majore les soutiens Citeo (DOM). */
|
|
1986
|
+
isDomTerritory?: boolean;
|
|
1987
|
+
fiscalYear?: number;
|
|
1988
|
+
tgapEurPerTonne?: number;
|
|
1989
|
+
/** Bilan annuel consolidé → peut monter l'ICI global à N3. */
|
|
1990
|
+
annualBilanConfirmed?: boolean;
|
|
1991
|
+
};
|
|
1992
|
+
type RoiLiveSignals = {
|
|
1993
|
+
penetrationRatePercent: number;
|
|
1994
|
+
activeDevices30d: number;
|
|
1995
|
+
validatedVisionScans: number;
|
|
1996
|
+
challengeCompletions: number;
|
|
1997
|
+
terrainResponses: number;
|
|
1998
|
+
annualBilanConfirmed?: boolean;
|
|
1999
|
+
};
|
|
2000
|
+
type RoiIndicators = {
|
|
2001
|
+
/** Gisement Économique Capturable (pertes avant). */
|
|
2002
|
+
gecEur: number;
|
|
2003
|
+
baselineBadTonnes: number;
|
|
2004
|
+
baselineErrorRatePercent: number;
|
|
2005
|
+
afterErrorRatePercent: number;
|
|
2006
|
+
/** Réduction combinée effective en points de % d'erreur (ex. 5.6). */
|
|
2007
|
+
combinedErrorReductionPoints: number;
|
|
2008
|
+
/** Réduction relative combinée (ex. 22.4 pour −22,4 %). */
|
|
2009
|
+
combinedErrorReductionPercent: number;
|
|
2010
|
+
stackingFormula: string;
|
|
2011
|
+
afterAnnualLossEur: number;
|
|
2012
|
+
afterBadTonnes: number;
|
|
2013
|
+
/** Économies brutes = pertes avant − pertes après. */
|
|
2014
|
+
grossSavingsEur: number;
|
|
2015
|
+
/** Budgets des seules actions (hors abonnement). */
|
|
2016
|
+
actionsBudgetEur: number;
|
|
2017
|
+
/** Ligne abonnement / contrat Wast-O. */
|
|
2018
|
+
wastoAnnualCostEur: number;
|
|
2019
|
+
totalActionBudgetsEur: number;
|
|
2020
|
+
citeoSupportGainEur: number;
|
|
2021
|
+
citeoSupportBaseEur: number;
|
|
2022
|
+
citeoDomMultiplier: number;
|
|
2023
|
+
isDomTerritory: boolean;
|
|
2024
|
+
/**
|
|
2025
|
+
* CEN = économies brutes + Citeo − budgets cumulés
|
|
2026
|
+
* (aligné avec le numérateur du ROI).
|
|
2027
|
+
*/
|
|
2028
|
+
cenEur: number;
|
|
2029
|
+
/** ROI = (économies + Citeo) / budgets ; null si budget 0. */
|
|
2030
|
+
roiMultiple: number | null;
|
|
2031
|
+
overallConfidence: ImpactConfidence;
|
|
2032
|
+
disclaimer: string;
|
|
2033
|
+
};
|
|
2034
|
+
declare const ROI_DISCLAIMER = "Ordres de grandeur p\u00E9dagogiques fond\u00E9s sur des hypoth\u00E8ses d\u00E9claratives (tonnages, taux d\u2019erreur, budgets). Non contractuels \u2014 \u00E0 affiner avec les donn\u00E9es exploitant / SITOM / TGAP.";
|
|
2035
|
+
declare function roundEuro(n: number): number;
|
|
2036
|
+
declare function isDomInseeCode(codeInsee: string | null | undefined): boolean;
|
|
2037
|
+
declare function detectDomTerritory(opts: {
|
|
2038
|
+
cityInseeCodes?: Array<string | null | undefined>;
|
|
2039
|
+
cityGroupCode?: string | null;
|
|
2040
|
+
cityGroupName?: string | null;
|
|
2041
|
+
}): boolean;
|
|
2042
|
+
declare function applyCiteoDomMultiplier(baseCiteoEur: number, isDom: boolean): {
|
|
2043
|
+
baseEur: number;
|
|
2044
|
+
multiplier: number;
|
|
2045
|
+
effectiveEur: number;
|
|
2046
|
+
};
|
|
2047
|
+
/** GEC = tonnage × (taux erreur / 100) × €/t */
|
|
2048
|
+
declare function computeGec(annualTonnage: number, errorRatePercent: number, costPerBadTonne: number): {
|
|
2049
|
+
gecEur: number;
|
|
2050
|
+
badTonnes: number;
|
|
2051
|
+
};
|
|
2052
|
+
/**
|
|
2053
|
+
* Empilement multiplicatif des réductions relatives d'actions actives.
|
|
2054
|
+
* newRate = baseline × Π(1 − r_i/100)
|
|
2055
|
+
*/
|
|
2056
|
+
declare function applyStackedErrorReductions(baselineErrorRatePercent: number, reductionsPercent: number[]): number;
|
|
2057
|
+
declare function isActionCountedInRoi(status?: string): boolean;
|
|
2058
|
+
/**
|
|
2059
|
+
* ICI — Indice de Confiance de l'Impact.
|
|
2060
|
+
* 1 = déclaratif, 2 = proxy live, 3 = mesuré / représentatif.
|
|
2061
|
+
*/
|
|
2062
|
+
declare function computeActionImpactConfidence(action: RoiActionInput, live: RoiLiveSignals): ImpactConfidence;
|
|
2063
|
+
declare function computeOverallConfidence(actionConfidences: ImpactConfidence[], opts?: {
|
|
2064
|
+
annualBilanConfirmed?: boolean;
|
|
2065
|
+
}): ImpactConfidence;
|
|
2066
|
+
declare function computeRoiIndicators(economics: RoiEconomicsInput, actions: RoiActionInput[], live?: RoiLiveSignals): RoiIndicators;
|
|
2067
|
+
type ActionContribution = {
|
|
2068
|
+
id?: string;
|
|
2069
|
+
name?: string;
|
|
2070
|
+
type?: string;
|
|
2071
|
+
shareEur: number;
|
|
2072
|
+
budgetEur: number;
|
|
2073
|
+
confidence: ImpactConfidence;
|
|
2074
|
+
effectiveReductionPercent: number;
|
|
2075
|
+
};
|
|
2076
|
+
/** Contribution approximative au prorata de la réduction effective (après ICI). */
|
|
2077
|
+
declare function allocateSavingsByAction(grossSavingsEur: number, actions: RoiActionInput[], live?: RoiLiveSignals): ActionContribution[];
|
|
2078
|
+
declare function estimateHouseholds(householdCount: number | null | undefined, population: number | null | undefined): number;
|
|
2079
|
+
declare function computePenetrationRate(activeHouseholdsProxy: number, householdCount: number): number;
|
|
2080
|
+
/** Simulation pédagogique territoire 100k hab. (validation formules). */
|
|
2081
|
+
declare function simulateTerritory100kExample(): {
|
|
2082
|
+
population: number;
|
|
2083
|
+
households: number;
|
|
2084
|
+
economics: RoiEconomicsInput;
|
|
2085
|
+
actions: RoiActionInput[];
|
|
2086
|
+
indicators: RoiIndicators;
|
|
2087
|
+
contributions: ActionContribution[];
|
|
2088
|
+
};
|
|
2089
|
+
|
|
2090
|
+
/** Dates de référence (semaine du 2024-01-01, lundi) pour conversions TZ */
|
|
2091
|
+
declare const WEEKDAY_REF_DATES: Record<Weekday, string>;
|
|
2092
|
+
declare const WEEKDAY_LABELS_FR: Record<Weekday, string>;
|
|
2093
|
+
declare const WEEKDAY_LABELS_FR_SHORT: Record<Weekday, string>;
|
|
2094
|
+
declare const WEEKDAY_INDEX: Record<Weekday, number>;
|
|
2095
|
+
declare const PRESET_SLOTS: {
|
|
2096
|
+
readonly morning: {
|
|
2097
|
+
readonly open: "08:00";
|
|
2098
|
+
readonly close: "12:00";
|
|
2099
|
+
};
|
|
2100
|
+
readonly afternoon: {
|
|
2101
|
+
readonly open: "14:00";
|
|
2102
|
+
readonly close: "18:00";
|
|
2103
|
+
};
|
|
2104
|
+
readonly fullDay: {
|
|
2105
|
+
readonly open: "08:00";
|
|
2106
|
+
readonly close: "18:00";
|
|
2107
|
+
};
|
|
2108
|
+
};
|
|
2109
|
+
|
|
2110
|
+
declare function parseTimeMinutes(value: string): number | null;
|
|
2111
|
+
declare function formatTimeMinutes(totalMinutes: number): string;
|
|
2112
|
+
declare function formatTimeDisplay(value: string): string;
|
|
2113
|
+
declare function slotsOverlap(a: TimeSlot, b: TimeSlot): boolean;
|
|
2114
|
+
declare function sortSlots(slots: TimeSlot[]): TimeSlot[];
|
|
2115
|
+
declare function nextWeekday(day: Weekday): Weekday;
|
|
2116
|
+
declare function addDaysToIsoDate(isoDate: string, days: number): string;
|
|
2117
|
+
declare function weekdayFromUtcDate(date: Date): Weekday;
|
|
2118
|
+
declare function utcHhmmFromDate(date: Date): string;
|
|
2119
|
+
declare function refDateForWeekday(day: Weekday): string;
|
|
2120
|
+
|
|
2121
|
+
/** Offset du fuseau IANA en minutes (positif = en avance sur UTC) à un instant donné. */
|
|
2122
|
+
declare function getTimezoneOffsetMinutes(timeZone: string, at: Date): number;
|
|
2123
|
+
/** Convertit une date/heure locale (dans timeZone) en instant UTC. */
|
|
2124
|
+
declare function localDateTimeToUtc(dateIso: string, time: string, timeZone: string): Date;
|
|
2125
|
+
declare function getBrowserTimeZone(): string;
|
|
2126
|
+
declare function utcDateIso(at: Date): string;
|
|
2127
|
+
|
|
2128
|
+
declare function validateOpeningHours(input: unknown): OpeningHoursValidationResult;
|
|
2129
|
+
/** Valide des horaires saisis en heure locale (même structure, sans storage/version). */
|
|
2130
|
+
declare function validateLocalOpeningHours(input: {
|
|
2131
|
+
rules: OpeningHoursRule[];
|
|
2132
|
+
exceptions?: OpeningHoursException[];
|
|
2133
|
+
}): OpeningHoursValidationResult;
|
|
2134
|
+
declare function createEmptyOpeningHours(): OpeningHours;
|
|
2135
|
+
declare function createEmptyLocalRules(): OpeningHoursRule[];
|
|
2136
|
+
|
|
2137
|
+
type LocalOpeningHoursInput = {
|
|
2138
|
+
rules: OpeningHoursRule[];
|
|
2139
|
+
exceptions?: OpeningHoursException[];
|
|
2140
|
+
};
|
|
2141
|
+
declare function convertLocalToUtc(local: LocalOpeningHoursInput, timeZone: string): OpeningHours;
|
|
2142
|
+
declare function convertUtcToLocal(utc: OpeningHours, timeZone: string): LocalOpeningHoursInput;
|
|
2143
|
+
declare function localRulesFromRange(fromDay: Weekday, toDay: Weekday, slots: TimeSlot[], exceptDays?: Weekday[]): OpeningHoursRule;
|
|
2144
|
+
|
|
2145
|
+
/** Formate un résumé court à partir d'horaires (UTC ou locaux selon le contenu passé). */
|
|
2146
|
+
declare function formatOpeningHoursSummary(hours: OpeningHours | {
|
|
2147
|
+
rules: OpeningHoursRule[];
|
|
2148
|
+
}, timeZone?: string): string;
|
|
2149
|
+
declare function formatOpeningHoursWeekly(hours: OpeningHours, timeZone?: string): WeeklyHoursRow[];
|
|
2150
|
+
declare function formatWeeklyRow(row: WeeklyHoursRow): string;
|
|
2151
|
+
|
|
2152
|
+
type RecyclingPointHoursSource = {
|
|
2153
|
+
hours?: string | null;
|
|
2154
|
+
details?: Record<string, unknown> | null;
|
|
2155
|
+
};
|
|
2156
|
+
declare function resolveHoursMode(details?: Record<string, unknown> | null): HoursInputMode;
|
|
2157
|
+
declare function resolveOpeningHoursUtc(point: RecyclingPointHoursSource): OpeningHours | null;
|
|
2158
|
+
declare function resolveOpeningHoursLocal(point: RecyclingPointHoursSource, timeZone?: string): {
|
|
2159
|
+
rules: OpeningHours['rules'];
|
|
2160
|
+
exceptions?: OpeningHours['exceptions'];
|
|
2161
|
+
} | null;
|
|
2162
|
+
declare function resolveHoursText(point: RecyclingPointHoursSource): string | null;
|
|
2163
|
+
/** Texte d'affichage des horaires (structuré converti ou texte libre). */
|
|
2164
|
+
declare function resolveHoursDisplay(point: RecyclingPointHoursSource, timeZone?: string): string | null;
|
|
2165
|
+
declare function resolveHoursModeFromPoint(point: RecyclingPointHoursSource): HoursInputMode;
|
|
2166
|
+
|
|
2167
|
+
declare function isOpenNow(hours: OpeningHours, at?: Date): boolean;
|
|
2168
|
+
declare function openNowLabel(hours: OpeningHours, at?: Date): 'Ouvert' | 'Fermé';
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Typed shape of CmsSite.settings when type === 'APP'.
|
|
2172
|
+
* Used for splash, icon and theme configuration (Expo-compatible).
|
|
2173
|
+
*/
|
|
2174
|
+
/** Splash screen config (expo-splash-screen compatible) */
|
|
2175
|
+
interface AppSplashSettings {
|
|
2176
|
+
/** Image URL or media id */
|
|
2177
|
+
image?: string;
|
|
2178
|
+
backgroundColor?: string;
|
|
2179
|
+
imageWidth?: number;
|
|
2180
|
+
resizeMode?: 'contain' | 'cover';
|
|
2181
|
+
dark?: {
|
|
2182
|
+
backgroundColor?: string;
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
/** Adaptive icon for Android (Expo format) */
|
|
2186
|
+
interface AppAdaptiveIconSettings {
|
|
2187
|
+
foregroundImage?: string;
|
|
2188
|
+
backgroundImage?: string;
|
|
2189
|
+
monochromeImage?: string;
|
|
2190
|
+
backgroundColor?: string;
|
|
2191
|
+
}
|
|
2192
|
+
/** App icon config (Expo format, 1024x1024 main icon) */
|
|
2193
|
+
interface AppIconSettings {
|
|
2194
|
+
/** Main icon URL (1024x1024) */
|
|
2195
|
+
image?: string;
|
|
2196
|
+
adaptiveIcon?: AppAdaptiveIconSettings;
|
|
2197
|
+
}
|
|
2198
|
+
/** Gradient definition */
|
|
2199
|
+
interface AppThemeGradient {
|
|
2200
|
+
from?: string;
|
|
2201
|
+
to?: string;
|
|
2202
|
+
stops?: string[];
|
|
2203
|
+
}
|
|
2204
|
+
/** Style template: colors, gradient, border radius */
|
|
2205
|
+
interface AppThemeSettings {
|
|
2206
|
+
primary?: string;
|
|
2207
|
+
/** Text / icons on `primary` background */
|
|
2208
|
+
onPrimary?: string;
|
|
2209
|
+
secondary?: string;
|
|
2210
|
+
tertiary?: string;
|
|
2211
|
+
gradient?: AppThemeGradient;
|
|
2212
|
+
success?: string;
|
|
2213
|
+
error?: string;
|
|
2214
|
+
dark?: string;
|
|
2215
|
+
grey?: string;
|
|
2216
|
+
/** e.g. "none" | "sm" | "md" | "lg" or number in px */
|
|
2217
|
+
borderRadius?: string | number;
|
|
2218
|
+
}
|
|
2219
|
+
/** Tab item for app navigation (expo-router Tabs) */
|
|
2220
|
+
interface AppTabConfig {
|
|
2221
|
+
id: string;
|
|
2222
|
+
title: string;
|
|
2223
|
+
/** Icon name (e.g. lucide: Home, MapPin, Calendar, Info) */
|
|
2224
|
+
icon?: string;
|
|
2225
|
+
screenId: string;
|
|
2226
|
+
route: string;
|
|
2227
|
+
}
|
|
2228
|
+
/** Stack screen for app navigation (expo-router Stack, outside tabs) */
|
|
2229
|
+
interface AppStackScreenConfig {
|
|
2230
|
+
id: string;
|
|
2231
|
+
screenId: string;
|
|
2232
|
+
route: string;
|
|
2233
|
+
options?: Record<string, unknown>;
|
|
2234
|
+
}
|
|
2235
|
+
/** Layout config: tabs + stack screens, consumed by clone script to generate _layout.tsx */
|
|
2236
|
+
interface AppLayoutsConfig {
|
|
2237
|
+
tabs?: AppTabConfig[];
|
|
2238
|
+
stackScreens?: AppStackScreenConfig[];
|
|
2239
|
+
/** Route or id of the initial tab (default first tab) */
|
|
2240
|
+
initialTab?: string;
|
|
2241
|
+
}
|
|
2242
|
+
/** Full app settings stored in CmsSite.settings when type === 'APP' */
|
|
2243
|
+
interface AppSettings {
|
|
2244
|
+
/** If set, app uses this URL for API client instead of env */
|
|
2245
|
+
apiBaseUrl?: string;
|
|
2246
|
+
splash?: AppSplashSettings;
|
|
2247
|
+
icon?: AppIconSettings;
|
|
2248
|
+
theme?: AppThemeSettings;
|
|
2249
|
+
/** Tabs and stack screens; used by clone script to generate layout files */
|
|
2250
|
+
layouts?: AppLayoutsConfig;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
interface WastoClientConfig {
|
|
2254
|
+
baseUrl: string;
|
|
2255
|
+
getToken?: () => string | null;
|
|
2256
|
+
/** Headers added to every request (e.g. X-Wasto-Client). */
|
|
2257
|
+
defaultHeaders?: Record<string, string>;
|
|
2258
|
+
/**
|
|
2259
|
+
* Optional hook when a request fails (HTTP error or network).
|
|
2260
|
+
* Called before the error is rethrown. Host apps (e.g. via cms-components)
|
|
2261
|
+
* wire Sentry here — wasto-sdk stays vendor-agnostic.
|
|
2262
|
+
*/
|
|
2263
|
+
onRequestError?: (error: Error, context: WastoRequestErrorContext) => void;
|
|
2264
|
+
}
|
|
2265
|
+
type WastoRequestErrorContext = {
|
|
2266
|
+
method: string;
|
|
2267
|
+
url: string;
|
|
2268
|
+
path: string;
|
|
2269
|
+
status?: number;
|
|
2270
|
+
};
|
|
2271
|
+
declare class WastoApiError extends Error {
|
|
2272
|
+
status: number;
|
|
2273
|
+
body?: unknown | undefined;
|
|
2274
|
+
constructor(message: string, status: number, body?: unknown | undefined);
|
|
2275
|
+
}
|
|
2276
|
+
declare function createWastoClient(config: WastoClientConfig): {
|
|
2277
|
+
request: <T>(path: string, options?: RequestInit) => Promise<T>;
|
|
2278
|
+
auth: {
|
|
2279
|
+
login: (email: string, password: string) => Promise<{
|
|
2280
|
+
access_token: string;
|
|
2281
|
+
user?: unknown;
|
|
2282
|
+
} | {
|
|
2283
|
+
requiresTwoFactor: true;
|
|
2284
|
+
pendingToken: string;
|
|
2285
|
+
}>;
|
|
2286
|
+
register: (data: {
|
|
2287
|
+
email: string;
|
|
2288
|
+
password: string;
|
|
2289
|
+
firstName?: string;
|
|
2290
|
+
lastName?: string;
|
|
2291
|
+
}) => Promise<{
|
|
2292
|
+
access_token?: string;
|
|
2293
|
+
user?: unknown;
|
|
2294
|
+
}>;
|
|
2295
|
+
forgotPassword: (email: string) => Promise<{
|
|
2296
|
+
ok: boolean;
|
|
2297
|
+
}>;
|
|
2298
|
+
resetPassword: (token: string, password: string) => Promise<{
|
|
2299
|
+
ok: boolean;
|
|
2300
|
+
}>;
|
|
2301
|
+
acceptInvite: (data: {
|
|
2302
|
+
token: string;
|
|
2303
|
+
password: string;
|
|
2304
|
+
firstName?: string;
|
|
2305
|
+
lastName?: string;
|
|
2306
|
+
}) => Promise<{
|
|
2307
|
+
access_token: string;
|
|
2308
|
+
user?: unknown;
|
|
2309
|
+
}>;
|
|
2310
|
+
verify2fa: (pendingToken: string, code: string) => Promise<{
|
|
2311
|
+
access_token: string;
|
|
2312
|
+
user?: unknown;
|
|
2313
|
+
}>;
|
|
2314
|
+
};
|
|
2315
|
+
users: {
|
|
2316
|
+
findAll: (params?: {
|
|
2317
|
+
page?: number;
|
|
2318
|
+
pageSize?: number;
|
|
2319
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2320
|
+
getById: (id: string) => Promise<unknown>;
|
|
2321
|
+
getMe: () => Promise<unknown>;
|
|
2322
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2323
|
+
invite: (data: unknown) => Promise<unknown>;
|
|
2324
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2325
|
+
updateMe: (data: unknown) => Promise<unknown>;
|
|
2326
|
+
remove: (id: string) => Promise<void>;
|
|
2327
|
+
};
|
|
2328
|
+
assets: {
|
|
2329
|
+
findAll: (params?: {
|
|
2330
|
+
page?: number;
|
|
2331
|
+
pageSize?: number;
|
|
2332
|
+
cityId?: string;
|
|
2333
|
+
cityGroupId?: string;
|
|
2334
|
+
type?: string;
|
|
2335
|
+
status?: string;
|
|
2336
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2337
|
+
getMapLocations: (params?: {
|
|
2338
|
+
page?: number;
|
|
2339
|
+
pageSize?: number;
|
|
2340
|
+
cityId?: string;
|
|
2341
|
+
cityGroupId?: string;
|
|
2342
|
+
type?: string;
|
|
2343
|
+
status?: string;
|
|
2344
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2345
|
+
getById: (id: string) => Promise<unknown>;
|
|
2346
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2347
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2348
|
+
remove: (id: string) => Promise<void>;
|
|
2349
|
+
};
|
|
2350
|
+
cities: {
|
|
2351
|
+
findAll: (params?: {
|
|
2352
|
+
page?: number;
|
|
2353
|
+
pageSize?: number;
|
|
2354
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2355
|
+
getById: (id: string) => Promise<unknown>;
|
|
2356
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2357
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2358
|
+
remove: (id: string) => Promise<void>;
|
|
2359
|
+
wasteTypes: (cityId: string) => {
|
|
2360
|
+
/** @deprecated Préférez cityGroups.wasteTypes pour la gestion du catalogue. */
|
|
2361
|
+
list: (params?: {
|
|
2362
|
+
page?: number;
|
|
2363
|
+
pageSize?: number;
|
|
2364
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2365
|
+
/** @deprecated Préférez cityGroups.wasteTypes.create */
|
|
2366
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2367
|
+
getById: (id: string) => Promise<unknown>;
|
|
2368
|
+
/** @deprecated Préférez cityGroups.wasteTypes.update */
|
|
2369
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2370
|
+
/** @deprecated Délie la ville ; préférez cityGroups.wasteTypes.unlinkCity ou remove */
|
|
2371
|
+
remove: (id: string) => Promise<void>;
|
|
2372
|
+
};
|
|
2373
|
+
wasteCollectionPlaces: (cityId: string) => {
|
|
2374
|
+
list: (params?: {
|
|
2375
|
+
page?: number;
|
|
2376
|
+
pageSize?: number;
|
|
2377
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2378
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2379
|
+
getById: (id: string) => Promise<unknown>;
|
|
2380
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2381
|
+
remove: (id: string) => Promise<void>;
|
|
2382
|
+
};
|
|
2383
|
+
quizQuestions: (cityId: string) => {
|
|
2384
|
+
list: (params?: {
|
|
2385
|
+
page?: number;
|
|
2386
|
+
pageSize?: number;
|
|
2387
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2388
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2389
|
+
getById: (id: string) => Promise<unknown>;
|
|
2390
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2391
|
+
remove: (id: string) => Promise<void>;
|
|
2392
|
+
};
|
|
2393
|
+
recyclingPoints: (cityId: string) => {
|
|
2394
|
+
list: (params?: {
|
|
2395
|
+
page?: number;
|
|
2396
|
+
pageSize?: number;
|
|
2397
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2398
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2399
|
+
getById: (id: string) => Promise<unknown>;
|
|
2400
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2401
|
+
remove: (id: string) => Promise<void>;
|
|
2402
|
+
};
|
|
2403
|
+
};
|
|
2404
|
+
wasteTypeDetails: (wasteTypeId: string) => {
|
|
2405
|
+
list: (params?: {
|
|
2406
|
+
page?: number;
|
|
2407
|
+
pageSize?: number;
|
|
2408
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2409
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2410
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2411
|
+
remove: (id: string) => Promise<void>;
|
|
2412
|
+
};
|
|
2413
|
+
cityGroups: {
|
|
2414
|
+
findAll: (params?: {
|
|
2415
|
+
page?: number;
|
|
2416
|
+
pageSize?: number;
|
|
2417
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2418
|
+
getById: (id: string) => Promise<unknown>;
|
|
2419
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2420
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2421
|
+
remove: (id: string) => Promise<void>;
|
|
2422
|
+
wasteTypes: (cityGroupId: string) => {
|
|
2423
|
+
list: (params?: {
|
|
2424
|
+
page?: number;
|
|
2425
|
+
pageSize?: number;
|
|
2426
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2427
|
+
getById: (id: string) => Promise<unknown>;
|
|
2428
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2429
|
+
update: (id: string, data: unknown) => Promise<unknown>;
|
|
2430
|
+
remove: (id: string) => Promise<void>;
|
|
2431
|
+
linkCity: (wasteTypeId: string, cityId: string) => Promise<unknown>;
|
|
2432
|
+
unlinkCity: (wasteTypeId: string, cityId: string) => Promise<void>;
|
|
2433
|
+
};
|
|
2434
|
+
};
|
|
2435
|
+
public: {
|
|
2436
|
+
cities: {
|
|
2437
|
+
findAll: (params?: {
|
|
2438
|
+
page?: number;
|
|
2439
|
+
pageSize?: number;
|
|
2440
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2441
|
+
getById: (id: string) => Promise<unknown>;
|
|
2442
|
+
getWasteTypes: (cityId: string, params?: {
|
|
2443
|
+
page?: number;
|
|
2444
|
+
pageSize?: number;
|
|
2445
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2446
|
+
getWasteCollectionPlaces: (cityId: string, params?: {
|
|
2447
|
+
page?: number;
|
|
2448
|
+
pageSize?: number;
|
|
2449
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2450
|
+
getRecyclingPoints: (cityId: string, params?: {
|
|
2451
|
+
page?: number;
|
|
2452
|
+
pageSize?: number;
|
|
2453
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2454
|
+
getChallenges: (cityId: string, params?: {
|
|
2455
|
+
page?: number;
|
|
2456
|
+
pageSize?: number;
|
|
2457
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2458
|
+
getBadges: (cityId: string, params?: {
|
|
2459
|
+
page?: number;
|
|
2460
|
+
pageSize?: number;
|
|
2461
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2462
|
+
getOperationalZones: (cityId: string, params?: {
|
|
2463
|
+
page?: number;
|
|
2464
|
+
pageSize?: number;
|
|
2465
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2466
|
+
searchStreetSectors: (cityId: string, params: SearchStreetSectorsQuery) => Promise<SearchStreetSectorsResponse>;
|
|
2467
|
+
getCalendarPdfUrl: (cityId: string, placeId: string, year?: number) => string;
|
|
2468
|
+
getCalendarPrintUrl: (cityId: string, placeId: string, year?: number, preview?: boolean) => string;
|
|
2469
|
+
};
|
|
2470
|
+
challenges: {
|
|
2471
|
+
list: (cityId?: string, params?: {
|
|
2472
|
+
page?: number;
|
|
2473
|
+
pageSize?: number;
|
|
2474
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2475
|
+
getById: (id: string) => Promise<unknown>;
|
|
2476
|
+
getSeries: (id: string) => Promise<unknown>;
|
|
2477
|
+
complete: (id: string, body: {
|
|
2478
|
+
deviceId: string;
|
|
2479
|
+
score: number;
|
|
2480
|
+
seriesId: string;
|
|
2481
|
+
}) => Promise<unknown>;
|
|
2482
|
+
getProgress: (deviceId: string) => Promise<unknown[]>;
|
|
2483
|
+
};
|
|
2484
|
+
blogPosts: {
|
|
2485
|
+
list: (cityGroupId?: string, params?: {
|
|
2486
|
+
page?: number;
|
|
2487
|
+
pageSize?: number;
|
|
2488
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2489
|
+
getById: (id: string) => Promise<unknown>;
|
|
2490
|
+
};
|
|
2491
|
+
announcements: {
|
|
2492
|
+
listForCity: (cityId: string) => Promise<{
|
|
2493
|
+
id: string;
|
|
2494
|
+
title: string;
|
|
2495
|
+
body: string;
|
|
2496
|
+
imageUrl?: string | null;
|
|
2497
|
+
sentAt?: string | null;
|
|
2498
|
+
}[]>;
|
|
2499
|
+
};
|
|
2500
|
+
cityGroups: {
|
|
2501
|
+
searchStreetSectors: (cityGroupId: string, params: {
|
|
2502
|
+
q: string;
|
|
2503
|
+
}) => Promise<SearchStreetSectorsResponse>;
|
|
2504
|
+
};
|
|
2505
|
+
tickets: {
|
|
2506
|
+
getForms: (params?: {
|
|
2507
|
+
page?: number;
|
|
2508
|
+
pageSize?: number;
|
|
2509
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2510
|
+
getForm: (id: string) => Promise<unknown>;
|
|
2511
|
+
create: (data: unknown) => Promise<unknown>;
|
|
2512
|
+
getByAccessKey: (accessKey: string) => Promise<unknown>;
|
|
2513
|
+
};
|
|
2514
|
+
chat: {
|
|
2515
|
+
getAvailability: (params: string | {
|
|
2516
|
+
cityId?: string;
|
|
2517
|
+
cityGroupId?: string;
|
|
2518
|
+
}) => Promise<{
|
|
2519
|
+
enabled: boolean;
|
|
2520
|
+
cityGroupId: string | null;
|
|
2521
|
+
reason?: string;
|
|
2522
|
+
}>;
|
|
2523
|
+
createConversation: (body: {
|
|
2524
|
+
deviceId: string;
|
|
2525
|
+
cityId?: string;
|
|
2526
|
+
cityGroupId?: string;
|
|
2527
|
+
}) => Promise<unknown>;
|
|
2528
|
+
setConversationLocation: (conversationId: string, body: {
|
|
2529
|
+
cityId: string;
|
|
2530
|
+
placeId?: string;
|
|
2531
|
+
}) => Promise<unknown>;
|
|
2532
|
+
getConversations: (deviceId: string, params?: {
|
|
2533
|
+
page?: number;
|
|
2534
|
+
pageSize?: number;
|
|
2535
|
+
}) => Promise<PaginatedResponse<unknown>>;
|
|
2536
|
+
getMessages: (conversationId: string) => Promise<unknown>;
|
|
2537
|
+
sendMessage: (conversationId: string, body: {
|
|
2538
|
+
content: string;
|
|
2539
|
+
actionOptionId?: string;
|
|
2540
|
+
placeId?: string;
|
|
2541
|
+
}) => Promise<unknown>;
|
|
2542
|
+
};
|
|
2543
|
+
devices: {
|
|
2544
|
+
registerPushToken: (deviceId: string, body: {
|
|
2545
|
+
token: string;
|
|
2546
|
+
}) => Promise<void>;
|
|
2547
|
+
};
|
|
2548
|
+
analytics: {
|
|
2549
|
+
track: (payload: unknown) => Promise<void>;
|
|
2550
|
+
delete: (deviceId: string) => Promise<void>;
|
|
2551
|
+
};
|
|
2552
|
+
cms: {
|
|
2553
|
+
getPageById: (id: string) => Promise<unknown>;
|
|
2554
|
+
getSiteBySlug: (slug: string) => Promise<unknown>;
|
|
2555
|
+
getAppBySlug: (slug: string) => Promise<unknown>;
|
|
2556
|
+
getAppMenuById: (appSlug: string, menuId: string) => Promise<unknown>;
|
|
2557
|
+
};
|
|
2558
|
+
};
|
|
2559
|
+
};
|
|
2560
|
+
type WastoClient = ReturnType<typeof createWastoClient>;
|
|
2561
|
+
|
|
2562
|
+
export { type AcceptInviteRequest, type AccessibleCityGroup, type ActionContribution, type AnnualRoiPoint, type AppAdaptiveIconSettings, type AppIconSettings, type AppLayoutsConfig, type AppSettings, type AppSplashSettings, type AppStackScreenConfig, type AppTabConfig, type AppThemeGradient, type AppThemeSettings, AssetEventType, AssetStatus, AssetType, type AssignConversationRequest, type AssignProgramRequest, type AssignTicketRequest, BookingStatus, type BootstrapCityGroupRequest, type BootstrapCityGroupResponse, CITEO_DOM_MULTIPLIERS, type CalendarPdfSector, CalendoEventStatus, CalendoEventType, CalendoTicketSaleStatus, type CalendoTicketingOverview, type CancelAssetBookingRequest, type ChatAction, type ChatActionOption, type ChatLink, ChatMessageRole, type ChatResponse, ChatStatus, type ChatTextResponse, type ChatWasteTypeDetail, type ChatWasteTypeFiche, type CityGroupDashboardAppAccessItem, type CityGroupDashboardAppsResponse, CityGroupType, CityStatus, CmsMenuLinkType, CmsSiteType, type CreateAssetBookingRequest, type CreateAssetConsumptionRecordRequest, type CreateAssetEventRequest, type CreateAssetInterventionRequest, type CreateAssetRequest, type CreateAttachedLocationRequest, type CreateBadgeRequest, type CreateBlogPostRequest, type CreateCalendoEventRequest, type CreateCalendoTicketSaleRequest, type CreateChallengeRequest, type CreateCityGroupRequest, type CreateCityRequest, type CreateCmsLayoutRequest, type CreateCmsMenuItemRequest, type CreateCmsMenuRequest, type CreateCmsPageRequest, type CreateCmsSiteRequest, type CreateConversationRequest, type CreateFieldReportFieldRequest, type CreateFieldReportFormRequest, type CreateFieldReportRequest, type CreateIotDeviceRequest, type CreateMaintenanceProgramRequest, type CreateMaintenanceTypeRequest, type CreateMapEventRequest, type CreateMapPoiRequest, type CreateMapZoneRequest, type CreateNotificationRequest, type CreateOperationalZoneRequest, type CreateProviderRequest, type CreateQuizQuestionRequest, type CreateRecipientGroupRequest, type CreateRecyclingPointRequest, type CreateSerieRequest, type CreateSurveyAnswerRequest, type CreateSurveyCohortRequest, type CreateSurveyQuestionRequest, type CreateSurveyRequest, type CreateSurveyResponseRequest, type CreateSurveySubCohortRequest, type CreateTerritoryActionRequest, type CreateTicketFieldRequest, type CreateTicketFormRequest, type CreateTicketFromChatRequest, type CreateTicketRequest, type CreateUserRequest, type CreateWasteCollectionDayRequest, type CreateWasteCollectionExceptionRequest, type CreateWasteCollectionPlaceRequest, type CreateWasteTypeDetailRequest, type CreateWasteTypeRequest, DASHBOARD_APPS, DASHBOARD_APP_BY_KEY, DASHBOARD_APP_BY_SLUG, DEFAULT_ENABLED_DASHBOARD_APP_SLUGS, DEFAULT_PAGE, DEFAULT_PAGE_SIZE, DOM_INSEE_PREFIXES, type DashboardAppDefinition, DashboardAppSlug, FREE_SELF_SERVE_DASHBOARD_APP_SLUGS, FREE_TIER_FEATURES, FREE_TIER_FEATURE_KEYS, FREE_TIER_LIMITS, FREE_TIER_RESOURCES, FieldReportFormStatus, FieldReportStatus, type FieldReportValueRequest, type ForgotPasswordRequest, type FreeTierErrorCode, type FreeTierErrorPayload, type FreeTierFeature, type FreeTierFeatureItem, type FreeTierResource, type FreeTierUsageItem, type FreeTierUsageSnapshot, type HoursInputMode, type ImpactConfidence, type ImpactConfidenceLevel, type ImportTerritoryHistoryRequest, type ImportTerritoryYearRequest, InterventionStatus, InterventionType, type InviteUserRequest, type IotWebhookPayloadRequest, type LocateWasteCollectionPlacesQuery, type LoginRequest, type LoginResponse, type LoginTwoFactorChallenge, MAX_PAGE_SIZE, type MaintenanceProgramItemRequest, MapEventStatus, type MapEventSummary, MapEventType, MapPoiCategory, MapPoiStatus, type MapPoiSummary, type MapZoneSummary, MapZoneType, NotificationDeliveryStatus, NotificationStatus, ONBOARDING_RESTRICTED_APP_SLUGS, type OnboardingCityGroupSearchHit, type OnboardingSinoeSearchHit, type OnboardingStepId, type OpeningHours, type OpeningHoursException, type OpeningHoursExceptionClosed, type OpeningHoursExceptionOpen, type OpeningHoursRule, type OpeningHoursValidationResult, type OperationalZone, OperationalZoneStatus, type OperationalZoneStreetLink, OperationalZoneType, PRESET_SLOTS, type PaginatedResponse, type PaginationMeta, type PaginationQuery, PermissionAction, PermissionResource, ProviderType, type PublicAnnouncement, type PwaLightBootstrapRequest, type PwaLightBootstrapResponse, QuestionType, type QuizAbImageChoice, type QuizAbImageOptions, type QuizExplanationDetail, type QuizMcqChoice, type QuizMcqOptions, type QuizQuestionKind, type QuizQuestionOptions, ROI_DEFAULTS, ROI_DISCLAIMER, ROI_SCENARIO_DEFS, RecipientGroupType, type RecyclingPoint, type RecyclingPointDetails, type RecyclingPointHoursSource, type RegisterRequest, type RequestJoinCityGroupRequest, type RequestJoinCityGroupResponse, type ResetPasswordRequest, ResponseStatus, type RoiActionInput, type RoiEconomicsInput, type RoiIndicators, type RoiLiveSignals, type SearchStreetSectorsQuery, type SearchStreetSectorsResponse, type SendMessageRequest, type SetCityGroupDashboardAppsRequest, type SetConversationLocationRequest, type StreetSectorMatch, SurveyMode, SurveyStatus, type SyncRestrictedAccessRequest, type SyncRestrictedAccessResponse, TGAP_LANDFILL_EUR_PER_TONNE, TerritoryActionStatus, TerritoryActionType, TicketFormStatus, TicketStatus, type TicketValueRequest, type TimeSlot, type UpdateAssetBookingRequest, type UpdateAssetInterventionRequest, type UpdateAssetRequest, type UpdateAssetStatusRequest, type UpdateBlogPostRequest, type UpdateCalendoEventRequest, type UpdateCalendoTicketSaleRequest, type UpdateCityGroupRequest, type UpdateCityRequest, type UpdateCmsLayoutRequest, type UpdateCmsMenuRequest, type UpdateCmsPageRequest, type UpdateCmsSiteRequest, type UpdateConversationStatusRequest, type UpdateFieldReportFieldRequest, type UpdateFieldReportFormRequest, type UpdateFieldReportRequest, type UpdateFieldReportStatusRequest, type UpdateIotDeviceRequest, type UpdateMaintenanceProgramRequest, type UpdateMaintenanceTypeRequest, type UpdateMapEventRequest, type UpdateMapPoiRequest, type UpdateMapZoneRequest, type UpdateNotificationRequest, type UpdateOperationalZoneRequest, type UpdateProviderRequest, type UpdateRecipientGroupRequest, type UpdateSurveyCohortRequest, type UpdateSurveyQuestionRequest, type UpdateSurveyRequest, type UpdateSurveyResponseRequest, type UpdateSurveySubCohortRequest, type UpdateTerritoryActionRequest, type UpdateTicketFormRequest, type UpdateTicketRequest, type UpdateTicketStatusRequest, type UpdateUserRequest, type UpsertTerritoryEconomicsRequest, UserRole, WASTO_LANDINGS_DOMAIN, WASTO_LANDINGS_INDEX_HOST, WASTO_RESERVED_SUBDOMAINS, WASTO_SECTIONS, WASTO_SECTION_BY_KEY, WEEKDAYS, WEEKDAY_INDEX, WEEKDAY_LABELS_FR, WEEKDAY_LABELS_FR_SHORT, WEEKDAY_REF_DATES, WastoApiError, type WastoClient, type WastoClientConfig, type WastoRequestErrorContext, type WastoSectionDefinition, type Weekday, type WeeklyHoursRow, addDaysToIsoDate, adjustCostPerBadTonneForTgap, allocateSavingsByAction, applyCiteoDomMultiplier, applyStackedErrorReductions, buildBauVsRealSeries, buildPaginationMeta, computeActionImpactConfidence, computeGec, computeOverallConfidence, computePenetrationRate, computeRoiIndicators, convertLocalToUtc, convertUtcToLocal, createEmptyLocalRules, createEmptyOpeningHours, createWastoClient, currentFiscalYear, dashboardAppKeyFromLandingHost, dashboardAppKeyToSlug, dashboardAppSlugToKey, detectDomTerritory, estimateHouseholds, formatOpeningHoursSummary, formatOpeningHoursWeekly, formatTimeDisplay, formatTimeMinutes, formatWeeklyRow, getBrowserTimeZone, getFreeTierLimit, getFreeTierMediaBytesLimit, getTgapEurPerTonne, getTimezoneOffsetMinutes, isActionCountedInRoi, isDashboardAppLandingHost, isDomInseeCode, isFreeSelfServeAppAccess, isFreeTierFeatureEnabled, isOpenNow, localDateTimeToUtc, localRulesFromRange, nextWeekday, normalizeDashboardAppSlug, openNowLabel, parseTimeMinutes, refDateForWeekday, resolveDashboardAppLandingUrl, resolveEnabledDashboardAppSlugs, resolveHoursDisplay, resolveHoursMode, resolveHoursModeFromPoint, resolveHoursText, resolveOpeningHoursLocal, resolveOpeningHoursUtc, resolveWastoLandingsIndexUrl, roundEuro, simulateTerritory100kExample, slotsOverlap, sortSlots, utcDateIso, utcHhmmFromDate, validateLocalOpeningHours, validateOpeningHours, weekdayFromUtcDate };
|