Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 14x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | const { faker } = require('@faker-js/faker');
const {
PkiBrazilCertificateParameters,
PkiParaguayCertificateParameters,
SslCertificateParameters,
CnbCertificateParameters,
CieCertificateParameters,
ArispCertificateParameters,
CieInstitution,
ArispCartorioInfo,
ArispEndereco,
} = require('../lib/certificate-parameters');
const {
PkiParaguayCertificateTypes, ArispRoles,
} = require('../lib/enums');
const { PkiParaguayDocumentTypes } = require('../lib/enums');
const pkiBrazilCertificateParameters = (user) => {
return new PkiBrazilCertificateParameters({
name: user.name,
emailAddress: 'john@example.com',
cnpj: '70.647.755/0001-68',
companyName: 'Example Company',
cpf: user.cpf,
birthDate: '1990-01-01',
oabUF: 'SP',
oabNumero: '12345',
rgEmissor: 'SSP',
rgEmissorUF: 'SP',
rgNumero: '67890',
organizationUnits: ['IT', 'Legal'],
organization: 'Example Organization',
country: 'Brazil',
phoneNumber: faker.phoneNumber,
});
};
// same kind as pkiBrazil, only different format
const cnbCertificateParameters = (user) => {
return new CnbCertificateParameters({
name: user.name,
emailAddress: 'john@example.com',
cnpj: '70.647.755/0001-68',
companyName: 'Example Company',
cpf: user.cpf,
birthDate: '1990-01-01',
oabUF: 'SP',
oabNumero: '12345',
rgEmissor: 'SSP',
rgEmissorUF: 'SP',
rgNumero: '67890',
organizationUnits: ['IT', 'Legal'],
organization: 'Example Organization',
country: 'Brazil',
phoneNumber: faker.phoneNumber,
});
};
const sslCertificateParameters = () => {
return new SslCertificateParameters({
dnsNames: ['teste.dns.com', 'teste2.dns.com'],
});
};
const cieCertificateParameters = (user) => {
return new CieCertificateParameters({
name: user.name,
eea: 'EU',
birthDate: '1990-01-01',
cpf: user.cpf,
registrationNumber: 'ABC123',
idNumber: 'XYZ789',
idIssuer: 'Government',
idIssuerState: 'StateX',
institution: new CieInstitution({
name: 'University of Example',
city: 'Exemplary city',
state: 'New State of Example'
}),
degree: 'Computer Science',
course: 'Software Engineering',
});
};
const pkiParaguayCertificateParameters = () => {
return new PkiParaguayCertificateParameters({
type: PkiParaguayCertificateTypes.TRIBUTARIO,
organization: 'Patorum S.A.',
organizationalUnit: 'Fabricación',
ruc: '800806107',
title: 'Supervisor de producción',
givenNames: 'Roque González',
surnames: 'de Santa Cruz',
documentType: PkiParaguayDocumentTypes.CedulaDeIdentidad,
documentNumber: '1234567',
emailAddress: 'roque.cruz@mailinator.com',
phoneNumber: '+595981555123',
});
};
const arispCertificateParameters = (user) => {
return new ArispCertificateParameters({
nome: user.name,
cpf: user.cpf,
funcao: ArispRoles.OFICIAL,
cartorio: new ArispCartorioInfo({
cns: '1234567890',
numero: 'CART123',
nome: 'Cartório ABC',
oficial: 'João Silva',
endereco: new ArispEndereco({
logradouro: 'Rua Principal',
numero: '123',
complemento: 'Apartamento 4A',
distrito: 'Centro',
comarca: 'Cidade Central',
municipio: 'Central City',
estado: 'DF',
cep: '12345-678'
}),
telefone: '84928173650',
site: 'www.cartorioabc.com',
email: 'contato@cartorioabc.com'
})
});
};
module.exports = {
pkiBrazilCertificateParameters: pkiBrazilCertificateParameters,
cnbCertificateParameters: cnbCertificateParameters,
sslCertificateParameters: sslCertificateParameters,
cieCertificateParameters: cieCertificateParameters,
pkiParaguayCertificateParameters: pkiParaguayCertificateParameters,
arispCertificateParameters: arispCertificateParameters,
};
|