@greensecurity/javascript-sdk 0.44.0-beta.70 → 0.44.0-beta.72
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/README.md +1 -4
- package/dist/commonjs/__tests__/vendorscans.test.js +2 -21
- package/dist/commonjs/__tests__/vendorscans.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +12 -13
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/invoicesInvoicesExport.js +2 -0
- package/dist/commonjs/funcs/invoicesInvoicesExport.js.map +1 -1
- package/dist/commonjs/funcs/invoicesListInvoices.js +2 -0
- package/dist/commonjs/funcs/invoicesListInvoices.js.map +1 -1
- package/dist/commonjs/funcs/vendorScansExportVendorScans.d.ts +3 -3
- package/dist/commonjs/funcs/vendorScansExportVendorScans.js +3 -3
- package/dist/commonjs/funcs/vendorScansVendorScanOut.d.ts +1 -1
- package/dist/commonjs/funcs/vendorScansVendorScanOut.js +3 -2
- package/dist/commonjs/funcs/vendorScansVendorScanOut.js.map +1 -1
- package/dist/commonjs/funcs/vendorsAddVendorCredentialFileForAutoClassification.js +1 -1
- package/dist/commonjs/funcs/vendorsAddVendorCredentialFileForAutoClassification.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.d.ts +5 -0
- package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.js +2 -0
- package/dist/commonjs/models/components/vendorcredentialfileforautoclassificationrequest.js.map +1 -1
- package/dist/commonjs/models/components/zone.d.ts +4 -4
- package/dist/commonjs/models/components/zone.d.ts.map +1 -1
- package/dist/commonjs/models/components/zone.js +4 -4
- package/dist/commonjs/models/components/zone.js.map +1 -1
- package/dist/commonjs/models/operations/createvendor.d.ts +9 -0
- package/dist/commonjs/models/operations/createvendor.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createvendor.js +2 -0
- package/dist/commonjs/models/operations/createvendor.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/invoicesexport.d.ts +10 -0
- package/dist/commonjs/models/operations/invoicesexport.d.ts.map +1 -1
- package/dist/commonjs/models/operations/invoicesexport.js +4 -0
- package/dist/commonjs/models/operations/invoicesexport.js.map +1 -1
- package/dist/commonjs/models/operations/listinvoices.d.ts +10 -0
- package/dist/commonjs/models/operations/listinvoices.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listinvoices.js +4 -0
- package/dist/commonjs/models/operations/listinvoices.js.map +1 -1
- package/dist/commonjs/models/operations/vendorscanout.d.ts +15 -0
- package/dist/commonjs/models/operations/vendorscanout.d.ts.map +1 -1
- package/dist/commonjs/models/operations/vendorscanout.js +19 -1
- package/dist/commonjs/models/operations/vendorscanout.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +0 -1
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +0 -1
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.core.d.ts +2 -0
- package/dist/commonjs/react-query/invoicesInvoicesExport.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.core.js +2 -0
- package/dist/commonjs/react-query/invoicesInvoicesExport.core.js.map +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.d.ts +4 -0
- package/dist/commonjs/react-query/invoicesInvoicesExport.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesInvoicesExport.js.map +1 -1
- package/dist/commonjs/react-query/invoicesListInvoices.core.d.ts +4 -0
- package/dist/commonjs/react-query/invoicesListInvoices.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesListInvoices.core.js +4 -0
- package/dist/commonjs/react-query/invoicesListInvoices.core.js.map +1 -1
- package/dist/commonjs/react-query/invoicesListInvoices.d.ts +4 -0
- package/dist/commonjs/react-query/invoicesListInvoices.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesListInvoices.js.map +1 -1
- package/dist/commonjs/react-query/vendorScansExportVendorScans.d.ts +6 -6
- package/dist/commonjs/react-query/vendorScansExportVendorScans.js +6 -6
- package/dist/commonjs/react-query/vendorScansVendorScanOut.d.ts +1 -1
- package/dist/commonjs/react-query/vendorScansVendorScanOut.js +1 -1
- package/dist/commonjs/sdk/vendorscans.d.ts +4 -13
- package/dist/commonjs/sdk/vendorscans.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendorscans.js +4 -16
- package/dist/commonjs/sdk/vendorscans.js.map +1 -1
- package/dist/esm/__tests__/vendorscans.test.js +3 -22
- package/dist/esm/__tests__/vendorscans.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +12 -13
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/invoicesInvoicesExport.js +2 -0
- package/dist/esm/funcs/invoicesInvoicesExport.js.map +1 -1
- package/dist/esm/funcs/invoicesListInvoices.js +2 -0
- package/dist/esm/funcs/invoicesListInvoices.js.map +1 -1
- package/dist/esm/funcs/vendorScansExportVendorScans.d.ts +3 -3
- package/dist/esm/funcs/vendorScansExportVendorScans.js +3 -3
- package/dist/esm/funcs/vendorScansVendorScanOut.d.ts +1 -1
- package/dist/esm/funcs/vendorScansVendorScanOut.js +4 -3
- package/dist/esm/funcs/vendorScansVendorScanOut.js.map +1 -1
- package/dist/esm/funcs/vendorsAddVendorCredentialFileForAutoClassification.js +1 -1
- package/dist/esm/funcs/vendorsAddVendorCredentialFileForAutoClassification.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.d.ts +5 -0
- package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.js +2 -0
- package/dist/esm/models/components/vendorcredentialfileforautoclassificationrequest.js.map +1 -1
- package/dist/esm/models/components/zone.d.ts +4 -4
- package/dist/esm/models/components/zone.d.ts.map +1 -1
- package/dist/esm/models/components/zone.js +4 -4
- package/dist/esm/models/components/zone.js.map +1 -1
- package/dist/esm/models/operations/createvendor.d.ts +9 -0
- package/dist/esm/models/operations/createvendor.d.ts.map +1 -1
- package/dist/esm/models/operations/createvendor.js +2 -0
- package/dist/esm/models/operations/createvendor.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/invoicesexport.d.ts +10 -0
- package/dist/esm/models/operations/invoicesexport.d.ts.map +1 -1
- package/dist/esm/models/operations/invoicesexport.js +4 -0
- package/dist/esm/models/operations/invoicesexport.js.map +1 -1
- package/dist/esm/models/operations/listinvoices.d.ts +10 -0
- package/dist/esm/models/operations/listinvoices.d.ts.map +1 -1
- package/dist/esm/models/operations/listinvoices.js +4 -0
- package/dist/esm/models/operations/listinvoices.js.map +1 -1
- package/dist/esm/models/operations/vendorscanout.d.ts +15 -0
- package/dist/esm/models/operations/vendorscanout.d.ts.map +1 -1
- package/dist/esm/models/operations/vendorscanout.js +17 -0
- package/dist/esm/models/operations/vendorscanout.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +0 -1
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +0 -1
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.core.d.ts +2 -0
- package/dist/esm/react-query/invoicesInvoicesExport.core.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.core.js +2 -0
- package/dist/esm/react-query/invoicesInvoicesExport.core.js.map +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.d.ts +4 -0
- package/dist/esm/react-query/invoicesInvoicesExport.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesInvoicesExport.js.map +1 -1
- package/dist/esm/react-query/invoicesListInvoices.core.d.ts +4 -0
- package/dist/esm/react-query/invoicesListInvoices.core.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesListInvoices.core.js +4 -0
- package/dist/esm/react-query/invoicesListInvoices.core.js.map +1 -1
- package/dist/esm/react-query/invoicesListInvoices.d.ts +4 -0
- package/dist/esm/react-query/invoicesListInvoices.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesListInvoices.js.map +1 -1
- package/dist/esm/react-query/vendorScansExportVendorScans.d.ts +6 -6
- package/dist/esm/react-query/vendorScansExportVendorScans.js +6 -6
- package/dist/esm/react-query/vendorScansVendorScanOut.d.ts +1 -1
- package/dist/esm/react-query/vendorScansVendorScanOut.js +1 -1
- package/dist/esm/sdk/vendorscans.d.ts +4 -13
- package/dist/esm/sdk/vendorscans.d.ts.map +1 -1
- package/dist/esm/sdk/vendorscans.js +4 -16
- package/dist/esm/sdk/vendorscans.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/vendorscans.test.ts +5 -24
- package/src/__tests__/zones.test.ts +12 -13
- package/src/funcs/invoicesInvoicesExport.ts +2 -0
- package/src/funcs/invoicesListInvoices.ts +2 -0
- package/src/funcs/vendorScansExportVendorScans.ts +3 -3
- package/src/funcs/vendorScansVendorScanOut.ts +4 -3
- package/src/funcs/vendorsAddVendorCredentialFileForAutoClassification.ts +4 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/vendorcredentialfileforautoclassificationrequest.ts +7 -0
- package/src/models/components/zone.ts +8 -8
- package/src/models/operations/createvendor.ts +11 -0
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/invoicesexport.ts +14 -0
- package/src/models/operations/listinvoices.ts +14 -0
- package/src/models/operations/vendorscanout.ts +43 -0
- package/src/react-query/index.ts +0 -1
- package/src/react-query/invoicesInvoicesExport.core.ts +4 -0
- package/src/react-query/invoicesInvoicesExport.ts +4 -0
- package/src/react-query/invoicesListInvoices.core.ts +8 -0
- package/src/react-query/invoicesListInvoices.ts +4 -0
- package/src/react-query/vendorScansExportVendorScans.ts +6 -6
- package/src/react-query/vendorScansVendorScanOut.ts +1 -1
- package/src/sdk/vendorscans.ts +4 -24
- package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.d.ts +0 -20
- package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
- package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.js +0 -126
- package/dist/commonjs/funcs/vendorScansVendorScanGpsScanOut.js.map +0 -1
- package/dist/commonjs/models/operations/vendorscangpsscanout.d.ts +0 -81
- package/dist/commonjs/models/operations/vendorscangpsscanout.d.ts.map +0 -1
- package/dist/commonjs/models/operations/vendorscangpsscanout.js +0 -96
- package/dist/commonjs/models/operations/vendorscangpsscanout.js.map +0 -1
- package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.d.ts +0 -31
- package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
- package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.js +0 -53
- package/dist/commonjs/react-query/vendorScansVendorScanGpsScanOut.js.map +0 -1
- package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.d.ts +0 -20
- package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
- package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.js +0 -90
- package/dist/esm/funcs/vendorScansVendorScanGpsScanOut.js.map +0 -1
- package/dist/esm/models/operations/vendorscangpsscanout.d.ts +0 -81
- package/dist/esm/models/operations/vendorscangpsscanout.d.ts.map +0 -1
- package/dist/esm/models/operations/vendorscangpsscanout.js +0 -57
- package/dist/esm/models/operations/vendorscangpsscanout.js.map +0 -1
- package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.d.ts +0 -31
- package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.d.ts.map +0 -1
- package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.js +0 -48
- package/dist/esm/react-query/vendorScansVendorScanGpsScanOut.js.map +0 -1
- package/src/funcs/vendorScansVendorScanGpsScanOut.ts +0 -182
- package/src/models/operations/vendorscangpsscanout.ts +0 -167
- package/src/react-query/vendorScansVendorScanGpsScanOut.ts +0 -117
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
MutationKey,
|
|
7
|
-
useMutation,
|
|
8
|
-
UseMutationResult,
|
|
9
|
-
} from "@tanstack/react-query";
|
|
10
|
-
import { GreenSecurityCore } from "../core.js";
|
|
11
|
-
import { vendorScansVendorScanGpsScanOut } from "../funcs/vendorScansVendorScanGpsScanOut.js";
|
|
12
|
-
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
-
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
15
|
-
import {
|
|
16
|
-
ConnectionError,
|
|
17
|
-
InvalidRequestError,
|
|
18
|
-
RequestAbortedError,
|
|
19
|
-
RequestTimeoutError,
|
|
20
|
-
UnexpectedClientError,
|
|
21
|
-
} from "../models/errors/httpclienterrors.js";
|
|
22
|
-
import * as errors from "../models/errors/index.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
27
|
-
import { useGreenSecurityContext } from "./_context.js";
|
|
28
|
-
import { MutationHookOptions } from "./_types.js";
|
|
29
|
-
|
|
30
|
-
export type VendorScansVendorScanGpsScanOutMutationVariables = {
|
|
31
|
-
request: operations.VendorScanGpsScanOutRequest;
|
|
32
|
-
options?: RequestOptions;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export type VendorScansVendorScanGpsScanOutMutationData =
|
|
36
|
-
operations.VendorScanGpsScanOutVendorScanGpsScanOutOk;
|
|
37
|
-
|
|
38
|
-
export type VendorScansVendorScanGpsScanOutMutationError =
|
|
39
|
-
| errors.ApiErrorResponse
|
|
40
|
-
| GreenSecurityError
|
|
41
|
-
| ResponseValidationError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| UnexpectedClientError
|
|
47
|
-
| SDKValidationError;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Automatic GPS check-out
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* 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.
|
|
54
|
-
*
|
|
55
|
-
* 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`.
|
|
56
|
-
*/
|
|
57
|
-
export function useVendorScansVendorScanGpsScanOutMutation(
|
|
58
|
-
options?: MutationHookOptions<
|
|
59
|
-
VendorScansVendorScanGpsScanOutMutationData,
|
|
60
|
-
VendorScansVendorScanGpsScanOutMutationError,
|
|
61
|
-
VendorScansVendorScanGpsScanOutMutationVariables
|
|
62
|
-
>,
|
|
63
|
-
): UseMutationResult<
|
|
64
|
-
VendorScansVendorScanGpsScanOutMutationData,
|
|
65
|
-
VendorScansVendorScanGpsScanOutMutationError,
|
|
66
|
-
VendorScansVendorScanGpsScanOutMutationVariables
|
|
67
|
-
> {
|
|
68
|
-
const client = useGreenSecurityContext();
|
|
69
|
-
return useMutation({
|
|
70
|
-
...buildVendorScansVendorScanGpsScanOutMutation(client, options),
|
|
71
|
-
...options,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function mutationKeyVendorScansVendorScanGpsScanOut(): MutationKey {
|
|
76
|
-
return [
|
|
77
|
-
"@greensecurity/javascript-sdk",
|
|
78
|
-
"vendor_scans",
|
|
79
|
-
"vendorScanGpsScanOut",
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function buildVendorScansVendorScanGpsScanOutMutation(
|
|
84
|
-
client$: GreenSecurityCore,
|
|
85
|
-
hookOptions?: RequestOptions,
|
|
86
|
-
): {
|
|
87
|
-
mutationKey: MutationKey;
|
|
88
|
-
mutationFn: (
|
|
89
|
-
variables: VendorScansVendorScanGpsScanOutMutationVariables,
|
|
90
|
-
) => Promise<VendorScansVendorScanGpsScanOutMutationData>;
|
|
91
|
-
} {
|
|
92
|
-
return {
|
|
93
|
-
mutationKey: mutationKeyVendorScansVendorScanGpsScanOut(),
|
|
94
|
-
mutationFn: function vendorScansVendorScanGpsScanOutMutationFn({
|
|
95
|
-
request,
|
|
96
|
-
options,
|
|
97
|
-
}): Promise<VendorScansVendorScanGpsScanOutMutationData> {
|
|
98
|
-
const mergedOptions = {
|
|
99
|
-
...hookOptions,
|
|
100
|
-
...options,
|
|
101
|
-
fetchOptions: {
|
|
102
|
-
...hookOptions?.fetchOptions,
|
|
103
|
-
...options?.fetchOptions,
|
|
104
|
-
signal: combineSignals(
|
|
105
|
-
hookOptions?.fetchOptions?.signal,
|
|
106
|
-
options?.fetchOptions?.signal,
|
|
107
|
-
),
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
return unwrapAsync(vendorScansVendorScanGpsScanOut(
|
|
111
|
-
client$,
|
|
112
|
-
request,
|
|
113
|
-
mergedOptions,
|
|
114
|
-
));
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
}
|