Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(license-api): Switch smart solutions client on feature flag #16231

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
357e1b0
feat: init
thorkellmani Oct 2, 2024
c985c07
feat: update client types
thorkellmani Oct 3, 2024
de79bce
Merge branch 'main' into feat/license-api-use-smart-solutions-v2
thorkellmani Oct 6, 2024
4e9b574
fix: wip
thorkellmani Oct 7, 2024
4e5a428
fix: typing
thorkellmani Oct 8, 2024
2e1b2df
fix: disability client
thorkellmani Oct 8, 2024
3c652e4
fix: revert clinet changes
thorkellmani Oct 8, 2024
fc0e0e8
feat: conditional license api init
thorkellmani Oct 8, 2024
1a16ca8
feat: pkpass helper class
thorkellmani Oct 8, 2024
01b53f2
fix: works
thorkellmani Oct 8, 2024
a675a0b
feat: versionable license-client
thorkellmani Oct 8, 2024
dd50863
feat: works
thorkellmani Oct 8, 2024
315ae78
chore: remove logs
thorkellmani Oct 8, 2024
6a7e4cd
fix: client updates
thorkellmani Oct 9, 2024
3e4a6c1
chore: add deprecated decoratorsgp
thorkellmani Oct 9, 2024
14ac6a8
fix: tests work
thorkellmani Oct 9, 2024
3f19554
fix: add version test
thorkellmani Oct 9, 2024
bee7309
chore: make nice
thorkellmani Oct 9, 2024
9109d7f
fix: json parsing
thorkellmani Oct 9, 2024
9374b9d
chore: fix deprecation messages
thorkellmani Oct 9, 2024
48bc124
fix: update types
thorkellmani Oct 9, 2024
86516d2
fix: rabbit review
thorkellmani Oct 9, 2024
cb2f93b
chore: use constant
thorkellmani Oct 9, 2024
1a1d0c7
chore: review
thorkellmani Oct 9, 2024
45bcea2
chore: remove variables
thorkellmani Oct 9, 2024
d9d4b73
fix: better error
thorkellmani Oct 9, 2024
e78bdf1
fix: revert constat deletion
thorkellmani Oct 9, 2024
967d610
Merge branch 'main' into feat/license-api-use-smart-solutions-v2
thorkellmani Oct 9, 2024
c87f2e6
fix: move types
thorkellmani Oct 9, 2024
89a39bb
Merge remote-tracking branch 'refs/remotes/origin/feat/license-api-us…
thorkellmani Oct 9, 2024
735ecfc
fix: linting
thorkellmani Oct 9, 2024
8d57047
fix: type
thorkellmani Oct 9, 2024
d980ba9
Merge branch 'main' into feat/license-api-use-smart-solutions-v2
thorkellmani Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/services/license-api/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
DrivingDigitalLicenseClientConfig,
HuntingDigitalLicenseClientConfig,
} from '@island.is/clients/license-client'
import { FeatureFlagConfig } from '@island.is/nest/feature-flags'

import { LoggingModule } from '@island.is/logging'

import { AuditModule } from '@island.is/nest/audit'
Expand Down Expand Up @@ -39,6 +41,7 @@ import { LicenseModule } from './modules/license/license.module'
MachineDigitalLicenseClientConfig,
HuntingDigitalLicenseClientConfig,
LicenseConfig,
FeatureFlagConfig,
],
}),
LicenseModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ApiProperty } from '@nestjs/swagger'
import { IsBoolean, IsOptional, IsString } from 'class-validator'
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { IsBoolean, IsEnum, IsOptional, IsString } from 'class-validator'
import { LicenseApiVersion } from '../license.types'

export class RevokeLicenseResponse {
@ApiProperty({ description: 'Has the license been revoked?' })
Expand All @@ -12,4 +13,9 @@ export class RevokeLicenseRequest {
@ApiProperty({ description: 'Optional request id for logging purposes' })
@IsString()
readonly requestId?: string

@ApiPropertyOptional({ enum: LicenseApiVersion })
@IsOptional()
@IsEnum(LicenseApiVersion)
readonly apiVersion?: LicenseApiVersion
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
IsOptional,
IsString,
} from 'class-validator'
import { LicenseUpdateType } from '../license.types'
import { LicenseApiVersion, LicenseUpdateType } from '../license.types'

export class UpdateLicenseRequest {
@ApiProperty({ enum: LicenseUpdateType, description: 'The update action' })
Expand All @@ -29,7 +29,13 @@ export class UpdateLicenseRequest {
@ApiProperty({ description: 'Optional request id for logging purposes' })
@IsString()
readonly requestId?: string

@ApiPropertyOptional({ enum: LicenseApiVersion })
@IsOptional()
@IsEnum(LicenseApiVersion)
readonly apiVersion?: LicenseApiVersion
}

export class UpdateLicenseResponse {
@ApiProperty()
@IsBoolean()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { IsPersonNationalId } from '@island.is/nest/core'
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { IsBoolean, IsObject, IsOptional, IsString } from 'class-validator'
import {
IsBoolean,
IsEnum,
IsObject,
IsOptional,
IsString,
} from 'class-validator'
import { LicenseApiVersion } from '../license.types'

export class VerifyLicenseRequest {
@ApiProperty({ description: 'PDF417 barcode scanner data' })
Expand All @@ -11,6 +18,11 @@ export class VerifyLicenseRequest {
@ApiProperty({ description: 'Optional request id for logging purposes' })
@IsString()
readonly requestId?: string

@ApiPropertyOptional({ enum: LicenseApiVersion })
@IsOptional()
@IsEnum(LicenseApiVersion)
readonly apiVersion?: LicenseApiVersion
}

class PassIdentity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
UserLicensesController,
} from './license.controller'
import { LicenseService } from './license.service'
import { LicenseServiceV1 } from './licenseV1.service'
import { LicenseServiceV2 } from './licenseV2.service'

@Module({
imports: [LicenseUpdateClientModule, LicenseCommonModule],
Expand All @@ -17,6 +19,8 @@ import { LicenseService } from './license.service'
useValue: logger,
},
LicenseService,
LicenseServiceV1,
LicenseServiceV2,
],
})
export class LicenseModule {}
Loading
Loading