Skip to content

Commit 375ec6b

Browse files
authored
Updated docs for sight tutorial (#935)
1 parent 0ff0634 commit 375ec6b

File tree

3 files changed

+82
-67
lines changed

3 files changed

+82
-67
lines changed

documentation/docs/configuration.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ sidebar_position: 3
33
---
44

55
# Configuration
6+
67
Most of the web applications integrating the MonkJs SDK will need the same configuration properties. To simplify the
78
syntax when configuring your app, we provide a TypeScript interfaces called (`PhotoCaptureAppConfig` and
89
`VideoCaptureAppConfig`) that contains the usual configuration properties needed for both the PhotoCapture and
@@ -21,6 +22,7 @@ export const MonkJsConfig: PhotoCaptureAppConfig = {
2122
This configuration object can then be passed to components like `<MonkAppStateProvider>` or `<PhotoCapture>`.
2223

2324
## Available Configuration Options
25+
2426
The following table lists the available configuration options in the `CaptureAppConfig` interface :
2527

2628
| Name | Type | Description | Required | Default Value |
@@ -59,13 +61,15 @@ The following table lists the available configuration options in the `CaptureApp
5961
| customComplianceThresholdsPerSight | `Record<string, CustomComplianceThresholds>` | A map associating Sight IDs to custom compliance thresholds. | | |
6062

6163
## Live Configs
64+
6265
MonkJs now also offers a way to configure Live Configurations for your web applications. This allows MonkJs apps to
6366
fetch their configurations (`PhotoCaptureAppConfig` or `VideoCaptureAppConfig`) from a GCP Bucket on startup. By doing
6467
this, the configurations of the applications can be modified without having to re-deploy the apps. Each live
6568
configuration consists of a JSON file stored in a public bucket on Monk's Google Cloud instances, identified by a unique
6669
ID. It is not possible for now to set up a custom hosting service for the live configs, but this feature should arrive
6770
soon. In order to set up a live configuration on one of your apps, you can simply use the following provider in your
6871
app :
72+
6973
```tsx
7074
import { LiveConfigAppProvider } from '@monkvision/common-ui-web';
7175

@@ -84,30 +88,32 @@ This component will automatically fetch the given live configuration from one of
8488
## Available Configuration Options
8589

8690
### Shared Configuration Options
91+
8792
The following table lists the options available in both the PhotoCapture and VideoCapture configurations :
8893

89-
| Name | Type | Description | Required | Default Value |
90-
|--------------------------|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|---------------------------|
91-
| workflow | `CaptureWorkflow` | Specifies which capture workflow this app is meant to be used for. The config options available change based on this param. | ✔️ | |
92-
| format | `CompressionFormat` | The output format of the compression. | | `CompressionFormat.JPEG` |
93-
| quality | `number` | Value indicating image quality for the compression output. | | `0.6` |
94-
| resolution | `CameraResolution` | Indicates the resolution of the pictures taken by the Camera. | | `CameraResolution.UHD_4K` |
95-
| allowImageUpscaling | `boolean` | Allow images to be scaled up if the device does not support the specified resolution in the `resolution` prop. | | `false` |
96-
| additionalTasks | `TaskName[]` | An optional list of additional tasks to run on every image of the inspection. | | |
97-
| startTasksOnComplete | `<code>boolean &#124; TaskName[]</code>` | Value indicating if tasks should be started at the end of the inspection. See the `inspection-capture-web` package doc for more info. | | `true` |
98-
| allowManualLogin | `boolean` | Indicates if manual login and logout should be enabled or not. | ✔️ | |
99-
| fetchFromSearchParams | `boolean` | Indicates if the app state (auth token, inspection ID etc.) should be fetched from the URL search params. | ✔️ | |
100-
| apiDomain | `string` | The API domain used to communicate with the API. | ✔️ | |
101-
| thumbnailDomain | `string` | The API domain used to communicate with the resize microservice. | ✔️ | |
102-
| requiredApiPermissions | `MonkApiPermission[]` | Required API permission that the user must have to use the current app. | | |
103-
| palette | `Partial<MonkPalette>` | Custom color palette to use in the app. | | |
104-
| allowCreateInspection | `boolean` | Indicates if automatic inspection creation should be enabled in the app. | ✔️ | |
105-
| createInspectionOptions | `CreateInspectionOptions` | Options used when automatically creating an inspection. | if `allowCreateInspection` is set to `true` | |
94+
| Name | Type | Description | Required | Default Value |
95+
|-------------------------|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|---------------------------|
96+
| workflow | `CaptureWorkflow` | Specifies which capture workflow this app is meant to be used for. The config options available change based on this param. | ✔️ | |
97+
| format | `CompressionFormat` | The output format of the compression. | | `CompressionFormat.JPEG` |
98+
| quality | `number` | Value indicating image quality for the compression output. | | `0.6` |
99+
| resolution | `CameraResolution` | Indicates the resolution of the pictures taken by the Camera. | | `CameraResolution.UHD_4K` |
100+
| allowImageUpscaling | `boolean` | Allow images to be scaled up if the device does not support the specified resolution in the `resolution` prop. | | `false` |
101+
| additionalTasks | `TaskName[]` | An optional list of additional tasks to run on every image of the inspection. | | |
102+
| startTasksOnComplete | `<code>boolean &#124; TaskName[]</code>` | Value indicating if tasks should be started at the end of the inspection. See the `inspection-capture-web` package doc for more info. | | `true` |
103+
| allowManualLogin | `boolean` | Indicates if manual login and logout should be enabled or not. | ✔️ | |
104+
| fetchFromSearchParams | `boolean` | Indicates if the app state (auth token, inspection ID etc.) should be fetched from the URL search params. | ✔️ | |
105+
| apiDomain | `string` | The API domain used to communicate with the API. | ✔️ | |
106+
| thumbnailDomain | `string` | The API domain used to communicate with the resize microservice. | ✔️ | |
107+
| requiredApiPermissions | `MonkApiPermission[]` | Required API permission that the user must have to use the current app. | | |
108+
| palette | `Partial<MonkPalette>` | Custom color palette to use in the app. | | |
109+
| allowCreateInspection | `boolean` | Indicates if automatic inspection creation should be enabled in the app. | ✔️ | |
110+
| createInspectionOptions | `CreateInspectionOptions` | Options used when automatically creating an inspection. | if `allowCreateInspection` is set to `true` | |
106111

107112
## PhotoCapture Configuration Options
113+
108114
The following table lists the available configuration options in the `PhotoCaptureAppConfig` interface.
109115

110-
*Note : PhotoCapture configurations must have their `workflow` property set to `CaptureWorkflow.PHOTO`.*
116+
_Note : PhotoCapture configurations must have their `workflow` property set to `CaptureWorkflow.PHOTO`._
111117

112118
| Name | Type | Description | Required | Default Value |
113119
|------------------------------------|----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|----------------------------------------------|
@@ -131,15 +137,17 @@ The following table lists the available configuration options in the `PhotoCaptu
131137
| allowVehicleTypeSelection | `boolean` | Indicates if manual vehicle type selection should be enabled if the vehicle type is not defined. | ✔️ | |
132138
| enableTutorial | `PhotoCaptureTutorialOption` | Options for displaying the photo capture tutorial. | | `PhotoCaptureTutorialOption.FIRST_TIME_ONLY` |
133139
| allowSkipTutorial | `boolean` | Boolean indicating if the user can skip the PhotoCapture tutorial. | | `true` |
134-
| enableSightTutorial | `boolean` | Boolean indicating whether the sight tutorial feature is enabled. | | `true` |
140+
| enableSightTutorial | `PhotoCaptureSightTutorialOption` | Options for displaying the photo capture sight tutorial. | | `PhotoCaptureSightTutorialOption.DISABLED` |
141+
| sightTutorial | `SightTutorial[]` | A collection of sight tutorial in different language with a list of sightIds associate to it. | | |
135142
| enableSteeringWheelPosition | `boolean` | Indicates if the capture Sights should vary based on the steering wheel position (right or left). | ✔️ | |
136143
| sights | `Record<..., string[]>` | A map associating each vehicle type supported by the app to a list of sight IDs. If `enableSteeringWheelPosition` is set to `true`, it's a map associating each steering wheel position to this map. | ✔️ | |
137144
| defaultSteeringWheelPosition | `SteeringWheelPosition` | Default steering wheel position to use if no steering wheel position has been specified. | if `enableSteeringWheelPosition` is set to `true` | |
138145

139146
## VideoCapture Configuration Options
147+
140148
The following table lists the available configuration options in the `VideoCaptureAppConfig` interface.
141149

142-
*Note : PhotoCapture configurations must have their `workflow` property set to `CaptureWorkflow.VIDEO`.*
150+
_Note : PhotoCapture configurations must have their `workflow` property set to `CaptureWorkflow.VIDEO`._
143151

144152
| Name | Type | Description | Required | Default Value |
145153
|-----------------------------|-----------|----------------------------------------------------------------------------------------------------------------|----------|---------------|

0 commit comments

Comments
 (0)