@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.
- package/README.md +1 -4
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- 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 +34 -6
- 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/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__/vendors.test.js +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 +34 -6
- 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/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__/vendors.test.ts +1 -1
- package/src/__tests__/vendorscans.test.ts +5 -24
- package/src/__tests__/zones.test.ts +34 -6
- 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/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,126 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.vendorScansVendorScanGpsScanOut = vendorScansVendorScanGpsScanOut;
|
|
40
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
-
const http_js_1 = require("../lib/http.js");
|
|
42
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
-
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
-
const security_js_1 = require("../lib/security.js");
|
|
46
|
-
const url_js_1 = require("../lib/url.js");
|
|
47
|
-
const errors = __importStar(require("../models/errors/index.js"));
|
|
48
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
-
const async_js_1 = require("../types/async.js");
|
|
50
|
-
/**
|
|
51
|
-
* Automatic GPS check-out
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* 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.
|
|
55
|
-
*
|
|
56
|
-
* 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`.
|
|
57
|
-
*/
|
|
58
|
-
function vendorScansVendorScanGpsScanOut(client, request, options) {
|
|
59
|
-
return new async_js_1.APIPromise($do(client, request, options));
|
|
60
|
-
}
|
|
61
|
-
async function $do(client, request, options) {
|
|
62
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.VendorScanGpsScanOutRequest$outboundSchema.parse(value), "Input validation failed");
|
|
63
|
-
if (!parsed.ok) {
|
|
64
|
-
return [parsed, { status: "invalid" }];
|
|
65
|
-
}
|
|
66
|
-
const payload = parsed.value;
|
|
67
|
-
const body = (0, encodings_js_1.encodeJSON)("body", payload.RequestBody, { explode: true });
|
|
68
|
-
const pathParams = {
|
|
69
|
-
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
70
|
-
explode: false,
|
|
71
|
-
charEncoding: "percent",
|
|
72
|
-
}),
|
|
73
|
-
};
|
|
74
|
-
const path = (0, url_js_1.pathToFunc)("/vendor-scans/{id}/gps-scan-out")(pathParams);
|
|
75
|
-
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
76
|
-
"Content-Type": "application/json",
|
|
77
|
-
Accept: "application/json",
|
|
78
|
-
}));
|
|
79
|
-
const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
|
|
80
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
81
|
-
const context = {
|
|
82
|
-
options: client._options,
|
|
83
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
84
|
-
operationID: "vendorScanGpsScanOut",
|
|
85
|
-
oAuth2Scopes: null,
|
|
86
|
-
resolvedSecurity: requestSecurity,
|
|
87
|
-
securitySource: client._options.security,
|
|
88
|
-
retryConfig: options?.retries
|
|
89
|
-
|| client._options.retryConfig
|
|
90
|
-
|| { strategy: "none" },
|
|
91
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
-
};
|
|
93
|
-
const requestRes = client._createRequest(context, {
|
|
94
|
-
security: requestSecurity,
|
|
95
|
-
method: "POST",
|
|
96
|
-
baseURL: options?.serverURL,
|
|
97
|
-
path: path,
|
|
98
|
-
headers: headers,
|
|
99
|
-
body: body,
|
|
100
|
-
userAgent: client._options.userAgent,
|
|
101
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
-
}, options);
|
|
103
|
-
if (!requestRes.ok) {
|
|
104
|
-
return [requestRes, { status: "invalid" }];
|
|
105
|
-
}
|
|
106
|
-
const req = requestRes.value;
|
|
107
|
-
const doResult = await client._do(req, {
|
|
108
|
-
context,
|
|
109
|
-
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
110
|
-
retryConfig: context.retryConfig,
|
|
111
|
-
retryCodes: context.retryCodes,
|
|
112
|
-
});
|
|
113
|
-
if (!doResult.ok) {
|
|
114
|
-
return [doResult, { status: "request-error", request: req }];
|
|
115
|
-
}
|
|
116
|
-
const response = doResult.value;
|
|
117
|
-
const responseFields = {
|
|
118
|
-
HttpMeta: { Response: response, Request: req },
|
|
119
|
-
};
|
|
120
|
-
const [result] = await M.match(M.json(200, operations.VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema), M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema), M.fail("4XX"), M.fail([500, "5XX"]))(response, req, { extraFields: responseFields });
|
|
121
|
-
if (!result.ok) {
|
|
122
|
-
return [result, { status: "complete", request: req, response }];
|
|
123
|
-
}
|
|
124
|
-
return [result, { status: "complete", request: req, response }];
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=vendorScansVendorScanGpsScanOut.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorScansVendorScanGpsScanOut.js","sourceRoot":"","sources":["../../../src/funcs/vendorScansVendorScanGpsScanOut.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCH,0EAuBC;AAtDD,sDAA+D;AAC/D,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;;;GAOG;AACH,SAAgB,+BAA+B,CAC7C,MAAyB,EACzB,OAA+C,EAC/C,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAA+C,EAC/C,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,0CAA0C,CAAC,KAAK,CAAC,KAAK,CAAC,EACpE,yBAAyB,CAC1B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ACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CACJ,GAAG,EACH,UAAU,CAAC,wDAAwD,CACpE,EACD,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,8BAA8B,CAAC,EAC3E,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CACrB,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { OpenEnum } from "../../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
export type VendorScanGpsScanOutVendorScanGpsScanOutRequest = {
|
|
6
|
-
/**
|
|
7
|
-
* Reported latitude, between -90 and 90.
|
|
8
|
-
*/
|
|
9
|
-
latitude: number;
|
|
10
|
-
/**
|
|
11
|
-
* Reported longitude, between -180 and 180.
|
|
12
|
-
*/
|
|
13
|
-
longitude: number;
|
|
14
|
-
/**
|
|
15
|
-
* Reported accuracy radius in FEET (not meters). The vendor is only checked out when the distance beyond the geofence exceeds it and it is no wider than 328 ft (100 m); a wider margin can earn a reminder but never a check-out.
|
|
16
|
-
*/
|
|
17
|
-
accuracy?: number | null | undefined;
|
|
18
|
-
};
|
|
19
|
-
export type VendorScanGpsScanOutRequest = {
|
|
20
|
-
/**
|
|
21
|
-
* The identifier of the object
|
|
22
|
-
*/
|
|
23
|
-
id: number;
|
|
24
|
-
requestBody: VendorScanGpsScanOutVendorScanGpsScanOutRequest;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
28
|
-
*/
|
|
29
|
-
export declare const Outcome: {
|
|
30
|
-
readonly CheckedOut: "checked_out";
|
|
31
|
-
readonly PossiblyLeft: "possibly_left";
|
|
32
|
-
readonly InsideRadius: "inside_radius";
|
|
33
|
-
readonly AlreadyCheckedOut: "already_checked_out";
|
|
34
|
-
readonly CheckoutFailed: "checkout_failed";
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
38
|
-
*/
|
|
39
|
-
export type Outcome = OpenEnum<typeof Outcome>;
|
|
40
|
-
/**
|
|
41
|
-
* The request was successful, and the server has returned the requested resource in the response body.
|
|
42
|
-
*/
|
|
43
|
-
export type VendorScanGpsScanOutVendorScanGpsScanOutOk = {
|
|
44
|
-
error?: string | null | undefined;
|
|
45
|
-
reason?: string | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Smart badge LED payload data. Only present when the scan-out response can update a smart badge locally.
|
|
48
|
-
*/
|
|
49
|
-
badgeData?: string | null | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* True when the vendor was checked out, was already checked out, or is still inside the geofence. False when the check-out was refused, and when the position was too imprecise to act on and only earned a reminder.
|
|
52
|
-
*/
|
|
53
|
-
success: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
56
|
-
*/
|
|
57
|
-
outcome: Outcome;
|
|
58
|
-
};
|
|
59
|
-
/** @internal */
|
|
60
|
-
export type VendorScanGpsScanOutVendorScanGpsScanOutRequest$Outbound = {
|
|
61
|
-
latitude: number;
|
|
62
|
-
longitude: number;
|
|
63
|
-
accuracy?: number | null | undefined;
|
|
64
|
-
};
|
|
65
|
-
/** @internal */
|
|
66
|
-
export declare const VendorScanGpsScanOutVendorScanGpsScanOutRequest$outboundSchema: z.ZodType<VendorScanGpsScanOutVendorScanGpsScanOutRequest$Outbound, z.ZodTypeDef, VendorScanGpsScanOutVendorScanGpsScanOutRequest>;
|
|
67
|
-
export declare function vendorScanGpsScanOutVendorScanGpsScanOutRequestToJSON(vendorScanGpsScanOutVendorScanGpsScanOutRequest: VendorScanGpsScanOutVendorScanGpsScanOutRequest): string;
|
|
68
|
-
/** @internal */
|
|
69
|
-
export type VendorScanGpsScanOutRequest$Outbound = {
|
|
70
|
-
id: number;
|
|
71
|
-
RequestBody: VendorScanGpsScanOutVendorScanGpsScanOutRequest$Outbound;
|
|
72
|
-
};
|
|
73
|
-
/** @internal */
|
|
74
|
-
export declare const VendorScanGpsScanOutRequest$outboundSchema: z.ZodType<VendorScanGpsScanOutRequest$Outbound, z.ZodTypeDef, VendorScanGpsScanOutRequest>;
|
|
75
|
-
export declare function vendorScanGpsScanOutRequestToJSON(vendorScanGpsScanOutRequest: VendorScanGpsScanOutRequest): string;
|
|
76
|
-
/** @internal */
|
|
77
|
-
export declare const Outcome$inboundSchema: z.ZodType<Outcome, z.ZodTypeDef, unknown>;
|
|
78
|
-
/** @internal */
|
|
79
|
-
export declare const VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema: z.ZodType<VendorScanGpsScanOutVendorScanGpsScanOutOk, z.ZodTypeDef, unknown>;
|
|
80
|
-
export declare function vendorScanGpsScanOutVendorScanGpsScanOutOkFromJSON(jsonString: string): SafeParseResult<VendorScanGpsScanOutVendorScanGpsScanOutOk, SDKValidationError>;
|
|
81
|
-
//# sourceMappingURL=vendorscangpsscanout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorscangpsscanout.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/vendorscangpsscanout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,+CAA+C,GAAG;IAC5D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,+CAA+C,CAAC;CAC9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;CAMV,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,0CAA0C,GAAG;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OA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96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema = exports.Outcome$inboundSchema = exports.VendorScanGpsScanOutRequest$outboundSchema = exports.VendorScanGpsScanOutVendorScanGpsScanOutRequest$outboundSchema = exports.Outcome = void 0;
|
|
40
|
-
exports.vendorScanGpsScanOutVendorScanGpsScanOutRequestToJSON = vendorScanGpsScanOutVendorScanGpsScanOutRequestToJSON;
|
|
41
|
-
exports.vendorScanGpsScanOutRequestToJSON = vendorScanGpsScanOutRequestToJSON;
|
|
42
|
-
exports.vendorScanGpsScanOutVendorScanGpsScanOutOkFromJSON = vendorScanGpsScanOutVendorScanGpsScanOutOkFromJSON;
|
|
43
|
-
const z = __importStar(require("zod/v3"));
|
|
44
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
45
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
46
|
-
const openEnums = __importStar(require("../../types/enums.js"));
|
|
47
|
-
const types = __importStar(require("../../types/primitives.js"));
|
|
48
|
-
/**
|
|
49
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
50
|
-
*/
|
|
51
|
-
exports.Outcome = {
|
|
52
|
-
CheckedOut: "checked_out",
|
|
53
|
-
PossiblyLeft: "possibly_left",
|
|
54
|
-
InsideRadius: "inside_radius",
|
|
55
|
-
AlreadyCheckedOut: "already_checked_out",
|
|
56
|
-
CheckoutFailed: "checkout_failed",
|
|
57
|
-
};
|
|
58
|
-
/** @internal */
|
|
59
|
-
exports.VendorScanGpsScanOutVendorScanGpsScanOutRequest$outboundSchema = z.object({
|
|
60
|
-
latitude: z.number(),
|
|
61
|
-
longitude: z.number(),
|
|
62
|
-
accuracy: z.nullable(z.number()).optional(),
|
|
63
|
-
});
|
|
64
|
-
function vendorScanGpsScanOutVendorScanGpsScanOutRequestToJSON(vendorScanGpsScanOutVendorScanGpsScanOutRequest) {
|
|
65
|
-
return JSON.stringify(exports.VendorScanGpsScanOutVendorScanGpsScanOutRequest$outboundSchema.parse(vendorScanGpsScanOutVendorScanGpsScanOutRequest));
|
|
66
|
-
}
|
|
67
|
-
/** @internal */
|
|
68
|
-
exports.VendorScanGpsScanOutRequest$outboundSchema = z.object({
|
|
69
|
-
id: z.number().int(),
|
|
70
|
-
requestBody: z.lazy(() => exports.VendorScanGpsScanOutVendorScanGpsScanOutRequest$outboundSchema),
|
|
71
|
-
}).transform((v) => {
|
|
72
|
-
return (0, primitives_js_1.remap)(v, {
|
|
73
|
-
requestBody: "RequestBody",
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
function vendorScanGpsScanOutRequestToJSON(vendorScanGpsScanOutRequest) {
|
|
77
|
-
return JSON.stringify(exports.VendorScanGpsScanOutRequest$outboundSchema.parse(vendorScanGpsScanOutRequest));
|
|
78
|
-
}
|
|
79
|
-
/** @internal */
|
|
80
|
-
exports.Outcome$inboundSchema = openEnums.inboundSchema(exports.Outcome);
|
|
81
|
-
/** @internal */
|
|
82
|
-
exports.VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema = z.object({
|
|
83
|
-
error: z.nullable(types.string()).optional(),
|
|
84
|
-
reason: z.nullable(types.string()).optional(),
|
|
85
|
-
badge_data: z.nullable(types.string()).optional(),
|
|
86
|
-
success: types.boolean(),
|
|
87
|
-
outcome: exports.Outcome$inboundSchema,
|
|
88
|
-
}).transform((v) => {
|
|
89
|
-
return (0, primitives_js_1.remap)(v, {
|
|
90
|
-
"badge_data": "badgeData",
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
function vendorScanGpsScanOutVendorScanGpsScanOutOkFromJSON(jsonString) {
|
|
94
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VendorScanGpsScanOutVendorScanGpsScanOutOk' from JSON`);
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=vendorscangpsscanout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorscangpsscanout.js","sourceRoot":"","sources":["../../../../src/models/operations/vendorscangpsscanout.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFH,sHASC;AAwBD,8EAQC;AAqBD,gHAcC;AAlKD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AACjD,gEAAkD;AAGlD,iEAAmD;AA0BnD;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,eAAe;IAC7B,YAAY,EAAE,eAAe;IAC7B,iBAAiB,EAAE,qBAAqB;IACxC,cAAc,EAAE,iBAAiB;CACzB,CAAC;AAiCX,gBAAgB;AACH,QAAA,8DAA8D,GAKrE,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEL,SAAgB,qDAAqD,CACnE,+CACiD;IAEjD,OAAO,IAAI,CAAC,SAAS,CACnB,sEAA8D,CAAC,KAAK,CAClE,+CAA+C,CAChD,CACF,CAAC;AACJ,CAAC;AAQD,gBAAgB;AACH,QAAA,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACvB,sEAA8D,CAC/D;CACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,aAAa;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,kDAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,qBAAqB,GAChC,SAAS,CAAC,aAAa,CAAC,eAAO,CAAC,CAAC;AAEnC,gBAAgB;AACH,QAAA,wDAAwD,GAEjE,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACjD,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;IACxB,OAAO,EAAE,6BAAqB;CAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEP,SAAgB,kDAAkD,CAChE,UAAkB;IAKlB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,gEAAwD,CAAC,KAAK,CAC5D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,wEAAwE,CACzE,CAAC;AACJ,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { MutationKey, UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import { GreenSecurityCore } from "../core.js";
|
|
3
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
4
|
-
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
5
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
6
|
-
import * as errors from "../models/errors/index.js";
|
|
7
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
8
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
9
|
-
import * as operations from "../models/operations/index.js";
|
|
10
|
-
import { MutationHookOptions } from "./_types.js";
|
|
11
|
-
export type VendorScansVendorScanGpsScanOutMutationVariables = {
|
|
12
|
-
request: operations.VendorScanGpsScanOutRequest;
|
|
13
|
-
options?: RequestOptions;
|
|
14
|
-
};
|
|
15
|
-
export type VendorScansVendorScanGpsScanOutMutationData = operations.VendorScanGpsScanOutVendorScanGpsScanOutOk;
|
|
16
|
-
export type VendorScansVendorScanGpsScanOutMutationError = errors.ApiErrorResponse | GreenSecurityError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError;
|
|
17
|
-
/**
|
|
18
|
-
* Automatic GPS check-out
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* 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.
|
|
22
|
-
*
|
|
23
|
-
* 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`.
|
|
24
|
-
*/
|
|
25
|
-
export declare function useVendorScansVendorScanGpsScanOutMutation(options?: MutationHookOptions<VendorScansVendorScanGpsScanOutMutationData, VendorScansVendorScanGpsScanOutMutationError, VendorScansVendorScanGpsScanOutMutationVariables>): UseMutationResult<VendorScansVendorScanGpsScanOutMutationData, VendorScansVendorScanGpsScanOutMutationError, VendorScansVendorScanGpsScanOutMutationVariables>;
|
|
26
|
-
export declare function mutationKeyVendorScansVendorScanGpsScanOut(): MutationKey;
|
|
27
|
-
export declare function buildVendorScansVendorScanGpsScanOutMutation(client$: GreenSecurityCore, hookOptions?: RequestOptions): {
|
|
28
|
-
mutationKey: MutationKey;
|
|
29
|
-
mutationFn: (variables: VendorScansVendorScanGpsScanOutMutationVariables) => Promise<VendorScansVendorScanGpsScanOutMutationData>;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=vendorScansVendorScanGpsScanOut.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorScansVendorScanGpsScanOut.d.ts","sourceRoot":"","sources":["../../../src/react-query/vendorScansVendorScanGpsScanOut.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAEX,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,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;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,gDAAgD,GAAG;IAC7D,OAAO,EAAE,UAAU,CAAC,2BAA2B,CAAC;IAChD,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,2CAA2C,GACrD,UAAU,CAAC,0CAA0C,CAAC;AAExD,MAAM,MAAM,4CAA4C,GACpD,MAAM,CAAC,gBAAgB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB;;;;;;;GAOG;AACH,wBAAgB,0CAA0C,CACxD,OAAO,CAAC,EAAE,mBAAmB,CAC3B,2CAA2C,EAC3C,4CAA4C,EAC5C,gDAAgD,CACjD,GACA,iBAAiB,CAClB,2CAA2C,EAC3C,4CAA4C,EAC5C,gDAAgD,CACjD,CAMA;AAED,wBAAgB,0CAA0C,IAAI,WAAW,CAMxE;AAED,wBAAgB,4CAA4C,CAC1D,OAAO,EAAE,iBAAiB,EAC1B,WAAW,CAAC,EAAE,cAAc,GAC3B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,CACV,SAAS,EAAE,gDAAgD,KACxD,OAAO,CAAC,2CAA2C,CAAC,CAAC;CAC3D,CA0BA"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useVendorScansVendorScanGpsScanOutMutation = useVendorScansVendorScanGpsScanOutMutation;
|
|
7
|
-
exports.mutationKeyVendorScansVendorScanGpsScanOut = mutationKeyVendorScansVendorScanGpsScanOut;
|
|
8
|
-
exports.buildVendorScansVendorScanGpsScanOutMutation = buildVendorScansVendorScanGpsScanOutMutation;
|
|
9
|
-
const react_query_1 = require("@tanstack/react-query");
|
|
10
|
-
const vendorScansVendorScanGpsScanOut_js_1 = require("../funcs/vendorScansVendorScanGpsScanOut.js");
|
|
11
|
-
const primitives_js_1 = require("../lib/primitives.js");
|
|
12
|
-
const fp_js_1 = require("../types/fp.js");
|
|
13
|
-
const _context_js_1 = require("./_context.js");
|
|
14
|
-
/**
|
|
15
|
-
* Automatic GPS check-out
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* 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.
|
|
19
|
-
*
|
|
20
|
-
* 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`.
|
|
21
|
-
*/
|
|
22
|
-
function useVendorScansVendorScanGpsScanOutMutation(options) {
|
|
23
|
-
const client = (0, _context_js_1.useGreenSecurityContext)();
|
|
24
|
-
return (0, react_query_1.useMutation)({
|
|
25
|
-
...buildVendorScansVendorScanGpsScanOutMutation(client, options),
|
|
26
|
-
...options,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function mutationKeyVendorScansVendorScanGpsScanOut() {
|
|
30
|
-
return [
|
|
31
|
-
"@greensecurity/javascript-sdk",
|
|
32
|
-
"vendor_scans",
|
|
33
|
-
"vendorScanGpsScanOut",
|
|
34
|
-
];
|
|
35
|
-
}
|
|
36
|
-
function buildVendorScansVendorScanGpsScanOutMutation(client$, hookOptions) {
|
|
37
|
-
return {
|
|
38
|
-
mutationKey: mutationKeyVendorScansVendorScanGpsScanOut(),
|
|
39
|
-
mutationFn: function vendorScansVendorScanGpsScanOutMutationFn({ request, options, }) {
|
|
40
|
-
const mergedOptions = {
|
|
41
|
-
...hookOptions,
|
|
42
|
-
...options,
|
|
43
|
-
fetchOptions: {
|
|
44
|
-
...hookOptions?.fetchOptions,
|
|
45
|
-
...options?.fetchOptions,
|
|
46
|
-
signal: (0, primitives_js_1.combineSignals)(hookOptions?.fetchOptions?.signal, options?.fetchOptions?.signal),
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
return (0, fp_js_1.unwrapAsync)((0, vendorScansVendorScanGpsScanOut_js_1.vendorScansVendorScanGpsScanOut)(client$, request, mergedOptions));
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=vendorScansVendorScanGpsScanOut.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorScansVendorScanGpsScanOut.js","sourceRoot":"","sources":["../../../src/react-query/vendorScansVendorScanGpsScanOut.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAsDH,gGAgBC;AAED,gGAMC;AAED,oGAkCC;AAhHD,uDAI+B;AAE/B,oGAA8F;AAC9F,wDAAsD;AActD,0CAA6C;AAC7C,+CAAwD;AAsBxD;;;;;;;GAOG;AACH,SAAgB,0CAA0C,CACxD,OAIC;IAMD,MAAM,MAAM,GAAG,IAAA,qCAAuB,GAAE,CAAC;IACzC,OAAO,IAAA,yBAAW,EAAC;QACjB,GAAG,4CAA4C,CAAC,MAAM,EAAE,OAAO,CAAC;QAChE,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,0CAA0C;IACxD,OAAO;QACL,+BAA+B;QAC/B,cAAc;QACd,sBAAsB;KACvB,CAAC;AACJ,CAAC;AAED,SAAgB,4CAA4C,CAC1D,OAA0B,EAC1B,WAA4B;IAO5B,OAAO;QACL,WAAW,EAAE,0CAA0C,EAAE;QACzD,UAAU,EAAE,SAAS,yCAAyC,CAAC,EAC7D,OAAO,EACP,OAAO,GACR;YACC,MAAM,aAAa,GAAG;gBACpB,GAAG,WAAW;gBACd,GAAG,OAAO;gBACV,YAAY,EAAE;oBACZ,GAAG,WAAW,EAAE,YAAY;oBAC5B,GAAG,OAAO,EAAE,YAAY;oBACxB,MAAM,EAAE,IAAA,8BAAc,EACpB,WAAW,EAAE,YAAY,EAAE,MAAM,EACjC,OAAO,EAAE,YAAY,EAAE,MAAM,CAC9B;iBACF;aACF,CAAC;YACF,OAAO,IAAA,mBAAW,EAAC,IAAA,oEAA+B,EAChD,OAAO,EACP,OAAO,EACP,aAAa,CACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -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"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
5
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
6
|
-
import * as M from "../lib/matchers.js";
|
|
7
|
-
import { compactMap } from "../lib/primitives.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
-
import { pathToFunc } from "../lib/url.js";
|
|
11
|
-
import * as errors from "../models/errors/index.js";
|
|
12
|
-
import * as operations from "../models/operations/index.js";
|
|
13
|
-
import { APIPromise } from "../types/async.js";
|
|
14
|
-
/**
|
|
15
|
-
* Automatic GPS check-out
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* 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.
|
|
19
|
-
*
|
|
20
|
-
* 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`.
|
|
21
|
-
*/
|
|
22
|
-
export function vendorScansVendorScanGpsScanOut(client, request, options) {
|
|
23
|
-
return new APIPromise($do(client, request, options));
|
|
24
|
-
}
|
|
25
|
-
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) => operations.VendorScanGpsScanOutRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
|
-
if (!parsed.ok) {
|
|
28
|
-
return [parsed, { status: "invalid" }];
|
|
29
|
-
}
|
|
30
|
-
const payload = parsed.value;
|
|
31
|
-
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
32
|
-
const pathParams = {
|
|
33
|
-
id: encodeSimple("id", payload.id, {
|
|
34
|
-
explode: false,
|
|
35
|
-
charEncoding: "percent",
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
38
|
-
const path = pathToFunc("/vendor-scans/{id}/gps-scan-out")(pathParams);
|
|
39
|
-
const headers = new Headers(compactMap({
|
|
40
|
-
"Content-Type": "application/json",
|
|
41
|
-
Accept: "application/json",
|
|
42
|
-
}));
|
|
43
|
-
const securityInput = await extractSecurity(client._options.security);
|
|
44
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
45
|
-
const context = {
|
|
46
|
-
options: client._options,
|
|
47
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
48
|
-
operationID: "vendorScanGpsScanOut",
|
|
49
|
-
oAuth2Scopes: null,
|
|
50
|
-
resolvedSecurity: requestSecurity,
|
|
51
|
-
securitySource: client._options.security,
|
|
52
|
-
retryConfig: options?.retries
|
|
53
|
-
|| client._options.retryConfig
|
|
54
|
-
|| { strategy: "none" },
|
|
55
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
56
|
-
};
|
|
57
|
-
const requestRes = client._createRequest(context, {
|
|
58
|
-
security: requestSecurity,
|
|
59
|
-
method: "POST",
|
|
60
|
-
baseURL: options?.serverURL,
|
|
61
|
-
path: path,
|
|
62
|
-
headers: headers,
|
|
63
|
-
body: body,
|
|
64
|
-
userAgent: client._options.userAgent,
|
|
65
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
66
|
-
}, options);
|
|
67
|
-
if (!requestRes.ok) {
|
|
68
|
-
return [requestRes, { status: "invalid" }];
|
|
69
|
-
}
|
|
70
|
-
const req = requestRes.value;
|
|
71
|
-
const doResult = await client._do(req, {
|
|
72
|
-
context,
|
|
73
|
-
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
74
|
-
retryConfig: context.retryConfig,
|
|
75
|
-
retryCodes: context.retryCodes,
|
|
76
|
-
});
|
|
77
|
-
if (!doResult.ok) {
|
|
78
|
-
return [doResult, { status: "request-error", request: req }];
|
|
79
|
-
}
|
|
80
|
-
const response = doResult.value;
|
|
81
|
-
const responseFields = {
|
|
82
|
-
HttpMeta: { Response: response, Request: req },
|
|
83
|
-
};
|
|
84
|
-
const [result] = await M.match(M.json(200, operations.VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema), M.jsonErr([400, 401, 403, 404, 422], errors.ApiErrorResponse$inboundSchema), M.fail("4XX"), M.fail([500, "5XX"]))(response, req, { extraFields: responseFields });
|
|
85
|
-
if (!result.ok) {
|
|
86
|
-
return [result, { status: "complete", request: req, response }];
|
|
87
|
-
}
|
|
88
|
-
return [result, { status: "complete", request: req, response }];
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=vendorScansVendorScanGpsScanOut.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorScansVendorScanGpsScanOut.js","sourceRoot":"","sources":["../../../src/funcs/vendorScansVendorScanGpsScanOut.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;GAOG;AACH,MAAM,UAAU,+BAA+B,CAC7C,MA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Result } from "../../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
-
export type VendorScanGpsScanOutVendorScanGpsScanOutRequest = {
|
|
6
|
-
/**
|
|
7
|
-
* Reported latitude, between -90 and 90.
|
|
8
|
-
*/
|
|
9
|
-
latitude: number;
|
|
10
|
-
/**
|
|
11
|
-
* Reported longitude, between -180 and 180.
|
|
12
|
-
*/
|
|
13
|
-
longitude: number;
|
|
14
|
-
/**
|
|
15
|
-
* Reported accuracy radius in FEET (not meters). The vendor is only checked out when the distance beyond the geofence exceeds it and it is no wider than 328 ft (100 m); a wider margin can earn a reminder but never a check-out.
|
|
16
|
-
*/
|
|
17
|
-
accuracy?: number | null | undefined;
|
|
18
|
-
};
|
|
19
|
-
export type VendorScanGpsScanOutRequest = {
|
|
20
|
-
/**
|
|
21
|
-
* The identifier of the object
|
|
22
|
-
*/
|
|
23
|
-
id: number;
|
|
24
|
-
requestBody: VendorScanGpsScanOutVendorScanGpsScanOutRequest;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
28
|
-
*/
|
|
29
|
-
export declare const Outcome: {
|
|
30
|
-
readonly CheckedOut: "checked_out";
|
|
31
|
-
readonly PossiblyLeft: "possibly_left";
|
|
32
|
-
readonly InsideRadius: "inside_radius";
|
|
33
|
-
readonly AlreadyCheckedOut: "already_checked_out";
|
|
34
|
-
readonly CheckoutFailed: "checkout_failed";
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
38
|
-
*/
|
|
39
|
-
export type Outcome = OpenEnum<typeof Outcome>;
|
|
40
|
-
/**
|
|
41
|
-
* The request was successful, and the server has returned the requested resource in the response body.
|
|
42
|
-
*/
|
|
43
|
-
export type VendorScanGpsScanOutVendorScanGpsScanOutOk = {
|
|
44
|
-
error?: string | null | undefined;
|
|
45
|
-
reason?: string | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Smart badge LED payload data. Only present when the scan-out response can update a smart badge locally.
|
|
48
|
-
*/
|
|
49
|
-
badgeData?: string | null | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* True when the vendor was checked out, was already checked out, or is still inside the geofence. False when the check-out was refused, and when the position was too imprecise to act on and only earned a reminder.
|
|
52
|
-
*/
|
|
53
|
-
success: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Which branch the server took. `possibly_left` means the vendor was only reminded and the check-in is still open, so a client watching a geofence should stay armed — it is the one case that answers `success: false` without being a refusal like `checkout_failed`.
|
|
56
|
-
*/
|
|
57
|
-
outcome: Outcome;
|
|
58
|
-
};
|
|
59
|
-
/** @internal */
|
|
60
|
-
export type VendorScanGpsScanOutVendorScanGpsScanOutRequest$Outbound = {
|
|
61
|
-
latitude: number;
|
|
62
|
-
longitude: number;
|
|
63
|
-
accuracy?: number | null | undefined;
|
|
64
|
-
};
|
|
65
|
-
/** @internal */
|
|
66
|
-
export declare const VendorScanGpsScanOutVendorScanGpsScanOutRequest$outboundSchema: z.ZodType<VendorScanGpsScanOutVendorScanGpsScanOutRequest$Outbound, z.ZodTypeDef, VendorScanGpsScanOutVendorScanGpsScanOutRequest>;
|
|
67
|
-
export declare function vendorScanGpsScanOutVendorScanGpsScanOutRequestToJSON(vendorScanGpsScanOutVendorScanGpsScanOutRequest: VendorScanGpsScanOutVendorScanGpsScanOutRequest): string;
|
|
68
|
-
/** @internal */
|
|
69
|
-
export type VendorScanGpsScanOutRequest$Outbound = {
|
|
70
|
-
id: number;
|
|
71
|
-
RequestBody: VendorScanGpsScanOutVendorScanGpsScanOutRequest$Outbound;
|
|
72
|
-
};
|
|
73
|
-
/** @internal */
|
|
74
|
-
export declare const VendorScanGpsScanOutRequest$outboundSchema: z.ZodType<VendorScanGpsScanOutRequest$Outbound, z.ZodTypeDef, VendorScanGpsScanOutRequest>;
|
|
75
|
-
export declare function vendorScanGpsScanOutRequestToJSON(vendorScanGpsScanOutRequest: VendorScanGpsScanOutRequest): string;
|
|
76
|
-
/** @internal */
|
|
77
|
-
export declare const Outcome$inboundSchema: z.ZodType<Outcome, z.ZodTypeDef, unknown>;
|
|
78
|
-
/** @internal */
|
|
79
|
-
export declare const VendorScanGpsScanOutVendorScanGpsScanOutOk$inboundSchema: z.ZodType<VendorScanGpsScanOutVendorScanGpsScanOutOk, z.ZodTypeDef, unknown>;
|
|
80
|
-
export declare function vendorScanGpsScanOutVendorScanGpsScanOutOkFromJSON(jsonString: string): SafeParseResult<VendorScanGpsScanOutVendorScanGpsScanOutOk, SDKValidationError>;
|
|
81
|
-
//# sourceMappingURL=vendorscangpsscanout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vendorscangpsscanout.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/vendorscangpsscanout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAI5B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,+CAA+C,GAAG;IAC5D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,+CAA+C,CAAC;CAC9D,CAAC;AAEF;;GAEG;A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