@greensecurity/javascript-sdk 0.40.8-beta.30 → 0.40.8-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.devcontainer/README.md +35 -0
  2. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  3. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/zones.test.js +5 -19
  5. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  6. package/dist/commonjs/lib/config.d.ts +2 -2
  7. package/dist/commonjs/lib/config.js +2 -2
  8. package/dist/commonjs/models/components/vendor.d.ts +2 -0
  9. package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
  10. package/dist/commonjs/models/components/vendor.js +4 -0
  11. package/dist/commonjs/models/components/vendor.js.map +1 -1
  12. package/dist/esm/__tests__/webhooks.test.js +1 -1
  13. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  14. package/dist/esm/__tests__/zones.test.js +5 -19
  15. package/dist/esm/__tests__/zones.test.js.map +1 -1
  16. package/dist/esm/lib/config.d.ts +2 -2
  17. package/dist/esm/lib/config.js +2 -2
  18. package/dist/esm/models/components/vendor.d.ts +2 -0
  19. package/dist/esm/models/components/vendor.d.ts.map +1 -1
  20. package/dist/esm/models/components/vendor.js +4 -0
  21. package/dist/esm/models/components/vendor.js.map +1 -1
  22. package/docs/sdks/alerts/README.md +219 -0
  23. package/docs/sdks/companies/README.md +126 -0
  24. package/docs/sdks/datarequests/README.md +302 -0
  25. package/docs/sdks/events/README.md +1126 -0
  26. package/docs/sdks/fhirconfigs/README.md +551 -0
  27. package/docs/sdks/greensecurity/README.md +14 -0
  28. package/docs/sdks/invoices/README.md +324 -0
  29. package/docs/sdks/mobiledevices/README.md +100 -0
  30. package/docs/sdks/organizations/README.md +508 -0
  31. package/docs/sdks/supportarticles/README.md +249 -0
  32. package/docs/sdks/systems/README.md +136 -0
  33. package/docs/sdks/users/README.md +831 -0
  34. package/docs/sdks/vendors/README.md +4904 -0
  35. package/docs/sdks/vendorscans/README.md +104 -0
  36. package/docs/sdks/webhooks/README.md +352 -0
  37. package/docs/sdks/zones/README.md +344 -0
  38. package/examples/README.md +31 -0
  39. package/examples/package-lock.json +1 -1
  40. package/jsr.json +1 -1
  41. package/package.json +1 -1
  42. package/src/__tests__/webhooks.test.ts +1 -1
  43. package/src/__tests__/zones.test.ts +5 -19
  44. package/src/lib/config.ts +2 -2
  45. package/src/models/components/vendor.ts +6 -0
