@greensecurity/javascript-sdk 0.43.1-beta.112 → 0.43.1-beta.113
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 +9 -8
- 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 +9 -8
- 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 +9 -8
- 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,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
|
}
|