@greensecurity/javascript-sdk 0.43.1-beta.112 → 0.43.1-beta.115
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 +6 -0
- package/dist/commonjs/__tests__/invoices.test.js +21 -0
- package/dist/commonjs/__tests__/invoices.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +17 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +32 -15
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/invoicesGetInvoice.d.ts +25 -0
- package/dist/commonjs/funcs/invoicesGetInvoice.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesGetInvoice.js +133 -0
- package/dist/commonjs/funcs/invoicesGetInvoice.js.map +1 -0
- package/dist/commonjs/funcs/vendorsCancelHandoff.d.ts +20 -0
- package/dist/commonjs/funcs/vendorsCancelHandoff.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsCancelHandoff.js +119 -0
- package/dist/commonjs/funcs/vendorsCancelHandoff.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/alert.d.ts +0 -1
- package/dist/commonjs/models/components/alert.d.ts.map +1 -1
- package/dist/commonjs/models/components/alert.js +0 -2
- package/dist/commonjs/models/components/alert.js.map +1 -1
- package/dist/commonjs/models/operations/cancelhandoff.d.ts +23 -0
- package/dist/commonjs/models/operations/cancelhandoff.d.ts.map +1 -0
- package/dist/commonjs/models/operations/cancelhandoff.js +64 -0
- package/dist/commonjs/models/operations/cancelhandoff.js.map +1 -0
- package/dist/commonjs/models/operations/getinvoice.d.ts +75 -0
- package/dist/commonjs/models/operations/getinvoice.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getinvoice.js +93 -0
- package/dist/commonjs/models/operations/getinvoice.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/invoicesGetInvoice.core.d.ts +20 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.core.js +46 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.core.js.map +1 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.d.ts +55 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.js +73 -0
- package/dist/commonjs/react-query/invoicesGetInvoice.js.map +1 -0
- package/dist/commonjs/react-query/vendorsCancelHandoff.d.ts +29 -0
- package/dist/commonjs/react-query/vendorsCancelHandoff.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsCancelHandoff.js +47 -0
- package/dist/commonjs/react-query/vendorsCancelHandoff.js.map +1 -0
- package/dist/commonjs/sdk/invoices.d.ts +12 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +14 -0
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +7 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +10 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/invoices.test.js +21 -0
- package/dist/esm/__tests__/invoices.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +17 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +32 -15
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/invoicesGetInvoice.d.ts +25 -0
- package/dist/esm/funcs/invoicesGetInvoice.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesGetInvoice.js +97 -0
- package/dist/esm/funcs/invoicesGetInvoice.js.map +1 -0
- package/dist/esm/funcs/vendorsCancelHandoff.d.ts +20 -0
- package/dist/esm/funcs/vendorsCancelHandoff.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsCancelHandoff.js +83 -0
- package/dist/esm/funcs/vendorsCancelHandoff.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/alert.d.ts +0 -1
- package/dist/esm/models/components/alert.d.ts.map +1 -1
- package/dist/esm/models/components/alert.js +0 -2
- package/dist/esm/models/components/alert.js.map +1 -1
- package/dist/esm/models/operations/cancelhandoff.d.ts +23 -0
- package/dist/esm/models/operations/cancelhandoff.d.ts.map +1 -0
- package/dist/esm/models/operations/cancelhandoff.js +26 -0
- package/dist/esm/models/operations/cancelhandoff.js.map +1 -0
- package/dist/esm/models/operations/getinvoice.d.ts +75 -0
- package/dist/esm/models/operations/getinvoice.d.ts.map +1 -0
- package/dist/esm/models/operations/getinvoice.js +56 -0
- package/dist/esm/models/operations/getinvoice.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/invoicesGetInvoice.core.d.ts +20 -0
- package/dist/esm/react-query/invoicesGetInvoice.core.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesGetInvoice.core.js +41 -0
- package/dist/esm/react-query/invoicesGetInvoice.core.js.map +1 -0
- package/dist/esm/react-query/invoicesGetInvoice.d.ts +55 -0
- package/dist/esm/react-query/invoicesGetInvoice.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesGetInvoice.js +63 -0
- package/dist/esm/react-query/invoicesGetInvoice.js.map +1 -0
- package/dist/esm/react-query/vendorsCancelHandoff.d.ts +29 -0
- package/dist/esm/react-query/vendorsCancelHandoff.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsCancelHandoff.js +42 -0
- package/dist/esm/react-query/vendorsCancelHandoff.js.map +1 -0
- package/dist/esm/sdk/invoices.d.ts +12 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +14 -0
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +7 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +10 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/invoices.test.ts +24 -0
- package/src/__tests__/vendors.test.ts +20 -0
- package/src/__tests__/zones.test.ts +32 -15
- package/src/funcs/invoicesGetInvoice.ts +188 -0
- package/src/funcs/vendorsCancelHandoff.ts +170 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/alert.ts +0 -3
- package/src/models/operations/cancelhandoff.ts +66 -0
- package/src/models/operations/getinvoice.ts +115 -0
- package/src/models/operations/index.ts +2 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/invoicesGetInvoice.core.ts +92 -0
- package/src/react-query/invoicesGetInvoice.ts +166 -0
- package/src/react-query/vendorsCancelHandoff.ts +111 -0
- package/src/sdk/invoices.ts +23 -0
- package/src/sdk/vendors.ts +18 -0
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
export type CancelHandoffRequestBody = {
|
|
13
|
+
qrCode: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The request was successful.
|
|
18
|
+
*/
|
|
19
|
+
export type CancelHandoffVendorCancelOk = {
|
|
20
|
+
success: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type CancelHandoffRequestBody$Outbound = {
|
|
25
|
+
qr_code: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CancelHandoffRequestBody$outboundSchema: z.ZodType<
|
|
30
|
+
CancelHandoffRequestBody$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
CancelHandoffRequestBody
|
|
33
|
+
> = z.object({
|
|
34
|
+
qrCode: z.string(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
qrCode: "qr_code",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function cancelHandoffRequestBodyToJSON(
|
|
42
|
+
cancelHandoffRequestBody: CancelHandoffRequestBody,
|
|
43
|
+
): string {
|
|
44
|
+
return JSON.stringify(
|
|
45
|
+
CancelHandoffRequestBody$outboundSchema.parse(cancelHandoffRequestBody),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CancelHandoffVendorCancelOk$inboundSchema: z.ZodType<
|
|
51
|
+
CancelHandoffVendorCancelOk,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
success: types.boolean(),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export function cancelHandoffVendorCancelOkFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<CancelHandoffVendorCancelOk, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => CancelHandoffVendorCancelOk$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'CancelHandoffVendorCancelOk' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const QueryParamStatus = {
|
|
10
|
+
Pending: "pending",
|
|
11
|
+
Authorized: "authorized",
|
|
12
|
+
Captured: "captured",
|
|
13
|
+
Refunded: "refunded",
|
|
14
|
+
RefundedToCredits: "refunded to credits",
|
|
15
|
+
Voided: "voided",
|
|
16
|
+
Waived: "waived",
|
|
17
|
+
Overdue: "overdue",
|
|
18
|
+
Paid: "paid",
|
|
19
|
+
Unpaid: "unpaid",
|
|
20
|
+
PaidByCredits: "paid by credits",
|
|
21
|
+
PaidByCreditCard: "paid by credit card",
|
|
22
|
+
PaidByCheck: "paid by check",
|
|
23
|
+
PaidByShareback: "paid by shareback",
|
|
24
|
+
PaidByPo: "paid by po",
|
|
25
|
+
PaidByOtherMeans: "paid by other means",
|
|
26
|
+
Credited: "credited",
|
|
27
|
+
} as const;
|
|
28
|
+
export type QueryParamStatus = ClosedEnum<typeof QueryParamStatus>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* When set to `credentialing`, only invoices with a credentialing product line item are considered.
|
|
32
|
+
*/
|
|
33
|
+
export const ProductType = {
|
|
34
|
+
Credentialing: "credentialing",
|
|
35
|
+
} as const;
|
|
36
|
+
/**
|
|
37
|
+
* When set to `credentialing`, only invoices with a credentialing product line item are considered.
|
|
38
|
+
*/
|
|
39
|
+
export type ProductType = ClosedEnum<typeof ProductType>;
|
|
40
|
+
|
|
41
|
+
export type GetInvoiceRequest = {
|
|
42
|
+
/**
|
|
43
|
+
* Comma-separated list of invoice financial statuses to match.
|
|
44
|
+
*/
|
|
45
|
+
status: Array<QueryParamStatus>;
|
|
46
|
+
/**
|
|
47
|
+
* When set to `credentialing`, only invoices with a credentialing product line item are considered.
|
|
48
|
+
*/
|
|
49
|
+
productType?: ProductType | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Scope to a specific vendor ID. Use `me` for the authenticated vendor. Cannot be combined with `company_id`, `facility_id`, or `system_id`.
|
|
52
|
+
*/
|
|
53
|
+
vendorId?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Scope to a specific authorized company ID. Cannot be combined with `vendor_id`, `facility_id`, or `system_id`.
|
|
56
|
+
*/
|
|
57
|
+
companyId?: number | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Scope to a specific authorized facility ID. Cannot be combined with `vendor_id`, `company_id`, or `system_id`.
|
|
60
|
+
*/
|
|
61
|
+
facilityId?: number | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Scope to a specific authorized system ID. Cannot be combined with `vendor_id`, `company_id`, or `facility_id`.
|
|
64
|
+
*/
|
|
65
|
+
systemId?: number | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const QueryParamStatus$outboundSchema: z.ZodNativeEnum<
|
|
70
|
+
typeof QueryParamStatus
|
|
71
|
+
> = z.nativeEnum(QueryParamStatus);
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const ProductType$outboundSchema: z.ZodNativeEnum<typeof ProductType> = z
|
|
75
|
+
.nativeEnum(ProductType);
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export type GetInvoiceRequest$Outbound = {
|
|
79
|
+
status: Array<string>;
|
|
80
|
+
product_type?: string | undefined;
|
|
81
|
+
vendor_id?: string | undefined;
|
|
82
|
+
company_id?: number | undefined;
|
|
83
|
+
facility_id?: number | undefined;
|
|
84
|
+
system_id?: number | undefined;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const GetInvoiceRequest$outboundSchema: z.ZodType<
|
|
89
|
+
GetInvoiceRequest$Outbound,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
GetInvoiceRequest
|
|
92
|
+
> = z.object({
|
|
93
|
+
status: z.array(QueryParamStatus$outboundSchema),
|
|
94
|
+
productType: ProductType$outboundSchema.optional(),
|
|
95
|
+
vendorId: z.string().optional(),
|
|
96
|
+
companyId: z.number().int().optional(),
|
|
97
|
+
facilityId: z.number().int().optional(),
|
|
98
|
+
systemId: z.number().int().optional(),
|
|
99
|
+
}).transform((v) => {
|
|
100
|
+
return remap$(v, {
|
|
101
|
+
productType: "product_type",
|
|
102
|
+
vendorId: "vendor_id",
|
|
103
|
+
companyId: "company_id",
|
|
104
|
+
facilityId: "facility_id",
|
|
105
|
+
systemId: "system_id",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export function getInvoiceRequestToJSON(
|
|
110
|
+
getInvoiceRequest: GetInvoiceRequest,
|
|
111
|
+
): string {
|
|
112
|
+
return JSON.stringify(
|
|
113
|
+
GetInvoiceRequest$outboundSchema.parse(getInvoiceRequest),
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -10,6 +10,7 @@ export * from "./addmobiledevice.js";
|
|
|
10
10
|
export * from "./addvendorcredentialfile.js";
|
|
11
11
|
export * from "./addvendormanagedbycompany.js";
|
|
12
12
|
export * from "./calculatesubscriptionprice.js";
|
|
13
|
+
export * from "./cancelhandoff.js";
|
|
13
14
|
export * from "./changepassword.js";
|
|
14
15
|
export * from "./changesubscription.js";
|
|
15
16
|
export * from "./checkdownloadcode.js";
|
|
@@ -33,6 +34,7 @@ export * from "./getcompany.js";
|
|
|
33
34
|
export * from "./getcurrentuser.js";
|
|
34
35
|
export * from "./getfacility.js";
|
|
35
36
|
export * from "./getfhirconfig.js";
|
|
37
|
+
export * from "./getinvoice.js";
|
|
36
38
|
export * from "./getinvoicesexportstatus.js";
|
|
37
39
|
export * from "./getlinkedusers.js";
|
|
38
40
|
export * from "./getnextscreeningquestion.js";
|
package/src/react-query/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export * from "./fhirConfigsListOfFhirConfigurations.js";
|
|
|
31
31
|
export * from "./fhirConfigsUpdateFhirConfigById.js";
|
|
32
32
|
export * from "./invoicesCreateInvoice.js";
|
|
33
33
|
export * from "./invoicesDownloadInvoicesExport.js";
|
|
34
|
+
export * from "./invoicesGetInvoice.js";
|
|
34
35
|
export * from "./invoicesGetInvoicesExportStatus.js";
|
|
35
36
|
export * from "./invoicesInvoicesExport.js";
|
|
36
37
|
export * from "./invoicesListInvoices.js";
|
|
@@ -61,6 +62,7 @@ export * from "./vendorsAcceptVendorCredential.js";
|
|
|
61
62
|
export * from "./vendorsAddVendorCredentialFile.js";
|
|
62
63
|
export * from "./vendorsAddVendorManagedByCompany.js";
|
|
63
64
|
export * from "./vendorsCalculateSubscriptionPrice.js";
|
|
65
|
+
export * from "./vendorsCancelHandoff.js";
|
|
64
66
|
export * from "./vendorScansGetNextScreeningQuestion.js";
|
|
65
67
|
export * from "./vendorScansSubmitScreeningResponse.js";
|
|
66
68
|
export * from "./vendorScansVendorScanOut.js";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
QueryClient,
|
|
7
|
+
QueryFunctionContext,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { GreenSecurityCore } from "../core.js";
|
|
11
|
+
import { invoicesGetInvoice } from "../funcs/invoicesGetInvoice.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import * as operations from "../models/operations/index.js";
|
|
16
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
17
|
+
export type InvoicesGetInvoiceQueryData = components.Invoice;
|
|
18
|
+
|
|
19
|
+
export function prefetchInvoicesGetInvoice(
|
|
20
|
+
queryClient: QueryClient,
|
|
21
|
+
client$: GreenSecurityCore,
|
|
22
|
+
request: operations.GetInvoiceRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return queryClient.prefetchQuery({
|
|
26
|
+
...buildInvoicesGetInvoiceQuery(
|
|
27
|
+
client$,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function buildInvoicesGetInvoiceQuery(
|
|
35
|
+
client$: GreenSecurityCore,
|
|
36
|
+
request: operations.GetInvoiceRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): {
|
|
39
|
+
queryKey: QueryKey;
|
|
40
|
+
queryFn: (
|
|
41
|
+
context: QueryFunctionContext,
|
|
42
|
+
) => Promise<InvoicesGetInvoiceQueryData>;
|
|
43
|
+
} {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: queryKeyInvoicesGetInvoice({
|
|
46
|
+
status: request.status,
|
|
47
|
+
productType: request.productType,
|
|
48
|
+
vendorId: request.vendorId,
|
|
49
|
+
companyId: request.companyId,
|
|
50
|
+
facilityId: request.facilityId,
|
|
51
|
+
systemId: request.systemId,
|
|
52
|
+
}),
|
|
53
|
+
queryFn: async function invoicesGetInvoiceQueryFn(
|
|
54
|
+
ctx,
|
|
55
|
+
): Promise<InvoicesGetInvoiceQueryData> {
|
|
56
|
+
const sig = combineSignals(
|
|
57
|
+
ctx.signal,
|
|
58
|
+
options?.signal,
|
|
59
|
+
options?.fetchOptions?.signal,
|
|
60
|
+
);
|
|
61
|
+
const mergedOptions = {
|
|
62
|
+
...options?.fetchOptions,
|
|
63
|
+
...options,
|
|
64
|
+
signal: sig,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return unwrapAsync(invoicesGetInvoice(
|
|
68
|
+
client$,
|
|
69
|
+
request,
|
|
70
|
+
mergedOptions,
|
|
71
|
+
));
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function queryKeyInvoicesGetInvoice(
|
|
77
|
+
parameters: {
|
|
78
|
+
status: Array<operations.QueryParamStatus>;
|
|
79
|
+
productType?: operations.ProductType | undefined;
|
|
80
|
+
vendorId?: string | undefined;
|
|
81
|
+
companyId?: number | undefined;
|
|
82
|
+
facilityId?: number | undefined;
|
|
83
|
+
systemId?: number | undefined;
|
|
84
|
+
},
|
|
85
|
+
): QueryKey {
|
|
86
|
+
return [
|
|
87
|
+
"@greensecurity/javascript-sdk",
|
|
88
|
+
"invoices",
|
|
89
|
+
"getInvoice",
|
|
90
|
+
parameters,
|
|
91
|
+
];
|
|
92
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
useQuery,
|
|
9
|
+
UseQueryResult,
|
|
10
|
+
useSuspenseQuery,
|
|
11
|
+
UseSuspenseQueryResult,
|
|
12
|
+
} from "@tanstack/react-query";
|
|
13
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
26
|
+
import {
|
|
27
|
+
QueryHookOptions,
|
|
28
|
+
SuspenseQueryHookOptions,
|
|
29
|
+
TupleToPrefixes,
|
|
30
|
+
} from "./_types.js";
|
|
31
|
+
import {
|
|
32
|
+
buildInvoicesGetInvoiceQuery,
|
|
33
|
+
InvoicesGetInvoiceQueryData,
|
|
34
|
+
prefetchInvoicesGetInvoice,
|
|
35
|
+
queryKeyInvoicesGetInvoice,
|
|
36
|
+
} from "./invoicesGetInvoice.core.js";
|
|
37
|
+
export {
|
|
38
|
+
buildInvoicesGetInvoiceQuery,
|
|
39
|
+
type InvoicesGetInvoiceQueryData,
|
|
40
|
+
prefetchInvoicesGetInvoice,
|
|
41
|
+
queryKeyInvoicesGetInvoice,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type InvoicesGetInvoiceQueryError =
|
|
45
|
+
| errors.ApiErrorResponse
|
|
46
|
+
| GreenSecurityError
|
|
47
|
+
| ResponseValidationError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| InvalidRequestError
|
|
52
|
+
| UnexpectedClientError
|
|
53
|
+
| SDKValidationError;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get a single invoice
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Returns the newest invoice in the caller's authorized scope matching the
|
|
60
|
+
* requested financial statuses. Use `product_type=credentialing` to limit
|
|
61
|
+
* results to invoices that include a credentialing product line item. At
|
|
62
|
+
* most one of `vendor_id`, `company_id`, `facility_id`, or `system_id`
|
|
63
|
+
* may be provided.
|
|
64
|
+
*/
|
|
65
|
+
export function useInvoicesGetInvoice(
|
|
66
|
+
request: operations.GetInvoiceRequest,
|
|
67
|
+
options?: QueryHookOptions<
|
|
68
|
+
InvoicesGetInvoiceQueryData,
|
|
69
|
+
InvoicesGetInvoiceQueryError
|
|
70
|
+
>,
|
|
71
|
+
): UseQueryResult<InvoicesGetInvoiceQueryData, InvoicesGetInvoiceQueryError> {
|
|
72
|
+
const client = useGreenSecurityContext();
|
|
73
|
+
return useQuery({
|
|
74
|
+
...buildInvoicesGetInvoiceQuery(
|
|
75
|
+
client,
|
|
76
|
+
request,
|
|
77
|
+
options,
|
|
78
|
+
),
|
|
79
|
+
...options,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get a single invoice
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* Returns the newest invoice in the caller's authorized scope matching the
|
|
88
|
+
* requested financial statuses. Use `product_type=credentialing` to limit
|
|
89
|
+
* results to invoices that include a credentialing product line item. At
|
|
90
|
+
* most one of `vendor_id`, `company_id`, `facility_id`, or `system_id`
|
|
91
|
+
* may be provided.
|
|
92
|
+
*/
|
|
93
|
+
export function useInvoicesGetInvoiceSuspense(
|
|
94
|
+
request: operations.GetInvoiceRequest,
|
|
95
|
+
options?: SuspenseQueryHookOptions<
|
|
96
|
+
InvoicesGetInvoiceQueryData,
|
|
97
|
+
InvoicesGetInvoiceQueryError
|
|
98
|
+
>,
|
|
99
|
+
): UseSuspenseQueryResult<
|
|
100
|
+
InvoicesGetInvoiceQueryData,
|
|
101
|
+
InvoicesGetInvoiceQueryError
|
|
102
|
+
> {
|
|
103
|
+
const client = useGreenSecurityContext();
|
|
104
|
+
return useSuspenseQuery({
|
|
105
|
+
...buildInvoicesGetInvoiceQuery(
|
|
106
|
+
client,
|
|
107
|
+
request,
|
|
108
|
+
options,
|
|
109
|
+
),
|
|
110
|
+
...options,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function setInvoicesGetInvoiceData(
|
|
115
|
+
client: QueryClient,
|
|
116
|
+
queryKeyBase: [
|
|
117
|
+
parameters: {
|
|
118
|
+
status: Array<operations.QueryParamStatus>;
|
|
119
|
+
productType?: operations.ProductType | undefined;
|
|
120
|
+
vendorId?: string | undefined;
|
|
121
|
+
companyId?: number | undefined;
|
|
122
|
+
facilityId?: number | undefined;
|
|
123
|
+
systemId?: number | undefined;
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
data: InvoicesGetInvoiceQueryData,
|
|
127
|
+
): InvoicesGetInvoiceQueryData | undefined {
|
|
128
|
+
const key = queryKeyInvoicesGetInvoice(...queryKeyBase);
|
|
129
|
+
|
|
130
|
+
return client.setQueryData<InvoicesGetInvoiceQueryData>(key, data);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function invalidateInvoicesGetInvoice(
|
|
134
|
+
client: QueryClient,
|
|
135
|
+
queryKeyBase: TupleToPrefixes<
|
|
136
|
+
[parameters: {
|
|
137
|
+
status: Array<operations.QueryParamStatus>;
|
|
138
|
+
productType?: operations.ProductType | undefined;
|
|
139
|
+
vendorId?: string | undefined;
|
|
140
|
+
companyId?: number | undefined;
|
|
141
|
+
facilityId?: number | undefined;
|
|
142
|
+
systemId?: number | undefined;
|
|
143
|
+
}]
|
|
144
|
+
>,
|
|
145
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
146
|
+
): Promise<void> {
|
|
147
|
+
return client.invalidateQueries({
|
|
148
|
+
...filters,
|
|
149
|
+
queryKey: [
|
|
150
|
+
"@greensecurity/javascript-sdk",
|
|
151
|
+
"invoices",
|
|
152
|
+
"getInvoice",
|
|
153
|
+
...queryKeyBase,
|
|
154
|
+
],
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function invalidateAllInvoicesGetInvoice(
|
|
159
|
+
client: QueryClient,
|
|
160
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
161
|
+
): Promise<void> {
|
|
162
|
+
return client.invalidateQueries({
|
|
163
|
+
...filters,
|
|
164
|
+
queryKey: ["@greensecurity/javascript-sdk", "invoices", "getInvoice"],
|
|
165
|
+
});
|
|
166
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { GreenSecurityCore } from "../core.js";
|
|
11
|
+
import { vendorsCancelHandoff } from "../funcs/vendorsCancelHandoff.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import { GreenSecurityError } from "../models/errors/greensecurityerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
27
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
28
|
+
import { MutationHookOptions } from "./_types.js";
|
|
29
|
+
|
|
30
|
+
export type VendorsCancelHandoffMutationVariables = {
|
|
31
|
+
request: operations.CancelHandoffRequestBody;
|
|
32
|
+
options?: RequestOptions;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type VendorsCancelHandoffMutationData =
|
|
36
|
+
operations.CancelHandoffVendorCancelOk;
|
|
37
|
+
|
|
38
|
+
export type VendorsCancelHandoffMutationError =
|
|
39
|
+
| errors.ApiErrorResponse
|
|
40
|
+
| GreenSecurityError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Cancels an existing handoff
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Cancels an existing handoff with the given QR code.
|
|
54
|
+
*/
|
|
55
|
+
export function useVendorsCancelHandoffMutation(
|
|
56
|
+
options?: MutationHookOptions<
|
|
57
|
+
VendorsCancelHandoffMutationData,
|
|
58
|
+
VendorsCancelHandoffMutationError,
|
|
59
|
+
VendorsCancelHandoffMutationVariables
|
|
60
|
+
>,
|
|
61
|
+
): UseMutationResult<
|
|
62
|
+
VendorsCancelHandoffMutationData,
|
|
63
|
+
VendorsCancelHandoffMutationError,
|
|
64
|
+
VendorsCancelHandoffMutationVariables
|
|
65
|
+
> {
|
|
66
|
+
const client = useGreenSecurityContext();
|
|
67
|
+
return useMutation({
|
|
68
|
+
...buildVendorsCancelHandoffMutation(client, options),
|
|
69
|
+
...options,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function mutationKeyVendorsCancelHandoff(): MutationKey {
|
|
74
|
+
return ["@greensecurity/javascript-sdk", "vendors", "cancelHandoff"];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function buildVendorsCancelHandoffMutation(
|
|
78
|
+
client$: GreenSecurityCore,
|
|
79
|
+
hookOptions?: RequestOptions,
|
|
80
|
+
): {
|
|
81
|
+
mutationKey: MutationKey;
|
|
82
|
+
mutationFn: (
|
|
83
|
+
variables: VendorsCancelHandoffMutationVariables,
|
|
84
|
+
) => Promise<VendorsCancelHandoffMutationData>;
|
|
85
|
+
} {
|
|
86
|
+
return {
|
|
87
|
+
mutationKey: mutationKeyVendorsCancelHandoff(),
|
|
88
|
+
mutationFn: function vendorsCancelHandoffMutationFn({
|
|
89
|
+
request,
|
|
90
|
+
options,
|
|
91
|
+
}): Promise<VendorsCancelHandoffMutationData> {
|
|
92
|
+
const mergedOptions = {
|
|
93
|
+
...hookOptions,
|
|
94
|
+
...options,
|
|
95
|
+
fetchOptions: {
|
|
96
|
+
...hookOptions?.fetchOptions,
|
|
97
|
+
...options?.fetchOptions,
|
|
98
|
+
signal: combineSignals(
|
|
99
|
+
hookOptions?.fetchOptions?.signal,
|
|
100
|
+
options?.fetchOptions?.signal,
|
|
101
|
+
),
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
return unwrapAsync(vendorsCancelHandoff(
|
|
105
|
+
client$,
|
|
106
|
+
request,
|
|
107
|
+
mergedOptions,
|
|
108
|
+
));
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
}
|
package/src/sdk/invoices.ts
CHANGED
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
DownloadInvoicesExportAcceptEnum,
|
|
8
8
|
invoicesDownloadInvoicesExport,
|
|
9
9
|
} from "../funcs/invoicesDownloadInvoicesExport.js";
|
|
10
|
+
import { invoicesGetInvoice } from "../funcs/invoicesGetInvoice.js";
|
|
10
11
|
import { invoicesGetInvoicesExportStatus } from "../funcs/invoicesGetInvoicesExportStatus.js";
|
|
11
12
|
import { invoicesInvoicesExport } from "../funcs/invoicesInvoicesExport.js";
|
|
12
13
|
import { invoicesListInvoices } from "../funcs/invoicesListInvoices.js";
|
|
13
14
|
import { invoicesMakePayment } from "../funcs/invoicesMakePayment.js";
|
|
14
15
|
import { invoicesUpdateInvoice } from "../funcs/invoicesUpdateInvoice.js";
|
|
15
16
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
17
|
+
import * as components from "../models/components/index.js";
|
|
16
18
|
import * as operations from "../models/operations/index.js";
|
|
17
19
|
import { unwrapAsync } from "../types/fp.js";
|
|
18
20
|
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
@@ -20,6 +22,27 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
|
20
22
|
export { DownloadInvoicesExportAcceptEnum } from "../funcs/invoicesDownloadInvoicesExport.js";
|
|
21
23
|
|
|
22
24
|
export class Invoices extends ClientSDK {
|
|
25
|
+
/**
|
|
26
|
+
* Get a single invoice
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Returns the newest invoice in the caller's authorized scope matching the
|
|
30
|
+
* requested financial statuses. Use `product_type=credentialing` to limit
|
|
31
|
+
* results to invoices that include a credentialing product line item. At
|
|
32
|
+
* most one of `vendor_id`, `company_id`, `facility_id`, or `system_id`
|
|
33
|
+
* may be provided.
|
|
34
|
+
*/
|
|
35
|
+
async getInvoice(
|
|
36
|
+
request: operations.GetInvoiceRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): Promise<components.Invoice> {
|
|
39
|
+
return unwrapAsync(invoicesGetInvoice(
|
|
40
|
+
this,
|
|
41
|
+
request,
|
|
42
|
+
options,
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
|
|
23
46
|
/**
|
|
24
47
|
* List invoices
|
|
25
48
|
*
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { vendorsAcceptVendorCredential } from "../funcs/vendorsAcceptVendorCrede
|
|
|
6
6
|
import { vendorsAddVendorCredentialFile } from "../funcs/vendorsAddVendorCredentialFile.js";
|
|
7
7
|
import { vendorsAddVendorManagedByCompany } from "../funcs/vendorsAddVendorManagedByCompany.js";
|
|
8
8
|
import { vendorsCalculateSubscriptionPrice } from "../funcs/vendorsCalculateSubscriptionPrice.js";
|
|
9
|
+
import { vendorsCancelHandoff } from "../funcs/vendorsCancelHandoff.js";
|
|
9
10
|
import { vendorsChangeSubscription } from "../funcs/vendorsChangeSubscription.js";
|
|
10
11
|
import { vendorsCheckDownloadCode } from "../funcs/vendorsCheckDownloadCode.js";
|
|
11
12
|
import { vendorsCreateNewVendorCredentialVersion } from "../funcs/vendorsCreateNewVendorCredentialVersion.js";
|
|
@@ -948,4 +949,21 @@ export class Vendors extends ClientSDK {
|
|
|
948
949
|
options,
|
|
949
950
|
));
|
|
950
951
|
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Cancels an existing handoff
|
|
955
|
+
*
|
|
956
|
+
* @remarks
|
|
957
|
+
* Cancels an existing handoff with the given QR code.
|
|
958
|
+
*/
|
|
959
|
+
async cancelHandoff(
|
|
960
|
+
request: operations.CancelHandoffRequestBody,
|
|
961
|
+
options?: RequestOptions,
|
|
962
|
+
): Promise<operations.CancelHandoffVendorCancelOk> {
|
|
963
|
+
return unwrapAsync(vendorsCancelHandoff(
|
|
964
|
+
this,
|
|
965
|
+
request,
|
|
966
|
+
options,
|
|
967
|
+
));
|
|
968
|
+
}
|
|
951
969
|
}
|