@greensecurity/javascript-sdk 0.44.0-beta.71 → 0.44.0-beta.73

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 (180) hide show
  1. package/README.md +1 -4
  2. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  3. package/dist/commonjs/__tests__/vendorscans.test.js +2 -21
  4. package/dist/commonjs/__tests__/vendorscans.test.js.map +1 -1
  5. package/dist/commonjs/__tests__/zones.test.js +34 -6
  6. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  7. package/dist/commonjs/funcs/invoicesInvoicesExport.js +2 -0
  8. package/dist/commonjs/funcs/invoicesInvoicesExport.js.map +1 -1
  9. package/dist/commonjs/funcs/invoicesListInvoices.js +2 -0
  10. package/dist/commonjs/funcs/invoicesListInvoices.js.map +1 -1
  11. package/dist/commonjs/funcs/vendorScansExportVendorScans.d.ts +3 -3
  12. package/dist/commonjs/funcs/vendorScansExportVendorScans.js +3 -3
  13. package/dist/commonjs/funcs/vendorScansVendorScanOut.d.ts +1 -1
  14. package/dist/commonjs/funcs/vendorScansVendorScanOut.js +3 -2
  15. package/dist/commonjs/funcs/vendorScansVendorScanOut.js.map +1 -1
  16. package/dist/commonjs/funcs/vendorsAddVendorCredentialFileForAutoClassification.js +1 -1
  17. package/dist/commonjs/funcs/vendorsAddVendorCredentialFileForAutoClassification.js.map +1 -1
  18. package/dist/commonjs/lib/config.d.ts +3 -3
  19. package/dist/commonjs/lib/config.js +3 -3
  20. package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.d.ts +5 -0
  21. package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.js +2 -0
  23. package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.js.map +1 -1
  24. package/dist/commonjs/models/operations/index.d.ts +0 -1
  25. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/index.js +0 -1
  27. package/dist/commonjs/models/operations/index.js.map +1 -1
  28. package/dist/commonjs/models/operations/invoicesexport.d.ts +10 -0
  29. package/dist/commonjs/models/operations/invoicesexport.d.ts.map +1 -1
  30. package/dist/commonjs/models/operations/invoicesexport.js +4 -0
  31. package/dist/commonjs/models/operations/invoicesexport.js.map +1 -1
  32. package/dist/commonjs/models/operations/listinvoices.d.ts +10 -0
  33. package/dist/commonjs/models/operations/listinvoices.d.ts.map +1 -1
  34. package/dist/commonjs/models/operations/listinvoices.js +4 -0
  35. package/dist/commonjs/models/operations/listinvoices.js.map +1 -1
  36. package/dist/commonjs/models/operations/vendorscanout.d.ts +15 -0
  37. package/dist/commonjs/models/operations/vendorscanout.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/vendorscanout.js +19 -1
  39. package/dist/commonjs/models/operations/vendorscanout.js.map +1 -1
  40. package/dist/commonjs/react-query/index.d.ts +0 -1
  41. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  42. package/dist/commonjs/react-query/index.js +0 -1
  43. package/dist/commonjs/react-query/index.js.map +1 -1
  44. package/dist/commonjs/react-query/invoicesInvoicesExport.core.d.ts +2 -0
  45. package/dist/commonjs/react-query/invoicesInvoicesExport.core.d.ts.map +1 -1
  46. package/dist/commonjs/react-query/invoicesInvoicesExport.core.js +2 -0
  47. package/dist/commonjs/react-query/invoicesInvoicesExport.core.js.map +1 -1
  48. package/dist/commonjs/react-query/invoicesInvoicesExport.d.ts +4 -0
  49. package/dist/commonjs/react-query/invoicesInvoicesExport.d.ts.map +1 -1
  50. package/dist/commonjs/react-query/invoicesInvoicesExport.js.map +1 -1
  51. package/dist/commonjs/react-query/invoicesListInvoices.core.d.ts +4 -0
  52. package/dist/commonjs/react-query/invoicesListInvoices.core.d.ts.map +1 -1
  53. package/dist/commonjs/react-query/invoicesListInvoices.core.js +4 -0
  54. package/dist/commonjs/react-query/invoicesListInvoices.core.js.map +1 -1
  55. package/dist/commonjs/react-query/invoicesListInvoices.d.ts +4 -0
  56. package/dist/commonjs/react-query/invoicesListInvoices.d.ts.map +1 -1
  57. package/dist/commonjs/react-query/invoicesListInvoices.js.map +1 -1
  58. package/dist/commonjs/react-query/vendorScansExportVendorScans.d.ts +6 -6
  59. package/dist/commonjs/react-query/vendorScansExportVendorScans.js +6 -6
  60. package/dist/commonjs/react-query/vendorScansVendorScanOut.d.ts +1 -1
  61. package/dist/commonjs/react-query/vendorScansVendorScanOut.js +1 -1
  62. package/dist/commonjs/sdk/vendorscans.d.ts +4 -13
  63. package/dist/commonjs/sdk/vendorscans.d.ts.map +1 -1
  64. package/dist/commonjs/sdk/vendorscans.js +4 -16
  65. package/dist/commonjs/sdk/vendorscans.js.map +1 -1
  66. package/dist/esm/__tests__/vendors.test.js +1 -1
  67. package/dist/esm/__tests__/vendorscans.test.js +3 -22
  68. package/dist/esm/__tests__/vendorscans.test.js.map +1 -1
  69. package/dist/esm/__tests__/zones.test.js +34 -6
  70. package/dist/esm/__tests__/zones.test.js.map +1 -1
  71. package/dist/esm/funcs/invoicesInvoicesExport.js +2 -0
  72. package/dist/esm/funcs/invoicesInvoicesExport.js.map +1 -1
  73. package/dist/esm/funcs/invoicesListInvoices.js +2 -0
  74. package/dist/esm/funcs/invoicesListInvoices.js.map +1 -1
  75. package/dist/esm/funcs/vendorScansExportVendorScans.d.ts +3 -3
  76. package/dist/esm/funcs/vendorScansExportVendorScans.js +3 -3
  77. package/dist/esm/funcs/vendorScansVendorScanOut.d.ts +1 -1
  78. package/dist/esm/funcs/vendorScansVendorScanOut.js +4 -3
  79. package/dist/esm/funcs/vendorScansVendorScanOut.js.map +1 -1
  80. package/dist/esm/funcs/vendorsAddVendorCredentialFileForAutoClassification.js +1 -1
  81. package/dist/esm/funcs/vendorsAddVendorCredentialFileForAutoClassification.js.map +1 -1
  82. package/dist/esm/lib/config.d.ts +3 -3
  83. package/dist/esm/lib/config.js +3 -3
  84. package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.d.ts +5 -0
  85. package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.d.ts.map +1 -1
  86. package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.js +2 -0
  87. package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.js.map +1 -1
  88. package/dist/esm/models/operations/index.d.ts +0 -1
  89. package/dist/esm/models/operations/index.d.ts.map +1 -1
  90. package/dist/esm/models/operations/index.js +0 -1
  91. package/dist/esm/models/operations/index.js.map +1 -1
  92. package/dist/esm/models/operations/invoicesexport.d.ts +10 -0
  93. package/dist/esm/models/operations/invoicesexport.d.ts.map +1 -1
  94. package/dist/esm/models/operations/invoicesexport.js +4 -0
  95. package/dist/esm/models/operations/invoicesexport.js.map +1 -1
  96. package/dist/esm/models/operations/listinvoices.d.ts +10 -0
  97. package/dist/esm/models/operations/listinvoices.d.ts.map +1 -1
  98. package/dist/esm/models/operations/listinvoices.js +4 -0
  99. package/dist/esm/models/operations/listinvoices.js.map +1 -1
  100. package/dist/esm/models/operations/vendorscanout.d.ts +15 -0
  101. package/dist/esm/models/operations/vendorscanout.d.ts.map +1 -1
  102. package/dist/esm/models/operations/vendorscanout.js +17 -0
  103. package/dist/esm/models/operations/vendorscanout.js.map +1 -1
  104. package/dist/esm/react-query/index.d.ts +0 -1
  105. package/dist/esm/react-query/index.d.ts.map +1 -1
  106. package/dist/esm/react-query/index.js +0 -1
  107. package/dist/esm/react-query/index.js.map +1 -1
  108. package/dist/esm/react-query/invoicesInvoicesExport.core.d.ts +2 -0
  109. package/dist/esm/react-query/invoicesInvoicesExport.core.d.ts.map +1 -1
  110. package/dist/esm/react-query/invoicesInvoicesExport.core.js +2 -0
  111. package/dist/esm/react-query/invoicesInvoicesExport.core.js.map +1 -1
  112. package/dist/esm/react-query/invoicesInvoicesExport.d.ts +4 -0
  113. package/dist/esm/react-query/invoicesInvoicesExport.d.ts.map +1 -1
  114. package/dist/esm/react-query/invoicesInvoicesExport.js.map +1 -1
  115. package/dist/esm/react-query/invoicesListInvoices.core.d.ts +4 -0
  116. package/dist/esm/react-query/invoicesListInvoices.core.d.ts.map +1 -1
  117. package/dist/esm/react-query/invoicesListInvoices.core.js +4 -0
  118. package/dist/esm/react-query/invoicesListInvoices.core.js.map +1 -1
  119. package/dist/esm/react-query/invoicesListInvoices.d.ts +4 -0
  120. package/dist/esm/react-query/invoicesListInvoices.d.ts.map +1 -1
  121. package/dist/esm/react-query/invoicesListInvoices.js.map +1 -1
  122. package/dist/esm/react-query/vendorScansExportVendorScans.d.ts +6 -6
  123. package/dist/esm/react-query/vendorScansExportVendorScans.js +6 -6
  124. package/dist/esm/react-query/vendorScansVendorScanOut.d.ts +1 -1
  125. package/dist/esm/react-query/vendorScansVendorScanOut.js +1 -1
  126. package/dist/esm/sdk/vendorscans.d.ts +4 -13
  127. package/dist/esm/sdk/vendorscans.d.ts.map +1 -1
  128. package/dist/esm/sdk/vendorscans.js +4 -16
  129. package/dist/esm/sdk/vendorscans.js.map +1 -1
  130. package/jsr.json +1 -1
  131. package/package.json +1 -1
  132. package/src/__tests__/vendors.test.ts +1 -1
  133. package/src/__tests__/vendorscans.test.ts +5 -24
  134. package/src/__tests__/zones.test.ts +34 -6
  135. package/src/funcs/invoicesInvoicesExport.ts +2 -0
  136. package/src/funcs/invoicesListInvoices.ts +2 -0
  137. package/src/funcs/vendorScansExportVendorScans.ts +3 -3
  138. package/src/funcs/vendorScansVendorScanOut.ts +4 -3
  139. package/src/funcs/vendorsAddVendorCredentialFileForAutoClassification.ts +4 -1
  140. package/src/lib/config.ts +3 -3
  141. package/src/models/components/vendorcredentialfileforautoclassificationrequest.ts +7 -0
  142. package/src/models/operations/index.ts +0 -1
  143. package/src/models/operations/invoicesexport.ts +14 -0
  144. package/src/models/operations/listinvoices.ts +14 -0
  145. package/src/models/operations/vendorscanout.ts +43 -0
  146. package/src/react-query/index.ts +0 -1
  147. package/src/react-query/invoicesInvoicesExport.core.ts +4 -0
  148. package/src/react-query/invoicesInvoicesExport.ts +4 -0
  149. package/src/react-query/invoicesListInvoices.core.ts +8 -0
  150. package/src/react-query/invoicesListInvoices.ts +4 -0
  151. package/src/react-query/vendorScansExportVendorScans.ts +6 -6
  152. package/src/react-query/vendorScansVendorScanOut.ts +1 -1
  153. package/src/sdk/vendorscans.ts +4 -24
  154. package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.d.ts +0 -20
  155. package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
  156. package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.js +0 -126
  157. package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.js.map +0 -1
  158. package/dist/commonjs/models/operations/vendorscangpsscanout.d.ts +0 -81
  159. package/dist/commonjs/models/operations/vendorscangpsscanout.d.ts.map +0 -1
  160. package/dist/commonjs/models/operations/vendorscangpsscanout.js +0 -96
  161. package/dist/commonjs/models/operations/vendorscangpsscanout.js.map +0 -1
  162. package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.d.ts +0 -31
  163. package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
  164. package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.js +0 -53
  165. package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.js.map +0 -1
  166. package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.d.ts +0 -20
  167. package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
  168. package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.js +0 -90
  169. package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.js.map +0 -1
  170. package/dist/esm/models/operations/vendorscangpsscanout.d.ts +0 -81
  171. package/dist/esm/models/operations/vendorscangpsscanout.d.ts.map +0 -1
  172. package/dist/esm/models/operations/vendorscangpsscanout.js +0 -57
  173. package/dist/esm/models/operations/vendorscangpsscanout.js.map +0 -1
  174. package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.d.ts +0 -31
  175. package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
  176. package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.js +0 -48
  177. package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.js.map +0 -1
  178. package/src/funcs/vendorScansVendorScanGpsScanOut.ts +0 -182
  179. package/src/models/operations/vendorscangpsscanout.ts +0 -167
  180. package/src/react-query/vendorScansVendorScanGpsScanOut.ts +0 -117
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@greensecurity/javascript-sdk",
5
- "version": "0.44.0-beta.71",
5
+ "version": "0.44.0-beta.73",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greensecurity/javascript-sdk",
3
- "version": "0.44.0-beta.71",
3
+ "version": "0.44.0-beta.73",
4
4
  "author": "Green Security LLC",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -121,7 +121,7 @@ test("Vendors List Vendor Credits", async () => {
121
121
  page: 1,
122
122
  useUrlParams: false,
123
123
  },
124
- creditBalance: 8683.29,
124
+ creditBalance: 3393.75,
125
125
  });
