@greensecurity/javascript-sdk 0.48.0-beta.9 → 0.49.0-beta.0
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 -1
- package/dist/commonjs/__tests__/fhirconfigs.test.js +18 -0
- package/dist/commonjs/__tests__/fhirconfigs.test.js.map +1 -1
- package/dist/commonjs/__tests__/subscriptionPlanSelection.test.d.ts +2 -0
- package/dist/commonjs/__tests__/subscriptionPlanSelection.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/subscriptionPlanSelection.test.js +36 -0
- package/dist/commonjs/__tests__/subscriptionPlanSelection.test.js.map +1 -0
- package/dist/commonjs/__tests__/users.test.js +3 -0
- package/dist/commonjs/__tests__/users.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.js +34 -0
- package/dist/commonjs/__tests__/zoneDevicesCreate.test.js.map +1 -1
- package/dist/commonjs/__tests__/zoneDevicesList.test.js +4 -0
- package/dist/commonjs/__tests__/zoneDevicesList.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +2 -9
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/doAdmin.d.ts +5 -4
- package/dist/commonjs/admin-funcs/doAdmin.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/doAdmin.js +10 -5
- package/dist/commonjs/admin-funcs/doAdmin.js.map +1 -1
- package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.d.ts +3 -2
- package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.js +2 -1
- package/dist/commonjs/admin-funcs/subscriptionFinishScreeningQuestions.js.map +1 -1
- package/dist/commonjs/admin-funcs/subscriptionPlanSelection.d.ts +7 -0
- package/dist/commonjs/admin-funcs/subscriptionPlanSelection.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/subscriptionPlanSelection.js +45 -0
- package/dist/commonjs/admin-funcs/subscriptionPlanSelection.js.map +1 -0
- package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.d.ts +3 -2
- package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.js +2 -1
- package/dist/commonjs/admin-funcs/subscriptionUpdateVendorType.js.map +1 -1
- package/dist/commonjs/admin-funcs/zoneDevicesFactoryReset.d.ts +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFactoryReset.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFactoryReset.js +14 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFactoryReset.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareUpdate.d.ts +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareUpdate.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareUpdate.js +14 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareUpdate.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareVersions.d.ts +8 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareVersions.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareVersions.js +13 -0
- package/dist/commonjs/admin-funcs/zoneDevicesFirmwareVersions.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesReboot.d.ts +3 -0
- package/dist/commonjs/admin-funcs/zoneDevicesReboot.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesReboot.js +13 -0
- package/dist/commonjs/admin-funcs/zoneDevicesReboot.js.map +1 -0
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts +2 -0
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/zoneDevicesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/invoicesConvertQuote.d.ts +1 -4
- package/dist/commonjs/funcs/invoicesConvertQuote.d.ts.map +1 -1
- package/dist/commonjs/funcs/invoicesConvertQuote.js +2 -6
- package/dist/commonjs/funcs/invoicesConvertQuote.js.map +1 -1
- package/dist/commonjs/funcs/vendorsChangeSubscription.d.ts +3 -2
- package/dist/commonjs/funcs/vendorsChangeSubscription.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsChangeSubscription.js +3 -2
- package/dist/commonjs/funcs/vendorsChangeSubscription.js.map +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorCompany.d.ts +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorCompany.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorCompany.js +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorCompany.js.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +9 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +8 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +9 -1
- package/dist/commonjs/index.extras.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/components/fhirconfig.d.ts +12 -0
- package/dist/commonjs/models/components/fhirconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirconfig.js +4 -0
- package/dist/commonjs/models/components/fhirconfig.js.map +1 -1
- package/dist/commonjs/models/components/invoice.d.ts +0 -5
- package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/components/invoice.js +0 -4
- package/dist/commonjs/models/components/invoice.js.map +1 -1
- package/dist/commonjs/models/components/userdetails.d.ts +22 -0
- package/dist/commonjs/models/components/userdetails.d.ts.map +1 -1
- package/dist/commonjs/models/components/userdetails.js +6 -0
- package/dist/commonjs/models/components/userdetails.js.map +1 -1
- package/dist/commonjs/models/components/userlocation.d.ts +10 -0
- package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
- package/dist/commonjs/models/components/userlocation.js +8 -0
- package/dist/commonjs/models/components/userlocation.js.map +1 -1
- package/dist/commonjs/models/operations/convertquote.d.ts +0 -21
- package/dist/commonjs/models/operations/convertquote.d.ts.map +1 -1
- package/dist/commonjs/models/operations/convertquote.js +1 -18
- package/dist/commonjs/models/operations/convertquote.js.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.d.ts +0 -25
- package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.js +0 -10
- package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
- package/dist/commonjs/models/operations/updateuser.d.ts +0 -2
- package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateuser.js +0 -1
- package/dist/commonjs/models/operations/updateuser.js.map +1 -1
- package/dist/commonjs/react-query/invoicesConvertQuote.d.ts +1 -4
- package/dist/commonjs/react-query/invoicesConvertQuote.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesConvertQuote.js +1 -4
- package/dist/commonjs/react-query/invoicesConvertQuote.js.map +1 -1
- package/dist/commonjs/react-query/vendorsChangeSubscription.d.ts +3 -2
- package/dist/commonjs/react-query/vendorsChangeSubscription.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsChangeSubscription.js +3 -2
- package/dist/commonjs/react-query/vendorsChangeSubscription.js.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorCompany.d.ts +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorCompany.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorCompany.js.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +9 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/sdk/invoices.d.ts +1 -4
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +1 -4
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +12 -3
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +12 -3
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/fhirconfigs.test.js +18 -0
- package/dist/esm/__tests__/fhirconfigs.test.js.map +1 -1
- package/dist/esm/__tests__/subscriptionPlanSelection.test.d.ts +2 -0
- package/dist/esm/__tests__/subscriptionPlanSelection.test.d.ts.map +1 -0
- package/dist/esm/__tests__/subscriptionPlanSelection.test.js +34 -0
- package/dist/esm/__tests__/subscriptionPlanSelection.test.js.map +1 -0
- package/dist/esm/__tests__/users.test.js +3 -0
- package/dist/esm/__tests__/users.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zoneDevicesCreate.test.js +34 -0
- package/dist/esm/__tests__/zoneDevicesCreate.test.js.map +1 -1
- package/dist/esm/__tests__/zoneDevicesList.test.js +4 -0
- package/dist/esm/__tests__/zoneDevicesList.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +2 -9
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/doAdmin.d.ts +5 -4
- package/dist/esm/admin-funcs/doAdmin.d.ts.map +1 -1
- package/dist/esm/admin-funcs/doAdmin.js +10 -5
- package/dist/esm/admin-funcs/doAdmin.js.map +1 -1
- package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.d.ts +3 -2
- package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.d.ts.map +1 -1
- package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.js +2 -1
- package/dist/esm/admin-funcs/subscriptionFinishScreeningQuestions.js.map +1 -1
- package/dist/esm/admin-funcs/subscriptionPlanSelection.d.ts +7 -0
- package/dist/esm/admin-funcs/subscriptionPlanSelection.d.ts.map +1 -0
- package/dist/esm/admin-funcs/subscriptionPlanSelection.js +9 -0
- package/dist/esm/admin-funcs/subscriptionPlanSelection.js.map +1 -0
- package/dist/esm/admin-funcs/subscriptionUpdateVendorType.d.ts +3 -2
- package/dist/esm/admin-funcs/subscriptionUpdateVendorType.d.ts.map +1 -1
- package/dist/esm/admin-funcs/subscriptionUpdateVendorType.js +2 -1
- package/dist/esm/admin-funcs/subscriptionUpdateVendorType.js.map +1 -1
- package/dist/esm/admin-funcs/zoneDevicesFactoryReset.d.ts +3 -0
- package/dist/esm/admin-funcs/zoneDevicesFactoryReset.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesFactoryReset.js +11 -0
- package/dist/esm/admin-funcs/zoneDevicesFactoryReset.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareUpdate.d.ts +3 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareUpdate.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareUpdate.js +11 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareUpdate.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareVersions.d.ts +8 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareVersions.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareVersions.js +10 -0
- package/dist/esm/admin-funcs/zoneDevicesFirmwareVersions.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesReboot.d.ts +3 -0
- package/dist/esm/admin-funcs/zoneDevicesReboot.d.ts.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesReboot.js +10 -0
- package/dist/esm/admin-funcs/zoneDevicesReboot.js.map +1 -0
- package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts +2 -0
- package/dist/esm/admin-funcs/zoneDevicesUpdate.d.ts.map +1 -1
- package/dist/esm/admin-funcs/zoneDevicesUpdate.js.map +1 -1
- package/dist/esm/funcs/invoicesConvertQuote.d.ts +1 -4
- package/dist/esm/funcs/invoicesConvertQuote.d.ts.map +1 -1
- package/dist/esm/funcs/invoicesConvertQuote.js +3 -7
- package/dist/esm/funcs/invoicesConvertQuote.js.map +1 -1
- package/dist/esm/funcs/vendorsChangeSubscription.d.ts +3 -2
- package/dist/esm/funcs/vendorsChangeSubscription.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsChangeSubscription.js +3 -2
- package/dist/esm/funcs/vendorsChangeSubscription.js.map +1 -1
- package/dist/esm/funcs/vendorsCreateVendorCompany.d.ts +1 -1
- package/dist/esm/funcs/vendorsCreateVendorCompany.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsCreateVendorCompany.js +1 -1
- package/dist/esm/funcs/vendorsCreateVendorCompany.js.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js +9 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/index.extras.d.ts +8 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +9 -1
- package/dist/esm/index.extras.js.map +1 -1
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/components/fhirconfig.d.ts +12 -0
- package/dist/esm/models/components/fhirconfig.d.ts.map +1 -1
- package/dist/esm/models/components/fhirconfig.js +4 -0
- package/dist/esm/models/components/fhirconfig.js.map +1 -1
- package/dist/esm/models/components/invoice.d.ts +0 -5
- package/dist/esm/models/components/invoice.d.ts.map +1 -1
- package/dist/esm/models/components/invoice.js +0 -4
- package/dist/esm/models/components/invoice.js.map +1 -1
- package/dist/esm/models/components/userdetails.d.ts +22 -0
- package/dist/esm/models/components/userdetails.d.ts.map +1 -1
- package/dist/esm/models/components/userdetails.js +6 -0
- package/dist/esm/models/components/userdetails.js.map +1 -1
- package/dist/esm/models/components/userlocation.d.ts +10 -0
- package/dist/esm/models/components/userlocation.d.ts.map +1 -1
- package/dist/esm/models/components/userlocation.js +8 -0
- package/dist/esm/models/components/userlocation.js.map +1 -1
- package/dist/esm/models/operations/convertquote.d.ts +0 -21
- package/dist/esm/models/operations/convertquote.d.ts.map +1 -1
- package/dist/esm/models/operations/convertquote.js +0 -16
- package/dist/esm/models/operations/convertquote.js.map +1 -1
- package/dist/esm/models/operations/createinvoice.d.ts +0 -25
- package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/createinvoice.js +0 -10
- package/dist/esm/models/operations/createinvoice.js.map +1 -1
- package/dist/esm/models/operations/updateuser.d.ts +0 -2
- package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
- package/dist/esm/models/operations/updateuser.js +0 -1
- package/dist/esm/models/operations/updateuser.js.map +1 -1
- package/dist/esm/react-query/invoicesConvertQuote.d.ts +1 -4
- package/dist/esm/react-query/invoicesConvertQuote.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesConvertQuote.js +1 -4
- package/dist/esm/react-query/invoicesConvertQuote.js.map +1 -1
- package/dist/esm/react-query/vendorsChangeSubscription.d.ts +3 -2
- package/dist/esm/react-query/vendorsChangeSubscription.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsChangeSubscription.js +3 -2
- package/dist/esm/react-query/vendorsChangeSubscription.js.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendorCompany.d.ts +1 -1
- package/dist/esm/react-query/vendorsCreateVendorCompany.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendorCompany.js.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +9 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js +9 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/sdk/invoices.d.ts +1 -4
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +1 -4
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +12 -3
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +12 -3
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/fhirconfigs.test.ts +18 -0
- package/src/__tests__/subscriptionPlanSelection.test.ts +53 -0
- package/src/__tests__/users.test.ts +3 -0
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/zoneDevicesCreate.test.ts +48 -0
- package/src/__tests__/zoneDevicesList.test.ts +4 -0
- package/src/__tests__/zones.test.ts +2 -9
- package/src/admin-funcs/doAdmin.ts +24 -11
- package/src/admin-funcs/subscriptionFinishScreeningQuestions.ts +11 -3
- package/src/admin-funcs/subscriptionPlanSelection.ts +17 -0
- package/src/admin-funcs/subscriptionUpdateVendorType.ts +11 -3
- package/src/admin-funcs/zoneDevicesFactoryReset.ts +11 -0
- package/src/admin-funcs/zoneDevicesFirmwareUpdate.ts +11 -0
- package/src/admin-funcs/zoneDevicesFirmwareVersions.ts +22 -0
- package/src/admin-funcs/zoneDevicesReboot.ts +10 -0
- package/src/admin-funcs/zoneDevicesUpdate.ts +4 -0
- package/src/funcs/invoicesConvertQuote.ts +3 -7
- package/src/funcs/vendorsChangeSubscription.ts +3 -2
- package/src/funcs/vendorsCreateVendorCompany.ts +4 -0
- package/src/funcs/vendorsUpdateVendorDetails.ts +9 -1
- package/src/index.extras.ts +9 -1
- package/src/lib/config.ts +4 -4
- package/src/models/components/fhirconfig.ts +12 -0
- package/src/models/components/invoice.ts +0 -9
- package/src/models/components/userdetails.ts +28 -0
- package/src/models/components/userlocation.ts +18 -0
- package/src/models/operations/convertquote.ts +0 -46
- package/src/models/operations/createinvoice.ts +0 -35
- package/src/models/operations/updateuser.ts +0 -3
- package/src/react-query/invoicesConvertQuote.ts +1 -4
- package/src/react-query/vendorsChangeSubscription.ts +3 -2
- package/src/react-query/vendorsCreateVendorCompany.ts +1 -0
- package/src/react-query/vendorsUpdateVendorDetails.ts +9 -1
- package/src/sdk/invoices.ts +1 -4
- package/src/sdk/vendors.ts +12 -3
|
@@ -20,9 +20,11 @@ import { Result } from "../types/fp.js";
|
|
|
20
20
|
import { getInternalCore } from "./initializeCore.js";
|
|
21
21
|
import { encodeJSON } from "../lib/encodings.js";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
// An internal call whose response is validated against a schema for `T` (see $doPost's
|
|
24
|
+
// responseSchema). internalApiResult is the untyped default.
|
|
25
|
+
export type internalApiResultOf<T> = APIPromise<
|
|
24
26
|
Result<
|
|
25
|
-
|
|
27
|
+
T,
|
|
26
28
|
| errors.ApiErrorResponse
|
|
27
29
|
| GreenSecurityError
|
|
28
30
|
| SDKValidationError
|
|
@@ -34,6 +36,8 @@ export type internalApiResult = APIPromise<
|
|
|
34
36
|
>
|
|
35
37
|
>;
|
|
36
38
|
|
|
39
|
+
export type internalApiResult = internalApiResultOf<Json>;
|
|
40
|
+
|
|
37
41
|
// This creates a generic JSON schema that can be used to validate any JSON object
|
|
38
42
|
const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
|
|
39
43
|
type Literal = z.infer<typeof literalSchema>;
|
|
@@ -201,10 +205,10 @@ export async function $doGetSingle<T extends object>(
|
|
|
201
205
|
return [result, { status: "complete", request: req, response }];
|
|
202
206
|
}
|
|
203
207
|
|
|
204
|
-
type BodyResult = Promise<
|
|
208
|
+
type BodyResult<T = Json> = Promise<
|
|
205
209
|
[
|
|
206
210
|
Result<
|
|
207
|
-
|
|
211
|
+
T,
|
|
208
212
|
| errors.ApiErrorResponse
|
|
209
213
|
| GreenSecurityError
|
|
210
214
|
| ResponseValidationError
|
|
@@ -222,13 +226,18 @@ type BodyResult = Promise<
|
|
|
222
226
|
// Shared by the JSON and multipart requests below: everything except the method, how the body
|
|
223
227
|
// is built and whether we name a Content-Type. A multipart body must NOT carry one, because only
|
|
224
228
|
// fetch can append the boundary it generates.
|
|
225
|
-
async function $doBodyRequest(
|
|
229
|
+
async function $doBodyRequest<R = Json>(
|
|
226
230
|
method: "POST" | "PUT",
|
|
227
231
|
route: string,
|
|
228
232
|
body: BodyInit | undefined,
|
|
229
233
|
contentTypeHeader: Record<string, string>,
|
|
230
234
|
options?: RequestOptions,
|
|
231
|
-
|
|
235
|
+
responseSchema?: z.ZodType<R>,
|
|
236
|
+
): BodyResult<R> {
|
|
237
|
+
// Without a schema the body is only checked to be JSON, which is every caller before typed
|
|
238
|
+
// responses existed.
|
|
239
|
+
const schema = (responseSchema ?? jsonSchema) as z.ZodType<R>;
|
|
240
|
+
|
|
232
241
|
const client = getInternalCore();
|
|
233
242
|
if (!client) {
|
|
234
243
|
throw new Error("GreenSecurityCore client is not initialized.");
|
|
@@ -290,7 +299,7 @@ async function $doBodyRequest(
|
|
|
290
299
|
};
|
|
291
300
|
|
|
292
301
|
const [result] = await M.match<
|
|
293
|
-
|
|
302
|
+
R,
|
|
294
303
|
| errors.ApiErrorResponse
|
|
295
304
|
| GreenSecurityError
|
|
296
305
|
| ResponseValidationError
|
|
@@ -301,10 +310,10 @@ async function $doBodyRequest(
|
|
|
301
310
|
| RequestTimeoutError
|
|
302
311
|
| ConnectionError
|
|
303
312
|
>(
|
|
304
|
-
M.json(200,
|
|
313
|
+
M.json(200, schema),
|
|
305
314
|
// A REST create answers 201, which matches none of the cases below — an unmatched status is
|
|
306
315
|
// an error, so the caller saw a failure for a request the server had accepted.
|
|
307
|
-
M.json(201,
|
|
316
|
+
M.json(201, schema),
|
|
308
317
|
// 422 is a real answer here, not a surprise: the create returns it for a refused certificate
|
|
309
318
|
// and for a model validation failure. Left out, it fell through to M.fail("4XX"), which
|
|
310
319
|
// yields a generic APIError and hides the server's message from the form.
|
|
@@ -319,17 +328,21 @@ async function $doBodyRequest(
|
|
|
319
328
|
return [result, { status: "complete", request: req, response }];
|
|
320
329
|
}
|
|
321
330
|
|
|
322
|
-
|
|
331
|
+
// Pass responseSchema to validate and type the 200/201 body; a body that does not match it comes
|
|
332
|
+
// back as a ResponseValidationError instead of being handed to the caller.
|
|
333
|
+
export async function $doPost<T extends object, R = Json>(
|
|
323
334
|
route: string,
|
|
324
335
|
postData: T,
|
|
325
336
|
options?: RequestOptions,
|
|
326
|
-
|
|
337
|
+
responseSchema?: z.ZodType<R>,
|
|
338
|
+
): BodyResult<R> {
|
|
327
339
|
return $doBodyRequest(
|
|
328
340
|
"POST",
|
|
329
341
|
route,
|
|
330
342
|
encodeJSON("body", postData, { explode: true }),
|
|
331
343
|
{ "Content-Type": "application/json" },
|
|
332
344
|
options,
|
|
345
|
+
responseSchema,
|
|
333
346
|
);
|
|
334
347
|
}
|
|
335
348
|
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { APIPromise } from "../types/async.js";
|
|
2
|
-
import { $doPost,
|
|
2
|
+
import { $doPost, internalApiResultOf } from "./doAdmin.js";
|
|
3
|
+
import {
|
|
4
|
+
subscriptionPlanSelectionResponse,
|
|
5
|
+
subscriptionPlanSelectionResponse$inboundSchema,
|
|
6
|
+
} from "./subscriptionPlanSelection.js";
|
|
3
7
|
|
|
4
8
|
export type subscriptionFinishScreeningQuestionsRequest = {
|
|
5
9
|
vendor_id: number;
|
|
6
10
|
};
|
|
7
11
|
|
|
8
|
-
export function subscriptionFinishScreeningQuestions(
|
|
12
|
+
export function subscriptionFinishScreeningQuestions(
|
|
13
|
+
request: subscriptionFinishScreeningQuestionsRequest,
|
|
14
|
+
): internalApiResultOf<subscriptionPlanSelectionResponse> {
|
|
9
15
|
return new APIPromise($doPost(
|
|
10
16
|
"/subscription/screening-questions",
|
|
11
|
-
request
|
|
17
|
+
request,
|
|
18
|
+
undefined,
|
|
19
|
+
subscriptionPlanSelectionResponse$inboundSchema,
|
|
12
20
|
));
|
|
13
21
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
|
|
3
|
+
// What finishing the screening questions or choosing a vendor type answers. GSSD-7289.
|
|
4
|
+
export type subscriptionPlanSelectionResponse = {
|
|
5
|
+
success: boolean;
|
|
6
|
+
// false when Standard is the vendor's only plan (e.g. Level 1, which cannot buy Emerald): the
|
|
7
|
+
// server has already selected it, so the plan step is skipped and the next step is the invoice.
|
|
8
|
+
plan_selection_required: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Unknown fields pass through, so the server can add to the response without breaking callers.
|
|
12
|
+
export const subscriptionPlanSelectionResponse$inboundSchema: z.ZodType<subscriptionPlanSelectionResponse> = z
|
|
13
|
+
.object({
|
|
14
|
+
success: z.boolean(),
|
|
15
|
+
plan_selection_required: z.boolean(),
|
|
16
|
+
})
|
|
17
|
+
.passthrough();
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { APIPromise } from "../types/async.js";
|
|
2
|
-
import { $doPost,
|
|
2
|
+
import { $doPost, internalApiResultOf } from "./doAdmin.js";
|
|
3
|
+
import {
|
|
4
|
+
subscriptionPlanSelectionResponse,
|
|
5
|
+
subscriptionPlanSelectionResponse$inboundSchema,
|
|
6
|
+
} from "./subscriptionPlanSelection.js";
|
|
3
7
|
|
|
4
8
|
export type subscriptionUpdateVendorTypeRequest = {
|
|
5
9
|
vendor_id: number;
|
|
6
10
|
vendor_type_id: number[];
|
|
7
11
|
};
|
|
8
12
|
|
|
9
|
-
export function subscriptionUpdateVendorType(
|
|
13
|
+
export function subscriptionUpdateVendorType(
|
|
14
|
+
request: subscriptionUpdateVendorTypeRequest,
|
|
15
|
+
): internalApiResultOf<subscriptionPlanSelectionResponse> {
|
|
10
16
|
return new APIPromise($doPost(
|
|
11
17
|
"/subscription/vendor-type",
|
|
12
|
-
request
|
|
18
|
+
request,
|
|
19
|
+
undefined,
|
|
20
|
+
subscriptionPlanSelectionResponse$inboundSchema,
|
|
13
21
|
));
|
|
14
22
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doPost, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
// Factory-resets a gateway over MQTT. The server clears its stored firmware versions, since the
|
|
5
|
+
// gateway reverts to factory and stops reporting until it is set up again. Returns the device.
|
|
6
|
+
// 422 when the gateway is offline.
|
|
7
|
+
//
|
|
8
|
+
// Internal for the same reason as zoneDevicesUpdate.
|
|
9
|
+
export function zoneDevicesFactoryReset(zoneDeviceId: number): internalApiResult {
|
|
10
|
+
return new APIPromise($doPost(`/zone-devices/${zoneDeviceId}/factory-reset`, {}));
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doPost, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
// Starts a gateway firmware update (the Update button on device details). The update runs over
|
|
5
|
+
// MQTT; follow it by polling zoneDevicesGet for `firmware_update_status`. Returns the device.
|
|
6
|
+
//
|
|
7
|
+
// Internal for the same reason as zoneDevicesUpdate. 409 when an update is already running, 422
|
|
8
|
+
// when the gateway is already on the target firmware.
|
|
9
|
+
export function zoneDevicesFirmwareUpdate(zoneDeviceId: number): internalApiResult {
|
|
10
|
+
return new APIPromise($doPost(`/zone-devices/${zoneDeviceId}/firmware-update`, {}));
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doPut, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
// Wire names, posted verbatim. Versions look like `v3.8.6`; send whichever the gateway reported.
|
|
5
|
+
export type zoneDevicesFirmwareVersionsRequest = {
|
|
6
|
+
wifi_version?: string;
|
|
7
|
+
ble_version?: string;
|
|
8
|
+
// true only from provisioning's final step (a safe point): a gateway found behind target flashes
|
|
9
|
+
// now instead of waiting for the nightly sweep. Omitted/false for mid-connection reports.
|
|
10
|
+
auto_update?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// Records the firmware the Gatekeeper app read off a gateway while connected to it. A gateway
|
|
14
|
+
// behind the target firmware is then updated automatically over MQTT. Returns the device.
|
|
15
|
+
//
|
|
16
|
+
// Internal for the same reason as zoneDevicesUpdate.
|
|
17
|
+
export function zoneDevicesFirmwareVersions(
|
|
18
|
+
zoneDeviceId: number,
|
|
19
|
+
request: zoneDevicesFirmwareVersionsRequest
|
|
20
|
+
): internalApiResult {
|
|
21
|
+
return new APIPromise($doPut(`/zone-devices/${zoneDeviceId}/firmware-versions`, request));
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doPost, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
// Reboots a gateway over MQTT (cgic-reboot). Fire-and-forget: the gateway drops the reply and
|
|
5
|
+
// reconnects on its own. Returns the device. 422 when the gateway is offline.
|
|
6
|
+
//
|
|
7
|
+
// Internal for the same reason as zoneDevicesUpdate.
|
|
8
|
+
export function zoneDevicesReboot(zoneDeviceId: number): internalApiResult {
|
|
9
|
+
return new APIPromise($doPost(`/zone-devices/${zoneDeviceId}/reboot`, {}));
|
|
10
|
+
}
|
|
@@ -9,6 +9,10 @@ export type zoneDevicesUpdateRequest = {
|
|
|
9
9
|
network_id?: number;
|
|
10
10
|
connection_type?: zoneDeviceConnectionType;
|
|
11
11
|
name?: string;
|
|
12
|
+
// Sent once the app has pushed the network's current settings to the gateway; only a network edit sets it.
|
|
13
|
+
needs_network_update?: false;
|
|
14
|
+
// The provisioning response's network_revision for the settings that were pushed; required with the clear.
|
|
15
|
+
network_revision?: string;
|
|
12
16
|
};
|
|
13
17
|
|
|
14
18
|
// Edits a gateway from the Gatekeeper device details screen. This only updates the record; the
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { GreenSecurityCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import { 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";
|
|
@@ -43,10 +43,7 @@ import { Result } from "../types/fp.js";
|
|
|
43
43
|
* invoices; a caller allowed to create the invoice but not to update the
|
|
44
44
|
* linked `VendorCredential` responds `401`.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
47
|
-
* `VendorCredential`: send `true` when the vendor is sending the
|
|
48
|
-
* converted invoice to their company managers to pay instead of paying
|
|
49
|
-
* it themselves. It follows the same rules as on `POST /invoices`.
|
|
46
|
+
* Takes no request body.
|
|
50
47
|
*
|
|
51
48
|
* **Permissions.** Requires a valid token. This endpoint is not gated on a named permission—the caller's role and their relationship to the record decide what it returns.
|
|
52
49
|
*
|
|
@@ -107,7 +104,7 @@ async function $do(
|
|
|
107
104
|
return [parsed, { status: "invalid" }];
|
|
108
105
|
}
|
|
109
106
|
const payload = parsed.value;
|
|
110
|
-
const body =
|
|
107
|
+
const body = null;
|
|
111
108
|
|
|
112
109
|
const pathParams = {
|
|
113
110
|
id: encodeSimple("id", payload.id, {
|
|
@@ -118,7 +115,6 @@ async function $do(
|
|
|
118
115
|
const path = pathToFunc("/invoices/{id}/convert")(pathParams);
|
|
119
116
|
|
|
120
117
|
const headers = new Headers(compactMap({
|
|
121
|
-
"Content-Type": "application/json",
|
|
122
118
|
Accept: "application/json",
|
|
123
119
|
}));
|
|
124
120
|
|
|
@@ -32,8 +32,9 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* @remarks
|
|
33
33
|
* Changes a vendor's credentialing subscription by updating the vendor type,
|
|
34
34
|
* the target facilities, or both. If the selection increases the subscription
|
|
35
|
-
* price, the server creates an invoice and charges the payment profile
|
|
36
|
-
*
|
|
35
|
+
* price, the server creates an invoice and charges the payment profile for the
|
|
36
|
+
* invoice total, including any tax and convenience fee; the response includes
|
|
37
|
+
* the invoice id.
|
|
37
38
|
*
|
|
38
39
|
* **Permissions.** Requires the `vendor_transactions.add` permission.
|
|
39
40
|
*
|
|
@@ -50,6 +50,7 @@ export function vendorsCreateVendorCompany(
|
|
|
50
50
|
Result<
|
|
51
51
|
operations.CreateVendorCompanyCreateVendorCompanyOk,
|
|
52
52
|
| errors.ApiErrorResponse
|
|
53
|
+
| errors.UnprocessableEntityOrValidationError
|
|
53
54
|
| GreenSecurityError
|
|
54
55
|
| ResponseValidationError
|
|
55
56
|
| ConnectionError
|
|
@@ -76,6 +77,7 @@ async function $do(
|
|
|
76
77
|
Result<
|
|
77
78
|
operations.CreateVendorCompanyCreateVendorCompanyOk,
|
|
78
79
|
| errors.ApiErrorResponse
|
|
80
|
+
| errors.UnprocessableEntityOrValidationError
|
|
79
81
|
| GreenSecurityError
|
|
80
82
|
| ResponseValidationError
|
|
81
83
|
| ConnectionError
|
|
@@ -165,6 +167,7 @@ async function $do(
|
|
|
165
167
|
const [result] = await M.match<
|
|
166
168
|
operations.CreateVendorCompanyCreateVendorCompanyOk,
|
|
167
169
|
| errors.ApiErrorResponse
|
|
170
|
+
| errors.UnprocessableEntityOrValidationError
|
|
168
171
|
| GreenSecurityError
|
|
169
172
|
| ResponseValidationError
|
|
170
173
|
| ConnectionError
|
|
@@ -179,6 +182,7 @@ async function $do(
|
|
|
179
182
|
operations.CreateVendorCompanyCreateVendorCompanyOk$inboundSchema,
|
|
180
183
|
),
|
|
181
184
|
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
185
|
+
M.jsonErr(422, errors.UnprocessableEntityOrValidationError$inboundSchema),
|
|
182
186
|
M.fail("4XX"),
|
|
183
187
|
M.fail([500, "5XX"]),
|
|
184
188
|
)(response, req, { extraFields: responseFields });
|
|
@@ -36,12 +36,20 @@ import * as types$ from "../types/primitives.js";
|
|
|
36
36
|
* can also remove the vendor from their company by sending `company_id: null`.
|
|
37
37
|
*
|
|
38
38
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
39
|
-
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `
|
|
39
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone`, `fax`, `work_email` and `personal_email`. The `address` and
|
|
40
40
|
* `country` properties of the shared `UserLocation` schema have no effect here, and
|
|
41
41
|
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
42
42
|
* province—the vendor's country, set only at registration, is not editable
|
|
43
43
|
* through this endpoint.
|
|
44
44
|
*
|
|
45
|
+
* `location.work_email` and `location.personal_email` are stored lowercased, and a
|
|
46
|
+
* value that is not a valid email address, or is longer than 255 characters, gets a
|
|
47
|
+
* `422` response. They are contact fields: the login stays `email`, which this
|
|
48
|
+
* endpoint does not change. When an update sets either of them, one must be the
|
|
49
|
+
* vendor's `email` and the other a different address or empty, or it gets a `422`.
|
|
50
|
+
* A vendor with neither one copying `email` yet can set just one and leave the
|
|
51
|
+
* other empty: the save puts `email` in the empty one (work, if both are).
|
|
52
|
+
*
|
|
45
53
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
46
54
|
* against the resulting state (using the vendor's existing value for whichever
|
|
47
55
|
* of the two you omit from the request). The server rejects a code that is not shaped like a real
|
package/src/index.extras.ts
CHANGED
|
@@ -80,6 +80,10 @@ import { zoneDevicesMacAvailability } from "./admin-funcs/zoneDevicesMacAvailabi
|
|
|
80
80
|
import { zoneDevicesUpdate } from "./admin-funcs/zoneDevicesUpdate.js";
|
|
81
81
|
import { zoneDevicesProvisioning } from "./admin-funcs/zoneDevicesProvisioning.js";
|
|
82
82
|
import { zoneDevicesDelete } from "./admin-funcs/zoneDevicesDelete.js";
|
|
83
|
+
import { zoneDevicesFirmwareVersions } from "./admin-funcs/zoneDevicesFirmwareVersions.js";
|
|
84
|
+
import { zoneDevicesFirmwareUpdate } from "./admin-funcs/zoneDevicesFirmwareUpdate.js";
|
|
85
|
+
import { zoneDevicesReboot } from "./admin-funcs/zoneDevicesReboot.js";
|
|
86
|
+
import { zoneDevicesFactoryReset } from "./admin-funcs/zoneDevicesFactoryReset.js";
|
|
83
87
|
import { lookupsAddressValidation } from "./admin-funcs/lookupsAddressValidation.js";
|
|
84
88
|
import { lookupsAddressAutocomplete } from "./admin-funcs/lookupsAddressAutocomplete.js";
|
|
85
89
|
import { lookupsAddressPlace } from "./admin-funcs/lookupsAddressPlace.js";
|
|
@@ -219,6 +223,10 @@ export const __internal = {
|
|
|
219
223
|
update: zoneDevicesUpdate,
|
|
220
224
|
provisioning: zoneDevicesProvisioning,
|
|
221
225
|
delete: zoneDevicesDelete,
|
|
222
|
-
macAvailability: zoneDevicesMacAvailability
|
|
226
|
+
macAvailability: zoneDevicesMacAvailability,
|
|
227
|
+
firmwareVersions: zoneDevicesFirmwareVersions,
|
|
228
|
+
firmwareUpdate: zoneDevicesFirmwareUpdate,
|
|
229
|
+
reboot: zoneDevicesReboot,
|
|
230
|
+
factoryReset: zoneDevicesFactoryReset
|
|
223
231
|
}
|
|
224
232
|
};
|
package/src/lib/config.ts
CHANGED
|
@@ -79,9 +79,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
79
79
|
|
|
80
80
|
export const SDK_METADATA = {
|
|
81
81
|
language: "typescript",
|
|
82
|
-
openapiDocVersion: "0.
|
|
83
|
-
sdkVersion: "0.
|
|
84
|
-
genVersion: "2.
|
|
82
|
+
openapiDocVersion: "0.48.0",
|
|
83
|
+
sdkVersion: "0.49.0-beta.0",
|
|
84
|
+
genVersion: "2.954.8",
|
|
85
85
|
userAgent:
|
|
86
|
-
"speakeasy-sdk/typescript 0.
|
|
86
|
+
"speakeasy-sdk/typescript 0.49.0-beta.0 2.954.8 0.48.0 @greensecurity/javascript-sdk",
|
|
87
87
|
} as const;
|
|
@@ -47,6 +47,10 @@ export type ProductionProfile = {
|
|
|
47
47
|
* The private key used to sign token requests to the production FHIR instance.
|
|
48
48
|
*/
|
|
49
49
|
privateKey?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Extra HTTP headers to send with the token request and with every FHIR request to the production instance, as a map of header name to value. Merged over the headers the client sets itself, so an entry named `Authorization`, `Content-Type` or `Accept` replaces the default. Empty when the facility's gateway needs none, which is the usual case. A value may be a credential, so this field is only served to callers allowed to see this configuration's secrets.
|
|
52
|
+
*/
|
|
53
|
+
customHeaders?: { [k: string]: string } | undefined;
|
|
50
54
|
/**
|
|
51
55
|
* Relative path of the self-hosted JSON Web Key (JWK) Set URL (JKU) serving this configuration's production public signing keys.
|
|
52
56
|
*/
|
|
@@ -97,6 +101,10 @@ export type NonProductionProfile = {
|
|
|
97
101
|
* The private key used to sign token requests to the non-production FHIR instance.
|
|
98
102
|
*/
|
|
99
103
|
privateKeyNp?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Extra HTTP headers to send with the token request and with every FHIR request to the non-production instance, as a map of header name to value. Merged over the headers the client sets itself, so an entry named `Authorization`, `Content-Type` or `Accept` replaces the default. Empty when the facility's gateway needs none, which is the usual case. A value may be a credential, so this field is only served to callers allowed to see this configuration's secrets.
|
|
106
|
+
*/
|
|
107
|
+
customHeadersNp?: { [k: string]: string } | undefined;
|
|
100
108
|
/**
|
|
101
109
|
* Relative path of the self-hosted JWK Set URL (JKU) serving this configuration's non-production public signing keys.
|
|
102
110
|
*/
|
|
@@ -221,6 +229,7 @@ export const ProductionProfile$inboundSchema: z.ZodType<
|
|
|
221
229
|
patient_list_url: types.optional(types.string()),
|
|
222
230
|
patient_list_id: types.optional(types.string()),
|
|
223
231
|
private_key: types.optional(types.string()),
|
|
232
|
+
custom_headers: types.optional(z.record(types.string())),
|
|
224
233
|
jku_path: types.optional(types.string()),
|
|
225
234
|
jku_url: z.nullable(types.string()).optional(),
|
|
226
235
|
signing_kid: z.nullable(types.string()).optional(),
|
|
@@ -234,6 +243,7 @@ export const ProductionProfile$inboundSchema: z.ZodType<
|
|
|
234
243
|
"patient_list_url": "patientListUrl",
|
|
235
244
|
"patient_list_id": "patientListId",
|
|
236
245
|
"private_key": "privateKey",
|
|
246
|
+
"custom_headers": "customHeaders",
|
|
237
247
|
"jku_path": "jkuPath",
|
|
238
248
|
"jku_url": "jkuUrl",
|
|
239
249
|
"signing_kid": "signingKid",
|
|
@@ -264,6 +274,7 @@ export const NonProductionProfile$inboundSchema: z.ZodType<
|
|
|
264
274
|
patient_list_url_np: types.optional(types.string()),
|
|
265
275
|
patient_list_id_np: types.optional(types.string()),
|
|
266
276
|
private_key_np: types.optional(types.string()),
|
|
277
|
+
custom_headers_np: types.optional(z.record(types.string())),
|
|
267
278
|
jku_path_np: types.optional(types.string()),
|
|
268
279
|
jku_url_np: z.nullable(types.string()).optional(),
|
|
269
280
|
signing_kid_np: z.nullable(types.string()).optional(),
|
|
@@ -277,6 +288,7 @@ export const NonProductionProfile$inboundSchema: z.ZodType<
|
|
|
277
288
|
"patient_list_url_np": "patientListUrlNp",
|
|
278
289
|
"patient_list_id_np": "patientListIdNp",
|
|
279
290
|
"private_key_np": "privateKeyNp",
|
|
291
|
+
"custom_headers_np": "customHeadersNp",
|
|
280
292
|
"jku_path_np": "jkuPathNp",
|
|
281
293
|
"jku_url_np": "jkuUrlNp",
|
|
282
294
|
"signing_kid_np": "signingKidNp",
|
|
@@ -141,10 +141,6 @@ export type Invoice = {
|
|
|
141
141
|
* When the invoice was created.
|
|
142
142
|
*/
|
|
143
143
|
dateCreated?: string | null | undefined;
|
|
144
|
-
/**
|
|
145
|
-
* When the vendor sent this invoice to their company managers to pay instead of paying it themselves (`send_to_company_manager` on `POST /invoices` or `POST /invoices/{id}/convert`). `null` if it was never sent, or if the vendor took it back or settled it themselves. It is kept on an invoice the managers paid, and on one that was later voided.
|
|
146
|
-
*/
|
|
147
|
-
dateSentToCompanyManager?: string | null | undefined;
|
|
148
144
|
/**
|
|
149
145
|
* The date the invoice payment is due. `null` if no due date is set.
|
|
150
146
|
*/
|
|
@@ -397,7 +393,6 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
397
393
|
date_processed: z.nullable(types.string()).optional(),
|
|
398
394
|
date_paid: z.nullable(types.string()).optional(),
|
|
399
395
|
date_created: z.nullable(types.string()).optional(),
|
|
400
|
-
date_sent_to_company_manager: z.nullable(types.string()).optional(),
|
|
401
396
|
date_due: z.nullable(types.string()).optional(),
|
|
402
397
|
amount: z.nullable(types.number()).optional(),
|
|
403
398
|
status: z.nullable(types.string()).optional(),
|
|
@@ -426,7 +421,6 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
426
421
|
"date_processed": "dateProcessed",
|
|
427
422
|
"date_paid": "datePaid",
|
|
428
423
|
"date_created": "dateCreated",
|
|
429
|
-
"date_sent_to_company_manager": "dateSentToCompanyManager",
|
|
430
424
|
"date_due": "dateDue",
|
|
431
425
|
"financial_status": "financialStatus",
|
|
432
426
|
"amount_not_paid": "amountNotPaid",
|
|
@@ -445,7 +439,6 @@ export type Invoice$Outbound = {
|
|
|
445
439
|
date_processed?: string | null | undefined;
|
|
446
440
|
date_paid?: string | null | undefined;
|
|
447
441
|
date_created?: string | null | undefined;
|
|
448
|
-
date_sent_to_company_manager?: string | null | undefined;
|
|
449
442
|
date_due?: string | null | undefined;
|
|
450
443
|
amount?: number | null | undefined;
|
|
451
444
|
status?: string | null | undefined;
|
|
@@ -478,7 +471,6 @@ export const Invoice$outboundSchema: z.ZodType<
|
|
|
478
471
|
dateProcessed: z.nullable(z.string()).optional(),
|
|
479
472
|
datePaid: z.nullable(z.string()).optional(),
|
|
480
473
|
dateCreated: z.nullable(z.string()).optional(),
|
|
481
|
-
dateSentToCompanyManager: z.nullable(z.string()).optional(),
|
|
482
474
|
dateDue: z.nullable(z.string()).optional(),
|
|
483
475
|
amount: z.nullable(z.number().int()).optional(),
|
|
484
476
|
status: z.nullable(z.string()).optional(),
|
|
@@ -506,7 +498,6 @@ export const Invoice$outboundSchema: z.ZodType<
|
|
|
506
498
|
dateProcessed: "date_processed",
|
|
507
499
|
datePaid: "date_paid",
|
|
508
500
|
dateCreated: "date_created",
|
|
509
|
-
dateSentToCompanyManager: "date_sent_to_company_manager",
|
|
510
501
|
dateDue: "date_due",
|
|
511
502
|
financialStatus: "financial_status",
|
|
512
503
|
amountNotPaid: "amount_not_paid",
|
|
@@ -85,6 +85,10 @@ export type UserDetails = {
|
|
|
85
85
|
* First name of the user.
|
|
86
86
|
*/
|
|
87
87
|
firstName?: string | null | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Middle name of the user, or `null` if not set. Returned only in the full user record (`expand=user`).
|
|
90
|
+
*/
|
|
91
|
+
middleName?: string | null | undefined;
|
|
88
92
|
/**
|
|
89
93
|
* Last name of the user.
|
|
90
94
|
*/
|
|
@@ -93,6 +97,24 @@ export type UserDetails = {
|
|
|
93
97
|
* Email address (not always valid)
|
|
94
98
|
*/
|
|
95
99
|
email: string;
|
|
100
|
+
/**
|
|
101
|
+
* A vendor's work email address, a contact field kept apart from `email`,
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* which stays the login. When it is the same address as `email`, it follows
|
|
105
|
+
* any change to the login. `null` if not set. Returned only in the full user
|
|
106
|
+
* record (`expand=user`).
|
|
107
|
+
*/
|
|
108
|
+
workEmail?: string | null | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* A vendor's personal email address, a contact field kept apart from `email`,
|
|
111
|
+
*
|
|
112
|
+
* @remarks
|
|
113
|
+
* which stays the login. When it is the same address as `email`, it follows
|
|
114
|
+
* any change to the login. `null` if not set. Returned only in the full user
|
|
115
|
+
* record (`expand=user`).
|
|
116
|
+
*/
|
|
117
|
+
personalEmail?: string | null | undefined;
|
|
96
118
|
/**
|
|
97
119
|
* The user's landline phone number, or `null` if not set.
|
|
98
120
|
*/
|
|
@@ -253,8 +275,11 @@ export const UserDetails$inboundSchema: z.ZodType<
|
|
|
253
275
|
> = z.object({
|
|
254
276
|
id: types.number(),
|
|
255
277
|
first_name: z.nullable(types.string()).optional(),
|
|
278
|
+
middle_name: z.nullable(types.string()).optional(),
|
|
256
279
|
last_name: z.nullable(types.string()).optional(),
|
|
257
280
|
email: types.string(),
|
|
281
|
+
work_email: z.nullable(types.string()).optional(),
|
|
282
|
+
personal_email: z.nullable(types.string()).optional(),
|
|
258
283
|
phone: z.nullable(types.string()).optional(),
|
|
259
284
|
mobile_phone: z.nullable(types.string()).optional(),
|
|
260
285
|
fax: z.nullable(types.string()).optional(),
|
|
@@ -274,7 +299,10 @@ export const UserDetails$inboundSchema: z.ZodType<
|
|
|
274
299
|
}).transform((v) => {
|
|
275
300
|
return remap$(v, {
|
|
276
301
|
"first_name": "firstName",
|
|
302
|
+
"middle_name": "middleName",
|
|
277
303
|
"last_name": "lastName",
|
|
304
|
+
"work_email": "workEmail",
|
|
305
|
+
"personal_email": "personalEmail",
|
|
278
306
|
"mobile_phone": "mobilePhone",
|
|
279
307
|
"phone_confirmed": "phoneConfirmed",
|
|
280
308
|
"email_confirmed": "emailConfirmed",
|
|
@@ -212,6 +212,14 @@ export type UserLocation = {
|
|
|
212
212
|
* The fax number of the location. `null` if not set.
|
|
213
213
|
*/
|
|
214
214
|
fax?: string | null | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* The vendor's work email address. Only `PUT /vendors/{vendor_id_or_me}` reads it. `null` if not set.
|
|
217
|
+
*/
|
|
218
|
+
workEmail?: string | null | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* The vendor's personal email address. Only `PUT /vendors/{vendor_id_or_me}` reads it. `null` if not set.
|
|
221
|
+
*/
|
|
222
|
+
personalEmail?: string | null | undefined;
|
|
215
223
|
/**
|
|
216
224
|
* The country of the location. `null` if not set.
|
|
217
225
|
*/
|
|
@@ -250,11 +258,15 @@ export const UserLocation$inboundSchema: z.ZodType<
|
|
|
250
258
|
phone: z.nullable(types.string()).optional(),
|
|
251
259
|
mobile_phone: z.nullable(types.string()).optional(),
|
|
252
260
|
fax: z.nullable(types.string()).optional(),
|
|
261
|
+
work_email: z.nullable(types.string()).optional(),
|
|
262
|
+
personal_email: z.nullable(types.string()).optional(),
|
|
253
263
|
country: z.nullable(types.string()).optional(),
|
|
254
264
|
timezone: z.nullable(Timezone$inboundSchema).optional(),
|
|
255
265
|
}).transform((v) => {
|
|
256
266
|
return remap$(v, {
|
|
257
267
|
"mobile_phone": "mobilePhone",
|
|
268
|
+
"work_email": "workEmail",
|
|
269
|
+
"personal_email": "personalEmail",
|
|
258
270
|
});
|
|
259
271
|
});
|
|
260
272
|
/** @internal */
|
|
@@ -268,6 +280,8 @@ export type UserLocation$Outbound = {
|
|
|
268
280
|
phone?: string | null | undefined;
|
|
269
281
|
mobile_phone?: string | null | undefined;
|
|
270
282
|
fax?: string | null | undefined;
|
|
283
|
+
work_email?: string | null | undefined;
|
|
284
|
+
personal_email?: string | null | undefined;
|
|
271
285
|
country?: string | null | undefined;
|
|
272
286
|
timezone?: string | null | undefined;
|
|
273
287
|
};
|
|
@@ -287,11 +301,15 @@ export const UserLocation$outboundSchema: z.ZodType<
|
|
|
287
301
|
phone: z.nullable(z.string()).optional(),
|
|
288
302
|
mobilePhone: z.nullable(z.string()).optional(),
|
|
289
303
|
fax: z.nullable(z.string()).optional(),
|
|
304
|
+
workEmail: z.nullable(z.string()).optional(),
|
|
305
|
+
personalEmail: z.nullable(z.string()).optional(),
|
|
290
306
|
country: z.nullable(z.string()).optional(),
|
|
291
307
|
timezone: z.nullable(Timezone$outboundSchema).optional(),
|
|
292
308
|
}).transform((v) => {
|
|
293
309
|
return remap$(v, {
|
|
294
310
|
mobilePhone: "mobile_phone",
|
|
311
|
+
workEmail: "work_email",
|
|
312
|
+
personalEmail: "personal_email",
|
|
295
313
|
});
|
|
296
314
|
});
|
|
297
315
|
|