interface.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. export interface Message {
  2. id: string;
  3. payload: any;
  4. }
  5. export interface ConnectionState {
  6. uuid?: string | number;
  7. status: 'BUFFER' | 'DIRECT_PUBLISH' | 'LIMIT_EXCEEDED',
  8. reason?: string;
  9. payload?: any;
  10. }
  11. export interface WrappedMessage {
  12. timeReceived: Date,
  13. payload: any
  14. thisMessageID: string,
  15. previousMessageID: string | null,
  16. }
  17. /* These are just sample interfaces to test with the verification process. */
  18. export interface FisMessage {
  19. header: {
  20. messageID: string,
  21. messageName: string
  22. },
  23. data: any
  24. }
  25. export interface FingerprintPayloadUI {
  26. id: string,
  27. cmd: `Registration` | `Verification` | `Quality Assurance` | `Populate Registered Prints`,
  28. date: Date,
  29. personInfo: PersonInfo,
  30. fpScan: string,
  31. fingerPosition: number
  32. }
  33. export interface FingerprintPayload extends FingerprintPayloadUI {
  34. fpTemplateArray: Fingerprint[]
  35. }
  36. export interface JavaResponse {
  37. id: string,
  38. operation: `Registration` | `Verification` | `Quality Assurance`,
  39. status: `Failed` | `Success` | `Registered` | `Not Registered`,
  40. message: string,
  41. data: PersonFingerprintData,
  42. edgeScore: number,
  43. score: number
  44. }
  45. export interface PersonFingerprintData {
  46. id: string,
  47. name: string,
  48. org: string,
  49. code: string,
  50. fingerprints: Fingerprint[]
  51. }
  52. export interface Fingerprint {
  53. name: string,
  54. fpPosition: number,
  55. fpTemplate: string,
  56. }
  57. export interface PersonInfo {
  58. id: string,
  59. name: string,
  60. org: string,
  61. code: number
  62. }
  63. export interface TransparencyResponseData {
  64. score: number,
  65. person: string,
  66. fpPosition: number,
  67. fpQuality: `good` | 'bad'
  68. }