Skip to content

Commit

Permalink
docs: typedoc update (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 authored Jun 29, 2024
2 parents 2fa8d4d + fe35c72 commit e2c49e8
Show file tree
Hide file tree
Showing 29 changed files with 92 additions and 98 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deploy-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,38 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.test == 'true'
run: npm install --ignore-scripts
- name: Run Lint
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.src == 'true
run: npm run lint
- name: Run Unit Tests
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.test == 'true'
run: npm run test
Release:
runs-on: ubuntu-latest
needs: [ 'Test' ]
steps:
- uses: actions/checkout@v4
if: ${{ needs.Test.outputs.src == 'true' && needs.Test.outputs.test == 'true' }}
if: ${{ needs.Test.outputs.src == 'true' }}
with:
persist-credentials: false
- name: Use Node.js
if: ${{ needs.Test.outputs.src == 'true' && needs.Test.outputs.test == 'true' }}
if: ${{ needs.Test.outputs.src == 'true' }}
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: NPM Install
if: ${{ needs.Test.outputs.src == 'true' && needs.Test.outputs.test == 'true' }}
if: ${{ needs.Test.outputs.src == 'true' }}
run: npm install --ignore-scripts
- name: Semantic Release (Dry Run)
if: ${{ needs.Test.outputs.src == 'true' && needs.Test.outputs.test == 'true' }}
if: ${{ needs.Test.outputs.src == 'true' }}
run: npm run semantic-release:dry-run
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Semantic Release
if: ${{ needs.Test.outputs.src == 'true' && needs.Test.outputs.test == 'true' }}
if: ${{ needs.Test.outputs.src == 'true' }}
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.test == 'true'
run: npm install --ignore-scripts
- name: Run Lint
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.src == 'true'
run: npm run lint
- name: Run Unit Tests
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.test == 'true'
run: npm run test
- name: Check test results
if: steps.filter.outputs.src == 'true' && steps.filter.outputs.test == 'true'
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.test == 'true'
run: exit ${{ steps.Test.outputs.test_result }}
id: check_test_result
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@the-rabbit-hole/semantic-release-config": "^1.5.0",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@types/tcp-port-used": "^1.0.4",
"@typescript-eslint/parser": "^7.13.1",
"@typescript-eslint/parser": "^7.14.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"node-hl7-server": "^2.3.0",
"node-hl7-server": "^2.4.1",
"npm-check-updates": "^16.14.20",
"npm-package-json-lint": "^8.0.0",
"portfinder": "^1.0.32",
Expand All @@ -91,7 +91,7 @@
"ts-node": "^10.9.2",
"ts-standard": "^12.0.2",
"tsd": "^0.31.1",
"typedoc": "^0.26.2",
"typedoc": "^0.26.3",
"typescript": "5.5.2",
"vitest": "^1.6.0"
},
Expand Down
15 changes: 7 additions & 8 deletions src/builder/batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import { SegmentList } from './modules/segmentList.js'

