@itentialopensource/adapter-microsoft_graph 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc.js +18 -0
  3. package/.gitlab/.gitkeep +0 -0
  4. package/.gitlab/issue_templates/.gitkeep +0 -0
  5. package/.gitlab/issue_templates/Default.md +17 -0
  6. package/.gitlab/issue_templates/bugReportTemplate.md +42 -0
  7. package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
  8. package/.jshintrc +0 -0
  9. package/AUTH.md +39 -0
  10. package/BROKER.md +199 -0
  11. package/CALLS.md +170 -0
  12. package/CHANGELOG.md +9 -0
  13. package/CODE_OF_CONDUCT.md +43 -0
  14. package/CONTRIBUTING.md +172 -0
  15. package/ENHANCE.md +69 -0
  16. package/LICENSE +201 -0
  17. package/PROPERTIES.md +641 -0
  18. package/README.md +337 -0
  19. package/SUMMARY.md +9 -0
  20. package/SYSTEMINFO.md +11 -0
  21. package/TROUBLESHOOT.md +47 -0
  22. package/adapter.js +18798 -0
  23. package/adapterBase.js +1787 -0
  24. package/entities/.generic/action.json +214 -0
  25. package/entities/.generic/schema.json +28 -0
  26. package/entities/.system/action.json +50 -0
  27. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  28. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  29. package/entities/.system/schema.json +19 -0
  30. package/entities/.system/schemaTokenReq.json +53 -0
  31. package/entities/.system/schemaTokenResp.json +53 -0
  32. package/entities/Applications/action.json +127 -0
  33. package/entities/Applications/schema.json +35 -0
  34. package/entities/AzureADDevice/action.json +106 -0
  35. package/entities/AzureADDevice/schema.json +45 -0
  36. package/entities/Batch/action.json +24 -0
  37. package/entities/Batch/schema.json +19 -0
  38. package/entities/CaseCreation/action.json +249 -0
  39. package/entities/CaseCreation/schema.json +30 -0
  40. package/entities/Catalog/action.json +25 -0
  41. package/entities/Catalog/schema.json +19 -0
  42. package/entities/ConnectionSetup/action.json +148 -0
  43. package/entities/ConnectionSetup/schema.json +25 -0
  44. package/entities/ContentSync/action.json +65 -0
  45. package/entities/ContentSync/schema.json +21 -0
  46. package/entities/CreateDSR/action.json +45 -0
  47. package/entities/CreateDSR/schema.json +20 -0
  48. package/entities/Deployment/action.json +106 -0
  49. package/entities/Deployment/schema.json +34 -0
  50. package/entities/DeploymentAudience/action.json +66 -0
  51. package/entities/DeploymentAudience/schema.json +32 -0
  52. package/entities/Events/action.json +108 -0
  53. package/entities/Events/schema.json +34 -0
  54. package/entities/Files/action.json +108 -0
  55. package/entities/Files/schema.json +23 -0
  56. package/entities/Groups/action.json +25 -0
  57. package/entities/Groups/schema.json +19 -0
  58. package/entities/IdentitySync/action.json +105 -0
  59. package/entities/IdentitySync/schema.json +23 -0
  60. package/entities/Insights/action.json +46 -0
  61. package/entities/Insights/schema.json +20 -0
  62. package/entities/LabelManagement/action.json +106 -0
  63. package/entities/LabelManagement/schema.json +23 -0
  64. package/entities/Mail/action.json +212 -0
  65. package/entities/Mail/schema.json +72 -0
  66. package/entities/Memberships/action.json +167 -0
  67. package/entities/Memberships/schema.json +70 -0
  68. package/entities/Misc/action.json +66 -0
  69. package/entities/Misc/schema.json +21 -0
  70. package/entities/Notebooks/action.json +107 -0
  71. package/entities/Notebooks/schema.json +34 -0
  72. package/entities/OpenExtensions/action.json +65 -0
  73. package/entities/OpenExtensions/schema.json +54 -0
  74. package/entities/People/action.json +46 -0
  75. package/entities/People/schema.json +31 -0
  76. package/entities/SchemaExtensions/action.json +65 -0
  77. package/entities/SchemaExtensions/schema.json +32 -0
  78. package/entities/Search/action.json +24 -0
  79. package/entities/Search/schema.json +19 -0
  80. package/entities/Security/action.json +151 -0
  81. package/entities/Security/schema.json +58 -0
  82. package/entities/SharePoint/action.json +214 -0
  83. package/entities/SharePoint/schema.json +39 -0
  84. package/entities/Subscriptions/action.json +65 -0
  85. package/entities/Subscriptions/schema.json +32 -0
  86. package/entities/TasksPlanner/action.json +272 -0
  87. package/entities/TasksPlanner/schema.json +86 -0
  88. package/entities/TasksTodo/action.json +187 -0
  89. package/entities/TasksTodo/schema.json +49 -0
  90. package/entities/Teams/action.json +519 -0
  91. package/entities/Teams/schema.json +120 -0
  92. package/entities/TrackDSRStatus/action.json +108 -0
  93. package/entities/TrackDSRStatus/schema.json +23 -0
  94. package/entities/TriggerEventForExistingLabel/action.json +108 -0
  95. package/entities/TriggerEventForExistingLabel/schema.json +23 -0
  96. package/entities/Users/action.json +213 -0
  97. package/entities/Users/schema.json +50 -0
  98. package/entities/WorkflowAutomation/action.json +249 -0
  99. package/entities/WorkflowAutomation/schema.json +30 -0
  100. package/error.json +190 -0
  101. package/package.json +87 -0
  102. package/pronghorn.json +8654 -0
  103. package/propertiesDecorators.json +14 -0
  104. package/propertiesSchema.json +1248 -0
  105. package/refs?service=git-upload-pack +0 -0
  106. package/report/creationReport.json +1715 -0
  107. package/report/graph.json +14709 -0
  108. package/sampleProperties.json +195 -0
  109. package/test/integration/adapterTestBasicGet.js +83 -0
  110. package/test/integration/adapterTestConnectivity.js +93 -0
  111. package/test/integration/adapterTestIntegration.js +6059 -0
  112. package/test/unit/adapterBaseTestUnit.js +949 -0
  113. package/test/unit/adapterTestUnit.js +7492 -0
  114. package/utils/adapterInfo.js +206 -0
  115. package/utils/addAuth.js +94 -0
  116. package/utils/artifactize.js +146 -0
  117. package/utils/basicGet.js +50 -0
  118. package/utils/checkMigrate.js +63 -0
  119. package/utils/entitiesToDB.js +178 -0
  120. package/utils/findPath.js +74 -0
  121. package/utils/methodDocumentor.js +225 -0
  122. package/utils/modify.js +154 -0
  123. package/utils/packModificationScript.js +35 -0
  124. package/utils/patches2bundledDeps.js +90 -0
  125. package/utils/pre-commit.sh +32 -0
  126. package/utils/removeHooks.js +20 -0
  127. package/utils/setup.js +33 -0
  128. package/utils/tbScript.js +246 -0
  129. package/utils/tbUtils.js +490 -0
  130. package/utils/testRunner.js +298 -0
  131. package/utils/troubleshootingAdapter.js +195 -0
  132. package/workflows/README.md +3 -0
