@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/src/roi/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calculations'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BookingStatus } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateAssetBookingRequest {
|
|
4
|
+
assetId: string;
|
|
5
|
+
startDate: string;
|
|
6
|
+
endDate?: string;
|
|
7
|
+
notes?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UpdateAssetBookingRequest {
|
|
11
|
+
startDate?: string;
|
|
12
|
+
endDate?: string;
|
|
13
|
+
status?: BookingStatus;
|
|
14
|
+
notes?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CancelAssetBookingRequest {
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { InterventionStatus, InterventionType } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateAssetInterventionRequest {
|
|
4
|
+
assetId?: string;
|
|
5
|
+
type: InterventionType;
|
|
6
|
+
plannedStart: string;
|
|
7
|
+
plannedEnd: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
assigneeId?: string;
|
|
11
|
+
notes?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface UpdateAssetInterventionRequest {
|
|
15
|
+
assetId?: string;
|
|
16
|
+
type?: InterventionType;
|
|
17
|
+
status?: InterventionStatus;
|
|
18
|
+
plannedStart?: string;
|
|
19
|
+
plannedEnd?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
assigneeId?: string;
|
|
23
|
+
notes?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { AssetEventType, AssetStatus, AssetType } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateAssetRequest {
|
|
4
|
+
uniqueIdentifier: string;
|
|
5
|
+
type: AssetType;
|
|
6
|
+
status?: AssetStatus;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
capacity?: number;
|
|
10
|
+
dimensions?: { length?: number; width?: number; height?: number };
|
|
11
|
+
cityId?: string;
|
|
12
|
+
cityGroupId?: string;
|
|
13
|
+
locationStartDate?: string;
|
|
14
|
+
locationEndDate?: string;
|
|
15
|
+
wasteTypeIds?: string[];
|
|
16
|
+
fuelType?: string;
|
|
17
|
+
consumptionRate?: number;
|
|
18
|
+
consumptionUnit?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
ownedById?: string;
|
|
21
|
+
isBookable?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface UpdateAssetRequest {
|
|
25
|
+
uniqueIdentifier?: string;
|
|
26
|
+
type?: AssetType;
|
|
27
|
+
status?: AssetStatus;
|
|
28
|
+
name?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
capacity?: number;
|
|
31
|
+
dimensions?: { length?: number; width?: number; height?: number };
|
|
32
|
+
cityId?: string;
|
|
33
|
+
cityGroupId?: string;
|
|
34
|
+
locationStartDate?: string;
|
|
35
|
+
locationEndDate?: string;
|
|
36
|
+
wasteTypeIds?: string[];
|
|
37
|
+
fuelType?: string;
|
|
38
|
+
consumptionRate?: number;
|
|
39
|
+
consumptionUnit?: string;
|
|
40
|
+
color?: string;
|
|
41
|
+
ownedById?: string;
|
|
42
|
+
isBookable?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface CreateAssetEventRequest {
|
|
46
|
+
eventType: AssetEventType;
|
|
47
|
+
title: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
latitude?: number;
|
|
50
|
+
longitude?: number;
|
|
51
|
+
metadata?: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface UpdateAssetStatusRequest {
|
|
55
|
+
status: AssetStatus;
|
|
56
|
+
latitude?: number;
|
|
57
|
+
longitude?: number;
|
|
58
|
+
notes?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CreateAssetConsumptionRecordRequest {
|
|
62
|
+
periodStart: string;
|
|
63
|
+
periodEnd: string;
|
|
64
|
+
value: number;
|
|
65
|
+
unit: string;
|
|
66
|
+
source: 'IOT' | 'MANUAL';
|
|
67
|
+
metadata?: Record<string, unknown>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface LoginRequest {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface RegisterRequest {
|
|
7
|
+
email: string;
|
|
8
|
+
password: string;
|
|
9
|
+
firstName?: string;
|
|
10
|
+
lastName?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ForgotPasswordRequest {
|
|
14
|
+
email: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ResetPasswordRequest {
|
|
18
|
+
token: string;
|
|
19
|
+
password: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AcceptInviteRequest {
|
|
23
|
+
token: string;
|
|
24
|
+
password: string;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
lastName?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface LoginResponse {
|
|
30
|
+
access_token: string;
|
|
31
|
+
user?: unknown;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface LoginTwoFactorChallenge {
|
|
35
|
+
requiresTwoFactor: true;
|
|
36
|
+
pendingToken: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface CreateBlogPostRequest {
|
|
2
|
+
cityGroupId: string;
|
|
3
|
+
title: string;
|
|
4
|
+
content: string;
|
|
5
|
+
published?: boolean;
|
|
6
|
+
publishedAt?: string;
|
|
7
|
+
/** ID d’un média CMS (image de couverture) */
|
|
8
|
+
coverMediaId?: string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface UpdateBlogPostRequest {
|
|
12
|
+
cityGroupId?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
published?: boolean;
|
|
16
|
+
publishedAt?: string;
|
|
17
|
+
/** ID d’un média CMS (image de couverture). `null` pour retirer. */
|
|
18
|
+
coverMediaId?: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface CalendarPdfSector {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
label: string | null;
|
|
5
|
+
cityId: string;
|
|
6
|
+
cityName: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface StreetSectorMatch {
|
|
10
|
+
streetId: string;
|
|
11
|
+
streetName: string;
|
|
12
|
+
cityId: string;
|
|
13
|
+
cityName: string;
|
|
14
|
+
sectors: CalendarPdfSector[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SearchStreetSectorsQuery {
|
|
18
|
+
q: string;
|
|
19
|
+
cityGroupId?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface SearchStreetSectorsResponse {
|
|
23
|
+
data: StreetSectorMatch[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CalendoEventStatus,
|
|
3
|
+
CalendoEventType,
|
|
4
|
+
CalendoTicketSaleStatus,
|
|
5
|
+
} from '../enums';
|
|
6
|
+
|
|
7
|
+
export interface CreateCalendoEventRequest {
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
type?: CalendoEventType;
|
|
11
|
+
status?: CalendoEventStatus;
|
|
12
|
+
venue: string;
|
|
13
|
+
startDate: string;
|
|
14
|
+
endDate?: string;
|
|
15
|
+
cityId?: string;
|
|
16
|
+
cityGroupId?: string;
|
|
17
|
+
ticketingEnabled?: boolean;
|
|
18
|
+
capacity?: number;
|
|
19
|
+
priceCents?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface UpdateCalendoEventRequest {
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
type?: CalendoEventType;
|
|
26
|
+
status?: CalendoEventStatus;
|
|
27
|
+
venue?: string;
|
|
28
|
+
startDate?: string;
|
|
29
|
+
endDate?: string | null;
|
|
30
|
+
cityId?: string | null;
|
|
31
|
+
cityGroupId?: string | null;
|
|
32
|
+
ticketingEnabled?: boolean;
|
|
33
|
+
capacity?: number | null;
|
|
34
|
+
priceCents?: number | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface CreateCalendoTicketSaleRequest {
|
|
38
|
+
quantity?: number;
|
|
39
|
+
purchaserName?: string;
|
|
40
|
+
purchaserEmail?: string;
|
|
41
|
+
notes?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface UpdateCalendoTicketSaleRequest {
|
|
45
|
+
status?: CalendoTicketSaleStatus;
|
|
46
|
+
notes?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CalendoTicketingOverview {
|
|
50
|
+
eventsOnSale: number;
|
|
51
|
+
totalSold: number;
|
|
52
|
+
totalRevenueCents: number;
|
|
53
|
+
events: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
title: string;
|
|
56
|
+
venue: string;
|
|
57
|
+
startDate: string;
|
|
58
|
+
status: CalendoEventStatus;
|
|
59
|
+
capacity: number | null;
|
|
60
|
+
soldCount: number;
|
|
61
|
+
priceCents: number | null;
|
|
62
|
+
revenueCents: number;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface CreateChallengeRequest {
|
|
2
|
+
name: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
cityId?: string;
|
|
5
|
+
imageUrl?: string;
|
|
6
|
+
imageBase64?: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
startDate?: string;
|
|
9
|
+
endDate?: string;
|
|
10
|
+
order?: number;
|
|
11
|
+
requiredChallengeId?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface CreateSerieRequest {
|
|
15
|
+
challengeId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
imageUrl?: string;
|
|
19
|
+
imageBase64?: string;
|
|
20
|
+
order?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CreateBadgeRequest {
|
|
24
|
+
challengeId: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
imageUrl?: string;
|
|
28
|
+
imageBase64?: string;
|
|
29
|
+
icon?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { ChatStatus } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateConversationRequest {
|
|
4
|
+
deviceId: string;
|
|
5
|
+
cityId?: string;
|
|
6
|
+
/** Scope collectivité entière (sans picker ville). */
|
|
7
|
+
cityGroupId?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface SetConversationLocationRequest {
|
|
11
|
+
cityId: string;
|
|
12
|
+
placeId?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AssignConversationRequest {
|
|
16
|
+
agentId: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UpdateConversationStatusRequest {
|
|
20
|
+
status: ChatStatus;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SendMessageRequest {
|
|
24
|
+
content: string;
|
|
25
|
+
actionOptionId?: string;
|
|
26
|
+
/** Lieu / secteur sélectionné (filtre calendrier RAG). */
|
|
27
|
+
placeId?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Détail matériau d’une fiche type de déchet (référentiel). */
|
|
31
|
+
export interface ChatWasteTypeDetail {
|
|
32
|
+
id: string;
|
|
33
|
+
material: string;
|
|
34
|
+
description?: string | null;
|
|
35
|
+
instructions?: string | null;
|
|
36
|
+
imageUrl?: string | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Fiche WasteType renvoyée par le chat (même source que console / app). */
|
|
40
|
+
export interface ChatWasteTypeFiche {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string | null;
|
|
44
|
+
instructions?: string | null;
|
|
45
|
+
color?: string | null;
|
|
46
|
+
colorLight?: string | null;
|
|
47
|
+
icon?: string | null;
|
|
48
|
+
imageUrl?: string | null;
|
|
49
|
+
rules: string[];
|
|
50
|
+
details: ChatWasteTypeDetail[];
|
|
51
|
+
matchedMaterial?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ChatLink {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
url: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ChatActionOption {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
nextStep?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ChatAction {
|
|
67
|
+
type: 'action';
|
|
68
|
+
id: string;
|
|
69
|
+
message: string;
|
|
70
|
+
options: ChatActionOption[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ChatTextResponse {
|
|
74
|
+
type: 'text';
|
|
75
|
+
content: string;
|
|
76
|
+
links?: ChatLink[];
|
|
77
|
+
/** Fiches types de déchets du référentiel (affichage card UI). */
|
|
78
|
+
wasteTypes?: ChatWasteTypeFiche[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type ChatResponse = ChatTextResponse | ChatAction;
|
|
82
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CityStatus } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateCityRequest {
|
|
4
|
+
name: string;
|
|
5
|
+
country: string;
|
|
6
|
+
population?: number;
|
|
7
|
+
status?: CityStatus;
|
|
8
|
+
outOfTheBins?: string;
|
|
9
|
+
presentationOfBins?: string;
|
|
10
|
+
returnOfBins?: string;
|
|
11
|
+
respectOfCalendar?: string;
|
|
12
|
+
holidays?: string;
|
|
13
|
+
logoMediaId?: string | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface UpdateCityRequest {
|
|
17
|
+
name?: string;
|
|
18
|
+
country?: string;
|
|
19
|
+
population?: number;
|
|
20
|
+
status?: CityStatus;
|
|
21
|
+
outOfTheBins?: string;
|
|
22
|
+
presentationOfBins?: string;
|
|
23
|
+
returnOfBins?: string;
|
|
24
|
+
respectOfCalendar?: string;
|
|
25
|
+
holidays?: string;
|
|
26
|
+
logoMediaId?: string | null;
|
|
27
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { CityGroupType } from '../enums';
|
|
2
|
+
import type { DashboardAppSlug } from '../dashboard-apps';
|
|
3
|
+
|
|
4
|
+
export interface CreateCityGroupRequest {
|
|
5
|
+
name: string;
|
|
6
|
+
type: CityGroupType;
|
|
7
|
+
code?: string;
|
|
8
|
+
siren?: string;
|
|
9
|
+
cityIds?: string[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface UpdateCityGroupRequest {
|
|
13
|
+
name?: string;
|
|
14
|
+
type?: CityGroupType;
|
|
15
|
+
code?: string;
|
|
16
|
+
siren?: string;
|
|
17
|
+
cityIds?: string[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CityGroupDashboardAppAccessItem {
|
|
21
|
+
slug: DashboardAppSlug;
|
|
22
|
+
key: string;
|
|
23
|
+
label: string;
|
|
24
|
+
dashboardPath: string;
|
|
25
|
+
isDevOnly?: boolean;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CityGroupDashboardAppsResponse {
|
|
30
|
+
cityGroupId: string;
|
|
31
|
+
apps: CityGroupDashboardAppAccessItem[];
|
|
32
|
+
/** Slugs activés (clés Prisma) — vide si configuration explicite absente côté API */
|
|
33
|
+
enabledSlugs: DashboardAppSlug[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface SetCityGroupDashboardAppsRequest {
|
|
37
|
+
enabledSlugs: DashboardAppSlug[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface AccessibleCityGroup {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
type: CityGroupType;
|
|
44
|
+
code?: string | null;
|
|
45
|
+
enabledDashboardAppSlugs?: DashboardAppSlug[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { CmsMenuLinkType, CmsSiteType } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateCmsSiteRequest {
|
|
4
|
+
name: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
type?: CmsSiteType;
|
|
7
|
+
domain?: string;
|
|
8
|
+
cityGroupId?: string;
|
|
9
|
+
settings?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface UpdateCmsSiteRequest {
|
|
13
|
+
name?: string;
|
|
14
|
+
slug?: string;
|
|
15
|
+
type?: CmsSiteType;
|
|
16
|
+
domain?: string;
|
|
17
|
+
cityGroupId?: string;
|
|
18
|
+
settings?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CreateCmsPageRequest {
|
|
22
|
+
siteId: string;
|
|
23
|
+
title: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
path: string;
|
|
26
|
+
content: Record<string, unknown>;
|
|
27
|
+
published?: boolean;
|
|
28
|
+
publishedAt?: string;
|
|
29
|
+
seoMetadata?: Record<string, unknown>;
|
|
30
|
+
layoutId?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface UpdateCmsPageRequest {
|
|
34
|
+
siteId?: string;
|
|
35
|
+
title?: string;
|
|
36
|
+
slug?: string;
|
|
37
|
+
path?: string;
|
|
38
|
+
content?: Record<string, unknown>;
|
|
39
|
+
published?: boolean;
|
|
40
|
+
publishedAt?: string;
|
|
41
|
+
seoMetadata?: Record<string, unknown>;
|
|
42
|
+
layoutId?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface CreateCmsLayoutRequest {
|
|
46
|
+
siteId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
type: CmsSiteType;
|
|
50
|
+
structure: Record<string, unknown>;
|
|
51
|
+
isDefault?: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface UpdateCmsLayoutRequest {
|
|
55
|
+
siteId?: string;
|
|
56
|
+
name?: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
type?: CmsSiteType;
|
|
59
|
+
structure?: Record<string, unknown>;
|
|
60
|
+
isDefault?: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface CreateCmsMenuItemRequest {
|
|
64
|
+
label: string;
|
|
65
|
+
icon?: string;
|
|
66
|
+
order: number;
|
|
67
|
+
linkType: CmsMenuLinkType;
|
|
68
|
+
pageId?: string;
|
|
69
|
+
externalUrl?: string;
|
|
70
|
+
componentId?: string;
|
|
71
|
+
parentId?: string;
|
|
72
|
+
metadata?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface CreateCmsMenuRequest {
|
|
76
|
+
siteId: string;
|
|
77
|
+
name: string;
|
|
78
|
+
location?: string;
|
|
79
|
+
items?: CreateCmsMenuItemRequest[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface UpdateCmsMenuRequest {
|
|
83
|
+
siteId?: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
location?: string;
|
|
86
|
+
items?: CreateCmsMenuItemRequest[];
|
|
87
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
FieldReportFormStatus,
|
|
3
|
+
FieldReportStatus,
|
|
4
|
+
QuestionType,
|
|
5
|
+
} from '../enums';
|
|
6
|
+
|
|
7
|
+
export interface FieldReportValueRequest {
|
|
8
|
+
fieldId: string;
|
|
9
|
+
value: unknown;
|
|
10
|
+
photoUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CreateFieldReportRequest {
|
|
14
|
+
formId: string;
|
|
15
|
+
values: FieldReportValueRequest[];
|
|
16
|
+
latitude?: number;
|
|
17
|
+
longitude?: number;
|
|
18
|
+
cityId?: string;
|
|
19
|
+
cityGroupId?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface UpdateFieldReportRequest {
|
|
23
|
+
status?: FieldReportStatus;
|
|
24
|
+
assignedToId?: string | null;
|
|
25
|
+
values?: FieldReportValueRequest[];
|
|
26
|
+
latitude?: number;
|
|
27
|
+
longitude?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface UpdateFieldReportStatusRequest {
|
|
31
|
+
status: FieldReportStatus;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CreateFieldReportFieldRequest {
|
|
35
|
+
type: QuestionType;
|
|
36
|
+
label: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
required?: boolean;
|
|
39
|
+
order?: number;
|
|
40
|
+
options?: unknown;
|
|
41
|
+
minValue?: number;
|
|
42
|
+
maxValue?: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface UpdateFieldReportFieldRequest
|
|
46
|
+
extends CreateFieldReportFieldRequest {
|
|
47
|
+
id?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface CreateFieldReportFormRequest {
|
|
51
|
+
title: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
status?: FieldReportFormStatus;
|
|
54
|
+
cityId?: string;
|
|
55
|
+
cityGroupId?: string;
|
|
56
|
+
fields?: CreateFieldReportFieldRequest[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UpdateFieldReportFormRequest {
|
|
60
|
+
title?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
status?: FieldReportFormStatus;
|
|
63
|
+
cityId?: string;
|
|
64
|
+
cityGroupId?: string;
|
|
65
|
+
fields?: UpdateFieldReportFieldRequest[];
|
|
66
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Ressources soumises à un quota numérique en offre gratuite. */
|
|
2
|
+
export type FreeTierResource =
|
|
3
|
+
| 'cmsApps'
|
|
4
|
+
| 'cmsPages'
|
|
5
|
+
| 'blogPosts'
|
|
6
|
+
| 'cmsMedia'
|
|
7
|
+
| 'wasteTypes'
|
|
8
|
+
| 'collectionPlaces'
|
|
9
|
+
| 'printCalendarTemplates';
|
|
10
|
+
|
|
11
|
+
/** Fonctionnalités désactivées en offre gratuite (feature gate). */
|
|
12
|
+
export type FreeTierFeature =
|
|
13
|
+
| 'challenges'
|
|
14
|
+
| 'roi'
|
|
15
|
+
| 'notifications'
|
|
16
|
+
| 'recyclingPoints'
|
|
17
|
+
| 'assets'
|
|
18
|
+
| 'nativeStorePublication'
|
|
19
|
+
| 'inviteMembers';
|
|
20
|
+
|
|
21
|
+
export type FreeTierErrorCode = 'FREE_TIER_LIMIT' | 'FREE_TIER_FEATURE';
|
|
22
|
+
|
|
23
|
+
export type FreeTierUsageItem = {
|
|
24
|
+
resource: FreeTierResource;
|
|
25
|
+
used: number;
|
|
26
|
+
/** `null` = illimité (compte payant). */
|
|
27
|
+
limit: number | null;
|
|
28
|
+
canCreate: boolean;
|
|
29
|
+
/** Octets utilisés (cmsMedia uniquement). */
|
|
30
|
+
usedBytes?: number;
|
|
31
|
+
/** Limite en octets (cmsMedia uniquement). */
|
|
32
|
+
limitBytes?: number | null;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type FreeTierFeatureItem = {
|
|
36
|
+
feature: FreeTierFeature;
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type FreeTierUsageSnapshot = {
|
|
41
|
+
cityGroupId: string;
|
|
42
|
+
freeTier: boolean;
|
|
43
|
+
resources: FreeTierUsageItem[];
|
|
44
|
+
features: FreeTierFeatureItem[];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type FreeTierErrorPayload = {
|
|
48
|
+
code: FreeTierErrorCode;
|
|
49
|
+
resource?: FreeTierResource;
|
|
50
|
+
feature?: FreeTierFeature;
|
|
51
|
+
used?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from './pagination.types';
|
|
2
|
+
export * from './auth.types';
|
|
3
|
+
export * from './users.types';
|
|
4
|
+
export * from './cities.types';
|
|
5
|
+
export * from './city-groups.types';
|
|
6
|
+
export * from './waste-types.types';
|
|
7
|
+
export * from './waste-collection-places.types';
|
|
8
|
+
export * from './waste-collection-places-query.types';
|
|
9
|
+
export * from './recycling-points.types';
|
|
10
|
+
export * from './quiz-questions.types';
|
|
11
|
+
export * from './cms.types';
|
|
12
|
+
export * from './assets.types';
|
|
13
|
+
export * from './asset-bookings.types';
|
|
14
|
+
export * from './asset-interventions.types';
|
|
15
|
+
export * from './challenges.types';
|
|
16
|
+
export * from './blog-posts.types';
|
|
17
|
+
export * from './notifications.types';
|
|
18
|
+
export * from './providers.types';
|
|
19
|
+
export * from './surveys.types';
|
|
20
|
+
export * from './tickets.types';
|
|
21
|
+
export * from './field-reports.types';
|
|
22
|
+
export * from './calendo-events.types';
|
|
23
|
+
|
|
24
|
+
export * from './mapso.types';
|
|
25
|
+
export * from './operational-zones.types';
|
|
26
|
+
export * from './maintenance.types';
|
|
27
|
+
export * from './iot.types';
|
|
28
|
+
export * from './chatbot.types';
|
|
29
|
+
export * from './roi.types';
|
|
30
|
+
export * from './calendar-pdf.types';
|
|
31
|
+
export * from './onboarding.types';
|
|
32
|
+
export * from './free-tier.types';
|