@@ -0,0 +1,249 @@
1
+ # SupportArticles
2
+ (*supportArticles*)
3
+
4
+ ## Overview
5
+
6
+ Articles from the FAQ
7
+
8
+ ### Available Operations
9
+
10
+ * [listOrSearchSupportArticles](#listorsearchsupportarticles) - List or search support articles
11
+ * [getSupportArticle](#getsupportarticle) - Get support article
12
+
13
+ ## listOrSearchSupportArticles
14
+
15
+ List or search support articles for FAQ.
16
+
17
+ ### Example Usage
18
+
19
+ <!-- UsageSnippet language="typescript" operationID="listOrSearchSupportArticles" method="get" path="/support_articles" -->
20
+ ```typescript
21
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
22
+
23
+ const greenSecurity = new GreenSecurity({
24
+ security: {
25
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
26
+ },
27
+ });
28
+
29
+ async function run() {
30
+ const result = await greenSecurity.supportArticles.listOrSearchSupportArticles({
31
+ sort: "job",
32
+ desc: true,
33
+ itemsPerPage: 25,
34
+ });
35
+
36
+ for await (const page of result) {
37
+ console.log(page);
38
+ }
39
+ }
40
+
41
+ run();
42
+ ```
43
+
44
+ ### Standalone function
45
+
46
+ The standalone function version of this method:
47
+
48
+ ```typescript
49
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
50
+ import { supportArticlesListOrSearchSupportArticles } from "@greensecurity/javascript-sdk/funcs/supportArticlesListOrSearchSupportArticles.js";
51
+
52
+ // Use `GreenSecurityCore` for best tree-shaking performance.
53
+ // You can create one instance of it to use across an application.
54
+ const greenSecurity = new GreenSecurityCore({
55
+ security: {
56
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
57
+ },
58
+ });
59
+
60
+ async function run() {
61
+ const res = await supportArticlesListOrSearchSupportArticles(greenSecurity, {
62
+ sort: "job",
63
+ desc: true,
64
+ itemsPerPage: 25,
65
+ });
66
+ if (res.ok) {
67
+ const { value: result } = res;
68
+ for await (const page of result) {
69
+ console.log(page);
70
+ }
71
+ } else {
72
+ console.log("supportArticlesListOrSearchSupportArticles failed:", res.error);
73
+ }
74
+ }
75
+
76
+ run();
77
+ ```
78
+
79
+ ### React hooks and utilities
80
+
81
+ This method can be used in React components through the following hooks and
82
+ associated utilities.
83
+
84
+ > Check out [this guide][hook-guide] for information about each of the utilities
85
+ > below and how to get started using React hooks.
86
+
87
+ [hook-guide]: ../../../REACT_QUERY.md
88
+
89
+ ```tsx
90
+ import {
91
+ // Query hooks for fetching data.
92
+ useSupportArticlesListOrSearchSupportArticles,
93
+ useSupportArticlesListOrSearchSupportArticlesSuspense,
94
+ // Query hooks suitable for building infinite scrolling or "load more" UIs.
95
+ useSupportArticlesListOrSearchSupportArticlesInfinite,
96
+ useSupportArticlesListOrSearchSupportArticlesInfiniteSuspense,
97
+
98
+ // Utility for prefetching data during server-side rendering and in React
99
+ // Server Components that will be immediately available to client components
100
+ // using the hooks.
101
+ prefetchSupportArticlesListOrSearchSupportArticles,
102
+
103
+ // Utilities to invalidate the query cache for this query in response to
104
+ // mutations and other user actions.
105
+ invalidateSupportArticlesListOrSearchSupportArticles,
106
+ invalidateAllSupportArticlesListOrSearchSupportArticles,
107
+ } from "@greensecurity/javascript-sdk/react-query/supportArticlesListOrSearchSupportArticles.js";
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ | Parameter | Type | Required | Description |
113
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
114
+ | `request` | [operations.ListOrSearchSupportArticlesRequest](../../models/operations/listorsearchsupportarticlesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
115
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
116
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
117
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
118
+
119
+ ### Response
120
+
121
+ **Promise\<[operations.ListOrSearchSupportArticlesResponse](../../models/operations/listorsearchsupportarticlesresponse.md)\>**
122
+
123
+ ### Errors
124
+
125
+ | Error Type | Status Code | Content Type |
126
+ | ----------------------- | ----------------------- | ----------------------- |
127
+ | errors.ApiErrorResponse | 400, 401, 403 | application/json |
128
+ | errors.ApiErrorResponse | 500 | application/json |
129
+ | errors.APIError | 4XX, 5XX | \*/\* |
130
+
131
+ ## getSupportArticle
132
+
133
+ Retrieve an individual support article.
134
+
135
+ Available `expand` scopes are:
136
+
137
+ - support_article.description
138
+ - support_article.published
139
+ - support_article.notes
140
+ - support_article.support_category
141
+
142
+ ### Example Usage
143
+
144
+ <!-- UsageSnippet language="typescript" operationID="getSupportArticle" method="get" path="/support_articles/{id}" -->
145
+ ```typescript
146
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
147
+
148
+ const greenSecurity = new GreenSecurity({
149
+ security: {
150
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
151
+ },
152
+ });
153
+
154
+ async function run() {
155
+ const result = await greenSecurity.supportArticles.getSupportArticle({
156
+ id: 600418,
157
+ expand: [
158
+ "facility.system",
159
+ ],
160
+ });
161
+
162
+ console.log(result);
163
+ }
164
+
165
+ run();
166
+ ```
167
+
168
+ ### Standalone function
169
+
170
+ The standalone function version of this method:
171
+
172
+ ```typescript
173
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
174
+ import { supportArticlesGetSupportArticle } from "@greensecurity/javascript-sdk/funcs/supportArticlesGetSupportArticle.js";
175
+
176
+ // Use `GreenSecurityCore` for best tree-shaking performance.
177
+ // You can create one instance of it to use across an application.
178
+ const greenSecurity = new GreenSecurityCore({
179
+ security: {
180
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
181
+ },
182
+ });
183
+
184
+ async function run() {
185
+ const res = await supportArticlesGetSupportArticle(greenSecurity, {
186
+ id: 600418,
187
+ expand: [
188
+ "facility.system",
189
+ ],
190
+ });
191
+ if (res.ok) {
192
+ const { value: result } = res;
193
+ console.log(result);
194
+ } else {
195
+ console.log("supportArticlesGetSupportArticle failed:", res.error);
196
+ }
197
+ }
198
+
199
+ run();
200
+ ```
201
+
202
+ ### React hooks and utilities
203
+
204
+ This method can be used in React components through the following hooks and
205
+ associated utilities.
206
+
207
+ > Check out [this guide][hook-guide] for information about each of the utilities
208
+ > below and how to get started using React hooks.
209
+
210
+ [hook-guide]: ../../../REACT_QUERY.md
211
+
212
+ ```tsx
213
+ import {
214
+ // Query hooks for fetching data.
215
+ useSupportArticlesGetSupportArticle,
216
+ useSupportArticlesGetSupportArticleSuspense,
217
+
218
+ // Utility for prefetching data during server-side rendering and in React
219
+ // Server Components that will be immediately available to client components
220
+ // using the hooks.
221
+ prefetchSupportArticlesGetSupportArticle,
222
+
223
+ // Utilities to invalidate the query cache for this query in response to
224
+ // mutations and other user actions.
225
+ invalidateSupportArticlesGetSupportArticle,
226
+ invalidateAllSupportArticlesGetSupportArticle,
227
+ } from "@greensecurity/javascript-sdk/react-query/supportArticlesGetSupportArticle.js";
228
+ ```
229
+
230
+ ### Parameters
231
+
232
+ | Parameter | Type | Required | Description |
233
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
234
+ | `request` | [operations.GetSupportArticleRequest](../../models/operations/getsupportarticlerequest.md) | :heavy_check_mark: | The request object to use for the request. |
235
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
236
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
237
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
238
+
239
+ ### Response
240
+
241
+ **Promise\<[components.SupportArticle](../../models/components/supportarticle.md)\>**
242
+
243
+ ### Errors
244
+
245
+ | Error Type | Status Code | Content Type |
246
+ | ----------------------- | ----------------------- | ----------------------- |
247
+ | errors.ApiErrorResponse | 400, 401, 403, 404 | application/json |
248
+ | errors.ApiErrorResponse | 500 | application/json |
249
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -0,0 +1,136 @@
1
+ # Systems
2
+ (*systems*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [listSystems](#listsystems) - List systems
9
+
10
+ ## listSystems
11
+
12
+ List or search systems.
13
+
14
+ Available `expand` scopes are:
15
+
16
+ - system.facilities
17
+
18
+ ### Example Usage
19
+
20
+ <!-- UsageSnippet language="typescript" operationID="listSystems" method="get" path="/systems" -->
21
+ ```typescript
22
+ import { GreenSecurity } from "@greensecurity/javascript-sdk";
23
+
24
+ const greenSecurity = new GreenSecurity({
25
+ security: {
26
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
27
+ },
28
+ });
29
+
30
+ async function run() {
31
+ const result = await greenSecurity.systems.listSystems({
32
+ sort: "job",
33
+ desc: true,
34
+ itemsPerPage: 25,
35
+ expand: [
36
+ "facility.system",
37
+ ],
38
+ });
39
+
40
+ for await (const page of result) {
41
+ console.log(page);
42
+ }
43
+ }
44
+
45
+ run();
46
+ ```
47
+
48
+ ### Standalone function
49
+
50
+ The standalone function version of this method:
51
+
52
+ ```typescript
53
+ import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
54
+ import { systemsListSystems } from "@greensecurity/javascript-sdk/funcs/systemsListSystems.js";
55
+
56
+ // Use `GreenSecurityCore` for best tree-shaking performance.
57
+ // You can create one instance of it to use across an application.
58
+ const greenSecurity = new GreenSecurityCore({
59
+ security: {
60
+ token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
61
+ },
62
+ });
63
+
64
+ async function run() {
65
+ const res = await systemsListSystems(greenSecurity, {
66
+ sort: "job",
67
+ desc: true,
68
+ itemsPerPage: 25,
69
+ expand: [
70
+ "facility.system",
71
+ ],
72
+ });
73
+ if (res.ok) {
74
+ const { value: result } = res;
75
+ for await (const page of result) {
76
+ console.log(page);
77
+ }
78
+ } else {
79
+ console.log("systemsListSystems failed:", res.error);
80
+ }
81
+ }
82
+
83
+ run();
84
+ ```
85
+
86
+ ### React hooks and utilities
87
+
88
+ This method can be used in React components through the following hooks and
89
+ associated utilities.
90
+
91
+ > Check out [this guide][hook-guide] for information about each of the utilities
92
+ > below and how to get started using React hooks.
93
+
94
+ [hook-guide]: ../../../REACT_QUERY.md
95
+
96
+ ```tsx
97
+ import {
98
+ // Query hooks for fetching data.
99
+ useSystemsListSystems,
100
+ useSystemsListSystemsSuspense,
101
+ // Query hooks suitable for building infinite scrolling or "load more" UIs.
102
+ useSystemsListSystemsInfinite,
103
+ useSystemsListSystemsInfiniteSuspense,
104
+
105
+ // Utility for prefetching data during server-side rendering and in React
106
+ // Server Components that will be immediately available to client components
107
+ // using the hooks.
108
+ prefetchSystemsListSystems,
109
+
110
+ // Utilities to invalidate the query cache for this query in response to
111
+ // mutations and other user actions.
112
+ invalidateSystemsListSystems,
113
+ invalidateAllSystemsListSystems,
114
+ } from "@greensecurity/javascript-sdk/react-query/systemsListSystems.js";
115
+ ```
116
+
117
+ ### Parameters
118
+
119
+ | Parameter | Type | Required | Description |
120
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
121
+ | `request` | [operations.ListSystemsRequest](../../models/operations/listsystemsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
122
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
123
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
124
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
125
+
126
+ ### Response
127
+
128
+ **Promise\<[operations.ListSystemsResponse](../../models/operations/listsystemsresponse.md)\>**
129
+
130
+ ### Errors
131
+
132
+ | Error Type | Status Code | Content Type |
133
+ | ----------------------- | ----------------------- | ----------------------- |
134
+ | errors.ApiErrorResponse | 403 | application/json |
135
+ | errors.ApiErrorResponse | 500 | application/json |
136
+ | errors.APIError | 4XX, 5XX | \*/\* |