Skip to content

Commit

Permalink
Merge branch 'main' into feat/new-ui-epic
Browse files Browse the repository at this point in the history
  • Loading branch information
jumaallan authored Nov 18, 2024
2 parents 4d0e58e + d979b2f commit 213beb1
Show file tree
Hide file tree
Showing 18 changed files with 265 additions and 126 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# .github/workflows/auto-author-assign.yml
name: Auto Author Assign

on:
pull_request_target:
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
assign-author:
if: ${{ !contains(github.event.pull_request.assignees, '') }}
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
51 changes: 37 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# Release Notes

## 10.3.6

* Modify access for document capture and selfie capture
* Allow skipApiSubmission for both document capture and selfie capture flows to allow for capture
and return of file paths without submitting the job to SmileID

## 10.3.5

* Fix the camera is closed bug on document capture flow
* Enhanced doc v submitted as doc v
* Correct flow for selfie when showInstructions is false

## 10.3.4

* Bump up the compileSdk to 35
* Add skipApiSubmission when true will capture smartselfie and return file paths for selfie and liveness images without submitting the job to SmilID
* Add skipApiSubmission when true will capture smartselfie and return file paths for selfie and
liveness images without submitting the job to SmilID

## 10.3.3

* Added inflow navigation as well as individual navigation for compose screens

## 10.3.2
Expand All @@ -28,7 +38,7 @@
## 10.2.7

* Fixed upload bug to retry in case a job already exists but zip was not uploaded
* Changed MLKit download modules to throw an exception explicitly if download fails
* Changed MLKit download modules to throw an exception explicitly if download fails

## 10.2.6

Expand All @@ -41,9 +51,11 @@
## 10.2.4

#### Fixed

* Job status history full data parsing causing a crash during polling

### Changed

* Removed `SmileID.setEnvironment()` since the API Keys are no longer shared between environments

## 10.2.3
Expand All @@ -54,7 +66,8 @@

## 10.2.2

* Fixed a bug where the `BiometricKycViewModel` would succeed but use the default error message as it was not being updated when changing state
* Fixed a bug where the `BiometricKycViewModel` would succeed but use the default error message as
it was not being updated when changing state
* Fixed a bug where `SmileID.submitJob` would not work for previously attempted API requests

## 10.2.1
Expand All @@ -64,7 +77,9 @@

## 10.2.0

* Added an optional "Strict Mode" to SmartSelfie Enrollment and Authentication to achieve better pass rates. Set `useStrictMode=true` to enable this new, streamlined UI and associated active liveness tasks
* Added an optional "Strict Mode" to SmartSelfie Enrollment and Authentication to achieve better
pass rates. Set `useStrictMode=true` to enable this new, streamlined UI and associated active
liveness tasks

## 10.1.7

Expand All @@ -89,7 +104,7 @@
* Update to K2 (aka Kotlin `2.0.0`)
* Update Compose BOM to 2024.05.00
* Update AndroidX to 1.13.1
* Update Activity to 1.9.0
* Update Activity to 1.9.0
* Update Fragment to 1.7.1
* Update Datastore to 1.1.1
* Update Sentry to 7.9.0
Expand All @@ -107,9 +122,12 @@

## 10.1.0

* Added an Offline Mode, enabled by calling `SmileID.setAllowOfflineMode(true)`. If a job is attempted while the device is offline, and offline mode has been enabled, the UI will complete successfully and the job can be submitted at a later time by calling `SmileID.submitJob(jobId)`
* Added an Offline Mode, enabled by calling `SmileID.setAllowOfflineMode(true)`. If a job is
attempted while the device is offline, and offline mode has been enabled, the UI will complete
successfully and the job can be submitted at a later time by calling `SmileID.submitJob(jobId)`
* Improved SmartSelfie Enrollment and Authentication times by moving to a synchronous API endpoint
* Made `KEY_RESULT` constants in `Fragment`s `internal` to remove a footgun where the constant was easily confused with `KEY_REQUEST`
* Made `KEY_RESULT` constants in `Fragment`s `internal` to remove a footgun where the constant was
easily confused with `KEY_REQUEST`
* Improved back button behavior on image confirmation and processing dialogs
* Fixed a bug where network retries would occasionally fail
* Bump Compose BOM to 2024.04.00
Expand Down Expand Up @@ -151,6 +169,7 @@
* Bump Sentry to 7.0.0

### Removed

* Removed `model_parameters` from `PrepUploadRequest`

