@greensecurity/javascript-sdk 0.30.19 → 0.30.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/bin/mcp-server.js +254 -60
- package/bin/mcp-server.js.map +15 -11
- package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +21 -2
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.js +121 -0
- package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- 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 +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/invoice.d.ts +2 -0
- package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/components/invoice.js +2 -0
- package/dist/commonjs/models/components/invoice.js.map +1 -1
- package/dist/commonjs/models/components/supervisor.d.ts +36 -0
- package/dist/commonjs/models/components/supervisor.d.ts.map +1 -0
- package/dist/commonjs/models/components/supervisor.js +73 -0
- package/dist/commonjs/models/components/supervisor.js.map +1 -0
- package/dist/commonjs/models/components/vendor.d.ts +6 -31
- package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendor.js +4 -34
- package/dist/commonjs/models/components/vendor.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/purchasescrubcredits.d.ts +91 -0
- package/dist/commonjs/models/operations/purchasescrubcredits.d.ts.map +1 -0
- package/dist/commonjs/models/operations/purchasescrubcredits.js +160 -0
- package/dist/commonjs/models/operations/purchasescrubcredits.js.map +1 -0
- package/dist/commonjs/models/operations/updatevendordetails.d.ts +5 -0
- package/dist/commonjs/models/operations/updatevendordetails.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatevendordetails.js +2 -0
- package/dist/commonjs/models/operations/updatevendordetails.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/vendorsPurchaseScrubCredits.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.js +47 -0
- package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.js.map +1 -0
- 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__/vendormanagedbycompanies.test.js +1 -1
- package/dist/esm/__tests__/vendors.test.js +21 -2
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/funcs/vendorsPurchaseScrubCredits.d.ts +17 -0
- package/dist/esm/funcs/vendorsPurchaseScrubCredits.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsPurchaseScrubCredits.js +85 -0
- package/dist/esm/funcs/vendorsPurchaseScrubCredits.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- 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 +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/invoice.d.ts +2 -0
- package/dist/esm/models/components/invoice.d.ts.map +1 -1
- package/dist/esm/models/components/invoice.js +2 -0
- package/dist/esm/models/components/invoice.js.map +1 -1
- package/dist/esm/models/components/supervisor.d.ts +36 -0
- package/dist/esm/models/components/supervisor.d.ts.map +1 -0
- package/dist/esm/models/components/supervisor.js +35 -0
- package/dist/esm/models/components/supervisor.js.map +1 -0
- package/dist/esm/models/components/vendor.d.ts +6 -31
- package/dist/esm/models/components/vendor.d.ts.map +1 -1
- package/dist/esm/models/components/vendor.js +3 -31
- package/dist/esm/models/components/vendor.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/purchasescrubcredits.d.ts +91 -0
- package/dist/esm/models/operations/purchasescrubcredits.d.ts.map +1 -0
- package/dist/esm/models/operations/purchasescrubcredits.js +118 -0
- package/dist/esm/models/operations/purchasescrubcredits.js.map +1 -0
- package/dist/esm/models/operations/updatevendordetails.d.ts +5 -0
- package/dist/esm/models/operations/updatevendordetails.d.ts.map +1 -1
- package/dist/esm/models/operations/updatevendordetails.js +2 -0
- package/dist/esm/models/operations/updatevendordetails.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/vendorsPurchaseScrubCredits.d.ts +23 -0
- package/dist/esm/react-query/vendorsPurchaseScrubCredits.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsPurchaseScrubCredits.js +42 -0
- package/dist/esm/react-query/vendorsPurchaseScrubCredits.js.map +1 -0
- 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__/vendormanagedbycompanies.test.ts +1 -1
- package/src/__tests__/vendors.test.ts +24 -2
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/funcs/vendorsPurchaseScrubCredits.ts +176 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/vendorsPurchaseScrubCredits.ts +37 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoice.ts +4 -0
- package/src/models/components/supervisor.ts +73 -0
- package/src/models/components/vendor.ts +13 -66
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/purchasescrubcredits.ts +237 -0
- package/src/models/operations/updatevendordetails.ts +7 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsPurchaseScrubCredits.ts +89 -0
- package/src/sdk/vendors.ts +18 -0
|
@@ -0,0 +1,237 @@
|
|
|
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 PurchaseScrubCreditsRequestBody = {
|
|
12
|
+
payLater: boolean;
|
|
13
|
+
variantId: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type PurchaseScrubCreditsRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
|
|
19
|
+
*/
|
|
20
|
+
vendorIdOrMe: string;
|
|
21
|
+
requestBody: PurchaseScrubCreditsRequestBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
26
|
+
*/
|
|
27
|
+
export type PurchaseScrubCreditsResponseBody = {
|
|
28
|
+
invoiceId?: number | undefined;
|
|
29
|
+
creditBalance?: number | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const PurchaseScrubCreditsRequestBody$inboundSchema: z.ZodType<
|
|
34
|
+
PurchaseScrubCreditsRequestBody,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
pay_later: z.boolean(),
|
|
39
|
+
variant_id: z.number().int(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"pay_later": "payLater",
|
|
43
|
+
"variant_id": "variantId",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type PurchaseScrubCreditsRequestBody$Outbound = {
|
|
49
|
+
pay_later: boolean;
|
|
50
|
+
variant_id: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const PurchaseScrubCreditsRequestBody$outboundSchema: z.ZodType<
|
|
55
|
+
PurchaseScrubCreditsRequestBody$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
PurchaseScrubCreditsRequestBody
|
|
58
|
+
> = z.object({
|
|
59
|
+
payLater: z.boolean(),
|
|
60
|
+
variantId: z.number().int(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
payLater: "pay_later",
|
|
64
|
+
variantId: "variant_id",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
71
|
+
*/
|
|
72
|
+
export namespace PurchaseScrubCreditsRequestBody$ {
|
|
73
|
+
/** @deprecated use `PurchaseScrubCreditsRequestBody$inboundSchema` instead. */
|
|
74
|
+
export const inboundSchema = PurchaseScrubCreditsRequestBody$inboundSchema;
|
|
75
|
+
/** @deprecated use `PurchaseScrubCreditsRequestBody$outboundSchema` instead. */
|
|
76
|
+
export const outboundSchema = PurchaseScrubCreditsRequestBody$outboundSchema;
|
|
77
|
+
/** @deprecated use `PurchaseScrubCreditsRequestBody$Outbound` instead. */
|
|
78
|
+
export type Outbound = PurchaseScrubCreditsRequestBody$Outbound;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function purchaseScrubCreditsRequestBodyToJSON(
|
|
82
|
+
purchaseScrubCreditsRequestBody: PurchaseScrubCreditsRequestBody,
|
|
83
|
+
): string {
|
|
84
|
+
return JSON.stringify(
|
|
85
|
+
PurchaseScrubCreditsRequestBody$outboundSchema.parse(
|
|
86
|
+
purchaseScrubCreditsRequestBody,
|
|
87
|
+
),
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function purchaseScrubCreditsRequestBodyFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<PurchaseScrubCreditsRequestBody, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => PurchaseScrubCreditsRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'PurchaseScrubCreditsRequestBody' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const PurchaseScrubCreditsRequest$inboundSchema: z.ZodType<
|
|
103
|
+
PurchaseScrubCreditsRequest,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
unknown
|
|
106
|
+
> = z.object({
|
|
107
|
+
vendor_id_or_me: z.string(),
|
|
108
|
+
RequestBody: z.lazy(() => PurchaseScrubCreditsRequestBody$inboundSchema),
|
|
109
|
+
}).transform((v) => {
|
|
110
|
+
return remap$(v, {
|
|
111
|
+
"vendor_id_or_me": "vendorIdOrMe",
|
|
112
|
+
"RequestBody": "requestBody",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export type PurchaseScrubCreditsRequest$Outbound = {
|
|
118
|
+
vendor_id_or_me: string;
|
|
119
|
+
RequestBody: PurchaseScrubCreditsRequestBody$Outbound;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const PurchaseScrubCreditsRequest$outboundSchema: z.ZodType<
|
|
124
|
+
PurchaseScrubCreditsRequest$Outbound,
|
|
125
|
+
z.ZodTypeDef,
|
|
126
|
+
PurchaseScrubCreditsRequest
|
|
127
|
+
> = z.object({
|
|
128
|
+
vendorIdOrMe: z.string(),
|
|
129
|
+
requestBody: z.lazy(() => PurchaseScrubCreditsRequestBody$outboundSchema),
|
|
130
|
+
}).transform((v) => {
|
|
131
|
+
return remap$(v, {
|
|
132
|
+
vendorIdOrMe: "vendor_id_or_me",
|
|
133
|
+
requestBody: "RequestBody",
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @internal
|
|
139
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
140
|
+
*/
|
|
141
|
+
export namespace PurchaseScrubCreditsRequest$ {
|
|
142
|
+
/** @deprecated use `PurchaseScrubCreditsRequest$inboundSchema` instead. */
|
|
143
|
+
export const inboundSchema = PurchaseScrubCreditsRequest$inboundSchema;
|
|
144
|
+
/** @deprecated use `PurchaseScrubCreditsRequest$outboundSchema` instead. */
|
|
145
|
+
export const outboundSchema = PurchaseScrubCreditsRequest$outboundSchema;
|
|
146
|
+
/** @deprecated use `PurchaseScrubCreditsRequest$Outbound` instead. */
|
|
147
|
+
export type Outbound = PurchaseScrubCreditsRequest$Outbound;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function purchaseScrubCreditsRequestToJSON(
|
|
151
|
+
purchaseScrubCreditsRequest: PurchaseScrubCreditsRequest,
|
|
152
|
+
): string {
|
|
153
|
+
return JSON.stringify(
|
|
154
|
+
PurchaseScrubCreditsRequest$outboundSchema.parse(
|
|
155
|
+
purchaseScrubCreditsRequest,
|
|
156
|
+
),
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function purchaseScrubCreditsRequestFromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<PurchaseScrubCreditsRequest, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => PurchaseScrubCreditsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'PurchaseScrubCreditsRequest' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const PurchaseScrubCreditsResponseBody$inboundSchema: z.ZodType<
|
|
172
|
+
PurchaseScrubCreditsResponseBody,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = z.object({
|
|
176
|
+
invoice_id: z.number().int().optional(),
|
|
177
|
+
credit_balance: z.number().int().optional(),
|
|
178
|
+
}).transform((v) => {
|
|
179
|
+
return remap$(v, {
|
|
180
|
+
"invoice_id": "invoiceId",
|
|
181
|
+
"credit_balance": "creditBalance",
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
export type PurchaseScrubCreditsResponseBody$Outbound = {
|
|
187
|
+
invoice_id?: number | undefined;
|
|
188
|
+
credit_balance?: number | undefined;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const PurchaseScrubCreditsResponseBody$outboundSchema: z.ZodType<
|
|
193
|
+
PurchaseScrubCreditsResponseBody$Outbound,
|
|
194
|
+
z.ZodTypeDef,
|
|
195
|
+
PurchaseScrubCreditsResponseBody
|
|
196
|
+
> = z.object({
|
|
197
|
+
invoiceId: z.number().int().optional(),
|
|
198
|
+
creditBalance: z.number().int().optional(),
|
|
199
|
+
}).transform((v) => {
|
|
200
|
+
return remap$(v, {
|
|
201
|
+
invoiceId: "invoice_id",
|
|
202
|
+
creditBalance: "credit_balance",
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
209
|
+
*/
|
|
210
|
+
export namespace PurchaseScrubCreditsResponseBody$ {
|
|
211
|
+
/** @deprecated use `PurchaseScrubCreditsResponseBody$inboundSchema` instead. */
|
|
212
|
+
export const inboundSchema = PurchaseScrubCreditsResponseBody$inboundSchema;
|
|
213
|
+
/** @deprecated use `PurchaseScrubCreditsResponseBody$outboundSchema` instead. */
|
|
214
|
+
export const outboundSchema = PurchaseScrubCreditsResponseBody$outboundSchema;
|
|
215
|
+
/** @deprecated use `PurchaseScrubCreditsResponseBody$Outbound` instead. */
|
|
216
|
+
export type Outbound = PurchaseScrubCreditsResponseBody$Outbound;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function purchaseScrubCreditsResponseBodyToJSON(
|
|
220
|
+
purchaseScrubCreditsResponseBody: PurchaseScrubCreditsResponseBody,
|
|
221
|
+
): string {
|
|
222
|
+
return JSON.stringify(
|
|
223
|
+
PurchaseScrubCreditsResponseBody$outboundSchema.parse(
|
|
224
|
+
purchaseScrubCreditsResponseBody,
|
|
225
|
+
),
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function purchaseScrubCreditsResponseBodyFromJSON(
|
|
230
|
+
jsonString: string,
|
|
231
|
+
): SafeParseResult<PurchaseScrubCreditsResponseBody, SDKValidationError> {
|
|
232
|
+
return safeParse(
|
|
233
|
+
jsonString,
|
|
234
|
+
(x) => PurchaseScrubCreditsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
235
|
+
`Failed to parse 'PurchaseScrubCreditsResponseBody' from JSON`,
|
|
236
|
+
);
|
|
237
|
+
}
|
|
@@ -45,6 +45,10 @@ export type UpdateVendorDetailsRequestBody = {
|
|
|
45
45
|
* Reduced list of attributes of the User Location
|
|
46
46
|
*/
|
|
47
47
|
location?: components.UserLocation | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* list of the vendor supervisor attributes
|
|
50
|
+
*/
|
|
51
|
+
supervisor?: components.Supervisor | null | undefined;
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
export type UpdateVendorDetailsRequest = {
|
|
@@ -87,6 +91,7 @@ export const UpdateVendorDetailsRequestBody$inboundSchema: z.ZodType<
|
|
|
87
91
|
send_weekly_summary_email: z.boolean().optional(),
|
|
88
92
|
title: z.string().optional(),
|
|
89
93
|
location: z.nullable(components.UserLocation$inboundSchema).optional(),
|
|
94
|
+
supervisor: z.nullable(components.Supervisor$inboundSchema).optional(),
|
|
90
95
|
}).transform((v) => {
|
|
91
96
|
return remap$(v, {
|
|
92
97
|
"qr_code": "qrCode",
|
|
@@ -102,6 +107,7 @@ export type UpdateVendorDetailsRequestBody$Outbound = {
|
|
|
102
107
|
send_weekly_summary_email?: boolean | undefined;
|
|
103
108
|
title?: string | undefined;
|
|
104
109
|
location?: components.UserLocation$Outbound | null | undefined;
|
|
110
|
+
supervisor?: components.Supervisor$Outbound | null | undefined;
|
|
105
111
|
};
|
|
106
112
|
|
|
107
113
|
/** @internal */
|
|
@@ -115,6 +121,7 @@ export const UpdateVendorDetailsRequestBody$outboundSchema: z.ZodType<
|
|
|
115
121
|
sendWeeklySummaryEmail: z.boolean().optional(),
|
|
116
122
|
title: z.string().optional(),
|
|
117
123
|
location: z.nullable(components.UserLocation$outboundSchema).optional(),
|
|
124
|
+
supervisor: z.nullable(components.Supervisor$outboundSchema).optional(),
|
|
118
125
|
}).transform((v) => {
|
|
119
126
|
return remap$(v, {
|
|
120
127
|
qrCode: "qr_code",
|
package/src/react-query/index.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from "./vendorsListVendorManagedByCompanies.js";
|
|
|
33
33
|
export * from "./vendorsListVendorScrubDetails.js";
|
|
34
34
|
export * from "./vendorsListVendorScrubPackages.js";
|
|
35
35
|
export * from "./vendorsListVendorScrubPurchases.js";
|
|
36
|
+
export * from "./vendorsPurchaseScrubCredits.js";
|
|
36
37
|
export * from "./vendorsUpdateVendorDetails.js";
|
|
37
38
|
export * from "./vendorsUpdateVendorManagedByCompany.js";
|
|
38
39
|
export * from "./vendorsUpdateVendorScrubDetails.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 { vendorsPurchaseScrubCredits } from "../funcs/vendorsPurchaseScrubCredits.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 VendorsPurchaseScrubCreditsMutationVariables = {
|
|
20
|
+
request: operations.PurchaseScrubCreditsRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type VendorsPurchaseScrubCreditsMutationData =
|
|
25
|
+
operations.PurchaseScrubCreditsResponseBody;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Purchase scrub credits
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Purchase scrub credits
|
|
32
|
+
*/
|
|
33
|
+
export function useVendorsPurchaseScrubCreditsMutation(
|
|
34
|
+
options?: MutationHookOptions<
|
|
35
|
+
VendorsPurchaseScrubCreditsMutationData,
|
|
36
|
+
Error,
|
|
37
|
+
VendorsPurchaseScrubCreditsMutationVariables
|
|
38
|
+
>,
|
|
39
|
+
): UseMutationResult<
|
|
40
|
+
VendorsPurchaseScrubCreditsMutationData,
|
|
41
|
+
Error,
|
|
42
|
+
VendorsPurchaseScrubCreditsMutationVariables
|
|
43
|
+
> {
|
|
44
|
+
const client = useGreenSecurityContext();
|
|
45
|
+
return useMutation({
|
|
46
|
+
...buildVendorsPurchaseScrubCreditsMutation(client, options),
|
|
47
|
+
...options,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function mutationKeyVendorsPurchaseScrubCredits(): MutationKey {
|
|
52
|
+
return ["@greensecurity/javascript-sdk", "vendors", "purchaseScrubCredits"];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildVendorsPurchaseScrubCreditsMutation(
|
|
56
|
+
client$: GreenSecurityCore,
|
|
57
|
+
hookOptions?: RequestOptions,
|
|
58
|
+
): {
|
|
59
|
+
mutationKey: MutationKey;
|
|
60
|
+
mutationFn: (
|
|
61
|
+
variables: VendorsPurchaseScrubCreditsMutationVariables,
|
|
62
|
+
) => Promise<VendorsPurchaseScrubCreditsMutationData>;
|
|
63
|
+
} {
|
|
64
|
+
return {
|
|
65
|
+
mutationKey: mutationKeyVendorsPurchaseScrubCredits(),
|
|
66
|
+
mutationFn: function vendorsPurchaseScrubCreditsMutationFn({
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
}): Promise<VendorsPurchaseScrubCreditsMutationData> {
|
|
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(vendorsPurchaseScrubCredits(
|
|
83
|
+
client$,
|
|
84
|
+
request,
|
|
85
|
+
mergedOptions,
|
|
86
|
+
));
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { vendorsListVendorManagedByCompanies } from "../funcs/vendorsListVendorM
|
|
|
18
18
|
import { vendorsListVendorScrubDetails } from "../funcs/vendorsListVendorScrubDetails.js";
|
|
19
19
|
import { vendorsListVendorScrubPackages } from "../funcs/vendorsListVendorScrubPackages.js";
|
|
20
20
|
import { vendorsListVendorScrubPurchases } from "../funcs/vendorsListVendorScrubPurchases.js";
|
|
21
|
+
import { vendorsPurchaseScrubCredits } from "../funcs/vendorsPurchaseScrubCredits.js";
|
|
21
22
|
import { vendorsUpdateVendorDetails } from "../funcs/vendorsUpdateVendorDetails.js";
|
|
22
23
|
import { vendorsUpdateVendorManagedByCompany } from "../funcs/vendorsUpdateVendorManagedByCompany.js";
|
|
23
24
|
import { vendorsUpdateVendorScrubDetails } from "../funcs/vendorsUpdateVendorScrubDetails.js";
|
|
@@ -404,4 +405,21 @@ export class Vendors extends ClientSDK {
|
|
|
404
405
|
options,
|
|
405
406
|
));
|
|
406
407
|
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Purchase scrub credits
|
|
411
|
+
*
|
|
412
|
+
* @remarks
|
|
413
|
+
* Purchase scrub credits
|
|
414
|
+
*/
|
|
415
|
+
async purchaseScrubCredits(
|
|
416
|
+
request: operations.PurchaseScrubCreditsRequest,
|
|
417
|
+
options?: RequestOptions,
|
|
418
|
+
): Promise<operations.PurchaseScrubCreditsResponseBody> {
|
|
419
|
+
return unwrapAsync(vendorsPurchaseScrubCredits(
|
|
420
|
+
this,
|
|
421
|
+
request,
|
|
422
|
+
options,
|
|
423
|
+
));
|
|
424
|
+
}
|
|
407
425
|
}
|