@greensecurity/javascript-sdk 0.45.0-beta.1 → 0.45.0-beta.10
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 +4 -1
- package/dist/commonjs/__tests__/fhirconfigs.test.js +21 -5
- package/dist/commonjs/__tests__/fhirconfigs.test.js.map +1 -1
- 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 +15 -16
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/companiesListCompanyManagers.js +1 -0
- package/dist/commonjs/funcs/companiesListCompanyManagers.js.map +1 -1
- package/dist/commonjs/funcs/invoicesConvertQuote.d.ts +33 -0
- package/dist/commonjs/funcs/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesConvertQuote.js +138 -0
- package/dist/commonjs/funcs/invoicesConvertQuote.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.d.ts +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.js +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorCredentialDetails.js.map +1 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.d.ts +4 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.js +5 -1
- package/dist/commonjs/funcs/vendorsVendorsExport.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/companymanager.d.ts +19 -1
- package/dist/commonjs/models/components/companymanager.d.ts.map +1 -1
- package/dist/commonjs/models/components/companymanager.js +13 -2
- package/dist/commonjs/models/components/companymanager.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/fhirconfig.d.ts +16 -0
- package/dist/commonjs/models/components/fhirconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirconfig.js +4 -0
- package/dist/commonjs/models/components/fhirconfig.js.map +1 -1
- package/dist/commonjs/models/components/fhirconfigcreate.d.ts +18 -0
- package/dist/commonjs/models/components/fhirconfigcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirconfigcreate.js +4 -0
- package/dist/commonjs/models/components/fhirconfigcreate.js.map +1 -1
- package/dist/commonjs/models/components/fhirextraentities.d.ts +9 -0
- package/dist/commonjs/models/components/fhirextraentities.d.ts.map +1 -1
- package/dist/commonjs/models/components/fhirextraentities.js +11 -0
- package/dist/commonjs/models/components/fhirextraentities.js.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts +5 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js +9 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/commonjs/models/operations/convertquote.d.ts +46 -0
- package/dist/commonjs/models/operations/convertquote.d.ts.map +1 -0
- package/dist/commonjs/models/operations/convertquote.js +69 -0
- package/dist/commonjs/models/operations/convertquote.js.map +1 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts +85 -0
- package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createinvoice.js +56 -1
- package/dist/commonjs/models/operations/createinvoice.js.map +1 -1
- 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/models/operations/listcompanymanagers.d.ts +20 -0
- package/dist/commonjs/models/operations/listcompanymanagers.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcompanymanagers.js +12 -1
- package/dist/commonjs/models/operations/listcompanymanagers.js.map +1 -1
- package/dist/commonjs/models/operations/vendorsexport.d.ts +6 -1
- package/dist/commonjs/models/operations/vendorsexport.d.ts.map +1 -1
- package/dist/commonjs/models/operations/vendorsexport.js +2 -0
- package/dist/commonjs/models/operations/vendorsexport.js.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.d.ts +2 -0
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.js +2 -0
- package/dist/commonjs/react-query/companiesListCompanyManagers.core.js.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.d.ts +2 -0
- package/dist/commonjs/react-query/companiesListCompanyManagers.d.ts.map +1 -1
- package/dist/commonjs/react-query/companiesListCompanyManagers.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/invoicesConvertQuote.d.ts +42 -0
- package/dist/commonjs/react-query/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesConvertQuote.js +60 -0
- package/dist/commonjs/react-query/invoicesConvertQuote.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.d.ts +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.js +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorCredentialDetails.js.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.core.js +1 -0
- package/dist/commonjs/react-query/vendorsVendorsExport.core.js.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.d.ts +10 -2
- package/dist/commonjs/react-query/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsVendorsExport.js +8 -2
- package/dist/commonjs/react-query/vendorsVendorsExport.js.map +1 -1
- package/dist/commonjs/sdk/invoices.d.ts +20 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +23 -0
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +5 -1
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +5 -1
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/fhirconfigs.test.js +21 -5
- package/dist/esm/__tests__/fhirconfigs.test.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 +15 -16
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/companiesListCompanyManagers.js +1 -0
- package/dist/esm/funcs/companiesListCompanyManagers.js.map +1 -1
- package/dist/esm/funcs/invoicesConvertQuote.d.ts +33 -0
- package/dist/esm/funcs/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesConvertQuote.js +102 -0
- package/dist/esm/funcs/invoicesConvertQuote.js.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.d.ts +1 -0
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.js +1 -0
- package/dist/esm/funcs/vendorsGetVendorCredentialDetails.js.map +1 -1
- package/dist/esm/funcs/vendorsVendorsExport.d.ts +4 -1
- package/dist/esm/funcs/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsVendorsExport.js +5 -1
- package/dist/esm/funcs/vendorsVendorsExport.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/companymanager.d.ts +19 -1
- package/dist/esm/models/components/companymanager.d.ts.map +1 -1
- package/dist/esm/models/components/companymanager.js +12 -1
- package/dist/esm/models/components/companymanager.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/fhirconfig.d.ts +16 -0
- package/dist/esm/models/components/fhirconfig.d.ts.map +1 -1
- package/dist/esm/models/components/fhirconfig.js +4 -0
- package/dist/esm/models/components/fhirconfig.js.map +1 -1
- package/dist/esm/models/components/fhirconfigcreate.d.ts +18 -0
- package/dist/esm/models/components/fhirconfigcreate.d.ts.map +1 -1
- package/dist/esm/models/components/fhirconfigcreate.js +4 -0
- package/dist/esm/models/components/fhirconfigcreate.js.map +1 -1
- package/dist/esm/models/components/fhirextraentities.d.ts +9 -0
- package/dist/esm/models/components/fhirextraentities.d.ts.map +1 -1
- package/dist/esm/models/components/fhirextraentities.js +11 -0
- package/dist/esm/models/components/fhirextraentities.js.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.d.ts +5 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.js +7 -0
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
- package/dist/esm/models/operations/convertquote.d.ts +46 -0
- package/dist/esm/models/operations/convertquote.d.ts.map +1 -0
- package/dist/esm/models/operations/convertquote.js +31 -0
- package/dist/esm/models/operations/convertquote.js.map +1 -0
- package/dist/esm/models/operations/createinvoice.d.ts +85 -0
- package/dist/esm/models/operations/createinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/createinvoice.js +55 -0
- package/dist/esm/models/operations/createinvoice.js.map +1 -1
- 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/models/operations/listcompanymanagers.d.ts +20 -0
- package/dist/esm/models/operations/listcompanymanagers.d.ts.map +1 -1
- package/dist/esm/models/operations/listcompanymanagers.js +11 -0
- package/dist/esm/models/operations/listcompanymanagers.js.map +1 -1
- package/dist/esm/models/operations/vendorsexport.d.ts +6 -1
- package/dist/esm/models/operations/vendorsexport.d.ts.map +1 -1
- package/dist/esm/models/operations/vendorsexport.js +2 -0
- package/dist/esm/models/operations/vendorsexport.js.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.core.d.ts +2 -0
- package/dist/esm/react-query/companiesListCompanyManagers.core.d.ts.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.core.js +2 -0
- package/dist/esm/react-query/companiesListCompanyManagers.core.js.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.d.ts +2 -0
- package/dist/esm/react-query/companiesListCompanyManagers.d.ts.map +1 -1
- package/dist/esm/react-query/companiesListCompanyManagers.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/invoicesConvertQuote.d.ts +42 -0
- package/dist/esm/react-query/invoicesConvertQuote.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesConvertQuote.js +55 -0
- package/dist/esm/react-query/invoicesConvertQuote.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.d.ts +2 -0
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.js +2 -0
- package/dist/esm/react-query/vendorsGetVendorCredentialDetails.js.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.core.d.ts +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.core.js +1 -0
- package/dist/esm/react-query/vendorsVendorsExport.core.js.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.d.ts +10 -2
- package/dist/esm/react-query/vendorsVendorsExport.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsVendorsExport.js +8 -2
- package/dist/esm/react-query/vendorsVendorsExport.js.map +1 -1
- package/dist/esm/sdk/invoices.d.ts +20 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +23 -0
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +5 -1
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +5 -1
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/fhirconfigs.test.ts +21 -5
- package/src/__tests__/invoices.test.ts +21 -0
- package/src/__tests__/zones.test.ts +15 -16
- package/src/funcs/companiesListCompanyManagers.ts +1 -0
- package/src/funcs/invoicesConvertQuote.ts +190 -0
- package/src/funcs/vendorsGetVendorCredentialDetails.ts +1 -0
- package/src/funcs/vendorsVendorsExport.ts +6 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/companymanager.ts +27 -2
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/fhirconfig.ts +20 -0
- package/src/models/components/fhirconfigcreate.ts +22 -0
- package/src/models/components/fhirextraentities.ts +20 -0
- package/src/models/components/vendorcredentialsummary.ts +19 -0
- package/src/models/operations/convertquote.ts +94 -0
- package/src/models/operations/createinvoice.ts +124 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listcompanymanagers.ts +28 -0
- package/src/models/operations/vendorsexport.ts +8 -1
- package/src/react-query/companiesListCompanyManagers.core.ts +4 -0
- package/src/react-query/companiesListCompanyManagers.ts +2 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/invoicesConvertQuote.ts +124 -0
- package/src/react-query/vendorsGetVendorCredentialDetails.ts +2 -0
- package/src/react-query/vendorsVendorsExport.core.ts +2 -0
- package/src/react-query/vendorsVendorsExport.ts +10 -2
- package/src/sdk/invoices.ts +31 -0
- package/src/sdk/vendors.ts +5 -1
|
@@ -0,0 +1,94 @@
|
|
|
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 ConvertQuoteRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The identifier of the object
|
|
15
|
+
*/
|
|
16
|
+
id: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The quote was converted, and the server has returned the resulting invoice.
|
|
21
|
+
*/
|
|
22
|
+
export type ConvertQuoteConvertQuoteOk = {
|
|
23
|
+
/**
|
|
24
|
+
* Identifier of the invoice the quote was converted into.
|
|
25
|
+
*/
|
|
26
|
+
id: number;
|
|
27
|
+
success: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Tax calculated on the new invoice.
|
|
30
|
+
*/
|
|
31
|
+
tax?: number | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Shipping calculated on the new invoice.
|
|
34
|
+
*/
|
|
35
|
+
shipping?: number | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Convenience fee calculated on the new invoice.
|
|
38
|
+
*/
|
|
39
|
+
convenienceFee?: number | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Total amount due on the new invoice, including tax, shipping and the convenience fee.
|
|
42
|
+
*/
|
|
43
|
+
total?: number | null | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type ConvertQuoteRequest$Outbound = {
|
|
48
|
+
id: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const ConvertQuoteRequest$outboundSchema: z.ZodType<
|
|
53
|
+
ConvertQuoteRequest$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
ConvertQuoteRequest
|
|
56
|
+
> = z.object({
|
|
57
|
+
id: z.number().int(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function convertQuoteRequestToJSON(
|
|
61
|
+
convertQuoteRequest: ConvertQuoteRequest,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
ConvertQuoteRequest$outboundSchema.parse(convertQuoteRequest),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const ConvertQuoteConvertQuoteOk$inboundSchema: z.ZodType<
|
|
70
|
+
ConvertQuoteConvertQuoteOk,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
unknown
|
|
73
|
+
> = z.object({
|
|
74
|
+
id: types.number(),
|
|
75
|
+
success: types.boolean(),
|
|
76
|
+
tax: z.nullable(types.number()).optional(),
|
|
77
|
+
shipping: z.nullable(types.number()).optional(),
|
|
78
|
+
convenience_fee: z.nullable(types.number()).optional(),
|
|
79
|
+
total: z.nullable(types.number()).optional(),
|
|
80
|
+
}).transform((v) => {
|
|
81
|
+
return remap$(v, {
|
|
82
|
+
"convenience_fee": "convenienceFee",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export function convertQuoteConvertQuoteOkFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<ConvertQuoteConvertQuoteOk, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => ConvertQuoteConvertQuoteOk$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'ConvertQuoteConvertQuoteOk' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -33,10 +33,27 @@ export type CreateInvoiceRequestBodyInvoicesRequestLines = {
|
|
|
33
33
|
paymentHandlerData?: string | undefined;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
38
|
+
*/
|
|
39
|
+
export const CreateInvoiceRequestBodyInvoicesRequestInvoiceType = {
|
|
40
|
+
Quote: "quote",
|
|
41
|
+
} as const;
|
|
42
|
+
/**
|
|
43
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
44
|
+
*/
|
|
45
|
+
export type CreateInvoiceRequestBodyInvoicesRequestInvoiceType = ClosedEnum<
|
|
46
|
+
typeof CreateInvoiceRequestBodyInvoicesRequestInvoiceType
|
|
47
|
+
>;
|
|
48
|
+
|
|
36
49
|
export type Five = {
|
|
37
50
|
vendorCredentialId: number;
|
|
38
51
|
lines?: Array<CreateInvoiceRequestBodyInvoicesRequestLines> | undefined;
|
|
39
52
|
credentialPricingIds?: Array<number> | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
55
|
+
*/
|
|
56
|
+
invoiceType?: CreateInvoiceRequestBodyInvoicesRequestInvoiceType | undefined;
|
|
40
57
|
};
|
|
41
58
|
|
|
42
59
|
export const CreateInvoiceRequestBodyInvoicesPaymentHandler = {
|
|
@@ -59,10 +76,27 @@ export type CreateInvoiceRequestBodyInvoicesLines = {
|
|
|
59
76
|
paymentHandlerData?: string | undefined;
|
|
60
77
|
};
|
|
61
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
81
|
+
*/
|
|
82
|
+
export const CreateInvoiceRequestBodyInvoicesInvoiceType = {
|
|
83
|
+
Quote: "quote",
|
|
84
|
+
} as const;
|
|
85
|
+
/**
|
|
86
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
87
|
+
*/
|
|
88
|
+
export type CreateInvoiceRequestBodyInvoicesInvoiceType = ClosedEnum<
|
|
89
|
+
typeof CreateInvoiceRequestBodyInvoicesInvoiceType
|
|
90
|
+
>;
|
|
91
|
+
|
|
62
92
|
export type Four = {
|
|
63
93
|
systemId: number;
|
|
64
94
|
lines?: Array<CreateInvoiceRequestBodyInvoicesLines> | undefined;
|
|
65
95
|
credentialPricingIds?: Array<number> | null | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
98
|
+
*/
|
|
99
|
+
invoiceType?: CreateInvoiceRequestBodyInvoicesInvoiceType | undefined;
|
|
66
100
|
};
|
|
67
101
|
|
|
68
102
|
export const CreateInvoiceRequestBodyPaymentHandler = {
|
|
@@ -85,10 +119,27 @@ export type CreateInvoiceRequestBodyLines = {
|
|
|
85
119
|
paymentHandlerData?: string | undefined;
|
|
86
120
|
};
|
|
87
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
124
|
+
*/
|
|
125
|
+
export const CreateInvoiceRequestBodyInvoiceType = {
|
|
126
|
+
Quote: "quote",
|
|
127
|
+
} as const;
|
|
128
|
+
/**
|
|
129
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
130
|
+
*/
|
|
131
|
+
export type CreateInvoiceRequestBodyInvoiceType = ClosedEnum<
|
|
132
|
+
typeof CreateInvoiceRequestBodyInvoiceType
|
|
133
|
+
>;
|
|
134
|
+
|
|
88
135
|
export type Three = {
|
|
89
136
|
facilityId: number;
|
|
90
137
|
lines?: Array<CreateInvoiceRequestBodyLines> | undefined;
|
|
91
138
|
credentialPricingIds?: Array<number> | null | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
141
|
+
*/
|
|
142
|
+
invoiceType?: CreateInvoiceRequestBodyInvoiceType | undefined;
|
|
92
143
|
};
|
|
93
144
|
|
|
94
145
|
export const RequestBodyPaymentHandler = {
|
|
@@ -111,10 +162,25 @@ export type RequestBodyLines = {
|
|
|
111
162
|
paymentHandlerData?: string | undefined;
|
|
112
163
|
};
|
|
113
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
167
|
+
*/
|
|
168
|
+
export const RequestBodyInvoiceType = {
|
|
169
|
+
Quote: "quote",
|
|
170
|
+
} as const;
|
|
171
|
+
/**
|
|
172
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
173
|
+
*/
|
|
174
|
+
export type RequestBodyInvoiceType = ClosedEnum<typeof RequestBodyInvoiceType>;
|
|
175
|
+
|
|
114
176
|
export type CreateInvoiceRequestBody2 = {
|
|
115
177
|
companyId: number;
|
|
116
178
|
lines?: Array<RequestBodyLines> | undefined;
|
|
117
179
|
credentialPricingIds?: Array<number> | null | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
182
|
+
*/
|
|
183
|
+
invoiceType?: RequestBodyInvoiceType | undefined;
|
|
118
184
|
};
|
|
119
185
|
|
|
120
186
|
export const PaymentHandler = {
|
|
@@ -135,10 +201,25 @@ export type Lines = {
|
|
|
135
201
|
paymentHandlerData?: string | undefined;
|
|
136
202
|
};
|
|
137
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
206
|
+
*/
|
|
207
|
+
export const InvoiceType = {
|
|
208
|
+
Quote: "quote",
|
|
209
|
+
} as const;
|
|
210
|
+
/**
|
|
211
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
212
|
+
*/
|
|
213
|
+
export type InvoiceType = ClosedEnum<typeof InvoiceType>;
|
|
214
|
+
|
|
138
215
|
export type RequestBody1 = {
|
|
139
216
|
vendorId: number;
|
|
140
217
|
lines?: Array<Lines> | undefined;
|
|
141
218
|
credentialPricingIds?: Array<number> | null | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* Set to `quote` to create a non-chargeable quote, used to preview an invoice's calculated totals before committing to it. Convert the quote into the real invoice with `POST /invoices/{id}/convert`. Omit this field to create a chargeable invoice directly.
|
|
221
|
+
*/
|
|
222
|
+
invoiceType?: InvoiceType | undefined;
|
|
142
223
|
};
|
|
143
224
|
|
|
144
225
|
export type CreateInvoiceRequestBody =
|
|
@@ -218,6 +299,11 @@ export function createInvoiceRequestBodyInvoicesRequestLinesToJSON(
|
|
|
218
299
|
);
|
|
219
300
|
}
|
|
220
301
|
|
|
302
|
+
/** @internal */
|
|
303
|
+
export const CreateInvoiceRequestBodyInvoicesRequestInvoiceType$outboundSchema:
|
|
304
|
+
z.ZodNativeEnum<typeof CreateInvoiceRequestBodyInvoicesRequestInvoiceType> = z
|
|
305
|
+
.nativeEnum(CreateInvoiceRequestBodyInvoicesRequestInvoiceType);
|
|
306
|
+
|
|
221
307
|
/** @internal */
|
|
222
308
|
export type Five$Outbound = {
|
|
223
309
|
vendor_credential_id: number;
|
|
@@ -225,6 +311,7 @@ export type Five$Outbound = {
|
|
|
225
311
|
| Array<CreateInvoiceRequestBodyInvoicesRequestLines$Outbound>
|
|
226
312
|
| undefined;
|
|
227
313
|
credential_pricing_ids?: Array<number> | null | undefined;
|
|
314
|
+
invoice_type?: string | undefined;
|
|
228
315
|
};
|
|
229
316
|
|
|
230
317
|
/** @internal */
|
|
@@ -235,10 +322,14 @@ export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
|
|
|
235
322
|
z.lazy(() => CreateInvoiceRequestBodyInvoicesRequestLines$outboundSchema),
|
|
236
323
|
).optional(),
|
|
237
324
|
credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
|
|
325
|
+
invoiceType:
|
|
326
|
+
CreateInvoiceRequestBodyInvoicesRequestInvoiceType$outboundSchema
|
|
327
|
+
.optional(),
|
|
238
328
|
}).transform((v) => {
|
|
239
329
|
return remap$(v, {
|
|
240
330
|
vendorCredentialId: "vendor_credential_id",
|
|
241
331
|
credentialPricingIds: "credential_pricing_ids",
|
|
332
|
+
invoiceType: "invoice_type",
|
|
242
333
|
});
|
|
243
334
|
});
|
|
244
335
|
|
|
@@ -304,11 +395,17 @@ export function createInvoiceRequestBodyInvoicesLinesToJSON(
|
|
|
304
395
|
);
|
|
305
396
|
}
|
|
306
397
|
|
|
398
|
+
/** @internal */
|
|
399
|
+
export const CreateInvoiceRequestBodyInvoicesInvoiceType$outboundSchema:
|
|
400
|
+
z.ZodNativeEnum<typeof CreateInvoiceRequestBodyInvoicesInvoiceType> = z
|
|
401
|
+
.nativeEnum(CreateInvoiceRequestBodyInvoicesInvoiceType);
|
|
402
|
+
|
|
307
403
|
/** @internal */
|
|
308
404
|
export type Four$Outbound = {
|
|
309
405
|
system_id: number;
|
|
310
406
|
lines?: Array<CreateInvoiceRequestBodyInvoicesLines$Outbound> | undefined;
|
|
311
407
|
credential_pricing_ids?: Array<number> | null | undefined;
|
|
408
|
+
invoice_type?: string | undefined;
|
|
312
409
|
};
|
|
313
410
|
|
|
314
411
|
/** @internal */
|
|
@@ -319,10 +416,13 @@ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
|
|
|
319
416
|
z.lazy(() => CreateInvoiceRequestBodyInvoicesLines$outboundSchema),
|
|
320
417
|
).optional(),
|
|
321
418
|
credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
|
|
419
|
+
invoiceType: CreateInvoiceRequestBodyInvoicesInvoiceType$outboundSchema
|
|
420
|
+
.optional(),
|
|
322
421
|
}).transform((v) => {
|
|
323
422
|
return remap$(v, {
|
|
324
423
|
systemId: "system_id",
|
|
325
424
|
credentialPricingIds: "credential_pricing_ids",
|
|
425
|
+
invoiceType: "invoice_type",
|
|
326
426
|
});
|
|
327
427
|
});
|
|
328
428
|
|
|
@@ -389,11 +489,18 @@ export function createInvoiceRequestBodyLinesToJSON(
|
|
|
389
489
|
);
|
|
390
490
|
}
|
|
391
491
|
|
|
492
|
+
/** @internal */
|
|
493
|
+
export const CreateInvoiceRequestBodyInvoiceType$outboundSchema:
|
|
494
|
+
z.ZodNativeEnum<typeof CreateInvoiceRequestBodyInvoiceType> = z.nativeEnum(
|
|
495
|
+
CreateInvoiceRequestBodyInvoiceType,
|
|
496
|
+
);
|
|
497
|
+
|
|
392
498
|
/** @internal */
|
|
393
499
|
export type Three$Outbound = {
|
|
394
500
|
facility_id: number;
|
|
395
501
|
lines?: Array<CreateInvoiceRequestBodyLines$Outbound> | undefined;
|
|
396
502
|
credential_pricing_ids?: Array<number> | null | undefined;
|
|
503
|
+
invoice_type?: string | undefined;
|
|
397
504
|
};
|
|
398
505
|
|
|
399
506
|
/** @internal */
|
|
@@ -406,10 +513,12 @@ export const Three$outboundSchema: z.ZodType<
|
|
|
406
513
|
lines: z.array(z.lazy(() => CreateInvoiceRequestBodyLines$outboundSchema))
|
|
407
514
|
.optional(),
|
|
408
515
|
credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
|
|
516
|
+
invoiceType: CreateInvoiceRequestBodyInvoiceType$outboundSchema.optional(),
|
|
409
517
|
}).transform((v) => {
|
|
410
518
|
return remap$(v, {
|
|
411
519
|
facilityId: "facility_id",
|
|
412
520
|
credentialPricingIds: "credential_pricing_ids",
|
|
521
|
+
invoiceType: "invoice_type",
|
|
413
522
|
});
|
|
414
523
|
});
|
|
415
524
|
|
|
@@ -472,11 +581,17 @@ export function requestBodyLinesToJSON(
|
|
|
472
581
|
);
|
|
473
582
|
}
|
|
474
583
|
|
|
584
|
+
/** @internal */
|
|
585
|
+
export const RequestBodyInvoiceType$outboundSchema: z.ZodNativeEnum<
|
|
586
|
+
typeof RequestBodyInvoiceType
|
|
587
|
+
> = z.nativeEnum(RequestBodyInvoiceType);
|
|
588
|
+
|
|
475
589
|
/** @internal */
|
|
476
590
|
export type CreateInvoiceRequestBody2$Outbound = {
|
|
477
591
|
company_id: number;
|
|
478
592
|
lines?: Array<RequestBodyLines$Outbound> | undefined;
|
|
479
593
|
credential_pricing_ids?: Array<number> | null | undefined;
|
|
594
|
+
invoice_type?: string | undefined;
|
|
480
595
|
};
|
|
481
596
|
|
|
482
597
|
/** @internal */
|
|
@@ -488,10 +603,12 @@ export const CreateInvoiceRequestBody2$outboundSchema: z.ZodType<
|
|
|
488
603
|
companyId: z.number().int(),
|
|
489
604
|
lines: z.array(z.lazy(() => RequestBodyLines$outboundSchema)).optional(),
|
|
490
605
|
credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
|
|
606
|
+
invoiceType: RequestBodyInvoiceType$outboundSchema.optional(),
|
|
491
607
|
}).transform((v) => {
|
|
492
608
|
return remap$(v, {
|
|
493
609
|
companyId: "company_id",
|
|
494
610
|
credentialPricingIds: "credential_pricing_ids",
|
|
611
|
+
invoiceType: "invoice_type",
|
|
495
612
|
});
|
|
496
613
|
});
|
|
497
614
|
|
|
@@ -554,11 +671,16 @@ export function linesToJSON(lines: Lines): string {
|
|
|
554
671
|
return JSON.stringify(Lines$outboundSchema.parse(lines));
|
|
555
672
|
}
|
|
556
673
|
|
|
674
|
+
/** @internal */
|
|
675
|
+
export const InvoiceType$outboundSchema: z.ZodNativeEnum<typeof InvoiceType> = z
|
|
676
|
+
.nativeEnum(InvoiceType);
|
|
677
|
+
|
|
557
678
|
/** @internal */
|
|
558
679
|
export type RequestBody1$Outbound = {
|
|
559
680
|
vendor_id: number;
|
|
560
681
|
lines?: Array<Lines$Outbound> | undefined;
|
|
561
682
|
credential_pricing_ids?: Array<number> | null | undefined;
|
|
683
|
+
invoice_type?: string | undefined;
|
|
562
684
|
};
|
|
563
685
|
|
|
564
686
|
/** @internal */
|
|
@@ -570,10 +692,12 @@ export const RequestBody1$outboundSchema: z.ZodType<
|
|
|
570
692
|
vendorId: z.number().int(),
|
|
571
693
|
lines: z.array(z.lazy(() => Lines$outboundSchema)).optional(),
|
|
572
694
|
credentialPricingIds: z.nullable(z.array(z.number().int())).optional(),
|
|
695
|
+
invoiceType: InvoiceType$outboundSchema.optional(),
|
|
573
696
|
}).transform((v) => {
|
|
574
697
|
return remap$(v, {
|
|
575
698
|
vendorId: "vendor_id",
|
|
576
699
|
credentialPricingIds: "credential_pricing_ids",
|
|
700
|
+
invoiceType: "invoice_type",
|
|
577
701
|
});
|
|
578
702
|
});
|
|
579
703
|
|
|
@@ -15,6 +15,7 @@ export * from "./cancelhandoff.js";
|
|
|
15
15
|
export * from "./changepassword.js";
|
|
16
16
|
export * from "./changesubscription.js";
|
|
17
17
|
export * from "./checkdownloadcode.js";
|
|
18
|
+
export * from "./convertquote.js";
|
|
18
19
|
export * from "./createcompanytargetfacility.js";
|
|
19
20
|
export * from "./createevent.js";
|
|
20
21
|
export * from "./createinvoice.js";
|
|
@@ -5,16 +5,36 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
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
|
|
|
14
|
+
/**
|
|
15
|
+
* Filter managers by status. Omit to return managers of every status.
|
|
16
|
+
*/
|
|
17
|
+
export const ListCompanyManagersQueryParamStatus = {
|
|
18
|
+
Active: "Active",
|
|
19
|
+
Inactive: "Inactive",
|
|
20
|
+
Deleted: "Deleted",
|
|
21
|
+
} as const;
|
|
22
|
+
/**
|
|
23
|
+
* Filter managers by status. Omit to return managers of every status.
|
|
24
|
+
*/
|
|
25
|
+
export type ListCompanyManagersQueryParamStatus = ClosedEnum<
|
|
26
|
+
typeof ListCompanyManagersQueryParamStatus
|
|
27
|
+
>;
|
|
28
|
+
|
|
13
29
|
export type ListCompanyManagersRequest = {
|
|
14
30
|
/**
|
|
15
31
|
* The identifier of the object
|
|
16
32
|
*/
|
|
17
33
|
id: number;
|
|
34
|
+
/**
|
|
35
|
+
* Filter managers by status. Omit to return managers of every status.
|
|
36
|
+
*/
|
|
37
|
+
status?: ListCompanyManagersQueryParamStatus | undefined;
|
|
18
38
|
/**
|
|
19
39
|
* A comma-separated list of object attributes to sort on.
|
|
20
40
|
*/
|
|
@@ -48,9 +68,16 @@ export type ListCompanyManagersResponse = {
|
|
|
48
68
|
result: ListCompanyManagersListCompanyManagersOk;
|
|
49
69
|
};
|
|
50
70
|
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const ListCompanyManagersQueryParamStatus$outboundSchema:
|
|
73
|
+
z.ZodNativeEnum<typeof ListCompanyManagersQueryParamStatus> = z.nativeEnum(
|
|
74
|
+
ListCompanyManagersQueryParamStatus,
|
|
75
|
+
);
|
|
76
|
+
|
|
51
77
|
/** @internal */
|
|
52
78
|
export type ListCompanyManagersRequest$Outbound = {
|
|
53
79
|
id: number;
|
|
80
|
+
status?: string | undefined;
|
|
54
81
|
sort?: string | null | undefined;
|
|
55
82
|
desc?: components.Desc$Outbound | undefined;
|
|
56
83
|
page?: number | undefined;
|
|
@@ -64,6 +91,7 @@ export const ListCompanyManagersRequest$outboundSchema: z.ZodType<
|
|
|
64
91
|
ListCompanyManagersRequest
|
|
65
92
|
> = z.object({
|
|
66
93
|
id: z.number().int(),
|
|
94
|
+
status: ListCompanyManagersQueryParamStatus$outboundSchema.optional(),
|
|
67
95
|
sort: z.nullable(z.string()).optional(),
|
|
68
96
|
desc: components.Desc$outboundSchema.optional(),
|
|
69
97
|
page: z.number().int().optional(),
|
|
@@ -56,9 +56,13 @@ export type VendorsExportRequest = {
|
|
|
56
56
|
*/
|
|
57
57
|
status?: string | undefined;
|
|
58
58
|
/**
|
|
59
|
-
* Scope to a specific company (API users must be authorized by MarketplaceAppActivation).
|
|
59
|
+
* Scope to a specific company (API users must be authorized by MarketplaceAppActivation). Cannot be combined with externally_managed_by_company_id.
|
|
60
60
|
*/
|
|
61
61
|
companyId?: number | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Only export *external* vendors who can be managed by the specified company. Cannot be combined with company_id.
|
|
64
|
+
*/
|
|
65
|
+
externallyManagedByCompanyId?: number | undefined;
|
|
62
66
|
/**
|
|
63
67
|
* Filter to vendors with (or without) a credentialing subscription.
|
|
64
68
|
*/
|
|
@@ -132,6 +136,7 @@ export type VendorsExportRequest$Outbound = {
|
|
|
132
136
|
zip_like?: string | undefined;
|
|
133
137
|
status?: string | undefined;
|
|
134
138
|
company_id?: number | undefined;
|
|
139
|
+
externally_managed_by_company_id?: number | undefined;
|
|
135
140
|
credentialing_subscription_id_null?: string | undefined;
|
|
136
141
|
scrubs_subscription_id_null?: string | undefined;
|
|
137
142
|
credentialing_subscription_status?: string | undefined;
|
|
@@ -167,6 +172,7 @@ export const VendorsExportRequest$outboundSchema: z.ZodType<
|
|
|
167
172
|
zipLike: z.string().optional(),
|
|
168
173
|
status: z.string().optional(),
|
|
169
174
|
companyId: z.number().int().optional(),
|
|
175
|
+
externallyManagedByCompanyId: z.number().int().optional(),
|
|
170
176
|
credentialingSubscriptionIdNull: z.string().optional(),
|
|
171
177
|
scrubsSubscriptionIdNull: z.string().optional(),
|
|
172
178
|
credentialingSubscriptionStatus: z.string().optional(),
|
|
@@ -203,6 +209,7 @@ export const VendorsExportRequest$outboundSchema: z.ZodType<
|
|
|
203
209
|
stateLike: "state_like",
|
|
204
210
|
zipLike: "zip_like",
|
|
205
211
|
companyId: "company_id",
|
|
212
|
+
externallyManagedByCompanyId: "externally_managed_by_company_id",
|
|
206
213
|
credentialingSubscriptionIdNull: "credentialing_subscription_id_null",
|
|
207
214
|
scrubsSubscriptionIdNull: "scrubs_subscription_id_null",
|
|
208
215
|
credentialingSubscriptionStatus: "credentialing_subscription_status",
|
|
@@ -75,6 +75,7 @@ export function buildCompaniesListCompanyManagersQuery(
|
|
|
75
75
|
} {
|
|
76
76
|
return {
|
|
77
77
|
queryKey: queryKeyCompaniesListCompanyManagers(request.id, {
|
|
78
|
+
status: request.status,
|
|
78
79
|
sort: request.sort,
|
|
79
80
|
desc: request.desc,
|
|
80
81
|
page: request.page,
|
|
@@ -118,6 +119,7 @@ export function buildCompaniesListCompanyManagersInfiniteQuery(
|
|
|
118
119
|
} {
|
|
119
120
|
return {
|
|
120
121
|
queryKey: queryKeyCompaniesListCompanyManagersInfinite(request.id, {
|
|
122
|
+
status: request.status,
|
|
121
123
|
sort: request.sort,
|
|
122
124
|
desc: request.desc,
|
|
123
125
|
page: request.page,
|
|
@@ -160,6 +162,7 @@ export function buildCompaniesListCompanyManagersInfiniteQuery(
|
|
|
160
162
|
export function queryKeyCompaniesListCompanyManagers(
|
|
161
163
|
id: number,
|
|
162
164
|
parameters: {
|
|
165
|
+
status?: operations.ListCompanyManagersQueryParamStatus | undefined;
|
|
163
166
|
sort?: string | null | undefined;
|
|
164
167
|
desc?: components.Desc | undefined;
|
|
165
168
|
page?: number | undefined;
|
|
@@ -178,6 +181,7 @@ export function queryKeyCompaniesListCompanyManagers(
|
|
|
178
181
|
export function queryKeyCompaniesListCompanyManagersInfinite(
|
|
179
182
|
id: number,
|
|
180
183
|
parameters: {
|
|
184
|
+
status?: operations.ListCompanyManagersQueryParamStatus | undefined;
|
|
181
185
|
sort?: string | null | undefined;
|
|
182
186
|
desc?: components.Desc | undefined;
|
|
183
187
|
page?: number | undefined;
|
|
@@ -212,6 +212,7 @@ export function setCompaniesListCompanyManagersData(
|
|
|
212
212
|
queryKeyBase: [
|
|
213
213
|
id: number,
|
|
214
214
|
parameters: {
|
|
215
|
+
status?: operations.ListCompanyManagersQueryParamStatus | undefined;
|
|
215
216
|
sort?: string | null | undefined;
|
|
216
217
|
desc?: components.Desc | undefined;
|
|
217
218
|
page?: number | undefined;
|
|
@@ -231,6 +232,7 @@ export function invalidateCompaniesListCompanyManagers(
|
|
|
231
232
|
[
|
|
232
233
|
id: number,
|
|
233
234
|
parameters: {
|
|
235
|
+
status?: operations.ListCompanyManagersQueryParamStatus | undefined;
|
|
234
236
|
sort?: string | null | undefined;
|
|
235
237
|
desc?: components.Desc | undefined;
|
|
236
238
|
page?: number | undefined;
|
package/src/react-query/index.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from "./fhirConfigsDeleteFhirConfigById.js";
|
|
|
33
33
|
export * from "./fhirConfigsGetFhirConfig.js";
|
|
34
34
|
export * from "./fhirConfigsListOfFhirConfigurations.js";
|
|
35
35
|
export * from "./fhirConfigsUpdateFhirConfigById.js";
|
|
36
|
+
export * from "./invoicesConvertQuote.js";
|
|
36
37
|
export * from "./invoicesCreateInvoice.js";
|
|
37
38
|
export * from "./invoicesDownloadInvoicesExport.js";
|
|
38
39
|
export * from "./invoicesGetInvoice.js";
|
|
@@ -0,0 +1,124 @@
|
|
|
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 { invoicesConvertQuote } from "../funcs/invoicesConvertQuote.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 InvoicesConvertQuoteMutationVariables = {
|
|
31
|
+
request: operations.ConvertQuoteRequest;
|
|
32
|
+
options?: RequestOptions;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type InvoicesConvertQuoteMutationData =
|
|
36
|
+
operations.ConvertQuoteConvertQuoteOk;
|
|
37
|
+
|
|
38
|
+
export type InvoicesConvertQuoteMutationError =
|
|
39
|
+
| errors.ApiErrorResponse
|
|
40
|
+
| GreenSecurityError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Convert a quote into an invoice
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Converts a quote into the real invoice its caller will be charged for, and
|
|
54
|
+
* returns the new invoice with its calculated totals. Any `VendorCredential`
|
|
55
|
+
* linked to the quote is re-pointed at the new invoice.
|
|
56
|
+
*
|
|
57
|
+
* The operation is idempotent: converting a quote that has already been
|
|
58
|
+
* processed returns the invoice previously created from it rather than
|
|
59
|
+
* creating a second one, so a retried request is safe.
|
|
60
|
+
*
|
|
61
|
+
* The referenced invoice must actually be a quote — a non-quote invoice id
|
|
62
|
+
* responds `400`. Requires a caller whose access scope permits creating
|
|
63
|
+
* invoices; a caller allowed to create the invoice but not to update the
|
|
64
|
+
* linked `VendorCredential` responds `401`.
|
|
65
|
+
*
|
|
66
|
+
* Takes no request body.
|
|
67
|
+
*/
|
|
68
|
+
export function useInvoicesConvertQuoteMutation(
|
|
69
|
+
options?: MutationHookOptions<
|
|
70
|
+
InvoicesConvertQuoteMutationData,
|
|
71
|
+
InvoicesConvertQuoteMutationError,
|
|
72
|
+
InvoicesConvertQuoteMutationVariables
|
|
73
|
+
>,
|
|
74
|
+
): UseMutationResult<
|
|
75
|
+
InvoicesConvertQuoteMutationData,
|
|
76
|
+
InvoicesConvertQuoteMutationError,
|
|
77
|
+
InvoicesConvertQuoteMutationVariables
|
|
78
|
+
> {
|
|
79
|
+
const client = useGreenSecurityContext();
|
|
80
|
+
return useMutation({
|
|
81
|
+
...buildInvoicesConvertQuoteMutation(client, options),
|
|
82
|
+
...options,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function mutationKeyInvoicesConvertQuote(): MutationKey {
|
|
87
|
+
return ["@greensecurity/javascript-sdk", "invoices", "convertQuote"];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function buildInvoicesConvertQuoteMutation(
|
|
91
|
+
client$: GreenSecurityCore,
|
|
92
|
+
hookOptions?: RequestOptions,
|
|
93
|
+
): {
|
|
94
|
+
mutationKey: MutationKey;
|
|
95
|
+
mutationFn: (
|
|
96
|
+
variables: InvoicesConvertQuoteMutationVariables,
|
|
97
|
+
) => Promise<InvoicesConvertQuoteMutationData>;
|
|
98
|
+
} {
|
|
99
|
+
return {
|
|
100
|
+
mutationKey: mutationKeyInvoicesConvertQuote(),
|
|
101
|
+
mutationFn: function invoicesConvertQuoteMutationFn({
|
|
102
|
+
request,
|
|
103
|
+
options,
|
|
104
|
+
}): Promise<InvoicesConvertQuoteMutationData> {
|
|
105
|
+
const mergedOptions = {
|
|
106
|
+
...hookOptions,
|
|
107
|
+
...options,
|
|
108
|
+
fetchOptions: {
|
|
109
|
+
...hookOptions?.fetchOptions,
|
|
110
|
+
...options?.fetchOptions,
|
|
111
|
+
signal: combineSignals(
|
|
112
|
+
hookOptions?.fetchOptions?.signal,
|
|
113
|
+
options?.fetchOptions?.signal,
|
|
114
|
+
),
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
return unwrapAsync(invoicesConvertQuote(
|
|
118
|
+
client$,
|
|
119
|
+
request,
|
|
120
|
+
mergedOptions,
|
|
121
|
+
));
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|