@greensecurity/javascript-sdk 0.35.3 → 0.35.13
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 +9 -0
- package/bin/mcp-server.js +795 -376
- package/bin/mcp-server.js.map +18 -12
- package/dist/commonjs/__tests__/invoices.test.d.ts +2 -0
- package/dist/commonjs/__tests__/invoices.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/invoices.test.js +25 -0
- package/dist/commonjs/__tests__/invoices.test.js.map +1 -0
- package/dist/commonjs/__tests__/vendors.test.js +17 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/funcs/invoicesMakePayment.d.ts +17 -0
- package/dist/commonjs/funcs/invoicesMakePayment.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesMakePayment.js +123 -0
- package/dist/commonjs/funcs/invoicesMakePayment.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/vendorsUpdateVendorCredentialData.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialData.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialData.js +128 -0
- package/dist/commonjs/funcs/vendorsUpdateVendorCredentialData.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/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/invoicesMakePayment.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/invoicesMakePayment.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/invoicesMakePayment.js +64 -0
- package/dist/commonjs/mcp-server/tools/invoicesMakePayment.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorCredentialDetails.js +2 -1
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorCredentialDetails.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialData.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialData.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialData.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorCredentialData.js.map +1 -0
- package/dist/commonjs/models/components/credential.d.ts +4 -0
- package/dist/commonjs/models/components/credential.d.ts.map +1 -1
- package/dist/commonjs/models/components/credential.js +8 -0
- package/dist/commonjs/models/components/credential.js.map +1 -1
- package/dist/commonjs/models/components/expand.d.ts +3 -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/vendorcredentialsummary.d.ts +2 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorcredentialsummary.js +4 -0
- package/dist/commonjs/models/components/vendorcredentialsummary.js.map +1 -1
- 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/models/operations/makepayment.d.ts +91 -0
- package/dist/commonjs/models/operations/makepayment.d.ts.map +1 -0
- package/dist/commonjs/models/operations/makepayment.js +146 -0
- package/dist/commonjs/models/operations/makepayment.js.map +1 -0
- package/dist/commonjs/models/operations/updatevendorcredentialdata.d.ts +186 -0
- package/dist/commonjs/models/operations/updatevendorcredentialdata.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatevendorcredentialdata.js +217 -0
- package/dist/commonjs/models/operations/updatevendorcredentialdata.js.map +1 -0
- 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/invoicesMakePayment.d.ts +23 -0
- package/dist/commonjs/react-query/invoicesMakePayment.d.ts.map +1 -0
- package/dist/commonjs/react-query/invoicesMakePayment.js +47 -0
- package/dist/commonjs/react-query/invoicesMakePayment.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/vendorsUpdateVendorCredentialData.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialData.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialData.js +51 -0
- package/dist/commonjs/react-query/vendorsUpdateVendorCredentialData.js.map +1 -0
- package/dist/commonjs/sdk/invoices.d.ts +12 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -0
- package/dist/commonjs/sdk/invoices.js +22 -0
- package/dist/commonjs/sdk/invoices.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +8 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +11 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/invoices.test.d.ts +2 -0
- package/dist/esm/__tests__/invoices.test.d.ts.map +1 -0
- package/dist/esm/__tests__/invoices.test.js +23 -0
- package/dist/esm/__tests__/invoices.test.js.map +1 -0
- package/dist/esm/__tests__/vendors.test.js +17 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/funcs/invoicesMakePayment.d.ts +17 -0
- package/dist/esm/funcs/invoicesMakePayment.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesMakePayment.js +87 -0
- package/dist/esm/funcs/invoicesMakePayment.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/vendorsUpdateVendorCredentialData.d.ts +17 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialData.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialData.js +92 -0
- package/dist/esm/funcs/vendorsUpdateVendorCredentialData.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/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/mcp-server.js.map +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/invoicesMakePayment.d.ts +8 -0
- package/dist/esm/mcp-server/tools/invoicesMakePayment.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/invoicesMakePayment.js +28 -0
- package/dist/esm/mcp-server/tools/invoicesMakePayment.js.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsGetVendorCredentialDetails.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsGetVendorCredentialDetails.js +2 -1
- package/dist/esm/mcp-server/tools/vendorsGetVendorCredentialDetails.js.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialData.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialData.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialData.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsUpdateVendorCredentialData.js.map +1 -0
- package/dist/esm/models/components/credential.d.ts +4 -0
- package/dist/esm/models/components/credential.d.ts.map +1 -1
- package/dist/esm/models/components/credential.js +8 -0
- package/dist/esm/models/components/credential.js.map +1 -1
- package/dist/esm/models/components/expand.d.ts +3 -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/vendorcredentialsummary.d.ts +2 -0
- package/dist/esm/models/components/vendorcredentialsummary.d.ts.map +1 -1
- package/dist/esm/models/components/vendorcredentialsummary.js +4 -0
- package/dist/esm/models/components/vendorcredentialsummary.js.map +1 -1
- 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/models/operations/makepayment.d.ts +91 -0
- package/dist/esm/models/operations/makepayment.d.ts.map +1 -0
- package/dist/esm/models/operations/makepayment.js +104 -0
- package/dist/esm/models/operations/makepayment.js.map +1 -0
- package/dist/esm/models/operations/updatevendorcredentialdata.d.ts +186 -0
- package/dist/esm/models/operations/updatevendorcredentialdata.d.ts.map +1 -0
- package/dist/esm/models/operations/updatevendorcredentialdata.js +177 -0
- package/dist/esm/models/operations/updatevendorcredentialdata.js.map +1 -0
- 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/invoicesMakePayment.d.ts +23 -0
- package/dist/esm/react-query/invoicesMakePayment.d.ts.map +1 -0
- package/dist/esm/react-query/invoicesMakePayment.js +42 -0
- package/dist/esm/react-query/invoicesMakePayment.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/vendorsUpdateVendorCredentialData.d.ts +23 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialData.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialData.js +46 -0
- package/dist/esm/react-query/vendorsUpdateVendorCredentialData.js.map +1 -0
- package/dist/esm/sdk/invoices.d.ts +12 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -0
- package/dist/esm/sdk/invoices.js +18 -0
- package/dist/esm/sdk/invoices.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +8 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +11 -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 +26 -0
- package/src/__tests__/vendors.test.ts +20 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/funcs/invoicesMakePayment.ts +172 -0
- package/src/funcs/vendorsGetVendorCredentialDetails.ts +1 -0
- package/src/funcs/vendorsUpdateVendorCredentialData.ts +180 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/invoicesMakePayment.ts +37 -0
- package/src/mcp-server/tools/vendorsGetVendorCredentialDetails.ts +2 -1
- package/src/mcp-server/tools/vendorsUpdateVendorCredentialData.ts +39 -0
- package/src/models/components/credential.ts +12 -0
- package/src/models/components/expand.ts +2 -0
- package/src/models/components/vendorcredentialsummary.ts +6 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/makepayment.ts +217 -0
- package/src/models/operations/updatevendorcredentialdata.ts +305 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/invoicesMakePayment.ts +89 -0
- package/src/react-query/vendorsGetVendorCredentialDetails.ts +2 -0
- package/src/react-query/vendorsUpdateVendorCredentialData.ts +92 -0
- package/src/sdk/invoices.ts +27 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/vendors.ts +19 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type MakePaymentRequestBody = {
|
|
12
|
+
amount?: number | undefined;
|
|
13
|
+
useCredits?: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type MakePaymentRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The identifier of the object
|
|
19
|
+
*/
|
|
20
|
+
id: number;
|
|
21
|
+
requestBody: MakePaymentRequestBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
26
|
+
*/
|
|
27
|
+
export type MakePaymentResponseBody = {
|
|
28
|
+
success?: boolean | undefined;
|
|
29
|
+
error?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const MakePaymentRequestBody$inboundSchema: z.ZodType<
|
|
34
|
+
MakePaymentRequestBody,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
amount: z.number().optional(),
|
|
39
|
+
use_credits: z.boolean().optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"use_credits": "useCredits",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type MakePaymentRequestBody$Outbound = {
|
|
48
|
+
amount?: number | undefined;
|
|
49
|
+
use_credits?: boolean | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const MakePaymentRequestBody$outboundSchema: z.ZodType<
|
|
54
|
+
MakePaymentRequestBody$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
MakePaymentRequestBody
|
|
57
|
+
> = z.object({
|
|
58
|
+
amount: z.number().optional(),
|
|
59
|
+
useCredits: z.boolean().optional(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
useCredits: "use_credits",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
69
|
+
*/
|
|
70
|
+
export namespace MakePaymentRequestBody$ {
|
|
71
|
+
/** @deprecated use `MakePaymentRequestBody$inboundSchema` instead. */
|
|
72
|
+
export const inboundSchema = MakePaymentRequestBody$inboundSchema;
|
|
73
|
+
/** @deprecated use `MakePaymentRequestBody$outboundSchema` instead. */
|
|
74
|
+
export const outboundSchema = MakePaymentRequestBody$outboundSchema;
|
|
75
|
+
/** @deprecated use `MakePaymentRequestBody$Outbound` instead. */
|
|
76
|
+
export type Outbound = MakePaymentRequestBody$Outbound;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function makePaymentRequestBodyToJSON(
|
|
80
|
+
makePaymentRequestBody: MakePaymentRequestBody,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
MakePaymentRequestBody$outboundSchema.parse(makePaymentRequestBody),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function makePaymentRequestBodyFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<MakePaymentRequestBody, SDKValidationError> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) => MakePaymentRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
93
|
+
`Failed to parse 'MakePaymentRequestBody' from JSON`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const MakePaymentRequest$inboundSchema: z.ZodType<
|
|
99
|
+
MakePaymentRequest,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
unknown
|
|
102
|
+
> = z.object({
|
|
103
|
+
id: z.number().int(),
|
|
104
|
+
RequestBody: z.lazy(() => MakePaymentRequestBody$inboundSchema),
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
"RequestBody": "requestBody",
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type MakePaymentRequest$Outbound = {
|
|
113
|
+
id: number;
|
|
114
|
+
RequestBody: MakePaymentRequestBody$Outbound;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const MakePaymentRequest$outboundSchema: z.ZodType<
|
|
119
|
+
MakePaymentRequest$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
MakePaymentRequest
|
|
122
|
+
> = z.object({
|
|
123
|
+
id: z.number().int(),
|
|
124
|
+
requestBody: z.lazy(() => MakePaymentRequestBody$outboundSchema),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
requestBody: "RequestBody",
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
134
|
+
*/
|
|
135
|
+
export namespace MakePaymentRequest$ {
|
|
136
|
+
/** @deprecated use `MakePaymentRequest$inboundSchema` instead. */
|
|
137
|
+
export const inboundSchema = MakePaymentRequest$inboundSchema;
|
|
138
|
+
/** @deprecated use `MakePaymentRequest$outboundSchema` instead. */
|
|
139
|
+
export const outboundSchema = MakePaymentRequest$outboundSchema;
|
|
140
|
+
/** @deprecated use `MakePaymentRequest$Outbound` instead. */
|
|
141
|
+
export type Outbound = MakePaymentRequest$Outbound;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function makePaymentRequestToJSON(
|
|
145
|
+
makePaymentRequest: MakePaymentRequest,
|
|
146
|
+
): string {
|
|
147
|
+
return JSON.stringify(
|
|
148
|
+
MakePaymentRequest$outboundSchema.parse(makePaymentRequest),
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function makePaymentRequestFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<MakePaymentRequest, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => MakePaymentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'MakePaymentRequest' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const MakePaymentResponseBody$inboundSchema: z.ZodType<
|
|
164
|
+
MakePaymentResponseBody,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
unknown
|
|
167
|
+
> = z.object({
|
|
168
|
+
success: z.boolean().optional(),
|
|
169
|
+
error: z.string().optional(),
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export type MakePaymentResponseBody$Outbound = {
|
|
174
|
+
success?: boolean | undefined;
|
|
175
|
+
error?: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/** @internal */
|
|
179
|
+
export const MakePaymentResponseBody$outboundSchema: z.ZodType<
|
|
180
|
+
MakePaymentResponseBody$Outbound,
|
|
181
|
+
z.ZodTypeDef,
|
|
182
|
+
MakePaymentResponseBody
|
|
183
|
+
> = z.object({
|
|
184
|
+
success: z.boolean().optional(),
|
|
185
|
+
error: z.string().optional(),
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @internal
|
|
190
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
191
|
+
*/
|
|
192
|
+
export namespace MakePaymentResponseBody$ {
|
|
193
|
+
/** @deprecated use `MakePaymentResponseBody$inboundSchema` instead. */
|
|
194
|
+
export const inboundSchema = MakePaymentResponseBody$inboundSchema;
|
|
195
|
+
/** @deprecated use `MakePaymentResponseBody$outboundSchema` instead. */
|
|
196
|
+
export const outboundSchema = MakePaymentResponseBody$outboundSchema;
|
|
197
|
+
/** @deprecated use `MakePaymentResponseBody$Outbound` instead. */
|
|
198
|
+
export type Outbound = MakePaymentResponseBody$Outbound;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function makePaymentResponseBodyToJSON(
|
|
202
|
+
makePaymentResponseBody: MakePaymentResponseBody,
|
|
203
|
+
): string {
|
|
204
|
+
return JSON.stringify(
|
|
205
|
+
MakePaymentResponseBody$outboundSchema.parse(makePaymentResponseBody),
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function makePaymentResponseBodyFromJSON(
|
|
210
|
+
jsonString: string,
|
|
211
|
+
): SafeParseResult<MakePaymentResponseBody, SDKValidationError> {
|
|
212
|
+
return safeParse(
|
|
213
|
+
jsonString,
|
|
214
|
+
(x) => MakePaymentResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
215
|
+
`Failed to parse 'MakePaymentResponseBody' from JSON`,
|
|
216
|
+
);
|
|
217
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const Status = {
|
|
13
|
+
PendingVendor: "Pending Vendor",
|
|
14
|
+
PendingApproval: "Pending Approval",
|
|
15
|
+
Approved: "Approved",
|
|
16
|
+
Declined: "Declined",
|
|
17
|
+
Denied: "Denied",
|
|
18
|
+
Expired: "Expired",
|
|
19
|
+
Suspended: "Suspended",
|
|
20
|
+
} as const;
|
|
21
|
+
export type Status = ClosedEnum<typeof Status>;
|
|
22
|
+
|
|
23
|
+
export const BcpOrderStatus = {
|
|
24
|
+
PendingGreen: "Pending Green",
|
|
25
|
+
PendingBCP: "Pending BCP",
|
|
26
|
+
Processed: "Processed",
|
|
27
|
+
} as const;
|
|
28
|
+
export type BcpOrderStatus = ClosedEnum<typeof BcpOrderStatus>;
|
|
29
|
+
|
|
30
|
+
export const BcpResultStatus = {
|
|
31
|
+
Pending: "Pending",
|
|
32
|
+
Processing: "Processing",
|
|
33
|
+
Clear: "Clear",
|
|
34
|
+
Hit: "Hit",
|
|
35
|
+
Unknown: "Unknown",
|
|
36
|
+
Review: "Review",
|
|
37
|
+
} as const;
|
|
38
|
+
export type BcpResultStatus = ClosedEnum<typeof BcpResultStatus>;
|
|
39
|
+
|
|
40
|
+
export type UpdateVendorCredentialDataRequestBody = {
|
|
41
|
+
jsonData?: string | undefined;
|
|
42
|
+
autoApprove?: boolean | undefined;
|
|
43
|
+
status?: Status | undefined;
|
|
44
|
+
bcpOrderId?: string | undefined;
|
|
45
|
+
bcpOrderStatus?: BcpOrderStatus | undefined;
|
|
46
|
+
bcpResultStatus?: BcpResultStatus | undefined;
|
|
47
|
+
bcpNotes?: string | undefined;
|
|
48
|
+
backgroundCheckProviderId?: number | undefined;
|
|
49
|
+
bcpTurnaroundTime?: number | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type UpdateVendorCredentialDataRequest = {
|
|
53
|
+
/**
|
|
54
|
+
* Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
|
|
55
|
+
*/
|
|
56
|
+
vendorIdOrMe: string;
|
|
57
|
+
/**
|
|
58
|
+
* The identifier of the object
|
|
59
|
+
*/
|
|
60
|
+
id: number;
|
|
61
|
+
requestBody: UpdateVendorCredentialDataRequestBody;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
66
|
+
.nativeEnum(Status);
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
|
|
70
|
+
Status$inboundSchema;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export namespace Status$ {
|
|
77
|
+
/** @deprecated use `Status$inboundSchema` instead. */
|
|
78
|
+
export const inboundSchema = Status$inboundSchema;
|
|
79
|
+
/** @deprecated use `Status$outboundSchema` instead. */
|
|
80
|
+
export const outboundSchema = Status$outboundSchema;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const BcpOrderStatus$inboundSchema: z.ZodNativeEnum<
|
|
85
|
+
typeof BcpOrderStatus
|
|
86
|
+
> = z.nativeEnum(BcpOrderStatus);
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const BcpOrderStatus$outboundSchema: z.ZodNativeEnum<
|
|
90
|
+
typeof BcpOrderStatus
|
|
91
|
+
> = BcpOrderStatus$inboundSchema;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
96
|
+
*/
|
|
97
|
+
export namespace BcpOrderStatus$ {
|
|
98
|
+
/** @deprecated use `BcpOrderStatus$inboundSchema` instead. */
|
|
99
|
+
export const inboundSchema = BcpOrderStatus$inboundSchema;
|
|
100
|
+
/** @deprecated use `BcpOrderStatus$outboundSchema` instead. */
|
|
101
|
+
export const outboundSchema = BcpOrderStatus$outboundSchema;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const BcpResultStatus$inboundSchema: z.ZodNativeEnum<
|
|
106
|
+
typeof BcpResultStatus
|
|
107
|
+
> = z.nativeEnum(BcpResultStatus);
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const BcpResultStatus$outboundSchema: z.ZodNativeEnum<
|
|
111
|
+
typeof BcpResultStatus
|
|
112
|
+
> = BcpResultStatus$inboundSchema;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
117
|
+
*/
|
|
118
|
+
export namespace BcpResultStatus$ {
|
|
119
|
+
/** @deprecated use `BcpResultStatus$inboundSchema` instead. */
|
|
120
|
+
export const inboundSchema = BcpResultStatus$inboundSchema;
|
|
121
|
+
/** @deprecated use `BcpResultStatus$outboundSchema` instead. */
|
|
122
|
+
export const outboundSchema = BcpResultStatus$outboundSchema;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const UpdateVendorCredentialDataRequestBody$inboundSchema: z.ZodType<
|
|
127
|
+
UpdateVendorCredentialDataRequestBody,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
unknown
|
|
130
|
+
> = z.object({
|
|
131
|
+
json_data: z.string().optional(),
|
|
132
|
+
auto_approve: z.boolean().optional(),
|
|
133
|
+
status: Status$inboundSchema.optional(),
|
|
134
|
+
bcp_order_id: z.string().optional(),
|
|
135
|
+
bcp_order_status: BcpOrderStatus$inboundSchema.optional(),
|
|
136
|
+
bcp_result_status: BcpResultStatus$inboundSchema.optional(),
|
|
137
|
+
bcp_notes: z.string().optional(),
|
|
138
|
+
background_check_provider_id: z.number().int().optional(),
|
|
139
|
+
bcp_turnaround_time: z.number().int().optional(),
|
|
140
|
+
}).transform((v) => {
|
|
141
|
+
return remap$(v, {
|
|
142
|
+
"json_data": "jsonData",
|
|
143
|
+
"auto_approve": "autoApprove",
|
|
144
|
+
"bcp_order_id": "bcpOrderId",
|
|
145
|
+
"bcp_order_status": "bcpOrderStatus",
|
|
146
|
+
"bcp_result_status": "bcpResultStatus",
|
|
147
|
+
"bcp_notes": "bcpNotes",
|
|
148
|
+
"background_check_provider_id": "backgroundCheckProviderId",
|
|
149
|
+
"bcp_turnaround_time": "bcpTurnaroundTime",
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export type UpdateVendorCredentialDataRequestBody$Outbound = {
|
|
155
|
+
json_data?: string | undefined;
|
|
156
|
+
auto_approve?: boolean | undefined;
|
|
157
|
+
status?: string | undefined;
|
|
158
|
+
bcp_order_id?: string | undefined;
|
|
159
|
+
bcp_order_status?: string | undefined;
|
|
160
|
+
bcp_result_status?: string | undefined;
|
|
161
|
+
bcp_notes?: string | undefined;
|
|
162
|
+
background_check_provider_id?: number | undefined;
|
|
163
|
+
bcp_turnaround_time?: number | undefined;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const UpdateVendorCredentialDataRequestBody$outboundSchema: z.ZodType<
|
|
168
|
+
UpdateVendorCredentialDataRequestBody$Outbound,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
UpdateVendorCredentialDataRequestBody
|
|
171
|
+
> = z.object({
|
|
172
|
+
jsonData: z.string().optional(),
|
|
173
|
+
autoApprove: z.boolean().optional(),
|
|
174
|
+
status: Status$outboundSchema.optional(),
|
|
175
|
+
bcpOrderId: z.string().optional(),
|
|
176
|
+
bcpOrderStatus: BcpOrderStatus$outboundSchema.optional(),
|
|
177
|
+
bcpResultStatus: BcpResultStatus$outboundSchema.optional(),
|
|
178
|
+
bcpNotes: z.string().optional(),
|
|
179
|
+
backgroundCheckProviderId: z.number().int().optional(),
|
|
180
|
+
bcpTurnaroundTime: z.number().int().optional(),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
jsonData: "json_data",
|
|
184
|
+
autoApprove: "auto_approve",
|
|
185
|
+
bcpOrderId: "bcp_order_id",
|
|
186
|
+
bcpOrderStatus: "bcp_order_status",
|
|
187
|
+
bcpResultStatus: "bcp_result_status",
|
|
188
|
+
bcpNotes: "bcp_notes",
|
|
189
|
+
backgroundCheckProviderId: "background_check_provider_id",
|
|
190
|
+
bcpTurnaroundTime: "bcp_turnaround_time",
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
197
|
+
*/
|
|
198
|
+
export namespace UpdateVendorCredentialDataRequestBody$ {
|
|
199
|
+
/** @deprecated use `UpdateVendorCredentialDataRequestBody$inboundSchema` instead. */
|
|
200
|
+
export const inboundSchema =
|
|
201
|
+
UpdateVendorCredentialDataRequestBody$inboundSchema;
|
|
202
|
+
/** @deprecated use `UpdateVendorCredentialDataRequestBody$outboundSchema` instead. */
|
|
203
|
+
export const outboundSchema =
|
|
204
|
+
UpdateVendorCredentialDataRequestBody$outboundSchema;
|
|
205
|
+
/** @deprecated use `UpdateVendorCredentialDataRequestBody$Outbound` instead. */
|
|
206
|
+
export type Outbound = UpdateVendorCredentialDataRequestBody$Outbound;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function updateVendorCredentialDataRequestBodyToJSON(
|
|
210
|
+
updateVendorCredentialDataRequestBody: UpdateVendorCredentialDataRequestBody,
|
|
211
|
+
): string {
|
|
212
|
+
return JSON.stringify(
|
|
213
|
+
UpdateVendorCredentialDataRequestBody$outboundSchema.parse(
|
|
214
|
+
updateVendorCredentialDataRequestBody,
|
|
215
|
+
),
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function updateVendorCredentialDataRequestBodyFromJSON(
|
|
220
|
+
jsonString: string,
|
|
221
|
+
): SafeParseResult<UpdateVendorCredentialDataRequestBody, SDKValidationError> {
|
|
222
|
+
return safeParse(
|
|
223
|
+
jsonString,
|
|
224
|
+
(x) =>
|
|
225
|
+
UpdateVendorCredentialDataRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
226
|
+
`Failed to parse 'UpdateVendorCredentialDataRequestBody' from JSON`,
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/** @internal */
|
|
231
|
+
export const UpdateVendorCredentialDataRequest$inboundSchema: z.ZodType<
|
|
232
|
+
UpdateVendorCredentialDataRequest,
|
|
233
|
+
z.ZodTypeDef,
|
|
234
|
+
unknown
|
|
235
|
+
> = z.object({
|
|
236
|
+
vendor_id_or_me: z.string(),
|
|
237
|
+
id: z.number().int(),
|
|
238
|
+
RequestBody: z.lazy(() =>
|
|
239
|
+
UpdateVendorCredentialDataRequestBody$inboundSchema
|
|
240
|
+
),
|
|
241
|
+
}).transform((v) => {
|
|
242
|
+
return remap$(v, {
|
|
243
|
+
"vendor_id_or_me": "vendorIdOrMe",
|
|
244
|
+
"RequestBody": "requestBody",
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export type UpdateVendorCredentialDataRequest$Outbound = {
|
|
250
|
+
vendor_id_or_me: string;
|
|
251
|
+
id: number;
|
|
252
|
+
RequestBody: UpdateVendorCredentialDataRequestBody$Outbound;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const UpdateVendorCredentialDataRequest$outboundSchema: z.ZodType<
|
|
257
|
+
UpdateVendorCredentialDataRequest$Outbound,
|
|
258
|
+
z.ZodTypeDef,
|
|
259
|
+
UpdateVendorCredentialDataRequest
|
|
260
|
+
> = z.object({
|
|
261
|
+
vendorIdOrMe: z.string(),
|
|
262
|
+
id: z.number().int(),
|
|
263
|
+
requestBody: z.lazy(() =>
|
|
264
|
+
UpdateVendorCredentialDataRequestBody$outboundSchema
|
|
265
|
+
),
|
|
266
|
+
}).transform((v) => {
|
|
267
|
+
return remap$(v, {
|
|
268
|
+
vendorIdOrMe: "vendor_id_or_me",
|
|
269
|
+
requestBody: "RequestBody",
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @internal
|
|
275
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
276
|
+
*/
|
|
277
|
+
export namespace UpdateVendorCredentialDataRequest$ {
|
|
278
|
+
/** @deprecated use `UpdateVendorCredentialDataRequest$inboundSchema` instead. */
|
|
279
|
+
export const inboundSchema = UpdateVendorCredentialDataRequest$inboundSchema;
|
|
280
|
+
/** @deprecated use `UpdateVendorCredentialDataRequest$outboundSchema` instead. */
|
|
281
|
+
export const outboundSchema =
|
|
282
|
+
UpdateVendorCredentialDataRequest$outboundSchema;
|
|
283
|
+
/** @deprecated use `UpdateVendorCredentialDataRequest$Outbound` instead. */
|
|
284
|
+
export type Outbound = UpdateVendorCredentialDataRequest$Outbound;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function updateVendorCredentialDataRequestToJSON(
|
|
288
|
+
updateVendorCredentialDataRequest: UpdateVendorCredentialDataRequest,
|
|
289
|
+
): string {
|
|
290
|
+
return JSON.stringify(
|
|
291
|
+
UpdateVendorCredentialDataRequest$outboundSchema.parse(
|
|
292
|
+
updateVendorCredentialDataRequest,
|
|
293
|
+
),
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export function updateVendorCredentialDataRequestFromJSON(
|
|
298
|
+
jsonString: string,
|
|
299
|
+
): SafeParseResult<UpdateVendorCredentialDataRequest, SDKValidationError> {
|
|
300
|
+
return safeParse(
|
|
301
|
+
jsonString,
|
|
302
|
+
(x) => UpdateVendorCredentialDataRequest$inboundSchema.parse(JSON.parse(x)),
|
|
303
|
+
`Failed to parse 'UpdateVendorCredentialDataRequest' from JSON`,
|
|
304
|
+
);
|
|
305
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./companiesListOrSearchCompanies.js";
|
|
|
9
9
|
export * from "./dataRequestsAddDataRequestFile.js";
|
|
10
10
|
export * from "./dataRequestsDeleteDataRequestFile.js";
|
|
11
11
|
export * from "./dataRequestsUpdateDataRequest.js";
|
|
12
|
+
export * from "./invoicesMakePayment.js";
|
|
12
13
|
export * from "./organizationsGetFacility.js";
|
|
13
14
|
export * from "./organizationsListOrSearchFacilities.js";
|
|
14
15
|
export * from "./supportArticlesGetSupportArticle.js";
|
|
@@ -53,6 +54,7 @@ export * from "./vendorsListVendorScrubPurchases.js";
|
|
|
53
54
|
export * from "./vendorsPurchaseScrubCredits.js";
|
|
54
55
|
export * from "./vendorsSendDownloadCode.js";
|
|
55
56
|
export * from "./vendorsSubmitVendorCredential.js";
|
|
57
|
+
export * from "./vendorsUpdateVendorCredentialData.js";
|
|
56
58
|
export * from "./vendorsUpdateVendorCredentialFile.js";
|
|
57
59
|
export * from "./vendorsUpdateVendorDetails.js";
|
|
58
60
|
export * from "./vendorsUpdateVendorManagedByCompany.js";
|
|
@@ -0,0 +1,89 @@
|
|
|
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 { invoicesMakePayment } from "../funcs/invoicesMakePayment.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
|
+
import { useGreenSecurityContext } from "./_context.js";
|
|
17
|
+
import { MutationHookOptions } from "./_types.js";
|
|
18
|
+
|
|
19
|
+
export type InvoicesMakePaymentMutationVariables = {
|
|
20
|
+
request: operations.MakePaymentRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type InvoicesMakePaymentMutationData =
|
|
25
|
+
operations.MakePaymentResponseBody;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Make payment for the invoice
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Make payment for the invoice
|
|
32
|
+
*/
|
|
33
|
+
export function useInvoicesMakePaymentMutation(
|
|
34
|
+
options?: MutationHookOptions<
|
|
35
|
+
InvoicesMakePaymentMutationData,
|
|
36
|
+
Error,
|
|
37
|
+
InvoicesMakePaymentMutationVariables
|
|
38
|
+
>,
|
|
39
|
+
): UseMutationResult<
|
|
40
|
+
InvoicesMakePaymentMutationData,
|
|
41
|
+
Error,
|
|
42
|
+
InvoicesMakePaymentMutationVariables
|
|
43
|
+
> {
|
|
44
|
+
const client = useGreenSecurityContext();
|
|
45
|
+
return useMutation({
|
|
46
|
+
...buildInvoicesMakePaymentMutation(client, options),
|
|
47
|
+
...options,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function mutationKeyInvoicesMakePayment(): MutationKey {
|
|
52
|
+
return ["@greensecurity/javascript-sdk", "invoices", "makePayment"];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildInvoicesMakePaymentMutation(
|
|
56
|
+
client$: GreenSecurityCore,
|
|
57
|
+
hookOptions?: RequestOptions,
|
|
58
|
+
): {
|
|
59
|
+
mutationKey: MutationKey;
|
|
60
|
+
mutationFn: (
|
|
61
|
+
variables: InvoicesMakePaymentMutationVariables,
|
|
62
|
+
) => Promise<InvoicesMakePaymentMutationData>;
|
|
63
|
+
} {
|
|
64
|
+
return {
|
|
65
|
+
mutationKey: mutationKeyInvoicesMakePayment(),
|
|
66
|
+
mutationFn: function invoicesMakePaymentMutationFn({
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
}): Promise<InvoicesMakePaymentMutationData> {
|
|
70
|
+
const mergedOptions = {
|
|
71
|
+
...hookOptions,
|
|
72
|
+
...options,
|
|
73
|
+
fetchOptions: {
|
|
74
|
+
...hookOptions?.fetchOptions,
|
|
75
|
+
...options?.fetchOptions,
|
|
76
|
+
signal: combineSignals(
|
|
77
|
+
hookOptions?.fetchOptions?.signal,
|
|
78
|
+
options?.fetchOptions?.signal,
|
|
79
|
+
),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
return unwrapAsync(invoicesMakePayment(
|
|
83
|
+
client$,
|
|
84
|
+
request,
|
|
85
|
+
mergedOptions,
|
|
86
|
+
));
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -51,6 +51,7 @@ export type VendorsGetVendorCredentialDetailsQueryData =
|
|
|
51
51
|
* - vendor_credential.vendor_credential_data_requests
|
|
52
52
|
* - vendor_credential.credential_variants
|
|
53
53
|
* - vendor_credential.targets_chop
|
|
54
|
+
* - vendor_credential.total_pending_credentials
|
|
54
55
|
*/
|
|
55
56
|
export function useVendorsGetVendorCredentialDetails(
|
|
56
57
|
request: operations.GetVendorCredentialDetailsRequest,
|
|
@@ -89,6 +90,7 @@ export function useVendorsGetVendorCredentialDetails(
|
|
|
89
90
|
* - vendor_credential.vendor_credential_data_requests
|
|
90
91
|
* - vendor_credential.credential_variants
|
|
91
92
|
* - vendor_credential.targets_chop
|
|
93
|
+
* - vendor_credential.total_pending_credentials
|
|
92
94
|
*/
|
|
93
95
|
export function useVendorsGetVendorCredentialDetailsSuspense(
|
|
94
96
|
request: operations.GetVendorCredentialDetailsRequest,
|