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

@secureideasllc/orion-data

v3.0.3

Published

Contains type definitions for the Orion services.

Downloads

638

Readme

Orion Data Types

Contains type definitions for the Orion services.

Installation

npm install @secureideasllc/orion-data

Important Note

This is pre-release. Breaking changes will be frequent, and will not increment the major version, for the near future. Once we have an initial stable release, we can comply with semantic versioning going forward, but 1.x.x should expect regular changes to data types.`

Development

These types are defined with Zod as the schema language. Typescript types are generated from the Zod schemas using its built-in type inference. Enums are an exception, as they are defined in Typescript and then converted to Zod schemas using its z.nativeEnum method. Because of the type inference, any changes to the Zod schemas will be reflected in the Typescript types. A given Zod schema's .parse method will always return a valid instance of the corresponding Typescript type, if it succeeds. However, the Typescript types are not guaranteed to be valid instances of the Zod schemas. This is because the Zod schemas can define additional constraints that are not expressible in Typescript. For example, a Zod schema can define a string that must be a valid email address, but the Typescript type will only be a string. This is a limitation of the Typescript language.

Naming Conventions

Conventionally, the Zod schemas use the suffix Schema to distinguish them from the Typescript types. So for example, the Zod schema for the User type is UserSchema, and the Typescript type is User. In the case of enums, the Zod schema is UserTypeEnum and the Typescript type is UserType.

Amending Existing Types

For now we can modify the types pretty freely, and should expect to. In the future, we may need to consider breaking changes more carefully.

Note

This repo uses a prepush hook that checks that the last commit has a message in the form of a semantic version. This is because the package publishing will fail if the version isn't incremented. Run npm version patch, npm version minor or npm version major before publishing. This will autoincrement the version in the package.json, and commit it to the history in a valid form.

Entity Relationship Diagram

Diagram Rev History

| Date | Author | Description | |------|--------|-------------| | 2024-01-24 | Mic | Initial draft | | 2024-01-25 | Mic | Renamed fields to match Orion-Data package | | 2024-02-02 | Mic | Removed backend references |

Diagram

erDiagram
ACCOUNT ||--o{ JOB : contains
JOB ||--o{ TARGETPATH: contains
JOB ||--o{ JOBRUN : relates-to
JOBRUN ||--|{ JOBRUNTARGET : relates-to
JOBRUNTARGET }o--o{ RESOURCE : refers-to
JOBRUN ||--|{ TARGETPATH: contains-copy-of
RISK }o--|{ RESOURCE : affects

ACCOUNT {
  string accountId
  string objectId
  string name
  string owner
  Job[] jobs
}
JOB {
  string jobId
  string jobName
  string domain
  string(base64) favicon
  enum runStatus
  string[] paths
  timestamp lastRun
  number lastRiskCount
  number lastRiskScore
}

TARGETPATH {
  string path
}
JOBRUN {
  string id
  string jobId
  String runId
  string runStatus
  timestamp runDate
  string[] paths
}
JOBRUNTARGET {
  string jobRunId
  string path
  enum targetStatus
  number responseCode
  string resourceId
  string[] referredResourceIds
}
RESOURCE {
  string resourceId
  string resourceSourceUrl
  string resourceHash
  string resourceType
}
RISK {
  string id
  string name
  string description
  number score
}