@greensecurity/javascript-sdk 0.47.0-beta.9 → 0.47.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/dist/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/__tests__/zones.test.js +5 -8
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/companyManagerGetAutopay.d.ts +3 -0
- package/dist/commonjs/admin-funcs/companyManagerGetAutopay.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/companyManagerGetAutopay.js +9 -0
- package/dist/commonjs/admin-funcs/companyManagerGetAutopay.js.map +1 -0
- package/dist/commonjs/admin-funcs/companyManagerUpdateAutopay.d.ts +3 -0
- package/dist/commonjs/admin-funcs/companyManagerUpdateAutopay.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/companyManagerUpdateAutopay.js +12 -0
- package/dist/commonjs/admin-funcs/companyManagerUpdateAutopay.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.d.ts +3 -0
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.js +6 -0
- package/dist/commonjs/funcs/vendorsGetVendorTargetFacilities.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +4 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +4 -0
- package/dist/commonjs/index.extras.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/components/expand.d.ts +1 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +1 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/vendorpaymentresponsibilityassignments.d.ts +2 -2
- package/dist/commonjs/models/components/vendortargetfacility.d.ts +4 -0
- package/dist/commonjs/models/components/vendortargetfacility.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendortargetfacility.js +2 -0
- package/dist/commonjs/models/components/vendortargetfacility.js.map +1 -1
- package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.d.ts +24 -0
- package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.d.ts.map +1 -0
- package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.js +58 -0
- package/dist/commonjs/models/components/vendortargetfacilitystatuscounts.js.map +1 -0
- package/dist/commonjs/models/operations/getvendortargetfacilities.d.ts +54 -7
- package/dist/commonjs/models/operations/getvendortargetfacilities.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getvendortargetfacilities.js +35 -3
- package/dist/commonjs/models/operations/getvendortargetfacilities.js.map +1 -1
- package/dist/commonjs/models/operations/updatevendorpaymentresponsibility.d.ts +2 -2
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.d.ts +6 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.js +6 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.core.js.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.d.ts +18 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.js +12 -0
- package/dist/commonjs/react-query/vendorsGetVendorTargetFacilities.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +3 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +3 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/__tests__/zones.test.js +5 -8
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/companyManagerGetAutopay.d.ts +3 -0
- package/dist/esm/admin-funcs/companyManagerGetAutopay.d.ts.map +1 -0
- package/dist/esm/admin-funcs/companyManagerGetAutopay.js +6 -0
- package/dist/esm/admin-funcs/companyManagerGetAutopay.js.map +1 -0
- package/dist/esm/admin-funcs/companyManagerUpdateAutopay.d.ts +3 -0
- package/dist/esm/admin-funcs/companyManagerUpdateAutopay.d.ts.map +1 -0
- package/dist/esm/admin-funcs/companyManagerUpdateAutopay.js +9 -0
- package/dist/esm/admin-funcs/companyManagerUpdateAutopay.js.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.d.ts +3 -0
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.js +6 -0
- package/dist/esm/funcs/vendorsGetVendorTargetFacilities.js.map +1 -1
- package/dist/esm/index.extras.d.ts +4 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +4 -0
- package/dist/esm/index.extras.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/components/expand.d.ts +1 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +1 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/vendorpaymentresponsibilityassignments.d.ts +2 -2
- package/dist/esm/models/components/vendortargetfacility.d.ts +4 -0
- package/dist/esm/models/components/vendortargetfacility.d.ts.map +1 -1
- package/dist/esm/models/components/vendortargetfacility.js +2 -0
- package/dist/esm/models/components/vendortargetfacility.js.map +1 -1
- package/dist/esm/models/components/vendortargetfacilitystatuscounts.d.ts +24 -0
- package/dist/esm/models/components/vendortargetfacilitystatuscounts.d.ts.map +1 -0
- package/dist/esm/models/components/vendortargetfacilitystatuscounts.js +21 -0
- package/dist/esm/models/components/vendortargetfacilitystatuscounts.js.map +1 -0
- package/dist/esm/models/operations/getvendortargetfacilities.d.ts +54 -7
- package/dist/esm/models/operations/getvendortargetfacilities.d.ts.map +1 -1
- package/dist/esm/models/operations/getvendortargetfacilities.js +34 -2
- package/dist/esm/models/operations/getvendortargetfacilities.js.map +1 -1
- package/dist/esm/models/operations/updatevendorpaymentresponsibility.d.ts +2 -2
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.d.ts +6 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.js +6 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.core.js.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.d.ts +18 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.js +12 -0
- package/dist/esm/react-query/vendorsGetVendorTargetFacilities.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +3 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +3 -0
- package/dist/esm/sdk/vendors.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__/zones.test.ts +5 -8
- package/src/admin-funcs/companyManagerGetAutopay.ts +6 -0
- package/src/admin-funcs/companyManagerUpdateAutopay.ts +12 -0
- package/src/funcs/vendorsGetVendorTargetFacilities.ts +6 -0
- package/src/index.extras.ts +4 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/expand.ts +2 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/vendorpaymentresponsibilityassignments.ts +2 -2
- package/src/models/components/vendortargetfacility.ts +6 -0
- package/src/models/components/vendortargetfacilitystatuscounts.ts +53 -0
- package/src/models/operations/getvendortargetfacilities.ts +76 -7
- package/src/models/operations/updatevendorpaymentresponsibility.ts +2 -2
- package/src/react-query/vendorsGetVendorTargetFacilities.core.ts +12 -0
- package/src/react-query/vendorsGetVendorTargetFacilities.ts +18 -0
- package/src/sdk/vendors.ts +3 -0
package/package.json
CHANGED
|
@@ -42,25 +42,22 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
42
42
|
facility: {
|
|
43
43
|
contacts: {
|
|
44
44
|
contact: {
|
|
45
|
-
status: "
|
|
45
|
+
status: "Active",
|
|
46
46
|
department: 123,
|
|
47
47
|
},
|
|
48
48
|
adminContact: {
|
|
49
|
-
status: "
|
|
49
|
+
status: "Inactive",
|
|
50
50
|
department: 123,
|
|
51
51
|
},
|
|
52
52
|
techContact: {
|
|
53
|
-
status: "
|
|
53
|
+
status: "Active",
|
|
54
54
|
department: 123,
|
|
55
55
|
},
|
|
56
56
|
greenSecurityCsm: {
|
|
57
57
|
status: "Active",
|
|
58
58
|
department: 123,
|
|
59
59
|
},
|
|
60
|
-
accountManager:
|
|
61
|
-
status: "Inactive",
|
|
62
|
-
department: 123,
|
|
63
|
-
},
|
|
60
|
+
accountManager: null,
|
|
64
61
|
},
|
|
65
62
|
vendorGuestPolicy: {
|
|
66
63
|
enabled: false,
|
|
@@ -86,7 +83,7 @@ test("Zones Security Zone Checkin", async () => {
|
|
|
86
83
|
|
|
87
84
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
88
85
|
qrCode: "<value>",
|
|
89
|
-
zoneId:
|
|
86
|
+
zoneId: 776072,
|
|
90
87
|
});
|
|
91
88
|
expect(result).toBeDefined();
|
|
92
89
|
expect(result).toEqual({});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doPut, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
export function companyManagerUpdateAutopay(
|
|
5
|
+
enabled: boolean,
|
|
6
|
+
signatureName?: string,
|
|
7
|
+
): internalApiResult {
|
|
8
|
+
return new APIPromise($doPut("/company_managers/me/autopay", {
|
|
9
|
+
enabled,
|
|
10
|
+
signature_name: signatureName,
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
@@ -44,8 +44,11 @@ import {
|
|
|
44
44
|
*
|
|
45
45
|
* - `vendor_target_facility.facility`
|
|
46
46
|
* - `vendor_target_facility.has_screening_responses`
|
|
47
|
+
* - `vendor_target_facility.expiring_credential_count`
|
|
47
48
|
*
|
|
48
49
|
* The endpoint rejects any other value with `422 Unprocessable Entity`.
|
|
50
|
+
*
|
|
51
|
+
* Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
|
|
49
52
|
*/
|
|
50
53
|
export function vendorsGetVendorTargetFacilities(
|
|
51
54
|
client: GreenSecurityCore,
|
|
@@ -126,8 +129,11 @@ async function $do(
|
|
|
126
129
|
"expand": payload.expand,
|
|
127
130
|
}, { explode: false }),
|
|
128
131
|
encodeFormQuery({
|
|
132
|
+
"active_facilities_only": payload.active_facilities_only,
|
|
129
133
|
"desc": payload.desc,
|
|
134
|
+
"facility_id": payload.facility_id,
|
|
130
135
|
"facility_name_like": payload.facility_name_like,
|
|
136
|
+
"include_status_counts": payload.include_status_counts,
|
|
131
137
|
"items_per_page": payload.items_per_page,
|
|
132
138
|
"page": payload.page,
|
|
133
139
|
"search_like": payload.search_like,
|
package/src/index.extras.ts
CHANGED
|
@@ -43,6 +43,8 @@ import { notifyVendorCredentialFileUploaded } from "./admin-funcs/notifyVendorCr
|
|
|
43
43
|
import { vendorCredentialGetFormLineItems } from "./admin-funcs/vendorCredentialGetFormLineItems.js";
|
|
44
44
|
import { vendorCredentialCreateFormQuote } from "./admin-funcs/vendorCredentialCreateFormQuote.js";
|
|
45
45
|
import { companyManagerGetPaymentForm } from "./admin-funcs/companyManagerGetPaymentForm.js";
|
|
46
|
+
import { companyManagerGetAutopay } from "./admin-funcs/companyManagerGetAutopay.js";
|
|
47
|
+
import { companyManagerUpdateAutopay } from "./admin-funcs/companyManagerUpdateAutopay.js";
|
|
46
48
|
import { vendorGetPaymentForm } from "./admin-funcs/vendorGetPaymentForm.js";
|
|
47
49
|
import { vendorGetSystemsRequiringSmartBadge } from "./admin-funcs/vendorGetSystemsRequiringSmartBadge.js";
|
|
48
50
|
import { vendorGetCompanyCredentialsSummary } from "./admin-funcs/vendorGetCompanyCredentialsSummary.js";
|
|
@@ -161,6 +163,8 @@ export const __internal = {
|
|
|
161
163
|
|
|
162
164
|
companyManager: {
|
|
163
165
|
getPaymentForm: companyManagerGetPaymentForm,
|
|
166
|
+
getAutopay: companyManagerGetAutopay,
|
|
167
|
+
updateAutopay: companyManagerUpdateAutopay,
|
|
164
168
|
},
|
|
165
169
|
|
|
166
170
|
vendor: {
|
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.47.0
|
|
82
|
+
openapiDocVersion: "0.47.0",
|
|
83
|
+
sdkVersion: "0.47.0",
|
|
84
84
|
genVersion: "2.948.4",
|
|
85
85
|
userAgent:
|
|
86
|
-
"speakeasy-sdk/typescript 0.47.0
|
|
86
|
+
"speakeasy-sdk/typescript 0.47.0 2.948.4 0.47.0 @greensecurity/javascript-sdk",
|
|
87
87
|
} as const;
|
|
@@ -19,6 +19,8 @@ export const Expand = {
|
|
|
19
19
|
VendorTargetFacilityFacility: "vendor_target_facility.facility",
|
|
20
20
|
VendorTargetFacilityHasScreeningResponses:
|
|
21
21
|
"vendor_target_facility.has_screening_responses",
|
|
22
|
+
VendorTargetFacilityExpiringCredentialCount:
|
|
23
|
+
"vendor_target_facility.expiring_credential_count",
|
|
22
24
|
ContactFacility: "contact.facility",
|
|
23
25
|
ContactSystem: "contact.system",
|
|
24
26
|
ContactDepartment: "contact.department",
|
|
@@ -177,6 +177,7 @@ export * from "./vendorscrubdetails.js";
|
|
|
177
177
|
export * from "./vendorscrubpurchase.js";
|
|
178
178
|
export * from "./vendortargetfacility.js";
|
|
179
179
|
export * from "./vendortargetfacilityscreeningresponse.js";
|
|
180
|
+
export * from "./vendortargetfacilitystatuscounts.js";
|
|
180
181
|
export * from "./vendortype.js";
|
|
181
182
|
export * from "./visitorcheckin.js";
|
|
182
183
|
export * from "./webhookconsumers.js";
|
|
@@ -37,14 +37,14 @@ export type VendorPaymentResponsibilityAssignments = {
|
|
|
37
37
|
*/
|
|
38
38
|
credentialingSubscriptionUserId?: number | null | undefined;
|
|
39
39
|
/**
|
|
40
|
-
* User ID responsible for
|
|
40
|
+
* User ID responsible for Badges payments (a vendor's first hard badge).
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
43
|
* `null` means the vendor is responsible.
|
|
44
44
|
*/
|
|
45
45
|
hardBadgeInitialUserId?: number | null | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* User ID responsible for
|
|
47
|
+
* User ID responsible for Replacement Badges payments (any hard badge after the first).
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
50
|
* `null` means the vendor is responsible.
|
|
@@ -40,6 +40,10 @@ export type VendorTargetFacility = {
|
|
|
40
40
|
* Whether the vendor has answered at least one target-facility screening question for this facility. Present only when you pass `vendor_target_facility.has_screening_responses` to `expand`. Combined with `questions_answered` it distinguishes "View" (answered some) from "None" (no questions answered) in the individual's subscription view.
|
|
41
41
|
*/
|
|
42
42
|
hasScreeningResponses?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* How many credentials the facility requires from the vendor have an approved version that expires within 30 days, with no newer version approved or waiting for approval. Company-owned credentials are left out when the caller is a vendor whose company has company managers. Present only when you pass `vendor_target_facility.expiring_credential_count` to `expand`.
|
|
45
|
+
*/
|
|
46
|
+
expiringCredentialCount?: number | undefined;
|
|
43
47
|
/**
|
|
44
48
|
* The date and time the target facility was added to the vendor, in ISO 8601 format, or `null` if not available.
|
|
45
49
|
*/
|
|
@@ -76,11 +80,13 @@ export const VendorTargetFacility$inboundSchema: z.ZodType<
|
|
|
76
80
|
status: types.nullable(types.string()),
|
|
77
81
|
questions_answered: types.nullable(types.boolean()),
|
|
78
82
|
has_screening_responses: types.optional(types.boolean()),
|
|
83
|
+
expiring_credential_count: types.optional(types.number()),
|
|
79
84
|
date_created: z.nullable(types.date()).optional(),
|
|
80
85
|
}).transform((v) => {
|
|
81
86
|
return remap$(v, {
|
|
82
87
|
"questions_answered": "questionsAnswered",
|
|
83
88
|
"has_screening_responses": "hasScreeningResponses",
|
|
89
|
+
"expiring_credential_count": "expiringCredentialCount",
|
|
84
90
|
"date_created": "dateCreated",
|
|
85
91
|
});
|
|
86
92
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* How many of a vendor's target facility rows are approved and not approved. Returned when you pass `include_status_counts=true`.
|
|
14
|
+
*/
|
|
15
|
+
export type VendorTargetFacilityStatusCounts = {
|
|
16
|
+
/**
|
|
17
|
+
* Rows with the `Approved` status.
|
|
18
|
+
*/
|
|
19
|
+
approved: number;
|
|
20
|
+
/**
|
|
21
|
+
* Rows with any other status, including no status.
|
|
22
|
+
*/
|
|
23
|
+
notApproved: number;
|
|
24
|
+
/**
|
|
25
|
+
* All rows the counts cover.
|
|
26
|
+
*/
|
|
27
|
+
total: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const VendorTargetFacilityStatusCounts$inboundSchema: z.ZodType<
|
|
32
|
+
VendorTargetFacilityStatusCounts,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
approved: types.number(),
|
|
37
|
+
not_approved: types.number(),
|
|
38
|
+
total: types.number(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"not_approved": "notApproved",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function vendorTargetFacilityStatusCountsFromJSON(
|
|
46
|
+
jsonString: string,
|
|
47
|
+
): SafeParseResult<VendorTargetFacilityStatusCounts, SDKValidationError> {
|
|
48
|
+
return safeParse(
|
|
49
|
+
jsonString,
|
|
50
|
+
(x) => VendorTargetFacilityStatusCounts$inboundSchema.parse(JSON.parse(x)),
|
|
51
|
+
`Failed to parse 'VendorTargetFacilityStatusCounts' from JSON`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -7,26 +7,52 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
10
11
|
import * as components from "../components/index.js";
|
|
11
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* Filters to target facilities with this status.
|
|
15
|
+
* Filters to target facilities with this status. `not_approved` matches every status other than `Approved`, including no status.
|
|
15
16
|
*/
|
|
16
17
|
export const GetVendorTargetFacilitiesQueryParamStatus = {
|
|
17
18
|
Pending: "pending",
|
|
18
19
|
Approved: "approved",
|
|
19
20
|
Denied: "denied",
|
|
21
|
+
NotApproved: "not_approved",
|
|
20
22
|
} as const;
|
|
21
23
|
/**
|
|
22
|
-
* Filters to target facilities with this status.
|
|
24
|
+
* Filters to target facilities with this status. `not_approved` matches every status other than `Approved`, including no status.
|
|
23
25
|
*/
|
|
24
26
|
export type GetVendorTargetFacilitiesQueryParamStatus = ClosedEnum<
|
|
25
27
|
typeof GetVendorTargetFacilitiesQueryParamStatus
|
|
26
28
|
>;
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
31
|
+
* When `true`, leaves out target facilities whose facility is not active.
|
|
32
|
+
*/
|
|
33
|
+
export const ActiveFacilitiesOnly = {
|
|
34
|
+
True: "true",
|
|
35
|
+
False: "false",
|
|
36
|
+
} as const;
|
|
37
|
+
/**
|
|
38
|
+
* When `true`, leaves out target facilities whose facility is not active.
|
|
39
|
+
*/
|
|
40
|
+
export type ActiveFacilitiesOnly = ClosedEnum<typeof ActiveFacilitiesOnly>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* When `true`, the response also includes `status_counts`.
|
|
44
|
+
*/
|
|
45
|
+
export const IncludeStatusCounts = {
|
|
46
|
+
True: "true",
|
|
47
|
+
False: "false",
|
|
48
|
+
} as const;
|
|
49
|
+
/**
|
|
50
|
+
* When `true`, the response also includes `status_counts`.
|
|
51
|
+
*/
|
|
52
|
+
export type IncludeStatusCounts = ClosedEnum<typeof IncludeStatusCounts>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The field to sort results by. Defaults to `facility_name`. `not_approved_first` lists the systems with the most rows that are not approved first, then by system name; within a system it puts the rows that are not approved first, then sorts by facility name. `not_approved_first` ignores `desc`.
|
|
30
56
|
*/
|
|
31
57
|
export const GetVendorTargetFacilitiesQueryParamSort = {
|
|
32
58
|
FacilityName: "facility_name",
|
|
@@ -34,9 +60,10 @@ export const GetVendorTargetFacilitiesQueryParamSort = {
|
|
|
34
60
|
Status: "status",
|
|
35
61
|
QuestionsAnswered: "questions_answered",
|
|
36
62
|
DateCreated: "date_created",
|
|
63
|
+
NotApprovedFirst: "not_approved_first",
|
|
37
64
|
} as const;
|
|
38
65
|
/**
|
|
39
|
-
* The field to sort results by. Defaults to `facility_name`.
|
|
66
|
+
* The field to sort results by. Defaults to `facility_name`. `not_approved_first` lists the systems with the most rows that are not approved first, then by system name; within a system it puts the rows that are not approved first, then sorts by facility name. `not_approved_first` ignores `desc`.
|
|
40
67
|
*/
|
|
41
68
|
export type GetVendorTargetFacilitiesQueryParamSort = ClosedEnum<
|
|
42
69
|
typeof GetVendorTargetFacilitiesQueryParamSort
|
|
@@ -62,13 +89,25 @@ export type GetVendorTargetFacilitiesRequest = {
|
|
|
62
89
|
*/
|
|
63
90
|
systemNameLike?: string | undefined;
|
|
64
91
|
/**
|
|
65
|
-
* Search across facility name and system name.
|
|
92
|
+
* Search across facility name, street address, city, state (code or full name), ZIP code, and system name.
|
|
66
93
|
*/
|
|
67
94
|
searchLike?: string | undefined;
|
|
68
95
|
/**
|
|
69
|
-
* Filters to target facilities with this status.
|
|
96
|
+
* Filters to target facilities with this status. `not_approved` matches every status other than `Approved`, including no status.
|
|
70
97
|
*/
|
|
71
98
|
status?: GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Filters to the target facility row of this facility.
|
|
101
|
+
*/
|
|
102
|
+
facilityId?: number | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* When `true`, leaves out target facilities whose facility is not active.
|
|
105
|
+
*/
|
|
106
|
+
activeFacilitiesOnly?: ActiveFacilitiesOnly | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* When `true`, the response also includes `status_counts`.
|
|
109
|
+
*/
|
|
110
|
+
includeStatusCounts?: IncludeStatusCounts | undefined;
|
|
72
111
|
/**
|
|
73
112
|
* The page number of results to return, starting at 1.
|
|
74
113
|
*/
|
|
@@ -78,7 +117,7 @@ export type GetVendorTargetFacilitiesRequest = {
|
|
|
78
117
|
*/
|
|
79
118
|
itemsPerPage?: number | undefined;
|
|
80
119
|
/**
|
|
81
|
-
* The field to sort results by. Defaults to `facility_name`.
|
|
120
|
+
* The field to sort results by. Defaults to `facility_name`. `not_approved_first` lists the systems with the most rows that are not approved first, then by system name; within a system it puts the rows that are not approved first, then sorts by facility name. `not_approved_first` ignores `desc`.
|
|
82
121
|
*/
|
|
83
122
|
sort?: GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
84
123
|
/**
|
|
@@ -100,6 +139,10 @@ export type GetVendorTargetFacilitiesGetVendorTargetFacilitiesOk = {
|
|
|
100
139
|
*/
|
|
101
140
|
pager: components.Pager;
|
|
102
141
|
items: Array<components.VendorTargetFacility>;
|
|
142
|
+
/**
|
|
143
|
+
* How many of a vendor's target facility rows are approved and not approved. Returned when you pass `include_status_counts=true`.
|
|
144
|
+
*/
|
|
145
|
+
statusCounts?: components.VendorTargetFacilityStatusCounts | undefined;
|
|
103
146
|
};
|
|
104
147
|
|
|
105
148
|
export type GetVendorTargetFacilitiesResponse = {
|
|
@@ -111,6 +154,16 @@ export const GetVendorTargetFacilitiesQueryParamStatus$outboundSchema:
|
|
|
111
154
|
z.ZodNativeEnum<typeof GetVendorTargetFacilitiesQueryParamStatus> = z
|
|
112
155
|
.nativeEnum(GetVendorTargetFacilitiesQueryParamStatus);
|
|
113
156
|
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const ActiveFacilitiesOnly$outboundSchema: z.ZodNativeEnum<
|
|
159
|
+
typeof ActiveFacilitiesOnly
|
|
160
|
+
> = z.nativeEnum(ActiveFacilitiesOnly);
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const IncludeStatusCounts$outboundSchema: z.ZodNativeEnum<
|
|
164
|
+
typeof IncludeStatusCounts
|
|
165
|
+
> = z.nativeEnum(IncludeStatusCounts);
|
|
166
|
+
|
|
114
167
|
/** @internal */
|
|
115
168
|
export const GetVendorTargetFacilitiesQueryParamSort$outboundSchema:
|
|
116
169
|
z.ZodNativeEnum<typeof GetVendorTargetFacilitiesQueryParamSort> = z
|
|
@@ -123,6 +176,9 @@ export type GetVendorTargetFacilitiesRequest$Outbound = {
|
|
|
123
176
|
system_name_like?: string | undefined;
|
|
124
177
|
search_like?: string | undefined;
|
|
125
178
|
status?: string | undefined;
|
|
179
|
+
facility_id?: number | undefined;
|
|
180
|
+
active_facilities_only?: string | undefined;
|
|
181
|
+
include_status_counts?: string | undefined;
|
|
126
182
|
page?: number | undefined;
|
|
127
183
|
items_per_page?: number | undefined;
|
|
128
184
|
sort?: string | undefined;
|
|
@@ -141,6 +197,9 @@ export const GetVendorTargetFacilitiesRequest$outboundSchema: z.ZodType<
|
|
|
141
197
|
systemNameLike: z.string().optional(),
|
|
142
198
|
searchLike: z.string().optional(),
|
|
143
199
|
status: GetVendorTargetFacilitiesQueryParamStatus$outboundSchema.optional(),
|
|
200
|
+
facilityId: z.number().int().optional(),
|
|
201
|
+
activeFacilitiesOnly: ActiveFacilitiesOnly$outboundSchema.optional(),
|
|
202
|
+
includeStatusCounts: IncludeStatusCounts$outboundSchema.optional(),
|
|
144
203
|
page: z.number().int().optional(),
|
|
145
204
|
itemsPerPage: z.number().int().optional(),
|
|
146
205
|
sort: GetVendorTargetFacilitiesQueryParamSort$outboundSchema.optional(),
|
|
@@ -152,6 +211,9 @@ export const GetVendorTargetFacilitiesRequest$outboundSchema: z.ZodType<
|
|
|
152
211
|
facilityNameLike: "facility_name_like",
|
|
153
212
|
systemNameLike: "system_name_like",
|
|
154
213
|
searchLike: "search_like",
|
|
214
|
+
facilityId: "facility_id",
|
|
215
|
+
activeFacilitiesOnly: "active_facilities_only",
|
|
216
|
+
includeStatusCounts: "include_status_counts",
|
|
155
217
|
itemsPerPage: "items_per_page",
|
|
156
218
|
});
|
|
157
219
|
});
|
|
@@ -175,6 +237,13 @@ export const GetVendorTargetFacilitiesGetVendorTargetFacilitiesOk$inboundSchema:
|
|
|
175
237
|
> = z.object({
|
|
176
238
|
pager: components.Pager$inboundSchema,
|
|
177
239
|
items: z.array(components.VendorTargetFacility$inboundSchema),
|
|
240
|
+
status_counts: types.optional(
|
|
241
|
+
components.VendorTargetFacilityStatusCounts$inboundSchema,
|
|
242
|
+
),
|
|
243
|
+
}).transform((v) => {
|
|
244
|
+
return remap$(v, {
|
|
245
|
+
"status_counts": "statusCounts",
|
|
246
|
+
});
|
|
178
247
|
});
|
|
179
248
|
|
|
180
249
|
export function getVendorTargetFacilitiesGetVendorTargetFacilitiesOkFromJSON(
|
|
@@ -19,11 +19,11 @@ export type UpdateVendorPaymentResponsibilityRequestBody = {
|
|
|
19
19
|
*/
|
|
20
20
|
credentialingSubscriptionUserId?: number | null | undefined;
|
|
21
21
|
/**
|
|
22
|
-
* User ID responsible for
|
|
22
|
+
* User ID responsible for Badges payments (a vendor's first hard badge). Pass `null` to reset responsibility to the vendor.
|
|
23
23
|
*/
|
|
24
24
|
hardBadgeInitialUserId?: number | null | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* User ID responsible for
|
|
26
|
+
* User ID responsible for Replacement Badges payments (any hard badge after the first). Pass `null` to reset responsibility to the vendor.
|
|
27
27
|
*/
|
|
28
28
|
hardBadgeExtraUserId?: number | null | undefined;
|
|
29
29
|
/**
|
|
@@ -79,6 +79,9 @@ export function buildVendorsGetVendorTargetFacilitiesQuery(
|
|
|
79
79
|
systemNameLike: request.systemNameLike,
|
|
80
80
|
searchLike: request.searchLike,
|
|
81
81
|
status: request.status,
|
|
82
|
+
facilityId: request.facilityId,
|
|
83
|
+
activeFacilitiesOnly: request.activeFacilitiesOnly,
|
|
84
|
+
includeStatusCounts: request.includeStatusCounts,
|
|
82
85
|
page: request.page,
|
|
83
86
|
itemsPerPage: request.itemsPerPage,
|
|
84
87
|
sort: request.sort,
|
|
@@ -129,6 +132,9 @@ export function buildVendorsGetVendorTargetFacilitiesInfiniteQuery(
|
|
|
129
132
|
systemNameLike: request.systemNameLike,
|
|
130
133
|
searchLike: request.searchLike,
|
|
131
134
|
status: request.status,
|
|
135
|
+
facilityId: request.facilityId,
|
|
136
|
+
activeFacilitiesOnly: request.activeFacilitiesOnly,
|
|
137
|
+
includeStatusCounts: request.includeStatusCounts,
|
|
132
138
|
page: request.page,
|
|
133
139
|
itemsPerPage: request.itemsPerPage,
|
|
134
140
|
sort: request.sort,
|
|
@@ -177,6 +183,9 @@ export function queryKeyVendorsGetVendorTargetFacilities(
|
|
|
177
183
|
systemNameLike?: string | undefined;
|
|
178
184
|
searchLike?: string | undefined;
|
|
179
185
|
status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
186
|
+
facilityId?: number | undefined;
|
|
187
|
+
activeFacilitiesOnly?: operations.ActiveFacilitiesOnly | undefined;
|
|
188
|
+
includeStatusCounts?: operations.IncludeStatusCounts | undefined;
|
|
180
189
|
page?: number | undefined;
|
|
181
190
|
itemsPerPage?: number | undefined;
|
|
182
191
|
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
@@ -200,6 +209,9 @@ export function queryKeyVendorsGetVendorTargetFacilitiesInfinite(
|
|
|
200
209
|
systemNameLike?: string | undefined;
|
|
201
210
|
searchLike?: string | undefined;
|
|
202
211
|
status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
212
|
+
facilityId?: number | undefined;
|
|
213
|
+
activeFacilitiesOnly?: operations.ActiveFacilitiesOnly | undefined;
|
|
214
|
+
includeStatusCounts?: operations.IncludeStatusCounts | undefined;
|
|
203
215
|
page?: number | undefined;
|
|
204
216
|
itemsPerPage?: number | undefined;
|
|
205
217
|
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
@@ -83,8 +83,11 @@ export type VendorsGetVendorTargetFacilitiesQueryError =
|
|
|
83
83
|
*
|
|
84
84
|
* - `vendor_target_facility.facility`
|
|
85
85
|
* - `vendor_target_facility.has_screening_responses`
|
|
86
|
+
* - `vendor_target_facility.expiring_credential_count`
|
|
86
87
|
*
|
|
87
88
|
* The endpoint rejects any other value with `422 Unprocessable Entity`.
|
|
89
|
+
*
|
|
90
|
+
* Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
|
|
88
91
|
*/
|
|
89
92
|
export function useVendorsGetVendorTargetFacilities(
|
|
90
93
|
request: operations.GetVendorTargetFacilitiesRequest,
|
|
@@ -119,8 +122,11 @@ export function useVendorsGetVendorTargetFacilities(
|
|
|
119
122
|
*
|
|
120
123
|
* - `vendor_target_facility.facility`
|
|
121
124
|
* - `vendor_target_facility.has_screening_responses`
|
|
125
|
+
* - `vendor_target_facility.expiring_credential_count`
|
|
122
126
|
*
|
|
123
127
|
* The endpoint rejects any other value with `422 Unprocessable Entity`.
|
|
128
|
+
*
|
|
129
|
+
* Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
|
|
124
130
|
*/
|
|
125
131
|
export function useVendorsGetVendorTargetFacilitiesSuspense(
|
|
126
132
|
request: operations.GetVendorTargetFacilitiesRequest,
|
|
@@ -155,8 +161,11 @@ export function useVendorsGetVendorTargetFacilitiesSuspense(
|
|
|
155
161
|
*
|
|
156
162
|
* - `vendor_target_facility.facility`
|
|
157
163
|
* - `vendor_target_facility.has_screening_responses`
|
|
164
|
+
* - `vendor_target_facility.expiring_credential_count`
|
|
158
165
|
*
|
|
159
166
|
* The endpoint rejects any other value with `422 Unprocessable Entity`.
|
|
167
|
+
*
|
|
168
|
+
* Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
|
|
160
169
|
*/
|
|
161
170
|
export function useVendorsGetVendorTargetFacilitiesInfinite(
|
|
162
171
|
request: operations.GetVendorTargetFacilitiesRequest,
|
|
@@ -205,8 +214,11 @@ export function useVendorsGetVendorTargetFacilitiesInfinite(
|
|
|
205
214
|
*
|
|
206
215
|
* - `vendor_target_facility.facility`
|
|
207
216
|
* - `vendor_target_facility.has_screening_responses`
|
|
217
|
+
* - `vendor_target_facility.expiring_credential_count`
|
|
208
218
|
*
|
|
209
219
|
* The endpoint rejects any other value with `422 Unprocessable Entity`.
|
|
220
|
+
*
|
|
221
|
+
* Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
|
|
210
222
|
*/
|
|
211
223
|
export function useVendorsGetVendorTargetFacilitiesInfiniteSuspense(
|
|
212
224
|
request: operations.GetVendorTargetFacilitiesRequest,
|
|
@@ -252,6 +264,9 @@ export function setVendorsGetVendorTargetFacilitiesData(
|
|
|
252
264
|
systemNameLike?: string | undefined;
|
|
253
265
|
searchLike?: string | undefined;
|
|
254
266
|
status?: operations.GetVendorTargetFacilitiesQueryParamStatus | undefined;
|
|
267
|
+
facilityId?: number | undefined;
|
|
268
|
+
activeFacilitiesOnly?: operations.ActiveFacilitiesOnly | undefined;
|
|
269
|
+
includeStatusCounts?: operations.IncludeStatusCounts | undefined;
|
|
255
270
|
page?: number | undefined;
|
|
256
271
|
itemsPerPage?: number | undefined;
|
|
257
272
|
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
|
@@ -281,6 +296,9 @@ export function invalidateVendorsGetVendorTargetFacilities(
|
|
|
281
296
|
status?:
|
|
282
297
|
| operations.GetVendorTargetFacilitiesQueryParamStatus
|
|
283
298
|
| undefined;
|
|
299
|
+
facilityId?: number | undefined;
|
|
300
|
+
activeFacilitiesOnly?: operations.ActiveFacilitiesOnly | undefined;
|
|
301
|
+
includeStatusCounts?: operations.IncludeStatusCounts | undefined;
|
|
284
302
|
page?: number | undefined;
|
|
285
303
|
itemsPerPage?: number | undefined;
|
|
286
304
|
sort?: operations.GetVendorTargetFacilitiesQueryParamSort | undefined;
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -1503,8 +1503,11 @@ export class Vendors extends ClientSDK {
|
|
|
1503
1503
|
*
|
|
1504
1504
|
* - `vendor_target_facility.facility`
|
|
1505
1505
|
* - `vendor_target_facility.has_screening_responses`
|
|
1506
|
+
* - `vendor_target_facility.expiring_credential_count`
|
|
1506
1507
|
*
|
|
1507
1508
|
* The endpoint rejects any other value with `422 Unprocessable Entity`.
|
|
1509
|
+
*
|
|
1510
|
+
* Pass `include_status_counts=true` to also receive `status_counts`, the number of approved and not approved rows. The counts honor `active_facilities_only` and `facility_id`, and ignore the search, name, and status filters.
|
|
1508
1511
|
*/
|
|
1509
1512
|
async getVendorTargetFacilities(
|
|
1510
1513
|
request: operations.GetVendorTargetFacilitiesRequest,
|