@wasto/sdk 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/index.d.mts +60 -3
  2. package/dist/index.d.ts +60 -3
  3. package/dist/index.js +79 -0
  4. package/dist/index.mjs +79 -0
  5. package/package.json +1 -1
  6. package/src/client.ts +791 -692
  7. package/src/dashboard-apps.ts +367 -350
  8. package/src/dto/cms-app-settings.ts +91 -91
  9. package/src/enums.ts +298 -298
  10. package/src/free-tier.ts +56 -56
  11. package/src/index.ts +35 -35
  12. package/src/opening-hours/constants.ts +48 -48
  13. package/src/opening-hours/convert.ts +276 -276
  14. package/src/opening-hours/format.ts +99 -99
  15. package/src/opening-hours/index.ts +9 -9
  16. package/src/opening-hours/is-open-now.ts +38 -38
  17. package/src/opening-hours/resolve.ts +71 -71
  18. package/src/opening-hours/time.ts +74 -74
  19. package/src/opening-hours/timezone.ts +34 -34
  20. package/src/opening-hours/types.ts +53 -53
  21. package/src/opening-hours/validate.ts +182 -182
  22. package/src/roi/calculations.ts +732 -732
  23. package/src/roi/index.ts +1 -1
  24. package/src/types/app-preload.types.ts +10 -0
  25. package/src/types/asset-bookings.types.ts +19 -19
  26. package/src/types/asset-interventions.types.ts +24 -24
  27. package/src/types/assets.types.ts +68 -68
  28. package/src/types/auth.types.ts +37 -37
  29. package/src/types/blog-posts.types.ts +19 -19
  30. package/src/types/calendar-pdf.types.ts +24 -24
  31. package/src/types/calendo-events.types.ts +64 -64
  32. package/src/types/challenges.types.ts +30 -30
  33. package/src/types/chatbot.types.ts +82 -82
  34. package/src/types/cities.types.ts +27 -27
  35. package/src/types/city-groups.types.ts +46 -46
  36. package/src/types/cms.types.ts +87 -87
  37. package/src/types/field-reports.types.ts +66 -66
  38. package/src/types/free-tier.types.ts +54 -54
  39. package/src/types/index.ts +33 -32
  40. package/src/types/iot.types.ts +31 -31
  41. package/src/types/maintenance.types.ts +44 -44
  42. package/src/types/mapso.types.ts +146 -146
  43. package/src/types/notifications.types.ts +68 -68
  44. package/src/types/onboarding.types.ts +117 -117
  45. package/src/types/operational-zones.types.ts +70 -70
  46. package/src/types/pagination.types.ts +33 -33
  47. package/src/types/providers.types.ts +29 -29
  48. package/src/types/quiz-questions.types.ts +59 -59
  49. package/src/types/recycling-points.types.ts +47 -47
  50. package/src/types/roi.types.ts +60 -60
  51. package/src/types/surveys.types.ts +103 -103
  52. package/src/types/tickets.types.ts +65 -65
  53. package/src/types/users.types.ts +30 -30
  54. package/src/types/waste-collection-places-query.types.ts +4 -4
  55. package/src/types/waste-collection-places.types.ts +34 -33
  56. package/src/types/waste-types.types.ts +21 -21
package/dist/index.d.mts CHANGED
@@ -273,7 +273,9 @@ declare enum DashboardAppSlug {
273
273
  MAPSO = "MAPSO",
274
274
  IAGO = "IAGO",
275
275
  PEDAGO = "PEDAGO",
276
- MARKETO = "MARKETO"
276
+ MARKETO = "MARKETO",
277
+ /** Connect'O — API agents / MCP (hors free self-serve) */
278
+ CONNECTO = "CONNECTO"
277
279
  }
