-
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
ec12eb9
commit fc76333
Showing
28 changed files
with
327 additions
and
32 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
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.countRedoRecords().then((result) => { | ||
console.log(`Redo Records: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,13 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
const DATA_SOURCE_CODE = "TEST"; | ||
const FLAGS = SzEngineFlags.SZ_WITH_INFO | ||
const RECORD_ID = "1"; | ||
|
||
szEngine.deleteRecord(DATA_SOURCE_CODE, RECORD_ID, FLAGS).then((result) => { | ||
console.log(`Redo Records: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,12 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
const FLAGS = SzEngineFlags.SZ_WITH_INFO | ||
const ENTITY_ID = 1; | ||
|
||
szEngine.findInterestingEntitiesByEntityId(ENTITY_ID, FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,13 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
const DATA_SOURCE_CODE = "TEST"; | ||
const FLAGS = SzEngineFlags.SZ_WITH_INFO | ||
const RECORD_ID = "1"; | ||
|
||
szEngine.findInterestingEntitiesByRecordId(DATA_SOURCE_CODE, RECORD_ID, FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,16 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
const FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS; | ||
const BUILD_OUT_DEGREES = 1; | ||
const MAX_DEGREES = 2; | ||
const MAX_ENTITIES = 10; | ||
const ENTITY_IDS = [1, 4]; | ||
|
||
szEngine.findNetworkByEntityId(ENTITY_IDS, MAX_DEGREES, BUILD_OUT_DEGREES, MAX_ENTITIES, FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,19 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
const FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS; | ||
const BUILD_OUT_DEGREES = 1; | ||
const MAX_DEGREES = 2; | ||
const MAX_ENTITIES = 10; | ||
const RECORDS:[string, string | number][] = [ | ||
["CUSTOMERS", "1001"], | ||
["CUSTOMERS", "1009"] | ||
]; | ||
|
||
szEngine.findNetworkByRecordId(RECORDS, MAX_DEGREES, BUILD_OUT_DEGREES, MAX_ENTITIES, FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,12 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
const FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS; | ||
|
||
szEngine.findPathByEntityId(1, 2, 2, [], [], FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,21 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
const FLAGS = SzEngineFlags.SZ_FIND_NETWORK_DEFAULT_FLAGS; | ||
|
||
szEngine.findPathByRecordId( | ||
"CUSTOMERS", | ||
"1001", | ||
"CUSTOMERS", | ||
"1009", | ||
2, | ||
[], | ||
[], | ||
FLAGS). | ||
then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.getActiveConfigId().then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.getEntityByEntityId(1, SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.getEntityByRecordId("CUSTOMERS", "1001", SzEngineFlags.SZ_ENTITY_DEFAULT_FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.getRecord("CUSTOMERS", "1001", SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.getRedoRecord().then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.getStats().then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,14 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
const RECORD_LIST:[string, string | number][] = [ | ||
["CUSTOMERS", "1001"], | ||
["CUSTOMERS", "1002"], | ||
] | ||
|
||
szEngine.getVirtualEntityByRecordId(RECORD_LIST, SzEngineFlags.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,10 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.howEntityByEntityId(1, SzEngineFlags.SZ_HOW_ENTITY_DEFAULT_FLAGS).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,26 @@ | ||
import { SzAbstractFactory, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const szParamFactory = new SzAbstractFactory(`0.0.0.0:8261`); | ||
const szEngine = szParamFactory.createEngine(); | ||
|
||
const DATA_SOURCE_CODE = "TEST"; | ||
const FLAGS = SzEngineFlags.SZ_RECORD_DEFAULT_FLAGS; | ||
const RECORD_DEFINITION = { | ||
"RECORD_TYPE": "PERSON", | ||
"PRIMARY_NAME_LAST": "Smith", | ||
"PRIMARY_NAME_FIRST": "Robert", | ||
"DATE_OF_BIRTH": "12/11/1978", | ||
"ADDR_TYPE": "MAILING", | ||
"ADDR_LINE1": "123 Main Street, Las Vegas NV 89132", | ||
"PHONE_TYPE": "HOME", | ||
"PHONE_NUMBER": "702-919-1300", | ||
"EMAIL_ADDRESS": "bsmith@work.com", | ||
"DATE": "1/2/18", | ||
"STATUS": "Active", | ||
"AMOUNT": "100" | ||
}; | ||
const RECORD_ID = "1"; | ||
|
||
await szEngine.preprocessRecord(JSON.stringify(RECORD_DEFINITION), FLAGS).then((resp) => { | ||
console.log(`RESULT #${RECORD_ID}:\n${resp}`); | ||
}); |
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,10 @@ | ||
import { SzAbstractFactory, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const szParamFactory = new SzAbstractFactory(`0.0.0.0:8261`); | ||
const szEngine = szParamFactory.createEngine(); | ||
|
||
szEngine.reevaluateEntity(1, SzEngineFlags.SZ_WITH_INFO).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}); |
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,10 @@ | ||
import { SzAbstractFactory, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const szParamFactory = new SzAbstractFactory(`0.0.0.0:8261`); | ||
const szEngine = szParamFactory.createEngine(); | ||
|
||
szEngine.reevaluateRecord("CUSTOMERS", "1001", SzEngineFlags.SZ_WITH_INFO).then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}); |
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,18 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
const ATTRIBUTES = { | ||
"NAME_FULL": "BOB SMITH", | ||
"EMAIL_ADDRESS": "bsmith@work.com" | ||
}; | ||
|
||
szEngine.searchByAttributes( | ||
ATTRIBUTES, | ||
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS, | ||
""). | ||
then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,4 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); |
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,15 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzAbstractFactoryOptions, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.whyEntities( | ||
1, | ||
4, | ||
SzEngineFlags.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS, | ||
). | ||
then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
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,15 @@ | ||
import { SzAbstractFactory as szAbstractFactoryCreator, SzEngineFlags } from '../../dist/@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const SzAbstractFactory = new szAbstractFactoryCreator(`0.0.0.0:8261`); | ||
const szEngine = SzAbstractFactory.createEngine(); | ||
|
||
szEngine.whyRecordInEntity( | ||
"CUSTOMERS", | ||
"1001", | ||
SzEngineFlags.SZ_WHY_RECORDS_DEFAULT_FLAGS, | ||
). | ||
then((result) => { | ||
console.log(`RESULT: ${result}`); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
Oops, something went wrong.