@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.
- package/dist/index.d.mts +60 -3
- package/dist/index.d.ts +60 -3
- package/dist/index.js +79 -0
- package/dist/index.mjs +79 -0
- package/package.json +1 -1
- package/src/client.ts +791 -692
- package/src/dashboard-apps.ts +367 -350
- package/src/dto/cms-app-settings.ts +91 -91
- package/src/enums.ts +298 -298
- package/src/free-tier.ts +56 -56
- package/src/index.ts +35 -35
- package/src/opening-hours/constants.ts +48 -48
- package/src/opening-hours/convert.ts +276 -276
- package/src/opening-hours/format.ts +99 -99
- package/src/opening-hours/index.ts +9 -9
- package/src/opening-hours/is-open-now.ts +38 -38
- package/src/opening-hours/resolve.ts +71 -71
- package/src/opening-hours/time.ts +74 -74
- package/src/opening-hours/timezone.ts +34 -34
- package/src/opening-hours/types.ts +53 -53
- package/src/opening-hours/validate.ts +182 -182
- package/src/roi/calculations.ts +732 -732
- package/src/roi/index.ts +1 -1
- package/src/types/app-preload.types.ts +10 -0
- package/src/types/asset-bookings.types.ts +19 -19
- package/src/types/asset-interventions.types.ts +24 -24
- package/src/types/assets.types.ts +68 -68
- package/src/types/auth.types.ts +37 -37
- package/src/types/blog-posts.types.ts +19 -19
- package/src/types/calendar-pdf.types.ts +24 -24
- package/src/types/calendo-events.types.ts +64 -64
- package/src/types/challenges.types.ts +30 -30
- package/src/types/chatbot.types.ts +82 -82
- package/src/types/cities.types.ts +27 -27
- package/src/types/city-groups.types.ts +46 -46
- package/src/types/cms.types.ts +87 -87
- package/src/types/field-reports.types.ts +66 -66
- package/src/types/free-tier.types.ts +54 -54
- package/src/types/index.ts +33 -32
- package/src/types/iot.types.ts +31 -31
- package/src/types/maintenance.types.ts +44 -44
- package/src/types/mapso.types.ts +146 -146
- package/src/types/notifications.types.ts +68 -68
- package/src/types/onboarding.types.ts +117 -117
- package/src/types/operational-zones.types.ts +70 -70
- package/src/types/pagination.types.ts +33 -33
- package/src/types/providers.types.ts +29 -29
- package/src/types/quiz-questions.types.ts +59 -59
- package/src/types/recycling-points.types.ts +47 -47
- package/src/types/roi.types.ts +60 -60
- package/src/types/surveys.types.ts +103 -103
- package/src/types/tickets.types.ts +65 -65
- package/src/types/users.types.ts +30 -30
- package/src/types/waste-collection-places-query.types.ts +4 -4
- package/src/types/waste-collection-places.types.ts +34 -33
- package/src/types/waste-types.types.ts +21 -21
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
export type QuizQuestionKind = 'waste_bin' | 'ab_image' | 'mcq';
|
|
2
|
-
|
|
3
|
-
export type QuizAbImageChoice = {
|
|
4
|
-
id: string;
|
|
5
|
-
imageUrl: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export type QuizAbImageOptions = {
|
|
10
|
-
choices: [QuizAbImageChoice, QuizAbImageChoice];
|
|
11
|
-
correctChoiceId: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type QuizMcqChoice = {
|
|
15
|
-
id: string;
|
|
16
|
-
text: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type QuizMcqOptions = {
|
|
20
|
-
choices: QuizMcqChoice[];
|
|
21
|
-
correctChoiceId: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type QuizQuestionOptions = QuizAbImageOptions | QuizMcqOptions;
|
|
25
|
-
|
|
26
|
-
/** Détail référentiel lié à une explication (WasteTypeDetail). */
|
|
27
|
-
export type QuizExplanationDetail = {
|
|
28
|
-
id: string;
|
|
29
|
-
material: string;
|
|
30
|
-
description?: string | null;
|
|
31
|
-
instructions?: string | null;
|
|
32
|
-
imageUrl?: string | null;
|
|
33
|
-
wasteType?: { id: string; name: string } | null;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export interface CreateQuizQuestionRequest {
|
|
37
|
-
/** @deprecated Ignored — city is taken from `serie.challenge.cityId`. */
|
|
38
|
-
cityId?: string;
|
|
39
|
-
/** Required for `waste_bin`; optional for `ab_image`. */
|
|
40
|
-
wasteTypeId?: string;
|
|
41
|
-
materialId?: string;
|
|
42
|
-
material: string;
|
|
43
|
-
question: string;
|
|
44
|
-
imageUrl?: string;
|
|
45
|
-
imageBase64?: string;
|
|
46
|
-
/** Required for `waste_bin`; optional for `ab_image`. */
|
|
47
|
-
correctWasteTypeId?: string;
|
|
48
|
-
/** Required: question belongs to a series (city = that series' challenge city). */
|
|
49
|
-
serieId: string;
|
|
50
|
-
order?: number;
|
|
51
|
-
/** Defaults to `waste_bin` (legacy). */
|
|
52
|
-
kind?: QuizQuestionKind;
|
|
53
|
-
/** Typed payload for non-waste_bin kinds. */
|
|
54
|
-
options?: QuizQuestionOptions;
|
|
55
|
-
/** Free-text explanation shown after answering (takes priority over detail). */
|
|
56
|
-
explanationText?: string | null;
|
|
57
|
-
/** Link to a référentiel WasteTypeDetail for explanation. */
|
|
58
|
-
explanationDetailId?: string | null;
|
|
59
|
-
}
|
|
1
|
+
export type QuizQuestionKind = 'waste_bin' | 'ab_image' | 'mcq';
|
|
2
|
+
|
|
3
|
+
export type QuizAbImageChoice = {
|
|
4
|
+
id: string;
|
|
5
|
+
imageUrl: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type QuizAbImageOptions = {
|
|
10
|
+
choices: [QuizAbImageChoice, QuizAbImageChoice];
|
|
11
|
+
correctChoiceId: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type QuizMcqChoice = {
|
|
15
|
+
id: string;
|
|
16
|
+
text: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type QuizMcqOptions = {
|
|
20
|
+
choices: QuizMcqChoice[];
|
|
21
|
+
correctChoiceId: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type QuizQuestionOptions = QuizAbImageOptions | QuizMcqOptions;
|
|
25
|
+
|
|
26
|
+
/** Détail référentiel lié à une explication (WasteTypeDetail). */
|
|
27
|
+
export type QuizExplanationDetail = {
|
|
28
|
+
id: string;
|
|
29
|
+
material: string;
|
|
30
|
+
description?: string | null;
|
|
31
|
+
instructions?: string | null;
|
|
32
|
+
imageUrl?: string | null;
|
|
33
|
+
wasteType?: { id: string; name: string } | null;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export interface CreateQuizQuestionRequest {
|
|
37
|
+
/** @deprecated Ignored — city is taken from `serie.challenge.cityId`. */
|
|
38
|
+
cityId?: string;
|
|
39
|
+
/** Required for `waste_bin`; optional for `ab_image`. */
|
|
40
|
+
wasteTypeId?: string;
|
|
41
|
+
materialId?: string;
|
|
42
|
+
material: string;
|
|
43
|
+
question: string;
|
|
44
|
+
imageUrl?: string;
|
|
45
|
+
imageBase64?: string;
|
|
46
|
+
/** Required for `waste_bin`; optional for `ab_image`. */
|
|
47
|
+
correctWasteTypeId?: string;
|
|
48
|
+
/** Required: question belongs to a series (city = that series' challenge city). */
|
|
49
|
+
serieId: string;
|
|
50
|
+
order?: number;
|
|
51
|
+
/** Defaults to `waste_bin` (legacy). */
|
|
52
|
+
kind?: QuizQuestionKind;
|
|
53
|
+
/** Typed payload for non-waste_bin kinds. */
|
|
54
|
+
options?: QuizQuestionOptions;
|
|
55
|
+
/** Free-text explanation shown after answering (takes priority over detail). */
|
|
56
|
+
explanationText?: string | null;
|
|
57
|
+
/** Link to a référentiel WasteTypeDetail for explanation. */
|
|
58
|
+
explanationDetailId?: string | null;
|
|
59
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import type { HoursInputMode, OpeningHours } from '../opening-hours/types';
|
|
2
|
-
|
|
3
|
-
export interface CreateRecyclingPointRequest {
|
|
4
|
-
cityId: string;
|
|
5
|
-
name: string;
|
|
6
|
-
type: string;
|
|
7
|
-
acceptedWasteTypes: string[];
|
|
8
|
-
latitude?: number;
|
|
9
|
-
longitude?: number;
|
|
10
|
-
/** @deprecated Prefer longitude (alias X = longitude). */
|
|
11
|
-
coordinateX?: number;
|
|
12
|
-
/** @deprecated Prefer latitude (alias Y = latitude). */
|
|
13
|
-
coordinateY?: number;
|
|
14
|
-
address?: string;
|
|
15
|
-
hours?: string;
|
|
16
|
-
phone?: string;
|
|
17
|
-
details?: RecyclingPointDetails;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type { HoursInputMode };
|
|
21
|
-
|
|
22
|
-
export type RecyclingPointDetails = {
|
|
23
|
-
address?: string;
|
|
24
|
-
hours?: string;
|
|
25
|
-
phone?: string;
|
|
26
|
-
hoursMode?: HoursInputMode;
|
|
27
|
-
openingHours?: OpeningHours;
|
|
28
|
-
[key: string]: unknown;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export interface RecyclingPoint {
|
|
32
|
-
id: string;
|
|
33
|
-
cityId?: string | null;
|
|
34
|
-
name: string;
|
|
35
|
-
type: string;
|
|
36
|
-
acceptedWasteTypes: string[];
|
|
37
|
-
latitude?: number | null;
|
|
38
|
-
longitude?: number | null;
|
|
39
|
-
/** @deprecated Prefer longitude. */
|
|
40
|
-
coordinateX?: number | null;
|
|
41
|
-
/** @deprecated Prefer latitude. */
|
|
42
|
-
coordinateY?: number | null;
|
|
43
|
-
address?: string | null;
|
|
44
|
-
hours?: string | null;
|
|
45
|
-
phone?: string | null;
|
|
46
|
-
details?: RecyclingPointDetails | null;
|
|
47
|
-
}
|
|
1
|
+
import type { HoursInputMode, OpeningHours } from '../opening-hours/types';
|
|
2
|
+
|
|
3
|
+
export interface CreateRecyclingPointRequest {
|
|
4
|
+
cityId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
acceptedWasteTypes: string[];
|
|
8
|
+
latitude?: number;
|
|
9
|
+
longitude?: number;
|
|
10
|
+
/** @deprecated Prefer longitude (alias X = longitude). */
|
|
11
|
+
coordinateX?: number;
|
|
12
|
+
/** @deprecated Prefer latitude (alias Y = latitude). */
|
|
13
|
+
coordinateY?: number;
|
|
14
|
+
address?: string;
|
|
15
|
+
hours?: string;
|
|
16
|
+
phone?: string;
|
|
17
|
+
details?: RecyclingPointDetails;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type { HoursInputMode };
|
|
21
|
+
|
|
22
|
+
export type RecyclingPointDetails = {
|
|
23
|
+
address?: string;
|
|
24
|
+
hours?: string;
|
|
25
|
+
phone?: string;
|
|
26
|
+
hoursMode?: HoursInputMode;
|
|
27
|
+
openingHours?: OpeningHours;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface RecyclingPoint {
|
|
32
|
+
id: string;
|
|
33
|
+
cityId?: string | null;
|
|
34
|
+
name: string;
|
|
35
|
+
type: string;
|
|
36
|
+
acceptedWasteTypes: string[];
|
|
37
|
+
latitude?: number | null;
|
|
38
|
+
longitude?: number | null;
|
|
39
|
+
/** @deprecated Prefer longitude. */
|
|
40
|
+
coordinateX?: number | null;
|
|
41
|
+
/** @deprecated Prefer latitude. */
|
|
42
|
+
coordinateY?: number | null;
|
|
43
|
+
address?: string | null;
|
|
44
|
+
hours?: string | null;
|
|
45
|
+
phone?: string | null;
|
|
46
|
+
details?: RecyclingPointDetails | null;
|
|
47
|
+
}
|
package/src/types/roi.types.ts
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import type { TerritoryActionStatus, TerritoryActionType } from '../enums'
|
|
2
|
-
|
|
3
|
-
export type { TerritoryActionStatus, TerritoryActionType }
|
|
4
|
-
|
|
5
|
-
export interface UpsertTerritoryEconomicsRequest {
|
|
6
|
-
cityId?: string
|
|
7
|
-
cityGroupId?: string
|
|
8
|
-
fiscalYear?: number
|
|
9
|
-
annualTonnageOmr: number
|
|
10
|
-
errorRatePercent: number
|
|
11
|
-
costPerBadTonne?: number
|
|
12
|
-
tgapEurPerTonne?: number
|
|
13
|
-
householdCount?: number | null
|
|
14
|
-
population?: number | null
|
|
15
|
-
wastoAnnualCostEur?: number
|
|
16
|
-
citeoSupportGainEur?: number
|
|
17
|
-
notes?: string | null
|
|
18
|
-
/** Si true, fige la baseline (avant) sur les valeurs courantes. */
|
|
19
|
-
lockBaseline?: boolean
|
|
20
|
-
annualBilanConfirmed?: boolean
|
|
21
|
-
dataSource?: 'MANUAL' | 'SINOE' | 'IMPORT'
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ImportTerritoryYearRequest {
|
|
25
|
-
fiscalYear: number
|
|
26
|
-
annualTonnageOmr: number
|
|
27
|
-
errorRatePercent?: number
|
|
28
|
-
costPerBadTonne?: number
|
|
29
|
-
citeoSupportGainEur?: number
|
|
30
|
-
population?: number | null
|
|
31
|
-
householdCount?: number | null
|
|
32
|
-
notes?: string | null
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface ImportTerritoryHistoryRequest {
|
|
36
|
-
cityGroupId: string
|
|
37
|
-
years: ImportTerritoryYearRequest[]
|
|
38
|
-
/** Si true, marque dataSource=SINOE. */
|
|
39
|
-
fromSinoe?: boolean
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface CreateTerritoryActionRequest {
|
|
43
|
-
name: string
|
|
44
|
-
description?: string
|
|
45
|
-
type?: TerritoryActionType
|
|
46
|
-
status?: TerritoryActionStatus
|
|
47
|
-
zoneLabel?: string
|
|
48
|
-
startDate?: string
|
|
49
|
-
endDate?: string
|
|
50
|
-
budgetCapexEur?: number
|
|
51
|
-
budgetOpexEur?: number
|
|
52
|
-
expectedErrorReductionPercent?: number
|
|
53
|
-
measuredErrorReductionPercent?: number | null
|
|
54
|
-
challengeId?: string | null
|
|
55
|
-
surveyId?: string | null
|
|
56
|
-
order?: number
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface UpdateTerritoryActionRequest
|
|
60
|
-
extends Partial<CreateTerritoryActionRequest> {}
|
|
1
|
+
import type { TerritoryActionStatus, TerritoryActionType } from '../enums'
|
|
2
|
+
|
|
3
|
+
export type { TerritoryActionStatus, TerritoryActionType }
|
|
4
|
+
|
|
5
|
+
export interface UpsertTerritoryEconomicsRequest {
|
|
6
|
+
cityId?: string
|
|
7
|
+
cityGroupId?: string
|
|
8
|
+
fiscalYear?: number
|
|
9
|
+
annualTonnageOmr: number
|
|
10
|
+
errorRatePercent: number
|
|
11
|
+
costPerBadTonne?: number
|
|
12
|
+
tgapEurPerTonne?: number
|
|
13
|
+
householdCount?: number | null
|
|
14
|
+
population?: number | null
|
|
15
|
+
wastoAnnualCostEur?: number
|
|
16
|
+
citeoSupportGainEur?: number
|
|
17
|
+
notes?: string | null
|
|
18
|
+
/** Si true, fige la baseline (avant) sur les valeurs courantes. */
|
|
19
|
+
lockBaseline?: boolean
|
|
20
|
+
annualBilanConfirmed?: boolean
|
|
21
|
+
dataSource?: 'MANUAL' | 'SINOE' | 'IMPORT'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ImportTerritoryYearRequest {
|
|
25
|
+
fiscalYear: number
|
|
26
|
+
annualTonnageOmr: number
|
|
27
|
+
errorRatePercent?: number
|
|
28
|
+
costPerBadTonne?: number
|
|
29
|
+
citeoSupportGainEur?: number
|
|
30
|
+
population?: number | null
|
|
31
|
+
householdCount?: number | null
|
|
32
|
+
notes?: string | null
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ImportTerritoryHistoryRequest {
|
|
36
|
+
cityGroupId: string
|
|
37
|
+
years: ImportTerritoryYearRequest[]
|
|
38
|
+
/** Si true, marque dataSource=SINOE. */
|
|
39
|
+
fromSinoe?: boolean
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface CreateTerritoryActionRequest {
|
|
43
|
+
name: string
|
|
44
|
+
description?: string
|
|
45
|
+
type?: TerritoryActionType
|
|
46
|
+
status?: TerritoryActionStatus
|
|
47
|
+
zoneLabel?: string
|
|
48
|
+
startDate?: string
|
|
49
|
+
endDate?: string
|
|
50
|
+
budgetCapexEur?: number
|
|
51
|
+
budgetOpexEur?: number
|
|
52
|
+
expectedErrorReductionPercent?: number
|
|
53
|
+
measuredErrorReductionPercent?: number | null
|
|
54
|
+
challengeId?: string | null
|
|
55
|
+
surveyId?: string | null
|
|
56
|
+
order?: number
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UpdateTerritoryActionRequest
|
|
60
|
+
extends Partial<CreateTerritoryActionRequest> {}
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import type { QuestionType, SurveyMode, SurveyStatus } from '../enums';
|
|
2
|
-
|
|
3
|
-
export interface CreateSurveySubCohortRequest {
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
order?: number;
|
|
7
|
-
responsibleUserIds?: string[];
|
|
8
|
-
attachedLocationIds?: string[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface CreateSurveyCohortRequest {
|
|
12
|
-
name: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
order?: number;
|
|
15
|
-
subCohorts?: CreateSurveySubCohortRequest[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface UpdateSurveySubCohortRequest {
|
|
19
|
-
name?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
order?: number;
|
|
22
|
-
responsibleUserIds?: string[];
|
|
23
|
-
attachedLocationIds?: string[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface UpdateSurveyCohortRequest {
|
|
27
|
-
name?: string;
|
|
28
|
-
description?: string;
|
|
29
|
-
order?: number;
|
|
30
|
-
subCohorts?: UpdateSurveySubCohortRequest[];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface CreateSurveyQuestionRequest {
|
|
34
|
-
type: QuestionType;
|
|
35
|
-
question: string;
|
|
36
|
-
description?: string;
|
|
37
|
-
required?: boolean;
|
|
38
|
-
order?: number;
|
|
39
|
-
options?: unknown;
|
|
40
|
-
minValue?: number;
|
|
41
|
-
maxValue?: number;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface UpdateSurveyQuestionRequest {
|
|
45
|
-
type?: QuestionType;
|
|
46
|
-
question?: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
required?: boolean;
|
|
49
|
-
order?: number;
|
|
50
|
-
options?: unknown;
|
|
51
|
-
minValue?: number;
|
|
52
|
-
maxValue?: number;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface CreateSurveyAnswerRequest {
|
|
56
|
-
questionId: string;
|
|
57
|
-
value: unknown;
|
|
58
|
-
photoUrl?: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface CreateSurveyResponseRequest {
|
|
62
|
-
answers: CreateSurveyAnswerRequest[];
|
|
63
|
-
latitude?: number;
|
|
64
|
-
longitude?: number;
|
|
65
|
-
metadata?: Record<string, unknown>;
|
|
66
|
-
subCohortId?: string;
|
|
67
|
-
attachedLocationId?: string;
|
|
68
|
-
/**
|
|
69
|
-
* Client-generated UUID for offline / multi-tab idempotent submit.
|
|
70
|
-
*/
|
|
71
|
-
clientSubmissionId?: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface UpdateSurveyResponseRequest {
|
|
75
|
-
answers?: CreateSurveyAnswerRequest[];
|
|
76
|
-
latitude?: number;
|
|
77
|
-
longitude?: number;
|
|
78
|
-
metadata?: Record<string, unknown>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface CreateSurveyRequest {
|
|
82
|
-
title: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
status?: SurveyStatus;
|
|
85
|
-
mode?: SurveyMode;
|
|
86
|
-
cityId?: string;
|
|
87
|
-
cityGroupId?: string;
|
|
88
|
-
campaignTag?: string;
|
|
89
|
-
questions?: CreateSurveyQuestionRequest[];
|
|
90
|
-
cohorts?: CreateSurveyCohortRequest[];
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface UpdateSurveyRequest {
|
|
94
|
-
title?: string;
|
|
95
|
-
description?: string;
|
|
96
|
-
status?: SurveyStatus;
|
|
97
|
-
mode?: SurveyMode;
|
|
98
|
-
cityId?: string;
|
|
99
|
-
cityGroupId?: string;
|
|
100
|
-
campaignTag?: string;
|
|
101
|
-
questions?: CreateSurveyQuestionRequest[];
|
|
102
|
-
cohorts?: UpdateSurveyCohortRequest[];
|
|
103
|
-
}
|
|
1
|
+
import type { QuestionType, SurveyMode, SurveyStatus } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface CreateSurveySubCohortRequest {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
order?: number;
|
|
7
|
+
responsibleUserIds?: string[];
|
|
8
|
+
attachedLocationIds?: string[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CreateSurveyCohortRequest {
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
order?: number;
|
|
15
|
+
subCohorts?: CreateSurveySubCohortRequest[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface UpdateSurveySubCohortRequest {
|
|
19
|
+
name?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
order?: number;
|
|
22
|
+
responsibleUserIds?: string[];
|
|
23
|
+
attachedLocationIds?: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface UpdateSurveyCohortRequest {
|
|
27
|
+
name?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
order?: number;
|
|
30
|
+
subCohorts?: UpdateSurveySubCohortRequest[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CreateSurveyQuestionRequest {
|
|
34
|
+
type: QuestionType;
|
|
35
|
+
question: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
order?: number;
|
|
39
|
+
options?: unknown;
|
|
40
|
+
minValue?: number;
|
|
41
|
+
maxValue?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface UpdateSurveyQuestionRequest {
|
|
45
|
+
type?: QuestionType;
|
|
46
|
+
question?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
required?: boolean;
|
|
49
|
+
order?: number;
|
|
50
|
+
options?: unknown;
|
|
51
|
+
minValue?: number;
|
|
52
|
+
maxValue?: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CreateSurveyAnswerRequest {
|
|
56
|
+
questionId: string;
|
|
57
|
+
value: unknown;
|
|
58
|
+
photoUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CreateSurveyResponseRequest {
|
|
62
|
+
answers: CreateSurveyAnswerRequest[];
|
|
63
|
+
latitude?: number;
|
|
64
|
+
longitude?: number;
|
|
65
|
+
metadata?: Record<string, unknown>;
|
|
66
|
+
subCohortId?: string;
|
|
67
|
+
attachedLocationId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Client-generated UUID for offline / multi-tab idempotent submit.
|
|
70
|
+
*/
|
|
71
|
+
clientSubmissionId?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface UpdateSurveyResponseRequest {
|
|
75
|
+
answers?: CreateSurveyAnswerRequest[];
|
|
76
|
+
latitude?: number;
|
|
77
|
+
longitude?: number;
|
|
78
|
+
metadata?: Record<string, unknown>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface CreateSurveyRequest {
|
|
82
|
+
title: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
status?: SurveyStatus;
|
|
85
|
+
mode?: SurveyMode;
|
|
86
|
+
cityId?: string;
|
|
87
|
+
cityGroupId?: string;
|
|
88
|
+
campaignTag?: string;
|
|
89
|
+
questions?: CreateSurveyQuestionRequest[];
|
|
90
|
+
cohorts?: CreateSurveyCohortRequest[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface UpdateSurveyRequest {
|
|
94
|
+
title?: string;
|
|
95
|
+
description?: string;
|
|
96
|
+
status?: SurveyStatus;
|
|
97
|
+
mode?: SurveyMode;
|
|
98
|
+
cityId?: string;
|
|
99
|
+
cityGroupId?: string;
|
|
100
|
+
campaignTag?: string;
|
|
101
|
+
questions?: CreateSurveyQuestionRequest[];
|
|
102
|
+
cohorts?: UpdateSurveyCohortRequest[];
|
|
103
|
+
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import type { QuestionType, TicketFormStatus, TicketStatus } from '../enums';
|
|
2
|
-
|
|
3
|
-
export interface TicketValueRequest {
|
|
4
|
-
fieldId: string;
|
|
5
|
-
value: unknown;
|
|
6
|
-
photoUrl?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface CreateTicketRequest {
|
|
10
|
-
ticketFormId: string;
|
|
11
|
-
values: TicketValueRequest[];
|
|
12
|
-
deviceId?: string;
|
|
13
|
-
conversationId?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface UpdateTicketRequest {
|
|
17
|
-
status?: TicketStatus;
|
|
18
|
-
assignedToId?: string;
|
|
19
|
-
values?: TicketValueRequest[];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface CreateTicketFieldRequest {
|
|
23
|
-
type: QuestionType;
|
|
24
|
-
label: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
required?: boolean;
|
|
27
|
-
order?: number;
|
|
28
|
-
options?: unknown;
|
|
29
|
-
minValue?: number;
|
|
30
|
-
maxValue?: number;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface CreateTicketFormRequest {
|
|
34
|
-
title: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
status?: TicketFormStatus;
|
|
37
|
-
isPublic?: boolean;
|
|
38
|
-
cityId?: string;
|
|
39
|
-
cityGroupId?: string;
|
|
40
|
-
fields?: CreateTicketFieldRequest[];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface UpdateTicketFormRequest {
|
|
44
|
-
title?: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
status?: TicketFormStatus;
|
|
47
|
-
isPublic?: boolean;
|
|
48
|
-
cityId?: string;
|
|
49
|
-
cityGroupId?: string;
|
|
50
|
-
fields?: CreateTicketFieldRequest[];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface AssignTicketRequest {
|
|
54
|
-
assignedToId: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface UpdateTicketStatusRequest {
|
|
58
|
-
status: TicketStatus;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface CreateTicketFromChatRequest {
|
|
62
|
-
conversationId: string;
|
|
63
|
-
ticketFormId: string;
|
|
64
|
-
values?: TicketValueRequest[];
|
|
65
|
-
}
|
|
1
|
+
import type { QuestionType, TicketFormStatus, TicketStatus } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface TicketValueRequest {
|
|
4
|
+
fieldId: string;
|
|
5
|
+
value: unknown;
|
|
6
|
+
photoUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CreateTicketRequest {
|
|
10
|
+
ticketFormId: string;
|
|
11
|
+
values: TicketValueRequest[];
|
|
12
|
+
deviceId?: string;
|
|
13
|
+
conversationId?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface UpdateTicketRequest {
|
|
17
|
+
status?: TicketStatus;
|
|
18
|
+
assignedToId?: string;
|
|
19
|
+
values?: TicketValueRequest[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CreateTicketFieldRequest {
|
|
23
|
+
type: QuestionType;
|
|
24
|
+
label: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
order?: number;
|
|
28
|
+
options?: unknown;
|
|
29
|
+
minValue?: number;
|
|
30
|
+
maxValue?: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CreateTicketFormRequest {
|
|
34
|
+
title: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
status?: TicketFormStatus;
|
|
37
|
+
isPublic?: boolean;
|
|
38
|
+
cityId?: string;
|
|
39
|
+
cityGroupId?: string;
|
|
40
|
+
fields?: CreateTicketFieldRequest[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface UpdateTicketFormRequest {
|
|
44
|
+
title?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
status?: TicketFormStatus;
|
|
47
|
+
isPublic?: boolean;
|
|
48
|
+
cityId?: string;
|
|
49
|
+
cityGroupId?: string;
|
|
50
|
+
fields?: CreateTicketFieldRequest[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface AssignTicketRequest {
|
|
54
|
+
assignedToId: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface UpdateTicketStatusRequest {
|
|
58
|
+
status: TicketStatus;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CreateTicketFromChatRequest {
|
|
62
|
+
conversationId: string;
|
|
63
|
+
ticketFormId: string;
|
|
64
|
+
values?: TicketValueRequest[];
|
|
65
|
+
}
|