@greensecurity/javascript-sdk 0.35.3 → 0.35.7
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 +784 -371
- package/bin/mcp-server.js.map +14 -8
- 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/__tests__/zones.test.js +33 -7
- package/dist/commonjs/__tests__/zones.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/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/mcp-server/mcp-server.js +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/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/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/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 +7 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +10 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/invoices.test.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/__tests__/zones.test.js +33 -7
- package/dist/esm/__tests__/zones.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/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/mcp-server/mcp-server.js +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/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/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/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 +7 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +10 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/invoices.test.ts +26 -0
- package/src/__tests__/vendors.test.ts +20 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +33 -7
- package/src/funcs/invoicesMakePayment.ts +172 -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/vendorsUpdateVendorCredentialData.ts +39 -0
- package/src/models/components/credential.ts +12 -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/vendorsUpdateVendorCredentialData.ts +92 -0
- package/src/sdk/invoices.ts +27 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/vendors.ts +18 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { vendorsUpdateVendorCredentialData } from "../funcs/vendorsUpdateVendorCredentialData.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 VendorsUpdateVendorCredentialDataMutationVariables = {
|
|
20
|
+
request: operations.UpdateVendorCredentialDataRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type VendorsUpdateVendorCredentialDataMutationData = boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update vendor credential data
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Update vendor credential data
|
|
31
|
+
*/
|
|
32
|
+
export function useVendorsUpdateVendorCredentialDataMutation(
|
|
33
|
+
options?: MutationHookOptions<
|
|
34
|
+
VendorsUpdateVendorCredentialDataMutationData,
|
|
35
|
+
Error,
|
|
36
|
+
VendorsUpdateVendorCredentialDataMutationVariables
|
|
37
|
+
>,
|
|
38
|
+
): UseMutationResult<
|
|
39
|
+
VendorsUpdateVendorCredentialDataMutationData,
|
|
40
|
+
Error,
|
|
41
|
+
VendorsUpdateVendorCredentialDataMutationVariables
|
|
42
|
+
> {
|
|
43
|
+
const client = useGreenSecurityContext();
|
|
44
|
+
return useMutation({
|
|
45
|
+
...buildVendorsUpdateVendorCredentialDataMutation(client, options),
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function mutationKeyVendorsUpdateVendorCredentialData(): MutationKey {
|
|
51
|
+
return [
|
|
52
|
+
"@greensecurity/javascript-sdk",
|
|
53
|
+
"vendors",
|
|
54
|
+
"updateVendorCredentialData",
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function buildVendorsUpdateVendorCredentialDataMutation(
|
|
59
|
+
client$: GreenSecurityCore,
|
|
60
|
+
hookOptions?: RequestOptions,
|
|
61
|
+
): {
|
|
62
|
+
mutationKey: MutationKey;
|
|
63
|
+
mutationFn: (
|
|
64
|
+
variables: VendorsUpdateVendorCredentialDataMutationVariables,
|
|
65
|
+
) => Promise<VendorsUpdateVendorCredentialDataMutationData>;
|
|
66
|
+
} {
|
|
67
|
+
return {
|
|
68
|
+
mutationKey: mutationKeyVendorsUpdateVendorCredentialData(),
|
|
69
|
+
mutationFn: function vendorsUpdateVendorCredentialDataMutationFn({
|
|
70
|
+
request,
|
|
71
|
+
options,
|
|
72
|
+
}): Promise<VendorsUpdateVendorCredentialDataMutationData> {
|
|
73
|
+
const mergedOptions = {
|
|
74
|
+
...hookOptions,
|
|
75
|
+
...options,
|
|
76
|
+
fetchOptions: {
|
|
77
|
+
...hookOptions?.fetchOptions,
|
|
78
|
+
...options?.fetchOptions,
|
|
79
|
+
signal: combineSignals(
|
|
80
|
+
hookOptions?.fetchOptions?.signal,
|
|
81
|
+
options?.fetchOptions?.signal,
|
|
82
|
+
),
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
return unwrapAsync(vendorsUpdateVendorCredentialData(
|
|
86
|
+
client$,
|
|
87
|
+
request,
|
|
88
|
+
mergedOptions,
|
|
89
|
+
));
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { invoicesMakePayment } from "../funcs/invoicesMakePayment.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Invoices extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Make payment for the invoice
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Make payment for the invoice
|
|
16
|
+
*/
|
|
17
|
+
async makePayment(
|
|
18
|
+
request: operations.MakePaymentRequest,
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): Promise<operations.MakePaymentResponseBody> {
|
|
21
|
+
return unwrapAsync(invoicesMakePayment(
|
|
22
|
+
this,
|
|
23
|
+
request,
|
|
24
|
+
options,
|
|
25
|
+
));
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
6
|
import { Companies } from "./companies.js";
|
|
7
7
|
import { DataRequests } from "./datarequests.js";
|
|
8
|
+
import { Invoices } from "./invoices.js";
|
|
8
9
|
import { Organizations } from "./organizations.js";
|
|
9
10
|
import { SupportArticles } from "./supportarticles.js";
|
|
10
11
|
import { Users } from "./users.js";
|
|
@@ -58,4 +59,9 @@ export class GreenSecurity extends ClientSDK {
|
|
|
58
59
|
get dataRequests(): DataRequests {
|
|
59
60
|
return (this._dataRequests ??= new DataRequests(this._options));
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
private _invoices?: Invoices;
|
|
64
|
+
get invoices(): Invoices {
|
|
65
|
+
return (this._invoices ??= new Invoices(this._options));
|
|
66
|
+
}
|
|
61
67
|
}
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -34,6 +34,7 @@ import { vendorsListVendorScrubPurchases } from "../funcs/vendorsListVendorScrub
|
|
|
34
34
|
import { vendorsPurchaseScrubCredits } from "../funcs/vendorsPurchaseScrubCredits.js";
|
|
35
35
|
import { vendorsSendDownloadCode } from "../funcs/vendorsSendDownloadCode.js";
|
|
36
36
|
import { vendorsSubmitVendorCredential } from "../funcs/vendorsSubmitVendorCredential.js";
|
|
37
|
+
import { vendorsUpdateVendorCredentialData } from "../funcs/vendorsUpdateVendorCredentialData.js";
|
|
37
38
|
import { vendorsUpdateVendorCredentialFile } from "../funcs/vendorsUpdateVendorCredentialFile.js";
|
|
38
39
|
import { vendorsUpdateVendorDetails } from "../funcs/vendorsUpdateVendorDetails.js";
|
|
39
40
|
import { vendorsUpdateVendorManagedByCompany } from "../funcs/vendorsUpdateVendorManagedByCompany.js";
|
|
@@ -134,6 +135,23 @@ export class Vendors extends ClientSDK {
|
|
|
134
135
|
));
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Update vendor credential data
|
|
140
|
+
*
|
|
141
|
+
* @remarks
|
|
142
|
+
* Update vendor credential data
|
|
143
|
+
*/
|
|
144
|
+
async updateVendorCredentialData(
|
|
145
|
+
request: operations.UpdateVendorCredentialDataRequest,
|
|
146
|
+
options?: RequestOptions,
|
|
147
|
+
): Promise<boolean> {
|
|
148
|
+
return unwrapAsync(vendorsUpdateVendorCredentialData(
|
|
149
|
+
this,
|
|
150
|
+
request,
|
|
151
|
+
options,
|
|
152
|
+
));
|
|
153
|
+
}
|
|
154
|
+
|
|
137
155
|
/**
|
|
138
156
|
* Get vendor credential file
|
|
139
157
|
*
|