@@ -0,0 +1,172 @@
1
+ # Contributing
2
+
3
+ First off, thanks for taking the time to contribute!
4
+
5
+ The following is a set of rules for contributing.
6
+
7
+ ## Code of Conduct
8
+
9
+ This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to support@itential.com.
10
+
11
+ ## How to Contribute
12
+
13
+ ### Reporting Bugs
14
+
15
+ This section guides you through submitting a bug report. Following these guidelines helps maintainers understand your report :pencil:, reproduce the behavior :computer: :left_right_arrow: :computer:, and find related reports :mag_right:.
16
+
17
+ Before creating bug reports, please check before-submitting-a-bug-report, as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. If you have an Itential support contract, please create an Itential Service Desk ticket. If you don't have an Itential support contract, please send an email of the issue to support@itential.com.
18
+
19
+ #### Before Submitting A Bug Report
20
+
21
+ * **Check the README.md.** You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem __in the latest version__.
22
+ * **Work through the troubleshooting process.** Troubleshooting will include changing the log level of Itential Automation Platform (IAP) and adapters and checking the logs to see what the issues are. These logs should be included in any ticket you open for this issue.
23
+ * **Check for resolutions to the issue.** Check the <a href="https://itential.atlassian.net/servicedesk/customer/kb/view/286883841?applicationId=605994d2-2cb2-3174-af59-ed5b23ff5fd5&spaceKey=PKB&src=1187380921" target="_blank">Itential Knowledge Base</a> to see if there is a known resolution for the issue you are having.
24
+ * **Ask around in chat if you are an Itential employee** to see if others are experiencing the same issue.
25
+
26
+ #### How to Submit a (Good) Bug Report
27
+
28
+ Bugs are tracked through the Itential Service Desk. Explain the problem and include additional details to help maintainers reproduce the problem:
29
+
30
+ - **Use a clear and descriptive title** for the issue to identify the problem.
31
+ - **Describe the exact steps which reproduce the problem** in as much detail as possible. For example, start by explaining how you configured the adapter (e.g., which properties you used and how they were set) or how you are using an artifact.
32
+ - **Provide specific examples to demonstrate the steps**. Include logs, or copy/paste snippets, in your examples.
33
+ - **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
34
+ - **Explain which behavior you expected to see instead and why.**
35
+ - **Include screenshots and animated GIFs** which show you following the described steps and clearly demonstrate the problem. You can use <a href="https://www.cockos.com/licecap/" target="_blank">this tool</a> to record GIFs on macOS and Windows. Use <a href="https://github.com/colinkeenan/silentcast" target="_blank">this tool</a> or <a href="https://github.com/rhcarvalho/byzanz-guiz" target="_blank">program</a> on Linux.
36
+ - **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
37
+
38
+ Provide more context by answering these questions:
39
+
40
+ - **Did the problem start happening recently** (e.g. after updating to a new version/tag) or was this always a problem?
41
+ - If the problem started happening recently, **can you reproduce the problem in an older version/tag?** What's the most recent version in which the problem does not happen?
42
+ - **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
43
+
44
+ Include details about your configuration and environment:
45
+
46
+ - **Which version of the adapter/artifact are you using?** You can get the exact version by checking the project version in the package.json file.
47
+ - **What's the name and version of the OS you're using**?
48
+ - **Are you running or using IAP in a virtual machine?** If so, which VM software are you using and which operating systems and versions are used for the host and guest?
49
+ - **Are there firewalls between IAP and any other system you are integrating with?** If so, have you tried running curl from the system IAP is on to the other system to verify you have connectivity between the systems?
50
+
51
+ ### Your First Code Contribution
52
+
53
+ #### Local development
54
+
55
+ This project can be developed locally on all operating systems. For instructions on how to do this, follow the steps highlighted in the README.md. The README.mdprovides many more details on cloning the repository for local development, how to lint and test your changes.
56
+
57
+ #### Development Process
58
+
59
+ The following provides a local copy of the repository along with dependencies.
60
+
61
+ ```json
62
+ go to the repository you are interested in working on
63
+ click on the Clone button to get the link(s) you can use to clone the repository
64
+ git clone <link to clone the project>
65
+ npm install
66
+ ```
67
+
68
+ Prior to making changes you should create a branch to work in. The branch should be named with the type of change (major, minor or patch) and then a Jira issue number or a description of the issue.
69
+
70
+ ```json
71
+ git checkout -b <name_of_your_new_branch>
72
+ ```
73
+
74
+ Make all of the desired changes.
75
+
76
+ > **Note:** All code changes should be accompanied by additional Unit and Integration tests to minimize the likelihood that any changes will negatively impact the adapter/artifact as well as to ensure the desired functionality is achieved.
77
+
78
+
79
+ <table border="1" class="bordered-table">
80
+ <tr>
81
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Files</span></th>
82
+ <th bgcolor="lightgrey" style="padding:15px"><span style="font-size:12.0pt">Changes</span></th>
83
+ </tr>
84
+ <tr>
85
+ <td style="padding:15px">.codeclimate.yml, .eslintignore, .eslintrc.js, .gitignore, .gitlab-ci.yml, .jshintrc, .npmignore</td>
86
+ <td style="padding:15px">These are foundational files that are used in linting and building of the adapter. Changes to these files are heavily scrutinized and may be implemented in a different manner so that the changes can be implemented across all adapters.</td>
87
+ </tr>
88
+ <tr>
89
+ <td style="padding:15px">CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, README.md</td>
90
+ <td style="padding:15px">These are license and process files for the repository. Changes to these files may require legal review and may also be implemented in a different manner so that the changes can be implemented across all adapters.</td>
91
+ </tr>
92
+ <tr>
93
+ <td style="padding:15px">utils/*, adapterBase.js</td>
94
+ <td style="padding:15px">Changes to these files will rarely be accepted. These are process files that need to be changed through the builder process and migration.</td>
95
+ </tr>
96
+ <tr>
97
+ <td style="padding:15px">adapter.js</td>
98
+ <td style="padding:15px">Changes to this file are code changes. They should be accompanied by the appropriate unit and integration tests. If new methods are added, they should also be added to the pronghorn.json file, otherwise integration tests are likely to fail.</td>
99
+ </tr>
100
+ <tr>
101
+ <td style="padding:15px">error.json, propertiesSchema.json</td>
102
+ <td style="padding:15px">These files are utilized by the Itential Runtime libraries. You can make changes to these files, but the changes should be appending of new errors or properties. Removal of errors and properties can result in rejection of the changes.</td>
103
+ </tr>
104
+ <tr>
105
+ <td style="padding:15px">pacakge.json, package-lock.json</td>
106
+ <td style="padding:15px">The package-lock.json is automatically generated and should only be updated when the dependencies inside of the package.json are modified. You can make changes to the package.json to add additional scripts, add new dependencies, modify names, etc. However, changing the scripts or dependencies that are Itential specific will be overriden during the acceptance process.</td>
107
+ </tr>
108
+ <tr>
109
+ <td style="padding:15px">pronghorn.json</td>
110
+ <td style="padding:15px">Changes to this file are made for integration into IAP. The most common change here is adding new methods that shoud be exposed to the IAP Workflow.</td>
111
+ </tr>
112
+ <tr>
113
+ <td style="padding:15px">entities/*</td>
114
+ <td style="padding:15px">Changes to these files include adding new capabilities, updating existing capabilities, or removing deprecated capabilities in the adapter. Translation configuration can also be modified here.</td>
115
+ </tr>
116
+ <tr>
117
+ <td style="padding:15px">test/*</td>
118
+ <td style="padding:15px">Changes to these files include adding, updating, or removing unit and integration tests in the adapter. Tests should never be removed unless the methods that are being tested are removed also. Both the unit and integration test file should have a marker that identifies where modification can take place. Modifications above that marker are likely to be rejected or implemented in a different manner.</td>
119
+ </tr>
120
+ </table>
121
+ <br>
122
+
123
+ > **Note:** It is a best practice to lint and test your code prior to committing changes into the repository. You can lint your code by running **npm run lint** and test it by running **node utils/testRunner.sh**. However, there are pre-commit hooks that will run these scripts when you commit your changes.
124
+
125
+ Commit the changes to the repository.
126
+
127
+ ```json
128
+ git commit -a -m "<descriptive message>"
129
+ ```
130
+
131
+ > **Note:** There are pre-commit hooks in place. If the pre-commit hooks fail, you will need to address those issues before moving forward.
132
+
133
+ Push the changes into the repository. This should only be done after the commit has successfully completed.
134
+
135
+ ```json
136
+ git push origin <name_of_your_new_branch>
137
+ ```
138
+
139
+ Create a Merge Request.
140
+
141
+ ### Merge Requests
142
+
143
+ - Fill out the provided merge request template.
144
+ - Reference related issues and merge requests liberally.
145
+ - Include screenshots and animated GIFs in your merge request whenever possible.
146
+ - Follow the project Styleguide.
147
+ - End all files with a newline.
148
+
149
+ ## Styleguide
150
+
151
+ ### Git Commit Messages
152
+
153
+ - Use the present tense ("Add feature" not "Added feature")
154
+ - Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
155
+ - Consider starting the commit message with an applicable emoji _(not required)_:
156
+ - :art: `:art:` When improving the format/structure of the code.
157
+ - :racehorse: `:racehorse:` When improving performance
158
+ - :non-potable_water: `:non-potable_water:` When plugging memory leaks.
159
+ - :memo: `:memo:` When writing documentation.
160
+ - :penguin: `:penguin:` When fixing something on Linux.
161
+ - :apple: `:apple:` When fixing something on macOS.
162
+ - :checkered_flag: `:checkered_flag:` When fixing something on Windows.
163
+ - :bug: `:bug:` When fixing a bug.
164
+ - :fire: `:fire:` When removing code or files.
165
+ - :green_heart: `:green_heart:` When fixing the CI build.
166
+ - :white_check_mark: `:white_check_mark:` When adding tests,
167
+ - :lock: `:lock:` When dealing with security.
168
+ - :arrow_up: `:arrow_up:` When upgrading dependencies.
169
+ - :arrow_down: `:arrow_down:` When downgrading dependencies.
170
+ - :shirt: `:shirt:` When removing linter warnings.
171
+
172
+ __Avoid installing unnecessary packages.__ Do not install packages just because they might be "nice to have". Itential Opensource projects are supposed to be minimal, specific, and compact by design.
package/ENHANCE.md ADDED
@@ -0,0 +1,69 @@
1
+ ## Enhancements
2
+
3
+ ### Adding a Second Instance of an Adapter
4
+
5
+ You can add a second instance of this adapter without adding new code on the file system. To do this go into the IAP Admin Essentials and add a new service config for this adapter. The two instances of the adapter should have unique ids. In addition, they should point to different instances (unique host and port) of the other system.
6
+
7
+ ### Adding Adapter Calls
8
+
9
+ There are multiple ways to add calls to an existing adapter.
10
+
11
+ The easiest way would be to use the Adapter Builder update process. This process takes in a Swagger or OpenAPI document, allows you to select the calls you want to add and then generates a zip file that can be used to update the adapter. Once you have the zip file simply put it in the adapter directory and execute `npm run adapter:update`.
12
+
13
+ ```bash
14
+ mv updatePackage.zip adapter-microsoft_graph
15
+ cd adapter-microsoft_graph
16
+ npm run adapter:update
17
+ ```
18
+
19
+ If you do not have a Swagger or OpenAPI document, you can use a Postman Collection and convert that to an OpenAPI document using APIMatic and then follow the first process.
20
+
21
+ If you want to manually update the adapter that can also be done the key thing is to make sure you update all of the right files. Within the entities directory you will find 1 or more entities. You can create a new entity or add to an existing entity. Each entity has an action.json file, any new call will need to be put in the action.json file. It will also need to be added to the enum for the ph_request_type in the appropriate schema files. Once this configuration is complete you will need to add the call to the adapter.js file and, in order to make it available as a workflow task in IAP, it should also be added to the pronghorn.json file. You can optionally add it to the unit and integration test files. There is more information on how to work on each of these files in the <a href="https://www.itential.com/automation-platform/integrations/adapters-resources/" target="_blank">Adapter Technical Resources</a> on Dev Site.
22
+
23
+ ```text
24
+ Files to update
25
+ * entities/<entity>/action.json: add an action
26
+ * entities/<entity>/schema.json (or the schema defined on the action): add action to the enum for ph_request_type
27
+ * adapter.js: add the new method and make sure it calls the proper entity and action
28
+ * pronghorn.json: add the new method
29
+ * test/unit/adapterTestUnit.js (optional but best practice): add unit test(s) - function is there, any required parameters error when not passed in
30
+ * test/integration/adapterTestIntegration.js (optional but best practice): add integration test
31
+ ```
32
+
33
+ ### Adding Adapter Properties
34
+
35
+ While changing adapter properties is done in the service instance configuration section of IAP, adding properties has to be done in the adapter. To add a property you should edit the propertiesSchema.json with the proper information for the property. In addition, you should modify the sampleProperties to have the new property in it.
36
+
37
+ ```text
38
+ Files to update
39
+ * propertiesSchema.json: add the new property and how it is defined
40
+ * sampleProperties: add the new property with a default value
41
+ * test/unit/adapterTestUnit.js (optional but best practice): add the property to the global properties
42
+ * test/integration/adapterTestIntegration.js (optional but best practice): add the property to the global properties
43
+ ```
44
+
45
+ ### Changing Adapter Authentication
46
+
47
+ Often an adapter is built before knowing the authentication and authentication processes can also change over time. The adapter supports many different kinds of authentication but it does require configuration. Some forms of authentication can be defined entirely with the adapter properties but others require configuration.
48
+
49
+ ```text
50
+ Files to update
51
+ * entities/.system/action.json: change the getToken action as needed
52
+ * entities/.system/schemaTokenReq.json: add input parameters (external name is name in other system)
53
+ * entities/.system/schemaTokenResp.json: add response parameters (external name is name in other system)
54
+ * propertiesSchema.json: add any new property and how it is defined
55
+ * sampleProperties: add any new property with a default value
56
+ * test/unit/adapterTestUnit.js (optional but best practice): add the property to the global properties
57
+ * test/integration/adapterTestIntegration.js (optional but best practice): add the property to the global properties
58
+ ```
59
+
60
+ ### Enhancing Adapter Integration Tests
61
+
62
+ The adapter integration tests are written to be able to test in either stub (standalone) mode or integrated to the other system. However, if integrating to the other system, you may need to provide better data than what the adapter provides by default as that data is likely to fail for create and update. To provide better data, edit the adapter integration test file. Make sure you do not remove the marker and keep custom code below the marker so you do not impact future migrations. Once the edits are complete, run the integration test as it instructs you to above. When you run integrated to the other system, you can also save mockdata for future use by changing the isSaveMockData flag to true.
63
+
64
+ ```text
65
+ Files to update
66
+ * test/integration/adapterTestIntegration.js: add better data for the create and update calls so that they will not fail.
67
+ ```
68
+
69
+ As mentioned previously, for most of these changes as well as other possible changes, there is more information on how to work on an adapter in the <a href="https://www.itential.com/automation-platform/integrations/adapters-resources/" target="_blank">Adapter Technical Resources</a> on Dev Site.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2019 Itential, LLC
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.