npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zscanner-backend

v0.9.20

Published

zScanner backend server. For or extend for your particular needs.

Downloads

6

Readme

zScanner

build status

API

Request Document Types

  GET /api-zscanner/v3/documenttypes

  200 OK
  [
      {
          mode: 'doc',
          display: 'Rodný list',
          type: 'birthcertificate',
      },
      {
          mode: 'doc',
          display: 'Občanský průkaz',
          type: 'nationalid',
      },
      ...
  ]
  curl -v -v \
       http://localhost:10805/api-zscanner/v3/documenttypes

Request Folders by Query

  GET /api-zscanner/v3/folders/search?query=mach

  200 OK
  [
      {
          externalId: '925221/9449',
          internalId: '124587112',
          name: 'Radana Macháčková',
          type: 'suggestedResult'
      },
      {
          externalId: '011116/0632',
          internalId: '124587113',
          name: 'František Machajda',
          type: 'searchResult'
      },
      ...
  ]
  curl -v -v \
       http://localhost:10805/api-zscanner/v3/folders/search?query=ova

Request Folder by Barcode

  GET /api-zscanner/v3/folders/decode?query=124587112

  200 OK
  {
      externalId: '925221/9449',
      internalId: '124587112',
      name: 'Radana Macháčková',
  }
  curl -v -v \
       http://localhost:10805/api-zscanner/v3/folders/decode?query=124587154

Submit Document Summary

  POST /api-zscanner/v3/documents/summary
  {
    "correlation": "1234",
    "folderInternalId": "124587112",
    "documentMode": "doc",
    "documentType": "birthcertificate",
    "pages": 1,
    "datetime": "2018-02-12T23:12:30Z",
    "name": "Rodny list",
    "notes": "Poznamky"
  }

  200 OK
  curl -v -v -XPOST \
       -H 'Content-Type: application-json' \
       --data '{
         "correlation": "1234",
         "folderInternalId": "124587112",
         "documentMode": "doc",
         "documentType": "birthcertificate",
         "pages": 1,
         "datetime": "2018-02-12T23:12:40Z",
         "name": "Rodny list",
         "notes": "Poznamky"
       }' \
       http://localhost:10805/api-zscanner/v3/documents/summary

Submit Document Page

  POST /api-zscanner/v3/documents/page
  Content-Type: multipart/form-data

  With the following parameters:
    correlation: "1234",
    page: 0,
    page (file): ...contents-of-the-image...

  200 OK
  curl -v -v -XPOST \
       -F "correlation=1234" \
       -F "page=0" \
       -F "[email protected]" \
       http://localhost:10805/api-zscanner/v3/documents/page

Upload large file

Start upload

  POST /api-zscanner/upload

  With following headers (value in metadata is base64 encoded):
    Tus-Resumable: 1.0.0
    Upload-Length: 5980
    Upload-Metadata: uploadType cGFnZQ==,relativePath bnVsbA==,name c2NvcmVzaGVldHMgKDQ4KS5wZGY=,type YXBwbGljYXRpb24vcGRm,filetype YXBwbGljYXRpb24vcGRm,filename c2NvcmVzaGVldHMgKDQ4KS5wZGY=

On success, there will be Location in response headers which is the endpoint for sending data

Write data to existing upload

PATCH request to url from Location header of POST request

  PATCH /api-zscanner/upload/298a1e1a0e9aed16017d7e5c607a77fd

  With following headers:
    Content-Type: application/offset+octet-stream
    Tus-Resumable: 1.0.0
    Upload-Offset: 0
  And data in Request Payload

Request BodyParts views

  GET /api-zscanner/v3/bodyparts/views

  200 OK
    [
        {
            "id": "1",
            "bodyParts":
                [
                    {
                        "id": "leftEye",
                        "name": "Left eye",
                        "coordinates": [0.2, 0.2]
                    },
                    {
                        "id": "rightEye",
                        "name": "Right eye",
                        "coordinates": [0.8, 0.2]
                    }
                ]
        },
        {
            "id": "2",
            "bodyParts":
                [
                    {
                        "id": "finger",
                        "name": "Finger",
                        "coordinates": [0.1, 0.1]
                    }
                ]
        }
    ]
  curl -v -v \
       http://localhost:10805/api-zscanner/v3/bodyparts/views

Request BodyParts view image

  GET /api-zscanner/v3/bodyparts/views/:id/image

  Get binary data of image (where :id is id of view)
  curl -v -v \
       http://localhost:10805/api-zscanner/v3/bodyparts/views/1/image

Request folder defects

  GET /api-zscanner/v3/folders/:folderId/defects

  200 OK
    [
        {
            "id": "defect1",
            "name": "Name of defect 1",
            "bodyPartId": "leftEye"
        },
        {
            "id": "defect2",
            "name": "Name of defect 2",
            "bodyPartId": "finger"
        }
    ]
  curl -v -v \
       http://localhost:10805/api-zscanner/v3/folders/1/defects