Skip to content

Commit

Permalink
[OTE-419] Add GB_GEO to compliance reasons (backport #1697) (#1717)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher-Li <[email protected]>
  • Loading branch information
mergify[bot] and Christopher-Li authored Jun 18, 2024
1 parent 2c3a4c7 commit f542b8b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as Knex from 'knex';

import { formatAlterTableEnumSql } from '../helpers';

export async function up(knex: Knex): Promise<void> {
return knex.raw(formatAlterTableEnumSql(
'compliance_status',
'reason',
['MANUAL', 'US_GEO', 'CA_GEO', 'GB_GEO', 'SANCTIONED_GEO', 'COMPLIANCE_PROVIDER'],
));
}

export async function down(knex: Knex): Promise<void> {
return knex.raw(formatAlterTableEnumSql(
'compliance_status',
'reason',
['MANUAL', 'US_GEO', 'CA_GEO', 'SANCTIONED_GEO', 'COMPLIANCE_PROVIDER'],
));
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum ComplianceReason {
MANUAL = 'MANUAL',
US_GEO = 'US_GEO',
CA_GEO = 'CA_GEO',
GB_GEO = 'GB_GEO',
SANCTIONED_GEO = 'SANCTIONED_GEO',
COMPLIANCE_PROVIDER = 'COMPLIANCE_PROVIDER',
}
Expand Down
1 change: 1 addition & 0 deletions indexer/services/comlink/public/api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3383,6 +3383,7 @@ This operation does not require authentication
|*anonymous*|MANUAL|
|*anonymous*|US_GEO|
|*anonymous*|CA_GEO|
|*anonymous*|GB_GEO|
|*anonymous*|SANCTIONED_GEO|
|*anonymous*|COMPLIANCE_PROVIDER|

Expand Down
1 change: 1 addition & 0 deletions indexer/services/comlink/public/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"MANUAL",
"US_GEO",
"CA_GEO",
"GB_GEO",
"SANCTIONED_GEO",
"COMPLIANCE_PROVIDER"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export function getGeoComplianceReason(
return ComplianceReason.US_GEO;
} else if (country === 'CA') {
return ComplianceReason.CA_GEO;
} else if (country === 'GB') {
return ComplianceReason.GB_GEO;
} else {
return ComplianceReason.SANCTIONED_GEO;
}
Expand Down

0 comments on commit f542b8b

Please sign in to comment.