-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f718a09
commit 824712b
Showing
11 changed files
with
193 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/courDeCassation/src/connector/mapper/extractors/extractRoute/extractRoute.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ges/courDeCassation/src/connector/mapper/extractors/extractRoute/extractRouteForJuritj.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { documentType } from '@label/core'; | ||
|
||
export { extractRouteForJuritj }; | ||
|
||
function extractRouteForJuritj({}: { | ||
session: documentType['decisionMetadata']['session']; | ||
solution: documentType['decisionMetadata']['solution']; | ||
publicationCategory: documentType['publicationCategory']; | ||
chamberId: string; | ||
civilMatterCode: documentType['decisionMetadata']['civilMatterCode']; | ||
civilCaseCode: documentType['decisionMetadata']['civilCaseCode']; | ||
criminalCaseCode: documentType['decisionMetadata']['criminalCaseCode']; | ||
NACCode: documentType['decisionMetadata']['NACCode']; | ||
endCaseCode: documentType['decisionMetadata']['endCaseCode']; | ||
}): documentType['route'] { | ||
return 'exhaustive'; | ||
} |
31 changes: 31 additions & 0 deletions
31
packages/courDeCassation/src/scripts/importJuritjDocuments.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import yargs from 'yargs'; | ||
import { buildBackend } from '@label/backend'; | ||
import { sderConnector } from '../connector'; | ||
import { parametersHandler } from '../lib/parametersHandler'; | ||
|
||
(async () => { | ||
const { environment, settings } = await parametersHandler.getParameters(); | ||
const { count } = parseArgv(); | ||
const backend = buildBackend(environment, settings); | ||
|
||
backend.runScript(() => sderConnector.importJuritjDocuments(count), { | ||
shouldLoadDb: true, | ||
}); | ||
})(); | ||
|
||
function parseArgv() { | ||
const argv = yargs | ||
.options({ | ||
count: { | ||
demandOption: true, | ||
description: 'number of documents you want to import', | ||
type: 'number', | ||
}, | ||
}) | ||
.help() | ||
.alias('help', 'h').argv; | ||
|
||
return { | ||
count: argv.count as number, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters