@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.
- package/.devcontainer/README.md +35 -0
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +5 -19
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/vendor.d.ts +2 -0
- package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendor.js +4 -0
- package/dist/commonjs/models/components/vendor.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +5 -19
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/vendor.d.ts +2 -0
- package/dist/esm/models/components/vendor.d.ts.map +1 -1
- package/dist/esm/models/components/vendor.js +4 -0
- package/dist/esm/models/components/vendor.js.map +1 -1
- package/docs/sdks/alerts/README.md +219 -0
- package/docs/sdks/companies/README.md +126 -0
- package/docs/sdks/datarequests/README.md +302 -0
- package/docs/sdks/events/README.md +1126 -0
- package/docs/sdks/fhirconfigs/README.md +551 -0
- package/docs/sdks/greensecurity/README.md +14 -0
- package/docs/sdks/invoices/README.md +324 -0
- package/docs/sdks/mobiledevices/README.md +100 -0
- package/docs/sdks/organizations/README.md +508 -0
- package/docs/sdks/supportarticles/README.md +249 -0
- package/docs/sdks/systems/README.md +136 -0
- package/docs/sdks/users/README.md +831 -0
- package/docs/sdks/vendors/README.md +4904 -0
- package/docs/sdks/vendorscans/README.md +104 -0
- package/docs/sdks/webhooks/README.md +352 -0
- package/docs/sdks/zones/README.md +344 -0
- package/examples/README.md +31 -0
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +5 -19
- package/src/lib/config.ts +2 -2
- package/src/models/components/vendor.ts +6 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# DataRequests
|
|
2
|
+
(*dataRequests*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [addDataRequestFile](#adddatarequestfile) - Add vendor credential data request
|
|
9
|
+
* [deleteDataRequestFile](#deletedatarequestfile) - Delete vendor credential data request file
|
|
10
|
+
* [updateDataRequest](#updatedatarequest) - Update vendor credential data request
|
|
11
|
+
|
|
12
|
+
## addDataRequestFile
|
|
13
|
+
|
|
14
|
+
It will set the vendor credential data request file attributes
|
|
15
|
+
|
|
16
|
+
### Example Usage
|
|
17
|
+
|
|
18
|
+
<!-- UsageSnippet language="typescript" operationID="addDataRequestFile" method="post" path="/data_requests/{id}/file" -->
|
|
19
|
+
```typescript
|
|
20
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
21
|
+
|
|
22
|
+
const greenSecurity = new GreenSecurity({
|
|
23
|
+
security: {
|
|
24
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
async function run() {
|
|
29
|
+
const result = await greenSecurity.dataRequests.addDataRequestFile({
|
|
30
|
+
id: 38177,
|
|
31
|
+
requestBody: {},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
console.log(result);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
run();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Standalone function
|
|
41
|
+
|
|
42
|
+
The standalone function version of this method:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
46
|
+
import { dataRequestsAddDataRequestFile } from "@greensecurity/javascript-sdk/funcs/dataRequestsAddDataRequestFile.js";
|
|
47
|
+
|
|
48
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
49
|
+
// You can create one instance of it to use across an application.
|
|
50
|
+
const greenSecurity = new GreenSecurityCore({
|
|
51
|
+
security: {
|
|
52
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
async function run() {
|
|
57
|
+
const res = await dataRequestsAddDataRequestFile(greenSecurity, {
|
|
58
|
+
id: 38177,
|
|
59
|
+
requestBody: {},
|
|
60
|
+
});
|
|
61
|
+
if (res.ok) {
|
|
62
|
+
const { value: result } = res;
|
|
63
|
+
console.log(result);
|
|
64
|
+
} else {
|
|
65
|
+
console.log("dataRequestsAddDataRequestFile failed:", res.error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
run();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### React hooks and utilities
|
|
73
|
+
|
|
74
|
+
This method can be used in React components through the following hooks and
|
|
75
|
+
associated utilities.
|
|
76
|
+
|
|
77
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
78
|
+
> below and how to get started using React hooks.
|
|
79
|
+
|
|
80
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import {
|
|
84
|
+
// Mutation hook for triggering the API call.
|
|
85
|
+
useDataRequestsAddDataRequestFileMutation
|
|
86
|
+
} from "@greensecurity/javascript-sdk/react-query/dataRequestsAddDataRequestFile.js";
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Parameters
|
|
90
|
+
|
|
91
|
+
| Parameter | Type | Required | Description |
|
|
92
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
|
+
| `request` | [operations.AddDataRequestFileRequest](../../models/operations/adddatarequestfilerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
94
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
95
|
+
| `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. |
|
|
96
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
97
|
+
|
|
98
|
+
### Response
|
|
99
|
+
|
|
100
|
+
**Promise\<[boolean](../../models/.md)\>**
|
|
101
|
+
|
|
102
|
+
### Errors
|
|
103
|
+
|
|
104
|
+
| Error Type | Status Code | Content Type |
|
|
105
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
106
|
+
| errors.ApiErrorResponse | 400, 401, 403 | application/json |
|
|
107
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
108
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
109
|
+
|
|
110
|
+
## deleteDataRequestFile
|
|
111
|
+
|
|
112
|
+
It will delete the vendor credential data request file
|
|
113
|
+
|
|
114
|
+
### Example Usage
|
|
115
|
+
|
|
116
|
+
<!-- UsageSnippet language="typescript" operationID="deleteDataRequestFile" method="delete" path="/data_requests/{id}/file" -->
|
|
117
|
+
```typescript
|
|
118
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
119
|
+
|
|
120
|
+
const greenSecurity = new GreenSecurity({
|
|
121
|
+
security: {
|
|
122
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
async function run() {
|
|
127
|
+
const result = await greenSecurity.dataRequests.deleteDataRequestFile({
|
|
128
|
+
id: 787566,
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
console.log(result);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
run();
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Standalone function
|
|
138
|
+
|
|
139
|
+
The standalone function version of this method:
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
143
|
+
import { dataRequestsDeleteDataRequestFile } from "@greensecurity/javascript-sdk/funcs/dataRequestsDeleteDataRequestFile.js";
|
|
144
|
+
|
|
145
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
146
|
+
// You can create one instance of it to use across an application.
|
|
147
|
+
const greenSecurity = new GreenSecurityCore({
|
|
148
|
+
security: {
|
|
149
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
async function run() {
|
|
154
|
+
const res = await dataRequestsDeleteDataRequestFile(greenSecurity, {
|
|
155
|
+
id: 787566,
|
|
156
|
+
});
|
|
157
|
+
if (res.ok) {
|
|
158
|
+
const { value: result } = res;
|
|
159
|
+
console.log(result);
|
|
160
|
+
} else {
|
|
161
|
+
console.log("dataRequestsDeleteDataRequestFile failed:", res.error);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
run();
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### React hooks and utilities
|
|
169
|
+
|
|
170
|
+
This method can be used in React components through the following hooks and
|
|
171
|
+
associated utilities.
|
|
172
|
+
|
|
173
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
174
|
+
> below and how to get started using React hooks.
|
|
175
|
+
|
|
176
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
import {
|
|
180
|
+
// Mutation hook for triggering the API call.
|
|
181
|
+
useDataRequestsDeleteDataRequestFileMutation
|
|
182
|
+
} from "@greensecurity/javascript-sdk/react-query/dataRequestsDeleteDataRequestFile.js";
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Parameters
|
|
186
|
+
|
|
187
|
+
| Parameter | Type | Required | Description |
|
|
188
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
189
|
+
| `request` | [operations.DeleteDataRequestFileRequest](../../models/operations/deletedatarequestfilerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
190
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
191
|
+
| `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. |
|
|
192
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
193
|
+
|
|
194
|
+
### Response
|
|
195
|
+
|
|
196
|
+
**Promise\<[boolean](../../models/.md)\>**
|
|
197
|
+
|
|
198
|
+
### Errors
|
|
199
|
+
|
|
200
|
+
| Error Type | Status Code | Content Type |
|
|
201
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
202
|
+
| errors.ApiErrorResponse | 400, 401, 403 | application/json |
|
|
203
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
204
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
205
|
+
|
|
206
|
+
## updateDataRequest
|
|
207
|
+
|
|
208
|
+
It will update the vendor credential data request attributes
|
|
209
|
+
|
|
210
|
+
### Example Usage
|
|
211
|
+
|
|
212
|
+
<!-- UsageSnippet language="typescript" operationID="updateDataRequest" method="put" path="/data_requests/{id}" -->
|
|
213
|
+
```typescript
|
|
214
|
+
import { GreenSecurity } from "@greensecurity/javascript-sdk";
|
|
215
|
+
|
|
216
|
+
const greenSecurity = new GreenSecurity({
|
|
217
|
+
security: {
|
|
218
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
async function run() {
|
|
223
|
+
const result = await greenSecurity.dataRequests.updateDataRequest({
|
|
224
|
+
id: 536149,
|
|
225
|
+
requestBody: {},
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
console.log(result);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
run();
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Standalone function
|
|
235
|
+
|
|
236
|
+
The standalone function version of this method:
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
import { GreenSecurityCore } from "@greensecurity/javascript-sdk/core.js";
|
|
240
|
+
import { dataRequestsUpdateDataRequest } from "@greensecurity/javascript-sdk/funcs/dataRequestsUpdateDataRequest.js";
|
|
241
|
+
|
|
242
|
+
// Use `GreenSecurityCore` for best tree-shaking performance.
|
|
243
|
+
// You can create one instance of it to use across an application.
|
|
244
|
+
const greenSecurity = new GreenSecurityCore({
|
|
245
|
+
security: {
|
|
246
|
+
token: process.env["GREEN_SECURITY_TOKEN"] ?? "",
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
async function run() {
|
|
251
|
+
const res = await dataRequestsUpdateDataRequest(greenSecurity, {
|
|
252
|
+
id: 536149,
|
|
253
|
+
requestBody: {},
|
|
254
|
+
});
|
|
255
|
+
if (res.ok) {
|
|
256
|
+
const { value: result } = res;
|
|
257
|
+
console.log(result);
|
|
258
|
+
} else {
|
|
259
|
+
console.log("dataRequestsUpdateDataRequest failed:", res.error);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
run();
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### React hooks and utilities
|
|
267
|
+
|
|
268
|
+
This method can be used in React components through the following hooks and
|
|
269
|
+
associated utilities.
|
|
270
|
+
|
|
271
|
+
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
272
|
+
> below and how to get started using React hooks.
|
|
273
|
+
|
|
274
|
+
[hook-guide]: ../../../REACT_QUERY.md
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
import {
|
|
278
|
+
// Mutation hook for triggering the API call.
|
|
279
|
+
useDataRequestsUpdateDataRequestMutation
|
|
280
|
+
} from "@greensecurity/javascript-sdk/react-query/dataRequestsUpdateDataRequest.js";
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Parameters
|
|
284
|
+
|
|
285
|
+
| Parameter | Type | Required | Description |
|
|
286
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
287
|
+
| `request` | [operations.UpdateDataRequestRequest](../../models/operations/updatedatarequestrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
288
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
289
|
+
| `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. |
|
|
290
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
291
|
+
|
|
292
|
+
### Response
|
|
293
|
+
|
|
294
|
+
**Promise\<[boolean](../../models/.md)\>**
|
|
295
|
+
|
|
296
|
+
### Errors
|
|
297
|
+
|
|
298
|
+
| Error Type | Status Code | Content Type |
|
|
299
|
+
| ----------------------- | ----------------------- | ----------------------- |
|
|
300
|
+
| errors.ApiErrorResponse | 400, 401, 403 | application/json |
|
|
301
|
+
| errors.ApiErrorResponse | 500 | application/json |
|
|
302
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|