126
126
  });
127
127
 
@@ -2,7 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { expect, test } from "vitest";
5
+ import { assert, expect, it, test } from "vitest";
6
6
  import { GreenSecurity } from "../index.js";
7
7
  import { DownloadVendorScansExportAcceptEnum } from "../sdk/vendorscans.js";
8
8
  import { filesToByteArray, streamToByteArray } from "./files.js";
@@ -224,27 +224,8 @@ test("Vendor Scans Vendor Scan Gps Checkout Config", async () => {
224
224
  });
225
225
  });
226
226
 
227
- test("Vendor Scans Vendor Scan Gps Scan Out", async () => {
228
- const testHttpClient = createTestHTTPClient("vendorScanGpsScanOut");
229
-
230
- const greenSecurity = new GreenSecurity({
231
- serverURL: process.env["TEST_SERVER_URL"] ?? "https://localhost:3000/api",
232
- httpClient: testHttpClient,
233
- security: {
234
- token: process.env["GREEN_SECURITY_TOKEN"] ?? "value",
235
- },
236
- });
237
-
238
- const result = await greenSecurity.vendorScans.vendorScanGpsScanOut({
239
- id: 818416,
240
- requestBody: {
241
- latitude: 9788.59,
242
- longitude: 5803.63,
243
- },
244
- });
245
- expect(result).toBeDefined();
246
- expect(result).toEqual({
247
- success: true,
248
- outcome: "possibly_left",
249
- });
227
+ it.skip("Vendor Scans Vendor Scan Gps Scan Out", async () => {
228
+ assert.fail(
229
+ "incomplete test found please make sure to address the following errors: [`workflow step vendorScanGpsScanOut.test referencing operation vendorScanGpsScanOut not found in document`]",
230
+ );
250
231
  });
@@ -36,17 +36,45 @@ test("Zones List Or Search Security Zones", async () => {
36
36
  },
37
37
  items: [
38
38
  {
39
- facility: {},
39
+ facility: {
40
+ contacts: {
41
+ contact: {
42
+ status: "Inactive",
43
+ department: null,
44
+ },
45
+ adminContact: {
46
+ status: "Deleted",
47
+ department: 123,
48
+ },
49
+ techContact: {
50
+ status: "Deleted",
51
+ department: 123,
52
+ },
53
+ greenSecurityCsm: {
54
+ status: "Deleted",
55
+ department: 123,
56
+ },
57
+ accountManager: {
58
+ status: "Active",
59
+ department: 123,
60
+ },
61
+ },
62
+ vendorGuestPolicy: {
63
+ enabled: false,
64
+ vendorGuestLimitAndOr: "and",
65
+ vendorGuestRequireEmail: false,
66
+ },
67
+ },
40
68
  },
41
69
  {
42
70
  facility: {
43
71
  contacts: {
44
72
  contact: {
45
73
  status: "Inactive",
46
- department: 123,
74
+ department: null,
47
75
  },
48
76
  adminContact: {
49
- status: "Active",
77
+ status: "Deleted",
50
78
  department: 123,
51
79
  },
52
80
  techContact: {
@@ -58,12 +86,12 @@ test("Zones List Or Search Security Zones", async () => {
58
86
  department: 123,
59
87
  },
60
88
  accountManager: {
61
- status: "Inactive",
89
+ status: "Active",
62
90
  department: 123,
63
91
  },
64
92
  },
65
93
  vendorGuestPolicy: {
66
- enabled: true,
94
+ enabled: false,
67
95
  vendorGuestLimitAndOr: "and",
68
96
  vendorGuestRequireEmail: false,
69
97
  },
@@ -86,7 +114,7 @@ test("Zones Security Zone Checkin", async () => {
86
114
 
87
115
  const result = await greenSecurity.zones.securityZoneCheckin({
88
116
  qrCode: "<value>",
89
- zoneId: 714947,
117
+ zoneId: 834385,
90
118
  });
91
119
  expect(result).toBeDefined();
92
120
  expect(result).toEqual({});
@@ -97,6 +97,8 @@ async function $do(
97
97
 
98
98
  const query = encodeFormQuery({
99
99
  "company_id": payload.company_id,
100
+ "date_gte": payload.date_gte,
101
+ "date_lte": payload.date_lte,
100
102
  "desc": payload.desc,
101
103
  "expand": payload.expand,
102
104
  "facility_id": payload.facility_id,
@@ -134,6 +134,8 @@ async function $do(
134
134
  }, { explode: false }),
135
135
  encodeFormQuery({
136
136
  "company_id": payload.company_id,
137
+ "date_gte": payload.date_gte,
138
+ "date_lte": payload.date_lte,
137
139
  "desc": payload.desc,
138
140
  "facility_id": payload.facility_id,
139
141
  "invoice_financial_status": payload.invoice_financial_status,
@@ -33,9 +33,9 @@ import { Result } from "../types/fp.js";
33
33
  * @remarks
34
34
  * Enqueues an asynchronous job to generate a CSV export of vendor scans, applying the same access scope and filter
35
35
  * parameters as the list endpoint. The CSV contains every column shown on the Scan Details page: date,
36
- * facility, system, zone, individual, company, scan type, recheck-after-screening, code, overridden, result,
37
- * error, appointment, department, visit purpose, visit contact, estimated checkout time, notes, and the
38
- * screening-required / screening-finished flags.
36
+ * facility, system, zone, individual, individual email, company, scan type, recheck-after-screening, code,
37
+ * overridden, result, error, appointment, department, visit purpose, visit contact, estimated checkout time,
38
+ * notes, and the screening-required / screening-finished flags.
39
39
  *
40
40
  * Returns a `status_url` for polling until the export is ready, along with a `download_url` and `status_id`.
41
41
  *
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { GreenSecurityCore } from "../core.js";
6
- import { encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import { matchStatusCode } from "../lib/http.js";
8
8
  import * as M from "../lib/matchers.js";
9
9
  import { compactMap } from "../lib/primitives.js";
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Vendor scan out
31
31
  *
32
32
  * @remarks
33
- * It scans out vendor from facility
33
+ * Scans a vendor out of a facility. Set `gps_checkout` when a device decided the vendor had left a configured geofence; it adds the automatic check-out notification and changes nothing else.
34
34
  */
35
35
  export function vendorScansVendorScanOut(
36
36
  client: GreenSecurityCore,
@@ -87,7 +87,7 @@ async function $do(
87
87
  return [parsed, { status: "invalid" }];
88
88
  }
89
89
  const payload = parsed.value;
90
- const body = null;
90
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
91
91
 
92
92
  const pathParams = {
93
93
  id: encodeSimple("id", payload.id, {
@@ -98,6 +98,7 @@ async function $do(
98
98
  const path = pathToFunc("/vendor-scans/{id}/scan-out")(pathParams);
99
99
 
100
100
  const headers = new Headers(compactMap({
101
+ "Content-Type": "application/json",
101
102
  Accept: "application/json",
102
103
  }));
103
104
 
@@ -184,7 +184,10 @@ async function $do(
184
184
  200,
185
185
  components.VendorCredentialFileForAutoClassificationOk$inboundSchema,
186
186
  ),
187
- M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema),
187
+ M.jsonErr(
188
+ [400, 401, 403, 404, 409, 422],
189
+ errors.ApiErrorResponse$inboundSchema,
190
+ ),
188
191
  M.fail("4XX"),
189
192
  M.fail([500, "5XX"]),
190
193
  )(response, req, { extraFields: responseFields });
package/src/lib/config.ts CHANGED
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "0.43.5",
83
- sdkVersion: "0.44.0-beta.71",
84
- genVersion: "2.928.0",
83
+ sdkVersion: "0.44.0-beta.73",
84
+ genVersion: "2.930.0",
85
85
  userAgent:
86
- "speakeasy-sdk/typescript 0.44.0-beta.71 2.928.0 0.43.5 @greensecurity/javascript-sdk",
86
+ "speakeasy-sdk/typescript 0.44.0-beta.73 2.930.0 0.43.5 @greensecurity/javascript-sdk",
87
87
  } as const;
@@ -14,12 +14,17 @@ export type VendorCredentialFileForAutoClassificationRequest = {
14
14
  * MIME type. Defaults server-side to application/octet-stream.
15
15
  */
16
16
  contentType?: string | undefined;
17
+ /**
18
+ * Number of files in this smart-upload submission; the server groups them into one classification batch. Defaults to 1.
19
+ */
20
+ fileCount?: number | undefined;
17
21
  };
18
22
 
19
23
  /** @internal */
20
24
  export type VendorCredentialFileForAutoClassificationRequest$Outbound = {
21
25
  filename: string;
22
26
  content_type?: string | undefined;
27
+ file_count?: number | undefined;
23
28
  };
24
29
 
25
30
  /** @internal */
@@ -31,9 +36,11 @@ export const VendorCredentialFileForAutoClassificationRequest$outboundSchema:
31
36
  > = z.object({
32
37
  filename: z.string(),
33
38
  contentType: z.string().optional(),
39
+ fileCount: z.number().int().optional(),
34
40
  }).transform((v) => {
35
41
  return remap$(v, {
36
42
  contentType: "content_type",
43
+ fileCount: "file_count",
37
44
  });
38
45
  });
39
46
 
@@ -169,6 +169,5 @@ export * from "./updatevendormanagedbycompany.js";
169
169
  export * from "./updatevendorpaymentresponsibility.js";
170
170
  export * from "./updatevendorscrubdetails.js";
171
171
  export * from "./vendorscangpscheckoutconfig.js";
172
- export * from "./vendorscangpsscanout.js";
173
172
  export * from "./vendorscanout.js";
174
173
  export * from "./vendorsexport.js";
@@ -32,6 +32,14 @@ export type InvoicesExportRequest = {
32
32
  * Case-insensitive search across representative name (vendor user full name) or the word "Company".
33
33
  */
34
34
  representative?: string | undefined;
35
+ /**
36
+ * Filter invoices with a processed date on or after this date (YYYY-MM-DD).
37
+ */
38
+ dateGte?: string | undefined;
39
+ /**
40
+ * Filter invoices with a processed date on or before this date (YYYY-MM-DD).
41
+ */
42
+ dateLte?: string | undefined;
35
43
  /**
36
44
  * Scope to a specific vendor (API users only; must be authorized by MarketplaceAppActivation).
37
45
  */
@@ -76,6 +84,8 @@ export type InvoicesExportRequest$Outbound = {
76
84
  invoice_number?: string | undefined;
77
85
  invoice_financial_status?: string | undefined;
78
86
  representative?: string | undefined;
87
+ date_gte?: string | undefined;
88
+ date_lte?: string | undefined;
79
89
  vendor_id?: string | undefined;
80
90
  company_id?: number | undefined;
81
91
  facility_id?: number | undefined;
@@ -95,6 +105,8 @@ export const InvoicesExportRequest$outboundSchema: z.ZodType<
95
105
  invoiceNumber: z.string().optional(),
96
106
  invoiceFinancialStatus: InvoiceFinancialStatus$outboundSchema.optional(),
97
107
  representative: z.string().optional(),
108
+ dateGte: z.string().optional(),
109
+ dateLte: z.string().optional(),
98
110
  vendorId: z.string().optional(),
99
111
  companyId: z.number().int().optional(),
100
112
  facilityId: z.number().int().optional(),
@@ -107,6 +119,8 @@ export const InvoicesExportRequest$outboundSchema: z.ZodType<
107
119
  return remap$(v, {
108
120
  invoiceNumber: "invoice_number",
109
121
  invoiceFinancialStatus: "invoice_financial_status",
122
+ dateGte: "date_gte",
123
+ dateLte: "date_lte",
110
124
  vendorId: "vendor_id",
111
125
  companyId: "company_id",
112
126
  facilityId: "facility_id",
@@ -43,6 +43,14 @@ export type ListInvoicesRequest = {
43
43
  * Filter by the representative's name.
44
44
  */
45
45
  representative?: string | undefined;
46
+ /**
47
+ * Filter invoices with a processed date on or after this date (YYYY-MM-DD).
48
+ */
49
+ dateGte?: string | undefined;
50
+ /**
51
+ * Filter invoices with a processed date on or before this date (YYYY-MM-DD).
52
+ */
53
+ dateLte?: string | undefined;
46
54
  /**
47
55
  * For vendors, "me" or the vendor ID to scope the request.
48
56
  *
@@ -89,6 +97,8 @@ export type ListInvoicesRequest$Outbound = {
89
97
  invoice_number?: string | undefined;
90
98
  invoice_financial_status?: string | undefined;
91
99
  representative?: string | undefined;
100
+ date_gte?: string | undefined;
101
+ date_lte?: string | undefined;
92
102
  vendor_id?: string | undefined;
93
103
  company_id?: number | undefined;
94
104
  facility_id?: number | undefined;
@@ -110,6 +120,8 @@ export const ListInvoicesRequest$outboundSchema: z.ZodType<
110
120
  invoiceFinancialStatus: components.InvoiceFinancialStatus$outboundSchema
111
121
  .optional(),
112
122
  representative: z.string().optional(),
123
+ dateGte: z.string().optional(),
124
+ dateLte: z.string().optional(),
113
125
  vendorId: z.string().optional(),
114
126
  companyId: z.number().int().optional(),
115
127
  facilityId: z.number().int().optional(),
@@ -119,6 +131,8 @@ export const ListInvoicesRequest$outboundSchema: z.ZodType<
119
131
  itemsPerPage: "items_per_page",
120
132
  invoiceNumber: "invoice_number",
121
133
  invoiceFinancialStatus: "invoice_financial_status",
134
+ dateGte: "date_gte",
135
+ dateLte: "date_lte",
122
136
  vendorId: "vendor_id",
123
137
  companyId: "company_id",
124
138
  facilityId: "facility_id",
@@ -9,11 +9,19 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import * as types from "../../types/primitives.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
+ export type VendorScanOutVendorScanOutRequest = {
13
+ /**
14
+ * Set by a device that decided the vendor left a configured geofence.
15
+ */
16
+ gpsCheckout?: boolean | undefined;
17
+ };
18
+
12
19
  export type VendorScanOutRequest = {
13
20
  /**
14
21
  * The identifier of the object
15
22
  */
16
23
  id: number;
24
+ requestBody?: VendorScanOutVendorScanOutRequest | undefined;
17
25
  };
18
26
 
19
27
  /**
@@ -29,9 +37,38 @@ export type VendorScanOutVendorScanOutOk = {
29
37
  success: boolean;
30
38
  };
31
39
 
40
+ /** @internal */
41
+ export type VendorScanOutVendorScanOutRequest$Outbound = {
42
+ gps_checkout: boolean;
43
+ };
44
+
45
+ /** @internal */
46
+ export const VendorScanOutVendorScanOutRequest$outboundSchema: z.ZodType<
47
+ VendorScanOutVendorScanOutRequest$Outbound,
48
+ z.ZodTypeDef,
49
+ VendorScanOutVendorScanOutRequest
50
+ > = z.object({
51
+ gpsCheckout: z.boolean().default(false),
52
+ }).transform((v) => {
53
+ return remap$(v, {
54
+ gpsCheckout: "gps_checkout",
55
+ });
56
+ });
57
+
58
+ export function vendorScanOutVendorScanOutRequestToJSON(
59
+ vendorScanOutVendorScanOutRequest: VendorScanOutVendorScanOutRequest,
60
+ ): string {
61
+ return JSON.stringify(
62
+ VendorScanOutVendorScanOutRequest$outboundSchema.parse(
63
+ vendorScanOutVendorScanOutRequest,
64
+ ),
65
+ );
66
+ }
67
+
32
68
  /** @internal */
33
69
  export type VendorScanOutRequest$Outbound = {
34
70
  id: number;
71
+ RequestBody?: VendorScanOutVendorScanOutRequest$Outbound | undefined;
35
72
  };
36
73
 
37
74
  /** @internal */
@@ -41,6 +78,12 @@ export const VendorScanOutRequest$outboundSchema: z.ZodType<
41
78
  VendorScanOutRequest
42
79
  > = z.object({
43
80
  id: z.number().int(),
81
+ requestBody: z.lazy(() => VendorScanOutVendorScanOutRequest$outboundSchema)
82
+ .optional(),
83
+ }).transform((v) => {
84
+ return remap$(v, {
85
+ requestBody: "RequestBody",
86
+ });
44
87
  });
45
88
 
46
89
  export function vendorScanOutRequestToJSON(
@@ -122,7 +122,6 @@ export * from "./vendorScansGetVendorScansExportStatus.js";
122
122
  export * from "./vendorScansListVendorScans.js";
123
123
  export * from "./vendorScansSubmitScreeningResponse.js";
124
124
  export * from "./vendorScansVendorScanGpsCheckoutConfig.js";
125
- export * from "./vendorScansVendorScanGpsScanOut.js";
126
125
  export * from "./vendorScansVendorScanOut.js";
127
126
  export * from "./vendorsChangeSubscription.js";
128
127
  export * from "./vendorsCheckDownloadCode.js";
@@ -47,6 +47,8 @@ export function buildInvoicesInvoicesExportQuery(
47
47
  invoiceNumber: request.invoiceNumber,
48
48
  invoiceFinancialStatus: request.invoiceFinancialStatus,
49
49
  representative: request.representative,
50
+ dateGte: request.dateGte,
51
+ dateLte: request.dateLte,
50
52
  vendorId: request.vendorId,
51
53
  companyId: request.companyId,
52
54
  facilityId: request.facilityId,
@@ -84,6 +86,8 @@ export function queryKeyInvoicesInvoicesExport(
84
86
  invoiceNumber?: string | undefined;
85
87
  invoiceFinancialStatus?: operations.InvoiceFinancialStatus | undefined;
86
88
  representative?: string | undefined;
89
+ dateGte?: string | undefined;
90
+ dateLte?: string | undefined;
87
91
  vendorId?: string | undefined;
88
92
  companyId?: number | undefined;
89
93
  facilityId?: number | undefined;
@@ -116,6 +116,8 @@ export function setInvoicesInvoicesExportData(
116
116
  invoiceNumber?: string | undefined;
117
117
  invoiceFinancialStatus?: operations.InvoiceFinancialStatus | undefined;
118
118
  representative?: string | undefined;
119
+ dateGte?: string | undefined;
120
+ dateLte?: string | undefined;
119
121
  vendorId?: string | undefined;
120
122
  companyId?: number | undefined;
121
123
  facilityId?: number | undefined;
@@ -140,6 +142,8 @@ export function invalidateInvoicesInvoicesExport(
140
142
  invoiceNumber?: string | undefined;
141
143
  invoiceFinancialStatus?: operations.InvoiceFinancialStatus | undefined;
142
144
  representative?: string | undefined;
145
+ dateGte?: string | undefined;
146
+ dateLte?: string | undefined;
143
147
  vendorId?: string | undefined;
144
148
  companyId?: number | undefined;
145
149
  facilityId?: number | undefined;
@@ -81,6 +81,8 @@ export function buildInvoicesListInvoicesQuery(
81
81
  invoiceNumber: request.invoiceNumber,
82
82
  invoiceFinancialStatus: request.invoiceFinancialStatus,
83
83
  representative: request.representative,
84
+ dateGte: request.dateGte,
85
+ dateLte: request.dateLte,
84
86
  vendorId: request.vendorId,
85
87
  companyId: request.companyId,
86
88
  facilityId: request.facilityId,
@@ -129,6 +131,8 @@ export function buildInvoicesListInvoicesInfiniteQuery(
129
131
  invoiceNumber: request.invoiceNumber,
130
132
  invoiceFinancialStatus: request.invoiceFinancialStatus,
131
133
  representative: request.representative,
134
+ dateGte: request.dateGte,
135
+ dateLte: request.dateLte,
132
136
  vendorId: request.vendorId,
133
137
  companyId: request.companyId,
134
138
  facilityId: request.facilityId,
@@ -174,6 +178,8 @@ export function queryKeyInvoicesListInvoices(
174
178
  invoiceNumber?: string | undefined;
175
179
  invoiceFinancialStatus?: components.InvoiceFinancialStatus | undefined;
176
180
  representative?: string | undefined;
181
+ dateGte?: string | undefined;
182
+ dateLte?: string | undefined;
177
183
  vendorId?: string | undefined;
178
184
  companyId?: number | undefined;
179
185
  facilityId?: number | undefined;
@@ -198,6 +204,8 @@ export function queryKeyInvoicesListInvoicesInfinite(
198
204
  invoiceNumber?: string | undefined;
199
205
  invoiceFinancialStatus?: components.InvoiceFinancialStatus | undefined;
200
206
  representative?: string | undefined;
207
+ dateGte?: string | undefined;
208
+ dateLte?: string | undefined;
201
209
  vendorId?: string | undefined;
202
210
  companyId?: number | undefined;
203
211
  facilityId?: number | undefined;
@@ -311,6 +311,8 @@ export function setInvoicesListInvoicesData(
311
311
  invoiceNumber?: string | undefined;
312
312
  invoiceFinancialStatus?: components.InvoiceFinancialStatus | undefined;
313
313
  representative?: string | undefined;
314
+ dateGte?: string | undefined;
315
+ dateLte?: string | undefined;
314
316
  vendorId?: string | undefined;
315
317
  companyId?: number | undefined;
316
318
  facilityId?: number | undefined;
@@ -336,6 +338,8 @@ export function invalidateInvoicesListInvoices(
336
338
  invoiceNumber?: string | undefined;
337
339
  invoiceFinancialStatus?: components.InvoiceFinancialStatus | undefined;
338
340
  representative?: string | undefined;
341
+ dateGte?: string | undefined;
342
+ dateLte?: string | undefined;
339
343
  vendorId?: string | undefined;
340
344
  companyId?: number | undefined;
341
345
  facilityId?: number | undefined;
@@ -59,9 +59,9 @@ export type VendorScansExportVendorScansQueryError =
59
59
  * @remarks
60
60
  * Enqueues an asynchronous job to generate a CSV export of vendor scans, applying the same access scope and filter
61
61
  * parameters as the list endpoint. The CSV contains every column shown on the Scan Details page: date,
62
- * facility, system, zone, individual, company, scan type, recheck-after-screening, code, overridden, result,
63
- * error, appointment, department, visit purpose, visit contact, estimated checkout time, notes, and the
64
- * screening-required / screening-finished flags.
62
+ * facility, system, zone, individual, individual email, company, scan type, recheck-after-screening, code,
63
+ * overridden, result, error, appointment, department, visit purpose, visit contact, estimated checkout time,
64
+ * notes, and the screening-required / screening-finished flags.
65
65
  *
66
66
  * Returns a `status_url` for polling until the export is ready, along with a `download_url` and `status_id`.
67
67
  */
@@ -92,9 +92,9 @@ export function useVendorScansExportVendorScans(
92
92
  * @remarks
93
93
  * Enqueues an asynchronous job to generate a CSV export of vendor scans, applying the same access scope and filter
94
94
  * parameters as the list endpoint. The CSV contains every column shown on the Scan Details page: date,
95
- * facility, system, zone, individual, company, scan type, recheck-after-screening, code, overridden, result,
96
- * error, appointment, department, visit purpose, visit contact, estimated checkout time, notes, and the
97
- * screening-required / screening-finished flags.
95
+ * facility, system, zone, individual, individual email, company, scan type, recheck-after-screening, code,
96
+ * overridden, result, error, appointment, department, visit purpose, visit contact, estimated checkout time,
97
+ * notes, and the screening-required / screening-finished flags.
98
98
  *
99
99
  * Returns a `status_url` for polling until the export is ready, along with a `download_url` and `status_id`.
100
100
  */
@@ -50,7 +50,7 @@ export type VendorScansVendorScanOutMutationError =
50
50
  * Vendor scan out
51
51
  *
52
52
  * @remarks
53
- * It scans out vendor from facility
53
+ * Scans a vendor out of a facility. Set `gps_checkout` when a device decided the vendor had left a configured geofence; it adds the automatic check-out notification and changes nothing else.
54
54
  */
55
55
  export function useVendorScansVendorScanOutMutation(
56
56
  options?: MutationHookOptions<
@@ -13,7 +13,6 @@ import { vendorScansGetVendorScansExportStatus } from "../funcs/vendorScansGetVe
13
13
  import { vendorScansListVendorScans } from "../funcs/vendorScansListVendorScans.js";
14
14
  import { vendorScansSubmitScreeningResponse } from "../funcs/vendorScansSubmitScreeningResponse.js";
15
15
  import { vendorScansVendorScanGpsCheckoutConfig } from "../funcs/vendorScansVendorScanGpsCheckoutConfig.js";
16
- import { vendorScansVendorScanGpsScanOut } from "../funcs/vendorScansVendorScanGpsScanOut.js";
17
16
  import { vendorScansVendorScanOut } from "../funcs/vendorScansVendorScanOut.js";
18
17
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
19
18
  import * as components from "../models/components/index.js";
@@ -54,9 +53,9 @@ export class VendorScans extends ClientSDK {
54
53
  * @remarks
55
54
  * Enqueues an asynchronous job to generate a CSV export of vendor scans, applying the same access scope and filter
56
55
  * parameters as the list endpoint. The CSV contains every column shown on the Scan Details page: date,
57
- * facility, system, zone, individual, company, scan type, recheck-after-screening, code, overridden, result,
58
- * error, appointment, department, visit purpose, visit contact, estimated checkout time, notes, and the
59
- * screening-required / screening-finished flags.
56
+ * facility, system, zone, individual, individual email, company, scan type, recheck-after-screening, code,
57
+ * overridden, result, error, appointment, department, visit purpose, visit contact, estimated checkout time,
58
+ * notes, and the screening-required / screening-finished flags.
60
59
  *
61
60
  * Returns a `status_url` for polling until the export is ready, along with a `download_url` and `status_id`.
62
61
  */
@@ -183,7 +182,7 @@ export class VendorScans extends ClientSDK {
183
182
  * Vendor scan out
184
183
  *
185
184
  * @remarks
186
- * It scans out vendor from facility
185
+ * Scans a vendor out of a facility. Set `gps_checkout` when a device decided the vendor had left a configured geofence; it adds the automatic check-out notification and changes nothing else.
187
186
  */
188
187
  async vendorScanOut(
189
188
  request: operations.VendorScanOutRequest,
@@ -214,23 +213,4 @@ export class VendorScans extends ClientSDK {
214
213
  options,
215
214
  ));
216
215
  }
217
-
218
- /**
219
- * Automatic GPS check-out
220
- *
221
- * @remarks
222
- * Reports the device's current position and scans the vendor out when it lies outside the geofence returned by the GPS check-out configuration endpoint. The distance is always recomputed server-side. Reporting the same exit twice is a no-op.
223
- *
224
- * When an accuracy radius is supplied it is discounted from the distance before the comparison. The vendor is checked out only when the entire error margin clears the geofence AND the reported accuracy is at most 328 ft (100 m). When only half the margin clears it — or the margin clears it entirely but is wider than that ceiling — the visit is left open and the vendor is sent a reminder to check out instead, once per check-in; the response then reports `success: false` with `outcome: possibly_left`.
225
- */
226
- async vendorScanGpsScanOut(
227
- request: operations.VendorScanGpsScanOutRequest,
228
- options?: RequestOptions,
229
- ): Promise<operations.VendorScanGpsScanOutVendorScanGpsScanOutOk> {
230
- return unwrapAsync(vendorScansVendorScanGpsScanOut(
231
- this,
232
- request,
233
- options,
234
- ));
235
- }
236
216
  }
@@ -1,20 +0,0 @@
1
- import { GreenSecurityCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
4
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
- import * as errors from "../models/errors/index.js";
6
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
- import * as operations from "../models/operations/index.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * Automatic GPS check-out
13
- *
14
- * @remarks
15
- * Reports the device's current position and scans the vendor out when it lies outside the geofence returned by the GPS check-out configuration endpoint. The distance is always recomputed server-side. Reporting the same exit twice is a no-op.
16
- *
17
- * When an accuracy radius is supplied it is discounted from the distance before the comparison. The vendor is checked out only when the entire error margin clears the geofence AND the reported accuracy is at most 328 ft (100 m). When only half the margin clears it — or the margin clears it entirely but is wider than that ceiling — the visit is left open and the vendor is sent a reminder to check out instead, once per check-in; the response then reports `success: false` with `outcome: possibly_left`.
18
- */
19
- export declare function vendorScansVendorScanGpsScanOut(client: GreenSecurityCore, request: operations.VendorScanGpsScanOutRequest, options?: RequestOptions): APIPromise<Result<operations.VendorScanGpsScanOutVendorScanGpsScanOutOk, errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
20
- //# sourceMappingURL=vendorScansVendorScanGpsScanOut.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vendorScansVendorScanGpsScanOut.d.ts","sourceRoot":"","sources":["../../../src/funcs/vendorScansVendorScanGpsScanOut.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,0CAA0C,EACnD,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}