{
  "author": {
    "name": "Chai Jian Wei <jianwei.c@affinidi.com>",
    "roles": [
      "author"
    ]
  },
  "bundled": {
    "chai": "^4.3.4",
    "dotenv": "^8.2.0",
    "form-data": "^4.0.0",
    "jsonwebtoken": "^8.5.1",
    "mocha": "^9.0.3",
    "node-fetch": "^2.6.1",
    "uuid": "^3.4.0"
  },
  "description": "An common-check-widget-backend-lib used to development backend for common-check-widget-frontend",
  "homepage": "https://gitlab.com/affinidi/safe-travel/st-experiments/common-check-widget-backend-lib",
  "jsiiVersion": "1.32.0 (build 3f4fe23)",
  "keywords": [
    "common-check-widget",
    "jsii",
    "typescript",
    "dotnet",
    "java",
    "python"
  ],
  "license": "MIT-0",
  "metadata": {
    "jsii": {
      "pacmak": {
        "hasDefaultInterfaces": true
      }
    }
  },
  "name": "@affinidi/common-check-widget-backend-lib",
  "readme": {
    "markdown": "# @affinidi/common-check-widget-backend-lib [![NPM][npm-image]][npm-url] [![PyPI][pypi-image]][pypi-url] [![Maven][maven-image]][maven-url] [![NuGet][nuget-image]][nuget-url]\n\n> An common-check-widget-backend-lib package authored in TypeScript that gets published as GitHub packages for Node.js, Python etc\n\n## License\n\nThis library is licensed under the MIT-0 License. See the LICENSE file.\n\n[npm-image]: https://img.shields.io/npm/v/jsii-code-samples\n[npm-url]: https://www.npmjs.com/package/@affinidi/common-check-widget-backend-lib\n[pypi-image]: https://img.shields.io/pypi/v/aws-jsiisamples.jsii-code-samples\n[pypi-url]: https://pypi.org/project/common-check-widget-backend-lib\n\n## Documentations\nhttps://common-check-widget-backend-lib.affinity-project.org/\n\n\n[maven-image]: https://img.shields.io/maven-central/v/software.aws.jsiisamples.jsii/jsii-code-samples\n[maven-url]: https://search.maven.org/artifact/common.check.widget.backend.lib/backend-ib\n[nuget-image]: https://img.shields.io/nuget/v/AWSSamples.Jsii\n[nuget-url]: https://www.nuget.org/packages/CCW.Jsii\"\n"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/affinityproject/common-check-widget-backend-lib.git"
  },
  "schema": "jsii/0.10.0",
  "submodules": {
    "@affinidi/common-check-widget-backend-lib.commonCheckVerify": {
      "locationInModule": {
        "filename": "lib/index.ts",
        "line": 3
      }
    },
    "@affinidi/common-check-widget-backend-lib.commonCheckVerify.endpointServiceBase": {
      "locationInModule": {
        "filename": "lib/commonCheckService.ts",
        "line": 3
      }
    }
  },
  "targets": {
    "dotnet": {
      "iconUrl": "https://raw.githubusercontent.com/aws/jsii/master/logo/png/128x128.png",
      "namespace": "Affinidi.Common.Check.Widget.Backend.Lib",
      "packageId": "Affinidi.Common.Check.Widget.Backend.Lib"
    },
    "java": {
      "maven": {
        "artifactId": "common-check-widget-backend-lib",
        "groupId": "com.affinidi.stg"
      },
      "package": "org.affinity.project"
    },
    "js": {
      "npm": "@affinidi/common-check-widget-backend-lib"
    },
    "python": {
      "distName": "affinidi.common-check-widget-backend-lib",
      "module": "affinidi.common_check_widget_backend_lib"
    }
  },
  "types": {
    "@affinidi/common-check-widget-backend-lib.CommonCheckWidget": {
      "assembly": "@affinidi/common-check-widget-backend-lib",
      "fqn": "@affinidi/common-check-widget-backend-lib.CommonCheckWidget",
      "initializer": {
        "locationInModule": {
          "filename": "lib/index.ts",
          "line": 9
        },
        "parameters": [
          {
            "name": "requestID",
            "optional": true,
            "type": {
              "primitive": "string"
            }
          }
        ]
      },
      "kind": "class",
      "locationInModule": {
        "filename": "lib/index.ts",
        "line": 6
      },
      "methods": [
        {
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 57
          },
          "name": "compareToken",
          "parameters": [
            {
              "name": "tokenExpected",
              "type": {
                "primitive": "any"
              }
            },
            {
              "name": "tokenCompared",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "boolean"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 37
          },
          "name": "decrypt",
          "parameters": [
            {
              "name": "data",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 45
          },
          "name": "generateHashFromData",
          "parameters": [
            {
              "name": "data",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 53
          },
          "name": "generateJWTFromData",
          "parameters": [
            {
              "name": "data",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 49
          },
          "name": "generateJWTFromDataHash",
          "parameters": [
            {
              "name": "data",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 41
          },
          "name": "generatePayloadJson",
          "parameters": [
            {
              "name": "flightNumber",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "flightDate",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "firstName",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "lastName",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "dateOfBirth",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "passport",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "nationality",
              "type": {
                "primitive": "string"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 33
          },
          "name": "getErrorMessage",
          "parameters": [
            {
              "name": "errorObj",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "any"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 27
          },
          "name": "verifyAsync",
          "parameters": [
            {
              "name": "obj",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "any"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 19
          },
          "name": "verifyWithCallback",
          "parameters": [
            {
              "name": "obj",
              "type": {
                "primitive": "any"
              }
            },
            {
              "name": "callback",
              "type": {
                "primitive": "any"
              }
            }
          ]
        }
      ],
      "name": "CommonCheckWidget",
      "properties": [
        {
          "locationInModule": {
            "filename": "lib/index.ts",
            "line": 8
          },
          "name": "commonCheckVerify",
          "type": {
            "fqn": "@affinidi/common-check-widget-backend-lib.commonCheckVerify.CommonCheckVerify"
          }
        }
      ]
    },
    "@affinidi/common-check-widget-backend-lib.commonCheckVerify.CommonCheckVerify": {
      "assembly": "@affinidi/common-check-widget-backend-lib",
      "base": "@affinidi/common-check-widget-backend-lib.commonCheckVerify.endpointServiceBase.EndpointServiceBase",
      "fqn": "@affinidi/common-check-widget-backend-lib.commonCheckVerify.CommonCheckVerify",
      "initializer": {
        "locationInModule": {
          "filename": "lib/commonCheckService.ts",
          "line": 10
        },
        "parameters": [
          {
            "name": "requestID",
            "type": {
              "primitive": "string"
            }
          }
        ]
      },
      "kind": "class",
      "locationInModule": {
        "filename": "lib/commonCheckService.ts",
        "line": 6
      },
      "methods": [
        {
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 24
          },
          "name": "fillObj",
          "parameters": [
            {
              "name": "obj",
              "type": {
                "primitive": "any"
              }
            }
          ]
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 29
          },
          "name": "generateJWT",
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 34
          },
          "name": "generateOptions",
          "returns": {
            "type": {
              "primitive": "any"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 48
          },
          "name": "generateResponse",
          "returns": {
            "type": {
              "primitive": "any"
            }
          }
        }
      ],
      "name": "CommonCheckVerify",
      "namespace": "commonCheckVerify",
      "properties": [
        {
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 7
          },
          "name": "obj",
          "type": {
            "primitive": "any"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 9
          },
          "name": "options",
          "overrides": "@affinidi/common-check-widget-backend-lib.commonCheckVerify.endpointServiceBase.EndpointServiceBase",
          "type": {
            "primitive": "any"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/commonCheckService.ts",
            "line": 8
          },
          "name": "requestID",
          "overrides": "@affinidi/common-check-widget-backend-lib.commonCheckVerify.endpointServiceBase.EndpointServiceBase",
          "type": {
            "primitive": "string"
          }
        }
      ]
    },
    "@affinidi/common-check-widget-backend-lib.commonCheckVerify.endpointServiceBase.EndpointServiceBase": {
      "abstract": true,
      "assembly": "@affinidi/common-check-widget-backend-lib",
      "fqn": "@affinidi/common-check-widget-backend-lib.commonCheckVerify.endpointServiceBase.EndpointServiceBase",
      "initializer": {
        "locationInModule": {
          "filename": "lib/base.ts",
          "line": 16
        },
        "parameters": [
          {
            "name": "apiEndpoint",
            "type": {
              "primitive": "string"
            }
          },
          {
            "name": "apiKey",
            "type": {
              "primitive": "string"
            }
          },
          {
            "name": "errorCode",
            "type": {
              "primitive": "string"
            }
          },
          {
            "name": "privateKeyFile",
            "type": {
              "primitive": "string"
            }
          },
          {
            "name": "secretPassphrase",
            "type": {
              "primitive": "string"
            }
          },
          {
            "name": "requestID",
            "type": {
              "primitive": "string"
            }
          }
        ]
      },
      "kind": "class",
      "locationInModule": {
        "filename": "lib/base.ts",
        "line": 6
      },
      "methods": [
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 35
          },
          "name": "callAPIEndpoint",
          "returns": {
            "type": {
              "primitive": "any"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 139
          },
          "name": "compare",
          "parameters": [
            {
              "name": "tokenExpected",
              "type": {
                "primitive": "any"
              }
            },
            {
              "name": "tokenCompared",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "boolean"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 78
          },
          "name": "decrypt",
          "parameters": [
            {
              "name": "data",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 30
          },
          "name": "fillOptions",
          "parameters": [
            {
              "name": "options",
              "type": {
                "primitive": "any"
              }
            }
          ]
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 112
          },
          "name": "generateHashFromData",
          "parameters": [
            {
              "name": "dataToSign",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 132
          },
          "name": "generateJWTFromData",
          "parameters": [
            {
              "name": "dataToSign",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "async": true,
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 121
          },
          "name": "generateJWTFromDataHash",
          "parameters": [
            {
              "name": "dataToSign",
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 95
          },
          "name": "generatePayloadJson",
          "parameters": [
            {
              "name": "flightNumber",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "flightDate",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "firstName",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "lastName",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "dateOfBirth",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "passport",
              "type": {
                "primitive": "string"
              }
            },
            {
              "name": "nationality",
              "type": {
                "primitive": "string"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 57
          },
          "name": "getErrorMessage",
          "parameters": [
            {
              "name": "errorObj",
              "optional": true,
              "type": {
                "primitive": "any"
              }
            }
          ],
          "returns": {
            "type": {
              "primitive": "any"
            }
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 25
          },
          "name": "retrieveApiKey",
          "returns": {
            "type": {
              "primitive": "string"
            }
          }
        }
      ],
      "name": "EndpointServiceBase",
      "namespace": "commonCheckVerify.endpointServiceBase",
      "properties": [
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 7
          },
          "name": "apiEndpoint",
          "type": {
            "primitive": "string"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 8
          },
          "name": "apiKey",
          "type": {
            "primitive": "string"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 9
          },
          "name": "errorCode",
          "type": {
            "primitive": "string"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 14
          },
          "name": "errors",
          "type": {
            "primitive": "any"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 13
          },
          "name": "options",
          "type": {
            "primitive": "any"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 10
          },
          "name": "privateKeyFile",
          "type": {
            "primitive": "string"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 12
          },
          "name": "requestID",
          "type": {
            "primitive": "string"
          }
        },
        {
          "locationInModule": {
            "filename": "lib/base.ts",
            "line": 11
          },
          "name": "secretPassphrase",
          "type": {
            "primitive": "string"
          }
        }
      ]
    }
  },
  "version": "2.1.1",
  "fingerprint": "C5x6qJ47JWVInDKj8J6RenRPOiItTUyHNJ/N5u+UwUE="
}