278
280
  type DashboardAppDefinition = {
279
281
  slug: DashboardAppSlug;
@@ -572,7 +574,8 @@ interface CreateWasteCollectionDayRequest {
572
574
  wasteTypeId: string;
573
575
  name: string;
574
576
  description?: string;
575
- biweekly?: boolean;
577
+ /** Fréquence en semaines (1 = hebdo, 2 = toutes les 2 semaines, …). */
578
+ everyWeeks?: number;
576
579
  startDate?: string;
577
580
  }
578
581
  interface CreateWasteCollectionExceptionRequest {
@@ -1857,6 +1860,17 @@ type SyncRestrictedAccessResponse = {
1857
1860
  /** Preset appliqué au bootstrap self-serve. */
1858
1861
  declare const ONBOARDING_RESTRICTED_APP_SLUGS: readonly DashboardAppSlug[];
1859
1862
 
1863
+ /**
1864
+ * Payload agrégé pour le cold-start des apps générées (events, calendrier, tri, carte).
1865
+ * Route : `GET /public/cities/:id/app-preload`
1866
+ */
1867
+ type CityAppPreload = {
1868
+ city: unknown;
1869
+ wasteTypes: unknown[];
1870
+ wasteCollectionPlaces: unknown[];
1871
+ recyclingPoints: unknown[];
1872
+ };
1873
+
1860
1874
  /**
1861
1875
  * Moteur ROI déchets — partagé simulateur landing / API / console.
1862
1876
  * Ordres de grandeur pédagogiques (non contractuels).
@@ -2432,6 +2446,42 @@ declare function createWastoClient(config: WastoClientConfig): {
2432
2446
  unlinkCity: (wasteTypeId: string, cityId: string) => Promise<void>;
2433
2447
  };
2434
2448
  };
2449
+ surveys: {
2450
+ findAll: (params?: {
2451
+ page?: number;
2452
+ pageSize?: number;
2453
+ cityId?: string;
2454
+ cityGroupId?: string;
2455
+ status?: string;
2456
+ light?: boolean;
2457
+ }) => Promise<PaginatedResponse<unknown>>;
2458
+ getById: (id: string) => Promise<unknown>;
2459
+ getStats: (id: string) => Promise<unknown>;
2460
+ getTerrainOverview: (params?: {
2461
+ cityId?: string;
2462
+ cityGroupId?: string;
2463
+ }) => Promise<unknown>;
2464
+ };
2465
+ fieldReports: {
2466
+ findAllForms: (params?: {
2467
+ page?: number;
2468
+ pageSize?: number;
2469
+ cityId?: string;
2470
+ cityGroupId?: string;
2471
+ status?: string;
2472
+ light?: boolean;
2473
+ }) => Promise<PaginatedResponse<unknown>>;
2474
+ getForm: (id: string) => Promise<unknown>;
2475
+ findAllReports: (params?: {
2476
+ page?: number;
2477
+ pageSize?: number;
2478
+ cityId?: string;
2479
+ cityGroupId?: string;
2480
+ status?: string;
2481
+ formId?: string;
2482
+ }) => Promise<PaginatedResponse<unknown>>;
2483
+ getReport: (id: string) => Promise<unknown>;
2484
+ };
2435
2485
  public: {
2436
2486
  cities: {
2437
2487
  findAll: (params?: {
@@ -2439,6 +2489,11 @@ declare function createWastoClient(config: WastoClientConfig): {
2439
2489
  pageSize?: number;
2440
2490
  }) => Promise<PaginatedResponse<unknown>>;
2441
2491
  getById: (id: string) => Promise<unknown>;
2492
+ /**
2493
+ * Cold-start agrégé : ville + types de déchets + lieux de collecte + points carte.
2494
+ * Remplace 4 appels paginés au lancement de l’app générée.
2495
+ */
2496
+ getAppPreload: (cityId: string) => Promise<CityAppPreload>;
2442
2497
  getWasteTypes: (cityId: string, params?: {
2443
2498
  page?: number;
2444
2499
  pageSize?: number;
@@ -2543,6 +2598,8 @@ declare function createWastoClient(config: WastoClientConfig): {
2543
2598
  devices: {
2544
2599
  registerPushToken: (deviceId: string, body: {
2545
2600
  token: string;
2601
+ cityId?: string | null;
2602
+ wasteCollectionPlaceId?: string | null;
2546
2603
  }) => Promise<void>;
2547
2604
  };
2548
2605
  analytics: {
@@ -2559,4 +2616,4 @@ declare function createWastoClient(config: WastoClientConfig): {
2559
2616
  };
2560
2617
  type WastoClient = ReturnType<typeof createWastoClient>;
2561
2618
 
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 };
2619
+ 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 CityAppPreload, 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 };
package/dist/index.d.ts CHANGED
@@ -273,7 +273,9 @@ declare enum DashboardAppSlug {
273
273
  MAPSO = "MAPSO",
274
274
  IAGO = "IAGO",
275
275
  PEDAGO = "PEDAGO",
276
- MARKETO = "MARKETO"
276
+ MARKETO = "MARKETO",
277
+ /** Connect'O — API agents / MCP (hors free self-serve) */
278
+ CONNECTO = "CONNECTO"
277
279
  }
278
280
  type DashboardAppDefinition = {
279
281
  slug: DashboardAppSlug;
@@ -572,7 +574,8 @@ interface CreateWasteCollectionDayRequest {
572
574
  wasteTypeId: string;
573
575
  name: string;
574
576
  description?: string;
575
- biweekly?: boolean;
577
+ /** Fréquence en semaines (1 = hebdo, 2 = toutes les 2 semaines, …). */
578
+ everyWeeks?: number;
576
579
  startDate?: string;
577
580
  }
578
581
  interface CreateWasteCollectionExceptionRequest {
@@ -1857,6 +1860,17 @@ type SyncRestrictedAccessResponse = {
1857
1860
  /** Preset appliqué au bootstrap self-serve. */
1858
1861
  declare const ONBOARDING_RESTRICTED_APP_SLUGS: readonly DashboardAppSlug[];
1859
1862
 
1863
+ /**
1864
+ * Payload agrégé pour le cold-start des apps générées (events, calendrier, tri, carte).
1865
+ * Route : `GET /public/cities/:id/app-preload`
1866
+ */
1867
+ type CityAppPreload = {
1868
+ city: unknown;
1869
+ wasteTypes: unknown[];
1870
+ wasteCollectionPlaces: unknown[];
1871
+ recyclingPoints: unknown[];
1872
+ };
1873
+
1860
1874
  /**
1861
1875
  * Moteur ROI déchets — partagé simulateur landing / API / console.
1862
1876
  * Ordres de grandeur pédagogiques (non contractuels).
@@ -2432,6 +2446,42 @@ declare function createWastoClient(config: WastoClientConfig): {
2432
2446
  unlinkCity: (wasteTypeId: string, cityId: string) => Promise<void>;
2433
2447
  };
2434
2448
  };
2449
+ surveys: {
2450
+ findAll: (params?: {
2451
+ page?: number;
2452
+ pageSize?: number;
2453
+ cityId?: string;
2454
+ cityGroupId?: string;
2455
+ status?: string;
2456
+ light?: boolean;
2457
+ }) => Promise<PaginatedResponse<unknown>>;
2458
+ getById: (id: string) => Promise<unknown>;
2459
+ getStats: (id: string) => Promise<unknown>;
2460
+ getTerrainOverview: (params?: {
2461
+ cityId?: string;
2462
+ cityGroupId?: string;
2463
+ }) => Promise<unknown>;
2464
+ };
2465
+ fieldReports: {
2466
+ findAllForms: (params?: {
2467
+ page?: number;
2468
+ pageSize?: number;
2469
+ cityId?: string;
2470
+ cityGroupId?: string;
2471
+ status?: string;
2472
+ light?: boolean;
2473
+ }) => Promise<PaginatedResponse<unknown>>;
2474
+ getForm: (id: string) => Promise<unknown>;
2475
+ findAllReports: (params?: {
2476
+ page?: number;
2477
+ pageSize?: number;
2478
+ cityId?: string;
2479
+ cityGroupId?: string;
2480
+ status?: string;
2481
+ formId?: string;
2482
+ }) => Promise<PaginatedResponse<unknown>>;
2483
+ getReport: (id: string) => Promise<unknown>;
2484
+ };
2435
2485
  public: {
2436
2486
  cities: {
2437
2487
  findAll: (params?: {
@@ -2439,6 +2489,11 @@ declare function createWastoClient(config: WastoClientConfig): {
2439
2489
  pageSize?: number;
2440
2490
  }) => Promise<PaginatedResponse<unknown>>;
2441
2491
  getById: (id: string) => Promise<unknown>;
2492
+ /**
2493
+ * Cold-start agrégé : ville + types de déchets + lieux de collecte + points carte.
2494
+ * Remplace 4 appels paginés au lancement de l’app générée.
2495
+ */
2496
+ getAppPreload: (cityId: string) => Promise<CityAppPreload>;
2442
2497
  getWasteTypes: (cityId: string, params?: {
2443
2498
  page?: number;
2444
2499
  pageSize?: number;
@@ -2543,6 +2598,8 @@ declare function createWastoClient(config: WastoClientConfig): {
2543
2598
  devices: {
2544
2599
  registerPushToken: (deviceId: string, body: {
2545
2600
  token: string;
2601
+ cityId?: string | null;
2602
+ wasteCollectionPlaceId?: string | null;
2546
2603
  }) => Promise<void>;
2547
2604
  };
2548
2605
  analytics: {
@@ -2559,4 +2616,4 @@ declare function createWastoClient(config: WastoClientConfig): {
2559
2616
  };
2560
2617
  type WastoClient = ReturnType<typeof createWastoClient>;
2561
2618
 
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 };
2619
+ 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 CityAppPreload, 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 };
package/dist/index.js CHANGED
@@ -467,6 +467,7 @@ var DashboardAppSlug = /* @__PURE__ */ ((DashboardAppSlug2) => {
467
467
  DashboardAppSlug2["IAGO"] = "IAGO";
468
468
  DashboardAppSlug2["PEDAGO"] = "PEDAGO";
469
469
  DashboardAppSlug2["MARKETO"] = "MARKETO";
470
+ DashboardAppSlug2["CONNECTO"] = "CONNECTO";
470
471
  return DashboardAppSlug2;
471
472
  })(DashboardAppSlug || {});
472
473
  var WASTO_SECTIONS = [
@@ -541,6 +542,14 @@ var WASTO_SECTIONS = [
541
542
  label: "ASSIST'O",
542
543
  sectionLabel: "Support",
543
544
  dashboardPath: "/support"
545
+ },
546
+ {
547
+ slug: "CONNECTO" /* CONNECTO */,
548
+ key: "connecto",
549
+ label: "CONNECT'O",
550
+ sectionLabel: "API & agents",
551
+ dashboardPath: "/integrations",
552
+ isDevOnly: true
544
553
  }
545
554
  ];
546
555
  var DASHBOARD_APPS = [
@@ -612,6 +621,13 @@ var DASHBOARD_APPS = [
612
621
  label: "MARKET'O",
613
622
  dashboardPath: "/analyses",
614
623
  isDevOnly: true
624
+ },
625
+ {
626
+ slug: "CONNECTO" /* CONNECTO */,
627
+ key: "connecto",
628
+ label: "CONNECT'O",
629
+ dashboardPath: "/integrations",
630
+ isDevOnly: true
615
631
  }
616
632
  ];
617
633
  var WASTO_SECTION_BY_KEY = Object.fromEntries(
@@ -2236,6 +2252,62 @@ function createWastoClient(config) {
2236
2252
  )
2237
2253
  })
2238
2254
  },
2255
+ surveys: {
2256
+ findAll: (params) => {
2257
+ const q = new URLSearchParams();
2258
+ if (params?.page != null) q.set("page", String(params.page));
2259
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2260
+ if (params?.cityId) q.set("cityId", params.cityId);
2261
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2262
+ if (params?.status) q.set("status", params.status);
2263
+ if (params?.light) q.set("light", "1");
2264
+ const query = q.toString();
2265
+ return request(
2266
+ `/surveys${query ? `?${query}` : ""}`
2267
+ );
2268
+ },
2269
+ getById: (id) => request(`/surveys/${id}`),
2270
+ getStats: (id) => request(`/surveys/${id}/stats`),
2271
+ getTerrainOverview: (params) => {
2272
+ const q = new URLSearchParams();
2273
+ if (params?.cityId) q.set("cityId", params.cityId);
2274
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2275
+ const query = q.toString();
2276
+ return request(
2277
+ `/surveys/terrain/overview${query ? `?${query}` : ""}`
2278
+ );
2279
+ }
2280
+ },
2281
+ fieldReports: {
2282
+ findAllForms: (params) => {
2283
+ const q = new URLSearchParams();
2284
+ if (params?.page != null) q.set("page", String(params.page));
2285
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2286
+ if (params?.cityId) q.set("cityId", params.cityId);
2287
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2288
+ if (params?.status) q.set("status", params.status);
2289
+ if (params?.light) q.set("light", "1");
2290
+ const query = q.toString();
2291
+ return request(
2292
+ `/field-reports/forms${query ? `?${query}` : ""}`
2293
+ );
2294
+ },
2295
+ getForm: (id) => request(`/field-reports/forms/${id}`),
2296
+ findAllReports: (params) => {
2297
+ const q = new URLSearchParams();
2298
+ if (params?.page != null) q.set("page", String(params.page));
2299
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2300
+ if (params?.cityId) q.set("cityId", params.cityId);
2301
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2302
+ if (params?.status) q.set("status", params.status);
2303
+ if (params?.formId) q.set("formId", params.formId);
2304
+ const query = q.toString();
2305
+ return request(
2306
+ `/field-reports${query ? `?${query}` : ""}`
2307
+ );
2308
+ },
2309
+ getReport: (id) => request(`/field-reports/${id}`)
2310
+ },
2239
2311
  public: {
2240
2312
  cities: {
2241
2313
  findAll: (params) => {
@@ -2246,6 +2318,13 @@ function createWastoClient(config) {
2246
2318
  return requestPublic(`/public/cities${query ? `?${query}` : ""}`);
2247
2319
  },
2248
2320
  getById: (id) => requestPublic(`/public/cities/${id}`),
2321
+ /**
2322
+ * Cold-start agrégé : ville + types de déchets + lieux de collecte + points carte.
2323
+ * Remplace 4 appels paginés au lancement de l’app générée.
2324
+ */
2325
+ getAppPreload: (cityId) => requestPublic(
2326
+ `/public/cities/${encodeURIComponent(cityId)}/app-preload`
2327
+ ),
2249
2328
  getWasteTypes: (cityId, params) => {
2250
2329
  const q = new URLSearchParams();
2251
2330
  if (params?.page != null) q.set("page", String(params.page));
package/dist/index.mjs CHANGED
@@ -307,6 +307,7 @@ var DashboardAppSlug = /* @__PURE__ */ ((DashboardAppSlug2) => {
307
307
  DashboardAppSlug2["IAGO"] = "IAGO";
308
308
  DashboardAppSlug2["PEDAGO"] = "PEDAGO";
309
309
  DashboardAppSlug2["MARKETO"] = "MARKETO";
310
+ DashboardAppSlug2["CONNECTO"] = "CONNECTO";
310
311
  return DashboardAppSlug2;
311
312
  })(DashboardAppSlug || {});
312
313
  var WASTO_SECTIONS = [
@@ -381,6 +382,14 @@ var WASTO_SECTIONS = [
381
382
  label: "ASSIST'O",
382
383
  sectionLabel: "Support",
383
384
  dashboardPath: "/support"
385
+ },
386
+ {
387
+ slug: "CONNECTO" /* CONNECTO */,
388
+ key: "connecto",
389
+ label: "CONNECT'O",
390
+ sectionLabel: "API & agents",
391
+ dashboardPath: "/integrations",
392
+ isDevOnly: true
384
393
  }
385
394
  ];
386
395
  var DASHBOARD_APPS = [
@@ -452,6 +461,13 @@ var DASHBOARD_APPS = [
452
461
  label: "MARKET'O",
453
462
  dashboardPath: "/analyses",
454
463
  isDevOnly: true
464
+ },
465
+ {
466
+ slug: "CONNECTO" /* CONNECTO */,
467
+ key: "connecto",
468
+ label: "CONNECT'O",
469
+ dashboardPath: "/integrations",
470
+ isDevOnly: true
455
471
  }
456
472
  ];
457
473
  var WASTO_SECTION_BY_KEY = Object.fromEntries(
@@ -2076,6 +2092,62 @@ function createWastoClient(config) {
2076
2092
  )
2077
2093
  })
2078
2094
  },
2095
+ surveys: {
2096
+ findAll: (params) => {
2097
+ const q = new URLSearchParams();
2098
+ if (params?.page != null) q.set("page", String(params.page));
2099
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2100
+ if (params?.cityId) q.set("cityId", params.cityId);
2101
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2102
+ if (params?.status) q.set("status", params.status);
2103
+ if (params?.light) q.set("light", "1");
2104
+ const query = q.toString();
2105
+ return request(
2106
+ `/surveys${query ? `?${query}` : ""}`
2107
+ );
2108
+ },
2109
+ getById: (id) => request(`/surveys/${id}`),
2110
+ getStats: (id) => request(`/surveys/${id}/stats`),
2111
+ getTerrainOverview: (params) => {
2112
+ const q = new URLSearchParams();
2113
+ if (params?.cityId) q.set("cityId", params.cityId);
2114
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2115
+ const query = q.toString();
2116
+ return request(
2117
+ `/surveys/terrain/overview${query ? `?${query}` : ""}`
2118
+ );
2119
+ }
2120
+ },
2121
+ fieldReports: {
2122
+ findAllForms: (params) => {
2123
+ const q = new URLSearchParams();
2124
+ if (params?.page != null) q.set("page", String(params.page));
2125
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2126
+ if (params?.cityId) q.set("cityId", params.cityId);
2127
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2128
+ if (params?.status) q.set("status", params.status);
2129
+ if (params?.light) q.set("light", "1");
2130
+ const query = q.toString();
2131
+ return request(
2132
+ `/field-reports/forms${query ? `?${query}` : ""}`
2133
+ );
2134
+ },
2135
+ getForm: (id) => request(`/field-reports/forms/${id}`),
2136
+ findAllReports: (params) => {
2137
+ const q = new URLSearchParams();
2138
+ if (params?.page != null) q.set("page", String(params.page));
2139
+ if (params?.pageSize != null) q.set("pageSize", String(params.pageSize));
2140
+ if (params?.cityId) q.set("cityId", params.cityId);
2141
+ if (params?.cityGroupId) q.set("cityGroupId", params.cityGroupId);
2142
+ if (params?.status) q.set("status", params.status);
2143
+ if (params?.formId) q.set("formId", params.formId);
2144
+ const query = q.toString();
2145
+ return request(
2146
+ `/field-reports${query ? `?${query}` : ""}`
2147
+ );
2148
+ },
2149
+ getReport: (id) => request(`/field-reports/${id}`)
2150
+ },
2079
2151
  public: {
2080
2152
  cities: {
2081
2153
  findAll: (params) => {
@@ -2086,6 +2158,13 @@ function createWastoClient(config) {
2086
2158
  return requestPublic(`/public/cities${query ? `?${query}` : ""}`);
2087
2159
  },
2088
2160
  getById: (id) => requestPublic(`/public/cities/${id}`),
2161
+ /**
2162
+ * Cold-start agrégé : ville + types de déchets + lieux de collecte + points carte.
2163
+ * Remplace 4 appels paginés au lancement de l’app générée.
2164
+ */
2165
+ getAppPreload: (cityId) => requestPublic(
2166
+ `/public/cities/${encodeURIComponent(cityId)}/app-preload`
2167
+ ),
2089
2168
  getWasteTypes: (cityId, params) => {
2090
2169
  const q = new URLSearchParams();
2091
2170
  if (params?.page != null) q.set("page", String(params.page));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wasto/sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "DTOs, types and HTTP client for Wasto API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",