@digigov-oss/data-to-amka-client
Advanced tools
Comparing version 1.0.11 to 1.0.12
@@ -39,3 +39,3 @@ import { AuditRecord, AuditEngine } from '@digigov-oss/gsis-audit-record-db'; | ||
*/ | ||
export declare type Overides = { | ||
export declare type overrides = { | ||
endpoint?: string; | ||
@@ -52,6 +52,6 @@ prod?: boolean; | ||
* @param pass string; | ||
* @param overides Overides; | ||
* @param overrides overrides; | ||
* @returns amka2dataOutputRecord | errorRecord | ||
*/ | ||
export declare const getAmka: (surname: string, firstName: string, fatherName: string, motherName: string, birthDate: string, afm: string, adt: string, user: string, pass: string, overides?: Overides | undefined) => Promise<any>; | ||
export declare const getAmka: (surname: string, firstName: string, fatherName: string, motherName: string, birthDate: string, afm: string, adt: string, user: string, pass: string, overrides?: overrides | undefined) => Promise<any>; | ||
export default getAmka; |
@@ -24,12 +24,12 @@ "use strict"; | ||
* @param pass string; | ||
* @param overides Overides; | ||
* @param overrides overrides; | ||
* @returns amka2dataOutputRecord | errorRecord | ||
*/ | ||
const getAmka = (surname, firstName, fatherName, motherName, birthDate, afm, adt, user, pass, overides) => __awaiter(void 0, void 0, void 0, function* () { | ||
const getAmka = (surname, firstName, fatherName, motherName, birthDate, afm, adt, user, pass, overrides) => __awaiter(void 0, void 0, void 0, function* () { | ||
var _a, _b, _c, _d, _e; | ||
const endpoint = (_a = overides === null || overides === void 0 ? void 0 : overides.endpoint) !== null && _a !== void 0 ? _a : ""; | ||
const prod = (_b = overides === null || overides === void 0 ? void 0 : overides.prod) !== null && _b !== void 0 ? _b : false; | ||
const auditInit = (_c = overides === null || overides === void 0 ? void 0 : overides.auditInit) !== null && _c !== void 0 ? _c : {}; | ||
const auditStoragePath = (_d = overides === null || overides === void 0 ? void 0 : overides.auditStoragePath) !== null && _d !== void 0 ? _d : "/tmp"; | ||
const auditEngine = (_e = overides === null || overides === void 0 ? void 0 : overides.auditEngine) !== null && _e !== void 0 ? _e : new gsis_audit_record_db_1.FileEngine(auditStoragePath); | ||
const endpoint = (_a = overrides === null || overrides === void 0 ? void 0 : overrides.endpoint) !== null && _a !== void 0 ? _a : ""; | ||
const prod = (_b = overrides === null || overrides === void 0 ? void 0 : overrides.prod) !== null && _b !== void 0 ? _b : false; | ||
const auditInit = (_c = overrides === null || overrides === void 0 ? void 0 : overrides.auditInit) !== null && _c !== void 0 ? _c : {}; | ||
const auditStoragePath = (_d = overrides === null || overrides === void 0 ? void 0 : overrides.auditStoragePath) !== null && _d !== void 0 ? _d : "/tmp"; | ||
const auditEngine = (_e = overrides === null || overrides === void 0 ? void 0 : overrides.auditEngine) !== null && _e !== void 0 ? _e : new gsis_audit_record_db_1.FileEngine(auditStoragePath); | ||
const wsdl = prod == true ? config_json_1.default.prod.wsdl : config_json_1.default.test.wsdl; | ||
@@ -36,0 +36,0 @@ const auditRecord = yield (0, gsis_audit_record_db_1.generateAuditRecord)(auditInit, auditEngine); |
@@ -39,3 +39,3 @@ import { AuditRecord, AuditEngine } from '@digigov-oss/gsis-audit-record-db'; | ||
*/ | ||
export declare type Overides = { | ||
export declare type overrides = { | ||
endpoint?: string; | ||
@@ -52,6 +52,6 @@ prod?: boolean; | ||
* @param pass string; | ||
* @param overides Overides; | ||
* @param overrides overrides; | ||
* @returns amka2dataOutputRecord | errorRecord | ||
*/ | ||
export declare const getAmka: (surname: string, firstName: string, fatherName: string, motherName: string, birthDate: string, afm: string, adt: string, user: string, pass: string, overides?: Overides | undefined) => Promise<any>; | ||
export declare const getAmka: (surname: string, firstName: string, fatherName: string, motherName: string, birthDate: string, afm: string, adt: string, user: string, pass: string, overrides?: overrides | undefined) => Promise<any>; | ||
export default getAmka; |
@@ -9,11 +9,11 @@ import soapClient from './soapClient.js'; | ||
* @param pass string; | ||
* @param overides Overides; | ||
* @param overrides overrides; | ||
* @returns amka2dataOutputRecord | errorRecord | ||
*/ | ||
export const getAmka = async (surname, firstName, fatherName, motherName, birthDate, afm, adt, user, pass, overides) => { | ||
const endpoint = overides?.endpoint ?? ""; | ||
const prod = overides?.prod ?? false; | ||
const auditInit = overides?.auditInit ?? {}; | ||
const auditStoragePath = overides?.auditStoragePath ?? "/tmp"; | ||
const auditEngine = overides?.auditEngine ?? new FileEngine(auditStoragePath); | ||
export const getAmka = async (surname, firstName, fatherName, motherName, birthDate, afm, adt, user, pass, overrides) => { | ||
const endpoint = overrides?.endpoint ?? ""; | ||
const prod = overrides?.prod ?? false; | ||
const auditInit = overrides?.auditInit ?? {}; | ||
const auditStoragePath = overrides?.auditStoragePath ?? "/tmp"; | ||
const auditEngine = overrides?.auditEngine ?? new FileEngine(auditStoragePath); | ||
const wsdl = prod == true ? config.prod.wsdl : config.test.wsdl; | ||
@@ -20,0 +20,0 @@ const auditRecord = await generateAuditRecord(auditInit, auditEngine); |
{ | ||
"name": "@digigov-oss/data-to-amka-client", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Client for data2amka service of GSIS", |
@@ -30,6 +30,6 @@ # data2amkaClient | ||
``` | ||
* you can use `overides` to override the default values | ||
* for your tests, you don't need to use the `overides` mecahnism, in that case, the default storage path will be used ie `/tmp` | ||
* you can use `overrides` to override the default values | ||
* for your tests, you don't need to use the `overrides` mecahnism, in that case, the default storage path will be used ie `/tmp` | ||
* look at [KED](https://www.gsis.gr/dimosia-dioikisi/ked/) standard guides for records you can use on auditInit" | ||
Also, you can use `overides` to override the default storage engine. Look at the test folder, for example. | ||
Also, you can use `overrides` to override the default storage engine. Look at the test folder, for example. | ||
@@ -97,8 +97,8 @@ Look at module [AuditRecordDB](https://gitlab.grnet.gr/digigov-oss/auditRecordDB/-/blob/main/README.md) for more details on how to use the AuditEngine. | ||
KED advertises a wrong endpoint(!) for the `data2amka` service on production WSDL. So, you have to use (override) the endpoint: `https://ked.gsis.gr/esb/amkaInfoService` | ||
You can do that by setting the `endpoint` property on the `overides` object. | ||
You can do that by setting the `endpoint` property on the `overrides` object. | ||
``` | ||
const overides = { | ||
const overrides = { | ||
endpoint: 'https://ked.gsis.gr/esb/amkaInfoService', | ||
} | ||
``` |
@@ -45,3 +45,3 @@ import soapClient from './soapClient.js'; | ||
*/ | ||
export type Overides = { | ||
export type overrides = { | ||
endpoint?:string; | ||
@@ -59,3 +59,3 @@ prod?:boolean; | ||
* @param pass string; | ||
* @param overides Overides; | ||
* @param overrides overrides; | ||
* @returns amka2dataOutputRecord | errorRecord | ||
@@ -72,8 +72,8 @@ */ | ||
pass:string, | ||
overides?:Overides) => { | ||
const endpoint = overides?.endpoint ?? ""; | ||
const prod = overides?.prod ?? false; | ||
const auditInit = overides?.auditInit ?? {} as AuditRecord; | ||
const auditStoragePath = overides?.auditStoragePath ?? "/tmp" | ||
const auditEngine = overides?.auditEngine ?? new FileEngine(auditStoragePath); | ||
overrides?:overrides) => { | ||
const endpoint = overrides?.endpoint ?? ""; | ||
const prod = overrides?.prod ?? false; | ||
const auditInit = overrides?.auditInit ?? {} as AuditRecord; | ||
const auditStoragePath = overrides?.auditStoragePath ?? "/tmp" | ||
const auditEngine = overrides?.auditEngine ?? new FileEngine(auditStoragePath); | ||
const wsdl = prod==true? config.prod.wsdl : config.test.wsdl; | ||
@@ -80,0 +80,0 @@ const auditRecord = await generateAuditRecord(auditInit, auditEngine); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
37635
0