/**
* Batch Class
* @description Creating a Batch (BHS) which could include hundreds of MSH segments for processing.
* @remarks Creating a Batch (BHS) which could include hundreds of MSH segments for processing.
* Normally used in large data processing.
* However, the server usually breaks down a batch MSH into single "elements" to process them and returns that the batch.
* @since 1.0.0
* @extends RootBase
*/
export class Batch extends RootBase {
/** @internal **/
Expand Down Expand Up @@ -44,7 +43,7 @@ export class Batch extends RootBase {

/**
* Add a Message to the Batch
* @description This adds a Message (MSH) output into the batch.
* @remarks This adds a Message (MSH) output into the batch.
* It also increases the count of the BTS segment as the batch final result
* when in end tells the receiving end how many message (MSH) segments are included.
* @since 1.0.0
Expand All @@ -63,7 +62,7 @@ export class Batch extends RootBase {

/**
* End Batch
* @description At the conclusion of building the batch,
* @remarks At the conclusion of building the batch,
* (Usually {@link add} method will be before this) will add the Batch Trailing Segment (BTS) to the end.
* If a message (MSH) is added after this,
* that message (MSH) will get added to the first BHS found if there is more than one.
Expand Down Expand Up @@ -95,7 +94,7 @@ export class Batch extends RootBase {

/**
* Get the First Segment
* @description Returns the first segment found in the Batch (BHS).
* @remarks Returns the first segment found in the Batch (BHS).
* This is only used during the {@link add} method
* in determining
* if there is more than one Batch of MSH in a File Batch {@link FileBatch}
Expand All @@ -110,7 +109,7 @@ export class Batch extends RootBase {

/**
* Get Messages within a submitted Batch
* @description This will parse the passed on "text"
* @remarks This will parse the passed on "text"
* in the contractor options and get all the messages (MSH) segments within it and return an array of them.
* @since 1.0.0
* @example
Expand Down Expand Up @@ -166,7 +165,7 @@ export class Batch extends RootBase {

/**
* Start Batch
* @description This allows you to override the orginial contractor BHS fields that are required.
* @remarks This allows you to override the orginial contractor BHS fields that are required.
* In this case, 'BHS.7'
* (Date Field) is filled out with a 14-character date field with YYYYMMDDHHMMSS entered in by default.
* @since 1.0.0
Expand All @@ -179,7 +178,7 @@ export class Batch extends RootBase {

/**
* Create File from a Batch
* @description Will procure a file of the saved MSH in the proper format
* @remarks Will procure a file of the saved MSH in the proper format
* that includes a FHS and FTS segments with the possibility of more than one BHS segments inside with one or more MSH inside each BHS groups.
* @since 1.0.0
* @param name File Name
Expand Down
11 changes: 5 additions & 6 deletions src/builder/fileBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import { SegmentList } from './modules/segmentList.js'

/**
* File Batch Class
* @description Create a File Batch (FHS) which will could include many BHS/BTS segments,
* @remarks Create a File Batch (FHS) which will could include many BHS/BTS segments,
* which could include many Message (MSH) segments to output the contents into a file on the OS.
* These files could then be used to send manually or read by another system to interpret the contents.
* This class helps
* in generating the particulars for that file generation to make sure that it follows the correct format.
* @since 1.0.0
* @extends RootBase
*/
export class FileBatch extends RootBase {
/** @internal */
Expand Down Expand Up @@ -56,7 +55,7 @@ export class FileBatch extends RootBase {

/**
* AAdd a Message or a Batch to the File
* @description This adds a Message (MSH) output into the file batch.
* @remarks This adds a Message (MSH) output into the file batch.
* If there is a Batch ("BHS") already part of this file, any new Message type will be added to the first found BHS regardless if the second Batch is added last.
* @since 1.0.0
* @param message The {@link Message} or {@link Batch} to add into the batch.
Expand Down Expand Up @@ -118,7 +117,7 @@ export class FileBatch extends RootBase {

/**
* End Batch
* @description At the conclusion of building the file batch,
* @remarks At the conclusion of building the file batch,
* (Usually {@link add} method will be before this) will add the File Batch Trailing Segment (FTS) to the end.
* If a message (MSH) is added after this,
* that message (MSH) will get added to the first BHS found if there is one, otherwise it will just be added.
Expand All @@ -132,7 +131,7 @@ export class FileBatch extends RootBase {

/**
* Get File name
* @description Get File name going to be created.
* @remarks Get File name going to be created.
* @since 1.2.0
*/
fileName (): string {
Expand All @@ -158,7 +157,7 @@ export class FileBatch extends RootBase {

/**
* Get Messages within a submitted File Batch
* @description This will parse the passed on "text"
* @remarks This will parse the passed on "text"
* in the contractor options and get all the messages (MSH) segments within it and return an array of them.
* This will happen regardless of the depth of the segments.
* @since 1.0.0
Expand Down
7 changes: 3 additions & 4 deletions src/builder/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { HL7Node } from './interface/hL7Node.js'
/**
* Message Class
* @since 1.0.0
* @extends RootBase
*/
export class Message extends RootBase {
/** @internal */
Expand Down Expand Up @@ -58,7 +57,7 @@ export class Message extends RootBase {
/**
* Add a new segment to a message.
* @since 1.0.0
* @description Creating a new segment adds an empty segment to the message.
* @remarks Creating a new segment adds an empty segment to the message.
* It could be blank, or it could have values added into it.
* @param path
* @example
Expand Down Expand Up @@ -109,7 +108,7 @@ export class Message extends RootBase {

/**
* Read a path of a message.
* @description Could return {@link SegmentList}
* @remarks Could return {@link SegmentList}
* @since 1.0.0
* @param path
*/
Expand Down Expand Up @@ -173,7 +172,7 @@ export class Message extends RootBase {

/**
* Create File from a Message
* @description Will procure a file of the saved MSH in the proper format
* @remarks Will procure a file of the saved MSH in the proper format
* that includes a FHS and FTS segments.
* @since 1.0.0
* @param name File Name
Expand Down
1 change: 0 additions & 1 deletion src/builder/modules/emptyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { HL7Node } from '../interface/hL7Node.js'
/**
* Empty Node
* @since 1.0.0
* @extends HL7Node
*/
export class EmptyNode implements HL7Node {
get name (): string {
Expand Down
1 change: 0 additions & 1 deletion src/builder/modules/nodeBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Message } from '../message.js'
/**
* Node Base
* @since 1.0.0
* @extends HL7Node
*/
export class NodeBase extends EventEmitter implements HL7Node {
protected parent: NodeBase | null
Expand Down
1 change: 0 additions & 1 deletion src/builder/modules/segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { SubComponent } from './subComponent.js'
/**
* Segment
* @since 1.0.0
* @extends NodeBase
*/
export class Segment extends NodeBase {
/** @internal */
Expand Down
2 changes: 1 addition & 1 deletion src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Connection } from './connection.js'

/**
* Client Class
* @description The main class that starts a client connection to a valid HL7 TCP/MLLP specified server.
* @remarks The main class that starts a client connection to a valid HL7 TCP/MLLP specified server.
* @since 1.0.0 */
export class Client extends EventEmitter {
/** @internal */
Expand Down
8 changes: 4 additions & 4 deletions src/client/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface IConnection extends EventEmitter {
/* eslint-enable */

/** Connection Class
* @description Create a connection customer that will listen to result send to the particular port.
* @remarks Create a connection customer that will listen to result send to the particular port.
* @since 1.0.0 */
export class Connection extends EventEmitter implements IConnection {
/** @internal */
Expand Down Expand Up @@ -113,7 +113,7 @@ export class Connection extends EventEmitter implements IConnection {
}

/** Close Client Listener Instance.
* @description Force close a connection.
* @remarks Force close a connection.
* It will stop any re-connection timers.
* If you want to restart, your app has to restart the connection.
* @since 1.0.0
Expand Down Expand Up @@ -159,7 +159,7 @@ export class Connection extends EventEmitter implements IConnection {

/**
* Get Port
* @description Get the port that this connection will connect to.
* @remarks Get the port that this connection will connect to.
* @since 2.0.0
*/
getPort (): number {
Expand Down Expand Up @@ -193,7 +193,7 @@ export class Connection extends EventEmitter implements IConnection {
}

/** Send a HL7 Message to the Listener
* @description This function sends a message/batch/file batch to the remote side.
* @remarks This function sends a message/batch/file batch to the remote side.
* It has the ability, if set to auto-retry (defaulted to 1 re-connect before connection closes)
* @since 1.0.0
* @param message The message we need to send to the port.
Expand Down
2 changes: 1 addition & 1 deletion src/client/module/inboundResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class InboundResponse {

/**
* Process the Inbound Response from the Server
* @description This takes the string of the response from the server and makes it a message.
* @remarks This takes the string of the response from the server and makes it a message.
* A response from a broker SHOULD always be a properly formated Hl7 message, we hope.
* @since 1.0.0
* @param data
Expand Down
8 changes: 4 additions & 4 deletions src/specification/2.1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HL7_SPEC_BASE } from './specification.js'

/**
* HL7 2.1 MSH Specification
* @description Only the required ones are listed below for typescript validation to pass.
* @remarks Only the required ones are listed below for typescript validation to pass.
* @since 1.0.0
* @example
* To make it easier on having to fill this out each time, you may do this in your code:
Expand All @@ -28,12 +28,12 @@ export interface HL7_2_1_MSH {
* @since 1.0.0 */
msh_9: string
/** Message Control ID
* @description This ID is unique to the message being sent
* @remarks This ID is unique to the message being sent
* so the client can track
* to see if they get a response back from the server that this particular message was successful.
* Max 20 characters.
* @since 1.0.0
* @default Random 20 Character String @see {@link randomString} if this is set to nothing or not included. */
* @default Random 20 Character String {@link randomString} if this is set to nothing or not included. */
msh_10?: string
/** Processing ID
* @since 1.0.0 */
Expand All @@ -42,7 +42,7 @@ export interface HL7_2_1_MSH {

/**
* Hl7 Specification Version 2.1
* @description Used to indicate that the message should follow 2.7 specification for retrieval or building a message.
* @remarks Used to indicate that the message should follow 2.7 specification for retrieval or building a message.
* @since 1.0.0
*/
export class HL7_2_1 extends HL7_SPEC_BASE {
Expand Down
8 changes: 4 additions & 4 deletions src/specification/2.2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HL7_SPEC_BASE } from './specification.js'

/**
* HL7 2.2 MSH Specification
* @description Only the required ones are listed below for typescript validation to pass.
* @remarks Only the required ones are listed below for typescript validation to pass.
* @since 1.0.0
* @example
* To make it easier on having to fill this out each time, you may do this in your code:
Expand Down Expand Up @@ -32,12 +32,12 @@ export interface HL7_2_2_MSH {
* @since 1.0.0 */
msh_9_2: string
/** Message Control ID
* @description This ID is unique to the message being sent
* @remarks This ID is unique to the message being sent
* so the client can track
* to see if they get a response back from the server that this particular message was successful.
* Max 20 characters.
* @since 1.0.0
* @default Random 20 Character String @see {@link randomString} if this is set to nothing or not included. */
* @default Random 20 Character String {@link randomString} if this is set to nothing or not included. */
msh_10?: string
/** Processing ID
* @since 1.0.0 */
Expand All @@ -46,7 +46,7 @@ export interface HL7_2_2_MSH {

/**
* Hl7 Specification Version 2.2
* @description Used to indicate that the message should follow 2.7 specification for retrieval or building a message.
* @remarks Used to indicate that the message should follow 2.7 specification for retrieval or building a message.
* @since 1.0.0
*/
export class HL7_2_2 extends HL7_SPEC_BASE {
Expand Down
Loading

0 comments on commit e2c49e8

Please sign in to comment.