## 10.0.0-beta14
Expand Down Expand Up @@ -259,10 +278,10 @@
* Renamed `getDocVJobStatus` to `getDocumentVerificationJobStatus`
* Renamed `pollDocVJobStatus` to `pollDocumentVerificationJobStatus`
* New sealed interface hierarchy for JobResult
* Renamed `DocVEntry` to `DocumentVerificationJobResult.Entry`
* Renamed `JobResult.Entry` to `SmartSelfieJobResult.Entry`
* Renamed `BiometricKycEntry` to `BiometricKycJobResult.Entry`
* `JobResult.Entry` is now an interface for all job types
* Renamed `DocVEntry` to `DocumentVerificationJobResult.Entry`
* Renamed `JobResult.Entry` to `SmartSelfieJobResult.Entry`
* Renamed `BiometricKycEntry` to `BiometricKycJobResult.Entry`
* `JobResult.Entry` is now an interface for all job types
* Bump Sentry to 6.29.0
* Bump Compose BOM to 2023.09.01
* Bump AndroidX Core to 1.12.0
Expand All @@ -271,7 +290,8 @@

#### Removed

* Removed `Document` model, so you now pass `countryCode` and `documentType` as separate params in `SmileID.DocumentVerification`
* Removed `Document` model, so you now pass `countryCode` and `documentType` as separate params in
`SmileID.DocumentVerification`
* `filename` property from `PrepUploadRequest`, as it is no longer required

## 10.0.0-beta07
Expand Down Expand Up @@ -334,7 +354,9 @@

#### Removed

* Removed polling from SmartSelfie Authentication, Document Verification, and Biometric KYC. The returned `SmileIDResult`s will now contain only the immediate result of job status without waiting for job completion
* Removed polling from SmartSelfie Authentication, Document Verification, and Biometric KYC. The
returned `SmileIDResult`s will now contain only the immediate result of job status without waiting
for job completion

## 10.0.0-beta04

