@qte/nest-spar-personsok
v1.2.4
Published
Nest module for SPAR Personsök.
Downloads
304
Keywords
Readme
Nest SPAR Personsök
Nest module for SPAR Personsök.
Installation
yarn add @qte/nest-spar-personsok
Usage
import { Module } from '@nestjs/common'
import { SparPersonsokModule } from '@qte/nest-spar-personsok'
import * as fs from 'fs'
const pfx = fs.readFileSync('path/to/pfx')
@Module({
imports: [
// Note that register accepts an empty object in non-production environments
SparPersonsokModule.register({
pfx: pfx,
passphrase: 'passphrase',
production: true,
identifieringsinformation: {
KundNrLeveransMottagare: '500243',
KundNrSlutkund: '500243',
UppdragId: '637',
SlutAnvandarId: 'qte-230819',
},
}),
],
})
export class AppModule {}
import { SparPersonsokService } from '@qte/nest-spar-personsok'
@Injectable()
export class AppService {
constructor(private readonly sparPersonsokService: SparPersonsokService) {}
async search() {
const result = await this.sparPersonsokService.personsok({
IdNummer: '198007199295',
})
console.log(result)
}
}