Skip to content

Commit cd93056

Browse files
authored
Merge pull request #829 from JupiterOne/add-docs-table-of-contents
Add table of contents to integration docs
2 parents c03094f + 529f4f0 commit cd93056

4 files changed

Lines changed: 133 additions & 19 deletions

File tree

docs/integrations/development.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,94 @@ state of the world" from a provider and have the data sent to JupiterOne. Data
88
that was sent up will be diffed against JupiterOne's understanding of the
99
"world" and persisted via a background process.
1010

11+
## Table of Contents
12+
13+
- [Integration development](#integration-development)
14+
- [Table of Contents](#table-of-contents)
15+
- [The integration framework](#the-integration-framework)
16+
- [`IntegrationInvocationConfig` fields](#integrationinvocationconfig-fields)
17+
- [`instanceConfigFields`](#instanceconfigfields)
18+
- [`loadExecutionConfig`](#loadexecutionconfig)
19+
- [`validateInvocation`](#validateinvocation)
20+
- [`getStepStartStates`](#getstepstartstates)
21+
- [`integrationSteps`](#integrationsteps)
22+
- [`beforeAddEntity(context: IntegrationExecutionContext<IntegrationConfig>, e: Entity): Entity`](#beforeaddentitycontext-integrationexecutioncontextintegrationconfig-e-entity-entity)
23+
- [`beforeAddRelationship(context: IntegrationExecutionContext<IntegrationConfig>, r: Relationship): Promise<Relationship> | Relationship`](#beforeaddrelationshipcontext-integrationexecutioncontextintegrationconfig-r-relationship-promiserelationship--relationship)
24+
- [How integrations are executed](#how-integrations-are-executed)
25+
- [Validation](#validation)
26+
- [Collection](#collection)
27+
- [What's in the `IntegrationExecutionContext` and `IntegrationExecutionStepContext`?](#whats-in-the-integrationexecutioncontext-and-integrationexecutionstepcontext)
28+
- [`IntegrationExecutionContext`](#integrationexecutioncontext)
29+
- [`instance`](#instance)
30+
- [`logger`](#logger)
31+
- [`forbiddenResource`](#forbiddenresource)
32+
- [`IntegrationExecutionStepContext`](#integrationexecutionstepcontext)
33+
- [`jobState`](#jobstate)
34+
- [Additional utilities](#additional-utilities)
35+
- [Data conversion](#data-conversion)
36+
- [Graph data generation and validation](#graph-data-generation-and-validation)
37+
- [`createIntegrationEntity`](#createintegrationentity)
38+
- [`createDirectRelationship`](#createdirectrelationship)
39+
- [`DirectRelationshipOptions`](#directrelationshipoptions)
40+
- [`DirectRelationshipLiteralOptions`](#directrelationshipliteraloptions)
41+
- [`createMappedRelationship`](#createmappedrelationship)
42+
- [`MappedRelationshipOptions`](#mappedrelationshipoptions)
43+
- [`MappedRelationshipLiteralOptions`](#mappedrelationshipliteraloptions)
44+
- [Raw data collection](#raw-data-collection)
45+
- [Testing](#testing)
46+
- [Auto-magic behind the framework](#auto-magic-behind-the-framework)
47+
- [Event reporting](#event-reporting)
48+
- [Data collection](#data-collection)
49+
- [Failure handling](#failure-handling)
50+
- [Step status codes](#step-status-codes)
51+
- [Letting the synchronizer know about partial datasets](#letting-the-synchronizer-know-about-partial-datasets)
52+
- [Detecting undeclared types](#detecting-undeclared-types)
53+
- [The CLI](#the-cli)
54+
- [Authentication](#authentication)
55+
- [Supported commands](#supported-commands)
56+
- [Command `j1-integration collect`](#command-j1-integration-collect)
57+
- [Options](#options)
58+
- [Option `--module` or `-m`](#option---module-or--m)
59+
- [Option `--integrationInstanceId` or `-i`](#option---integrationinstanceid-or--i)
60+
- [Option `--api-key` or `-k`](#option---api-key-or--k)
61+
- [Option `--step` or `-s`](#option---step-or--s)
62+
- [Option `--no-cache`](#option---no-cache)
63+
- [Option `--cache-path`](#option---cache-path)
64+
- [Option `--disable-schema-validation` or `-V`](#option---disable-schema-validation-or--v)
65+
- [Command `j1-integration sync`](#command-j1-integration-sync)
66+
- [Keeping the door open for developers not using JavaScript or TypeScript](#keeping-the-door-open-for-developers-not-using-javascript-or-typescript)
67+
- [Options](#options-1)
68+
- [Option `--module` or `-m`](#option---module-or--m-1)
69+
- [Option `--integrationInstanceId` or `-i`](#option---integrationinstanceid-or--i-1)
70+
- [Option `--source`](#option---source)
71+
- [Option `--scope`](#option---scope)
72+
- [Option `--api-key` or `-k`](#option---api-key-or--k-1)
73+
- [Option `--tail` or `-t`](#option---tail-or--t)
74+
- [Option `--api-base-url`](#option---api-base-url)
75+
- [Command `j1-integration run`](#command-j1-integration-run)
76+
- [Option `--skip-finalize`](#option---skip-finalize)
77+
- [Command `j1-integration visualize`](#command-j1-integration-visualize)
78+
- [Command `j1-integration visualize-types`](#command-j1-integration-visualize-types)
79+
- [Command `j1-integration document`](#command-j1-integration-document)
80+
- [Command `j1-integration validate-question-file`](#command-j1-integration-validate-question-file)
81+
- [Command `j1-integration generate-integration-graph-schema`](#command-j1-integration-generate-integration-graph-schema)
82+
- [Future commands and utilities](#future-commands-and-utilities)
83+
- [More commands and options](#more-commands-and-options)
84+
- [Command `j1-integration plan`](#command-j1-integration-plan)
85+
- [Command `j1-integration sync --dry-run`](#command-j1-integration-sync---dry-run)
86+
- [Command `j1-integration generate`](#command-j1-integration-generate)
87+
- [One CLI tool for all JupiterOne development](#one-cli-tool-for-all-jupiterone-development)
88+
- [Better methods of authentication with JupiterOne](#better-methods-of-authentication-with-jupiterone)
89+
- [Does JupiterOne use this SDK for managed integrations?](#does-jupiterone-use-this-sdk-for-managed-integrations)
90+
- [Future work around integrations](#future-work-around-integrations)
91+
- [`external` integrations](#external-integrations)
92+
- [Event ingestion](#event-ingestion)
93+
- [j1 CLI](#j1-cli)
94+
- [Authentication](#authentication-1)
95+
- [Supported commands](#supported-commands-1)
96+
- [Command `j1 export`](#command-j1-export)
97+
- [Command `j1 import`](#command-j1-import)
98+
1199
## The integration framework
12100

13101
This SDK supports building JupiterOne integrations using either JavaScript or

docs/integrations/development_guide.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ in this SDK project.
88

99
## Table of Contents
1010

11-
- [Getting Started](#getting-started)
12-
- [Requirements](#requirements)
13-
- [Setup](#setup)
14-
- [Developing the integration](#developing-the-integration)
15-
- [Integration Configuration](#integration-configuration)
16-
- [Creating instanceConfigFields](#1-creating-instanceconfigfields)
17-
- [Creating validateInvocation](#2-creating-validateinvocation)
18-
- [Adding or creating an API Client](#adding-or-creating-an-api-client)
19-
- [Basic client setup](#basic-client-setup)
20-
- [Adding the first route](#adding-the-first-route)
21-
- [Creating your first IntegrationStep](#3-creating-your-first-integrationstep)
22-
- [Creating the Account step](#creating-the-account-step)
23-
- [id](#id)
24-
- [name](#name)
25-
- [entities](#entities)
26-
- [executionHandler](#executionhandler)
27-
- [Converters](#converters)
28-
- [Running the integration](#running-the-integration-🚀)
11+
- [Getting Started with Integration Development](#getting-started-with-integration-development)
12+
- [Table of Contents](#table-of-contents)
13+
- [Getting Started](#getting-started)
14+
- [**Requirements**](#requirements)
15+
- [**Setup**](#setup)
16+
- [**Developing the integration**](#developing-the-integration)
17+
- [**Integration configuration**](#integration-configuration)
18+
- [**1. Creating `InstanceConfigFields`**](#1-creating-instanceconfigfields)
19+
- [**2. Creating `ValidateInvocation`**](#2-creating-validateinvocation)
20+
- [Adding or Creating an API Client](#adding-or-creating-an-api-client)
21+
- [Basic Client Setup](#basic-client-setup)
22+
- [Adding the first route](#adding-the-first-route)
23+
- [**3. Creating your first `IntegrationStep`**](#3-creating-your-first-integrationstep)
24+
- [**Creating the `Account` Step**](#creating-the-account-step)
25+
- [**id**](#id)
26+
- [**name**](#name)
27+
- [**entities**](#entities)
28+
- [**executionHandler**](#executionhandler)
29+
- [**Converters**](#converters)
30+
- [Running the integration](#running-the-integration)
2931

3032
## Getting Started
3133

@@ -699,7 +701,7 @@ export async function fetchAccountDetails({
699701
700702
And that's it! We have a working `executionHandler`.
701703
702-
## Running the integration 🚀
704+
## Running the integration
703705
704706
We've now:
705707

docs/integrations/step-patterns.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ JupiterOne integration. Here, we assign names to each of these patterns in order
1414
to build a shared, referenceable grammar to use when developing new JupiterOne
1515
integrations.
1616

17+
## Table of Contents
18+
19+
- [JupiterOne Integration Step Patterns](#jupiterone-integration-step-patterns)
20+
- [Table of Contents](#table-of-contents)
21+
- [Step Classification](#step-classification)
22+
- ["Singleton" step pattern](#singleton-step-pattern)
23+
- ["Fetch Entities" step pattern](#fetch-entities-step-pattern)
24+
- ["Fetch Relationships" step pattern](#fetch-relationships-step-pattern)
25+
- ["Fetch Child Entities" step pattern](#fetch-child-entities-step-pattern)
26+
- ["Build Child Relationships" step pattern](#build-child-relationships-step-pattern)
27+
- [Conclusion](#conclusion)
28+
29+
## Step Classification
30+
1731
Let's imagine a JupiterOne integration for a device management tool, "Acme".
1832
This integration ingests the following entities and relationships:
1933

docs/integrations/testing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ fetched. Steps iterate source objects using the data client and converters to
3232
produce entities and relationships, but the steps are responsible for organizing
3333
data collection and entity and relationship construction.
3434

35+
## Table of Contents
36+
37+
- [Testing Integrations](#testing-integrations)
38+
- [Table of Contents](#table-of-contents)
39+
- [Integration Testing](#integration-testing)
40+
- [Unit Testing](#unit-testing)
41+
- [`createMockExecutionContext`](#createmockexecutioncontext)
42+
- [Testing steps using `executeStepWithDependencies`](#testing-steps-using-executestepwithdependencies)
43+
- [`setupRecording`](#setuprecording)
44+
3545
## Integration Testing
3646

3747
Ideal integration testing (ensuring end-to-end success) would:

0 commit comments

Comments
 (0)