Expand Down Expand Up @@ -382,7 +404,8 @@
* Minor update to default colours to add contrast
* Submit colour liveness images instead of greyscale
* Update SmartSelfie™ directives copy to be more succinct
* Changed the order of arguments in Composables to ensure required arguments come first and so that Modifier is the first optional argument
* Changed the order of arguments in Composables to ensure required arguments come first and so that
Modifier is the first optional argument
* Compile against API level 34
* Bump Gradle to 8.0.2
* Bump Kotlin to 1.8.22
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ datastore = "1.1.1"
junit = "4.13.2"
kotlin = "2.0.21"
kotlin-immutable-collections = "0.3.8"
ksp = "2.0.21-1.0.26"
ksp = "2.0.21-1.0.27"
ktlint-plugin = "12.1.1"
leakcanary = "2.14"
lottie = "6.6.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.5-SNAPSHOT
10.3.7-SNAPSHOT
106 changes: 63 additions & 43 deletions lib/src/main/java/com/smileidentity/compose/SmileIDExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.smileidentity.compose.nav.OrchestratedSelfieCaptureParams
import com.smileidentity.compose.nav.ResultCallbacks
import com.smileidentity.compose.nav.Routes
import com.smileidentity.compose.nav.SelfieCaptureParams
import com.smileidentity.compose.nav.SerializableFile
import com.smileidentity.compose.nav.getDocumentCaptureRoute
import com.smileidentity.compose.nav.getSelfieCaptureRoute
import com.smileidentity.compose.theme.colorScheme
Expand Down Expand Up @@ -92,10 +93,14 @@ fun SmileID.SmartSelfieEnrollment(
true,
skipApiSubmission,
)
val screenDestination = getSelfieCaptureRoute(useStrictMode, commonParams)
val orchestratedDestination = Routes.Orchestrated.SelfieRoute(
params = OrchestratedSelfieCaptureParams(commonParams),
params = OrchestratedSelfieCaptureParams(
commonParams,
startRoute = screenDestination,
showStartRoute = true,
),
)
val screenDestination = getSelfieCaptureRoute(useStrictMode, commonParams)
BaseSmileIDScreen(
orchestratedDestination,
screenDestination,
Expand Down Expand Up @@ -159,10 +164,14 @@ fun SmileID.SmartSelfieAuthentication(
isEnroll = false,
skipApiSubmission,
)
val screenDestination = getSelfieCaptureRoute(useStrictMode, commonParams)
val orchestratedDestination = Routes.Orchestrated.SelfieRoute(
params = OrchestratedSelfieCaptureParams(commonParams),
params = OrchestratedSelfieCaptureParams(
commonParams,
startRoute = screenDestination,
showStartRoute = true,
),
)
val screenDestination = getSelfieCaptureRoute(useStrictMode, commonParams)
BaseSmileIDScreen(
orchestratedDestination,
screenDestination,
Expand Down Expand Up @@ -222,29 +231,30 @@ fun SmileID.DocumentVerification(
allowAgentMode: Boolean = false,
allowGalleryUpload: Boolean = false,
showInstructions: Boolean = true,
skipApiSubmission: Boolean = false,
extraPartnerParams: ImmutableMap<String, String> = persistentMapOf(),
colorScheme: ColorScheme = SmileID.colorScheme,
typography: Typography = SmileID.typography,
onResult: SmileIDCallback<DocumentVerificationResult> = {},
) {
val commonParams = DocumentCaptureParams(
userId,
jobId,
allowNewEnroll,
allowAgentMode,
showAttribution,
showInstructions,
extraPartnerParams,
userId = userId,
jobId = jobId,
showInstructions = showInstructions,
showAttribution = showAttribution,
allowAgentMode = allowAgentMode,
allowGallerySelection = allowGalleryUpload,
knownIdAspectRatio = idAspectRatio,
allowNewEnroll = allowNewEnroll,
countryCode = countryCode,
documentType = documentType,
captureBothSides = captureBothSides,
skipApiSubmission = skipApiSubmission,
selfieFile = bypassSelfieCaptureWithFile?.let { SerializableFile.fromFile(it) },
extraPartnerParams = extraPartnerParams,
)
val screenDestination = getDocumentCaptureRoute(
countryCode,
commonParams,
documentType,
captureBothSides,
idAspectRatio,
bypassSelfieCaptureWithFile,
allowGalleryUpload,
)
val orchestratedDestination = Routes.Orchestrated.DocVRoute(
params = OrchestratedDocumentParams(commonParams),
Expand Down Expand Up @@ -309,29 +319,30 @@ fun SmileID.EnhancedDocumentVerificationScreen(
allowAgentMode: Boolean = false,
allowGalleryUpload: Boolean = false,
showInstructions: Boolean = true,
skipApiSubmission: Boolean = false,
extraPartnerParams: ImmutableMap<String, String> = persistentMapOf(),
colorScheme: ColorScheme = SmileID.colorScheme,
typography: Typography = SmileID.typography,
onResult: SmileIDCallback<EnhancedDocumentVerificationResult> = {},
) {
val commonParams = DocumentCaptureParams(
userId,
jobId,
allowNewEnroll,
allowAgentMode,
showAttribution,
showInstructions,
extraPartnerParams,
userId = userId,
jobId = jobId,
showInstructions = showInstructions,
showAttribution = showAttribution,
allowAgentMode = allowAgentMode,
allowGallerySelection = allowGalleryUpload,
knownIdAspectRatio = idAspectRatio,
allowNewEnroll = allowNewEnroll,
countryCode = countryCode,
documentType = documentType,
captureBothSides = captureBothSides,
skipApiSubmission = skipApiSubmission,
selfieFile = bypassSelfieCaptureWithFile?.let { SerializableFile.fromFile(it) },
extraPartnerParams = extraPartnerParams,
)
val screenDestination = getDocumentCaptureRoute(
countryCode,
commonParams,
documentType,
captureBothSides,
idAspectRatio,
bypassSelfieCaptureWithFile,
allowGalleryUpload,
)
val orchestratedDestination = Routes.Orchestrated.EnhancedDocVRoute(
params = OrchestratedDocumentParams(commonParams),
Expand Down Expand Up @@ -385,6 +396,25 @@ fun SmileID.BiometricKYC(
typography: Typography = SmileID.typography,
onResult: SmileIDCallback<BiometricKycResult> = {},
) {
val commonParams = SelfieCaptureParams(
userId,
jobId,
allowNewEnroll,
allowAgentMode,
showAttribution,
showInstructions,
extraPartnerParams,
true,
skipApiSubmission = true,
)
val selfieDestination = getSelfieCaptureRoute(false, commonParams)
val screenDestination = Routes.Orchestrated.SelfieRoute(
params = OrchestratedSelfieCaptureParams(
commonParams,
startRoute = selfieDestination,
showStartRoute = true,
),
)
val orchestratedDestination = Routes.Orchestrated.BiometricKycRoute(
OrchestratedBiometricCaptureParams(
BiometricKYCParams(
Expand All @@ -397,23 +427,13 @@ fun SmileID.BiometricKYC(
allowNewEnroll = allowNewEnroll,
extraPartnerParams = extraPartnerParams,
),
startRoute = screenDestination,
showStartRoute = true,
),
)
val selfieCaptureParams = SelfieCaptureParams(
userId,
jobId,
allowNewEnroll,
allowAgentMode,
showAttribution,
showInstructions,
extraPartnerParams,
true,
skipApiSubmission = true,
)
val screenDestination = getSelfieCaptureRoute(false, selfieCaptureParams)
BaseSmileIDScreen(
orchestratedDestination,
screenDestination,
selfieDestination,
ResultCallbacks(onBiometricKYCResult = onResult),
modifier,
colorScheme,
Expand Down
Loading

0 comments on commit 213beb1

Please sign in to comment.