@greensecurity/javascript-sdk 0.43.1-beta.100 → 0.43.1-beta.102
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 +3 -0
- package/dist/commonjs/__tests__/invoices.test.js +18 -0
- package/dist/commonjs/__tests__/invoices.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +10 -12
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/invoicesGetInvoicesExportStatus.d.ts +19 -0
- package/dist/commonjs/funcs/invoicesGetInvoicesExportStatus.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesGetInvoicesExportStatus.js +123 -0
- package/dist/commonjs/funcs/invoicesGetInvoicesExportStatus.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/operations/getinvoicesexportstatus.d.ts +49 -0
- package/dist/commonjs/models/operations/getinvoicesexportstatus.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getinvoicesexportstatus.js +72 -0
- package/dist/commonjs/models/operations/getinvoicesexportstatus.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.core.d.ts +12 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.core.js +39 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.core.js.map +1 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.d.ts +31 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.js +71 -0
- package/dist/commonjs/react-query/invoicesGetInvoicesExportStatus.js.map +1 -0
- package/dist/commonjs/sdk/invoices.d.ts +8 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +11 -0
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/esm/__tests__/invoices.test.js +18 -0
- package/dist/esm/__tests__/invoices.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +10 -12
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/invoicesGetInvoicesExportStatus.d.ts +19 -0
- package/dist/esm/funcs/invoicesGetInvoicesExportStatus.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesGetInvoicesExportStatus.js +87 -0
- package/dist/esm/funcs/invoicesGetInvoicesExportStatus.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/operations/getinvoicesexportstatus.d.ts +49 -0
- package/dist/esm/models/operations/getinvoicesexportstatus.d.ts.map +1 -0
- package/dist/esm/models/operations/getinvoicesexportstatus.js +34 -0
- package/dist/esm/models/operations/getinvoicesexportstatus.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.core.d.ts +12 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.core.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.core.js +34 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.core.js.map +1 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.d.ts +31 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.js +61 -0
- package/dist/esm/react-query/invoicesGetInvoicesExportStatus.js.map +1 -0
- package/dist/esm/sdk/invoices.d.ts +8 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +11 -0
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/invoices.test.ts +21 -0
- package/src/__tests__/zones.test.ts +10 -12
- package/src/funcs/invoicesGetInvoicesExportStatus.ts +175 -0
- package/src/lib/config.ts +2 -2
- package/src/models/operations/getinvoicesexportstatus.ts +103 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/invoicesGetInvoicesExportStatus.core.ts +76 -0
- package/src/react-query/invoicesGetInvoicesExportStatus.ts +152 -0
- package/src/sdk/invoices.ts +19 -0
|
@@ -30,6 +30,7 @@ export * from "./expeditetimeremaining.js";
|
|
|
30
30
|
export * from "./getcompany.js";
|
|
31
31
|
export * from "./getfacility.js";
|
|
32
32
|
export * from "./getfhirconfig.js";
|
|
33
|
+
export * from "./getinvoicesexportstatus.js";
|
|
33
34
|
export * from "./getlinkedusers.js";
|
|
34
35
|
export * from "./getnextscreeningquestion.js";
|
|
35
36
|
export * from "./getnextunansweredscreeningquestion.js";
|
package/src/react-query/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from "./fhirConfigsListOfFhirConfigurations.js";
|
|
|
30
30
|
export * from "./fhirConfigsUpdateFhirConfigById.js";
|
|
31
31
|
export * from "./invoicesCreateInvoice.js";
|
|
32
32
|
export * from "./invoicesDownloadInvoicesExport.js";
|
|
33
|
+
export * from "./invoicesGetInvoicesExportStatus.js";
|
|
33
34
|
export * from "./invoicesInvoicesExport.js";
|
|
34
35
|
export * from "./invoicesListInvoices.js";
|
|
35
36
|
export * from "./invoicesMakePayment.js";
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { invoicesGetInvoicesExportStatus } from "../funcs/invoicesGetInvoicesExportStatus.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
export type InvoicesGetInvoicesExportStatusQueryData =
|
|
17
|
+
operations.GetInvoicesExportStatusResponseBody;
|
|
18
|
+
|
|
19
|
+
export function prefetchInvoicesGetInvoicesExportStatus(
|
|
20
|
+
queryClient: QueryClient,
|
|
21
|
+
client$: GreenSecurityCore,
|
|
22
|
+
request: operations.GetInvoicesExportStatusRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return queryClient.prefetchQuery({
|
|
26
|
+
...buildInvoicesGetInvoicesExportStatusQuery(
|
|
27
|
+
client$,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function buildInvoicesGetInvoicesExportStatusQuery(
|
|
35
|
+
client$: GreenSecurityCore,
|
|
36
|
+
request: operations.GetInvoicesExportStatusRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): {
|
|
39
|
+
queryKey: QueryKey;
|
|
40
|
+
queryFn: (
|
|
41
|
+
context: QueryFunctionContext,
|
|
42
|
+
) => Promise<InvoicesGetInvoicesExportStatusQueryData>;
|
|
43
|
+
} {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: queryKeyInvoicesGetInvoicesExportStatus(request.id),
|
|
46
|
+
queryFn: async function invoicesGetInvoicesExportStatusQueryFn(
|
|
47
|
+
ctx,
|
|
48
|
+
): Promise<InvoicesGetInvoicesExportStatusQueryData> {
|
|
49
|
+
const sig = combineSignals(
|
|
50
|
+
ctx.signal,
|
|
51
|
+
options?.signal,
|
|
52
|
+
options?.fetchOptions?.signal,
|
|
53
|
+
);
|
|
54
|
+
const mergedOptions = {
|
|
55
|
+
...options?.fetchOptions,
|
|
56
|
+
...options,
|
|
57
|
+
signal: sig,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return unwrapAsync(invoicesGetInvoicesExportStatus(
|
|
61
|
+
client$,
|
|
62
|
+
request,
|
|
63
|
+
mergedOptions,
|
|
64
|
+
));
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function queryKeyInvoicesGetInvoicesExportStatus(id: string): QueryKey {
|
|
70
|
+
return [
|
|
71
|
+
"@greensecurity/javascript-sdk",
|
|
72
|
+
"invoices",
|
|
73
|
+
"getInvoicesExportStatus",
|
|
74
|
+
id,
|
|
75
|
+
];
|
|
76
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
buildInvoicesGetInvoicesExportStatusQuery,
|
|
33
|
+
InvoicesGetInvoicesExportStatusQueryData,
|
|
34
|
+
prefetchInvoicesGetInvoicesExportStatus,
|
|
35
|
+
queryKeyInvoicesGetInvoicesExportStatus,
|
|
36
|
+
} from "./invoicesGetInvoicesExportStatus.core.js";
|
|
37
|
+
export {
|
|
38
|
+
buildInvoicesGetInvoicesExportStatusQuery,
|
|
39
|
+
type InvoicesGetInvoicesExportStatusQueryData,
|
|
40
|
+
prefetchInvoicesGetInvoicesExportStatus,
|
|
41
|
+
queryKeyInvoicesGetInvoicesExportStatus,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type InvoicesGetInvoicesExportStatusQueryError =
|
|
45
|
+
| errors.ApiErrorResponse
|
|
46
|
+
| GreenSecurityError
|
|
47
|
+
| ResponseValidationError
|
|
48
|
+
| ConnectionError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| InvalidRequestError
|
|
52
|
+
| UnexpectedClientError
|
|
53
|
+
| SDKValidationError;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get invoice export status
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Poll the status of an asynchronous invoice export job. When `ready` is true,
|
|
60
|
+
* the export is complete and can be downloaded via the download endpoint.
|
|
61
|
+
*/
|
|
62
|
+
export function useInvoicesGetInvoicesExportStatus(
|
|
63
|
+
request: operations.GetInvoicesExportStatusRequest,
|
|
64
|
+
options?: QueryHookOptions<
|
|
65
|
+
InvoicesGetInvoicesExportStatusQueryData,
|
|
66
|
+
InvoicesGetInvoicesExportStatusQueryError
|
|
67
|
+
>,
|
|
68
|
+
): UseQueryResult<
|
|
69
|
+
InvoicesGetInvoicesExportStatusQueryData,
|
|
70
|
+
InvoicesGetInvoicesExportStatusQueryError
|
|
71
|
+
> {
|
|
72
|
+
const client = useGreenSecurityContext();
|
|
73
|
+
return useQuery({
|
|
74
|
+
...buildInvoicesGetInvoicesExportStatusQuery(
|
|
75
|
+
client,
|
|
76
|
+
request,
|
|
77
|
+
options,
|
|
78
|
+
),
|
|
79
|
+
...options,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get invoice export status
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* Poll the status of an asynchronous invoice export job. When `ready` is true,
|
|
88
|
+
* the export is complete and can be downloaded via the download endpoint.
|
|
89
|
+
*/
|
|
90
|
+
export function useInvoicesGetInvoicesExportStatusSuspense(
|
|
91
|
+
request: operations.GetInvoicesExportStatusRequest,
|
|
92
|
+
options?: SuspenseQueryHookOptions<
|
|
93
|
+
InvoicesGetInvoicesExportStatusQueryData,
|
|
94
|
+
InvoicesGetInvoicesExportStatusQueryError
|
|
95
|
+
>,
|
|
96
|
+
): UseSuspenseQueryResult<
|
|
97
|
+
InvoicesGetInvoicesExportStatusQueryData,
|
|
98
|
+
InvoicesGetInvoicesExportStatusQueryError
|
|
99
|
+
> {
|
|
100
|
+
const client = useGreenSecurityContext();
|
|
101
|
+
return useSuspenseQuery({
|
|
102
|
+
...buildInvoicesGetInvoicesExportStatusQuery(
|
|
103
|
+
client,
|
|
104
|
+
request,
|
|
105
|
+
options,
|
|
106
|
+
),
|
|
107
|
+
...options,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function setInvoicesGetInvoicesExportStatusData(
|
|
112
|
+
client: QueryClient,
|
|
113
|
+
queryKeyBase: [id: string],
|
|
114
|
+
data: InvoicesGetInvoicesExportStatusQueryData,
|
|
115
|
+
): InvoicesGetInvoicesExportStatusQueryData | undefined {
|
|
116
|
+
const key = queryKeyInvoicesGetInvoicesExportStatus(...queryKeyBase);
|
|
117
|
+
|
|
118
|
+
return client.setQueryData<InvoicesGetInvoicesExportStatusQueryData>(
|
|
119
|
+
key,
|
|
120
|
+
data,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function invalidateInvoicesGetInvoicesExportStatus(
|
|
125
|
+
client: QueryClient,
|
|
126
|
+
queryKeyBase: TupleToPrefixes<[id: string]>,
|
|
127
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
128
|
+
): Promise<void> {
|
|
129
|
+
return client.invalidateQueries({
|
|
130
|
+
...filters,
|
|
131
|
+
queryKey: [
|
|
132
|
+
"@greensecurity/javascript-sdk",
|
|
133
|
+
"invoices",
|
|
134
|
+
"getInvoicesExportStatus",
|
|
135
|
+
...queryKeyBase,
|
|
136
|
+
],
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function invalidateAllInvoicesGetInvoicesExportStatus(
|
|
141
|
+
client: QueryClient,
|
|
142
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
143
|
+
): Promise<void> {
|
|
144
|
+
return client.invalidateQueries({
|
|
145
|
+
...filters,
|
|
146
|
+
queryKey: [
|
|
147
|
+
"@greensecurity/javascript-sdk",
|
|
148
|
+
"invoices",
|
|
149
|
+
"getInvoicesExportStatus",
|
|
150
|
+
],
|
|
151
|
+
});
|
|
152
|
+
}
|
package/src/sdk/invoices.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DownloadInvoicesExportAcceptEnum,
|
|
8
8
|
invoicesDownloadInvoicesExport,
|
|
9
9
|
} from "../funcs/invoicesDownloadInvoicesExport.js";
|
|
10
|
+
import { invoicesGetInvoicesExportStatus } from "../funcs/invoicesGetInvoicesExportStatus.js";
|
|
10
11
|
import { invoicesInvoicesExport } from "../funcs/invoicesInvoicesExport.js";
|
|
11
12
|
import { invoicesListInvoices } from "../funcs/invoicesListInvoices.js";
|
|
12
13
|
import { invoicesMakePayment } from "../funcs/invoicesMakePayment.js";
|
|
@@ -145,6 +146,24 @@ export class Invoices extends ClientSDK {
|
|
|
145
146
|
));
|
|
146
147
|
}
|
|
147
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Get invoice export status
|
|
151
|
+
*
|
|
152
|
+
* @remarks
|
|
153
|
+
* Poll the status of an asynchronous invoice export job. When `ready` is true,
|
|
154
|
+
* the export is complete and can be downloaded via the download endpoint.
|
|
155
|
+
*/
|
|
156
|
+
async getInvoicesExportStatus(
|
|
157
|
+
request: operations.GetInvoicesExportStatusRequest,
|
|
158
|
+
options?: RequestOptions,
|
|
159
|
+
): Promise<operations.GetInvoicesExportStatusResponseBody> {
|
|
160
|
+
return unwrapAsync(invoicesGetInvoicesExportStatus(
|
|
161
|
+
this,
|
|
162
|
+
request,
|
|
163
|
+
options,
|
|
164
|
+
));
|
|
165
|
+
}
|
|
166
|
+
|
|
148
167
|
/**
|
|
149
168
|
* Download invoices CSV
|
|
150
169
|
*
|