@greensecurity/javascript-sdk 0.31.3 → 0.31.4
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 +1278 -1072
- package/bin/mcp-server.js.map +24 -12
- package/dist/commonjs/__tests__/vendors.test.js +22 -6
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +8 -8
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.js +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/commonjs/funcs/vendorsSubmitVendorCredential.d.ts +17 -0
- package/dist/commonjs/funcs/vendorsSubmitVendorCredential.d.ts.map +1 -0
- package/dist/commonjs/funcs/vendorsSubmitVendorCredential.js +119 -0
- package/dist/commonjs/funcs/vendorsSubmitVendorCredential.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/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorsDetails.js +2 -1
- package/dist/commonjs/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/vendorsSubmitVendorCredential.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/vendorsSubmitVendorCredential.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/vendorsSubmitVendorCredential.js +64 -0
- package/dist/commonjs/mcp-server/tools/vendorsSubmitVendorCredential.js.map +1 -0
- 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/vendor.d.ts +2 -0
- package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendor.js +4 -0
- 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/submitvendorcredential.d.ts +61 -0
- package/dist/commonjs/models/operations/submitvendorcredential.d.ts.map +1 -0
- package/dist/commonjs/models/operations/submitvendorcredential.js +119 -0
- package/dist/commonjs/models/operations/submitvendorcredential.js.map +1 -0
- 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/vendorsGetVendorsDetails.d.ts +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.js +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/commonjs/react-query/vendorsSubmitVendorCredential.d.ts +23 -0
- package/dist/commonjs/react-query/vendorsSubmitVendorCredential.d.ts.map +1 -0
- package/dist/commonjs/react-query/vendorsSubmitVendorCredential.js +47 -0
- package/dist/commonjs/react-query/vendorsSubmitVendorCredential.js.map +1 -0
- 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__/vendors.test.js +22 -6
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +8 -8
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts +1 -0
- package/dist/esm/funcs/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorsDetails.js +1 -0
- package/dist/esm/funcs/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/esm/funcs/vendorsSubmitVendorCredential.d.ts +17 -0
- package/dist/esm/funcs/vendorsSubmitVendorCredential.d.ts.map +1 -0
- package/dist/esm/funcs/vendorsSubmitVendorCredential.js +83 -0
- package/dist/esm/funcs/vendorsSubmitVendorCredential.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/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsGetVendorsDetails.js +2 -1
- package/dist/esm/mcp-server/tools/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/esm/mcp-server/tools/vendorsSubmitVendorCredential.d.ts +8 -0
- package/dist/esm/mcp-server/tools/vendorsSubmitVendorCredential.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/vendorsSubmitVendorCredential.js +28 -0
- package/dist/esm/mcp-server/tools/vendorsSubmitVendorCredential.js.map +1 -0
- 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/vendor.d.ts +2 -0
- package/dist/esm/models/components/vendor.d.ts.map +1 -1
- package/dist/esm/models/components/vendor.js +4 -0
- 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/submitvendorcredential.d.ts +61 -0
- package/dist/esm/models/operations/submitvendorcredential.d.ts.map +1 -0
- package/dist/esm/models/operations/submitvendorcredential.js +79 -0
- package/dist/esm/models/operations/submitvendorcredential.js.map +1 -0
- 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/vendorsGetVendorsDetails.d.ts +2 -0
- package/dist/esm/react-query/vendorsGetVendorsDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorsDetails.js +2 -0
- package/dist/esm/react-query/vendorsGetVendorsDetails.js.map +1 -1
- package/dist/esm/react-query/vendorsSubmitVendorCredential.d.ts +23 -0
- package/dist/esm/react-query/vendorsSubmitVendorCredential.d.ts.map +1 -0
- package/dist/esm/react-query/vendorsSubmitVendorCredential.js +42 -0
- package/dist/esm/react-query/vendorsSubmitVendorCredential.js.map +1 -0
- 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 +2 -2
- package/src/__tests__/vendors.test.ts +25 -6
- package/src/__tests__/zones.test.ts +8 -8
- package/src/funcs/vendorsGetVendorsDetails.ts +1 -0
- package/src/funcs/vendorsSubmitVendorCredential.ts +178 -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/vendorsGetVendorsDetails.ts +2 -1
- package/src/mcp-server/tools/vendorsSubmitVendorCredential.ts +37 -0
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/vendor.ts +6 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/submitvendorcredential.ts +159 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsGetVendorsDetails.ts +2 -0
- package/src/react-query/vendorsSubmitVendorCredential.ts +88 -0
- package/src/sdk/vendors.ts +19 -0
|
@@ -138,6 +138,7 @@ export type Vendor = {
|
|
|
138
138
|
title?: string | null | undefined;
|
|
139
139
|
user?: One | number | undefined;
|
|
140
140
|
registrationData?: { [k: string]: any } | null | undefined;
|
|
141
|
+
registrationFinished?: boolean | null | undefined;
|
|
141
142
|
vendorJob?: VendorJobTitle | number | null | undefined;
|
|
142
143
|
vendorType?: VendorType | number | null | undefined;
|
|
143
144
|
/**
|
|
@@ -844,6 +845,7 @@ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
|
|
|
844
845
|
user: z.union([z.lazy(() => One$inboundSchema), z.number().int()])
|
|
845
846
|
.optional(),
|
|
846
847
|
registration_data: z.nullable(z.record(z.any())).optional(),
|
|
848
|
+
registration_finished: z.nullable(z.boolean()).optional(),
|
|
847
849
|
vendor_job: z.nullable(
|
|
848
850
|
z.union([VendorJobTitle$inboundSchema, z.number().int()]),
|
|
849
851
|
).optional(),
|
|
@@ -879,6 +881,7 @@ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
|
|
|
879
881
|
"email_recepient": "emailRecepient",
|
|
880
882
|
"send_weekly_summary_email": "sendWeeklySummaryEmail",
|
|
881
883
|
"registration_data": "registrationData",
|
|
884
|
+
"registration_finished": "registrationFinished",
|
|
882
885
|
"vendor_job": "vendorJob",
|
|
883
886
|
"vendor_type": "vendorType",
|
|
884
887
|
"qr_code": "qrCode",
|
|
@@ -903,6 +906,7 @@ export type Vendor$Outbound = {
|
|
|
903
906
|
title?: string | null | undefined;
|
|
904
907
|
user?: One$Outbound | number | undefined;
|
|
905
908
|
registration_data?: { [k: string]: any } | null | undefined;
|
|
909
|
+
registration_finished?: boolean | null | undefined;
|
|
906
910
|
vendor_job?: VendorJobTitle$Outbound | number | null | undefined;
|
|
907
911
|
vendor_type?: VendorType$Outbound | number | null | undefined;
|
|
908
912
|
supervisor?: Supervisor$Outbound | null | undefined;
|
|
@@ -939,6 +943,7 @@ export const Vendor$outboundSchema: z.ZodType<
|
|
|
939
943
|
user: z.union([z.lazy(() => One$outboundSchema), z.number().int()])
|
|
940
944
|
.optional(),
|
|
941
945
|
registrationData: z.nullable(z.record(z.any())).optional(),
|
|
946
|
+
registrationFinished: z.nullable(z.boolean()).optional(),
|
|
942
947
|
vendorJob: z.nullable(
|
|
943
948
|
z.union([VendorJobTitle$outboundSchema, z.number().int()]),
|
|
944
949
|
).optional(),
|
|
@@ -972,6 +977,7 @@ export const Vendor$outboundSchema: z.ZodType<
|
|
|
972
977
|
emailRecepient: "email_recepient",
|
|
973
978
|
sendWeeklySummaryEmail: "send_weekly_summary_email",
|
|
974
979
|
registrationData: "registration_data",
|
|
980
|
+
registrationFinished: "registration_finished",
|
|
975
981
|
vendorJob: "vendor_job",
|
|
976
982
|
vendorType: "vendor_type",
|
|
977
983
|
qrCode: "qr_code",
|
|
@@ -39,6 +39,7 @@ export * from "./passwordresetrequest.js";
|
|
|
39
39
|
export * from "./postauthenticate.js";
|
|
40
40
|
export * from "./purchasescrubcredits.js";
|
|
41
41
|
export * from "./securityzonecheckin.js";
|
|
42
|
+
export * from "./submitvendorcredential.js";
|
|
42
43
|
export * from "./updatesthewebhookendpointwiththegivenid.js";
|
|
43
44
|
export * from "./updatevendordetails.js";
|
|
44
45
|
export * from "./updatevendormanagedbycompany.js";
|
|
@@ -0,0 +1,159 @@
|
|
|
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 SubmitVendorCredentialRequestBody = {
|
|
12
|
+
notes?: string | undefined;
|
|
13
|
+
jsonData?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type SubmitVendorCredentialRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* ID of the vendor credential rep.
|
|
19
|
+
*/
|
|
20
|
+
vendorCredentialId: number;
|
|
21
|
+
requestBody: SubmitVendorCredentialRequestBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const SubmitVendorCredentialRequestBody$inboundSchema: z.ZodType<
|
|
26
|
+
SubmitVendorCredentialRequestBody,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
notes: z.string().optional(),
|
|
31
|
+
json_data: z.string().optional(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"json_data": "jsonData",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type SubmitVendorCredentialRequestBody$Outbound = {
|
|
40
|
+
notes?: string | undefined;
|
|
41
|
+
json_data?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const SubmitVendorCredentialRequestBody$outboundSchema: z.ZodType<
|
|
46
|
+
SubmitVendorCredentialRequestBody$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
SubmitVendorCredentialRequestBody
|
|
49
|
+
> = z.object({
|
|
50
|
+
notes: z.string().optional(),
|
|
51
|
+
jsonData: z.string().optional(),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
jsonData: "json_data",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export namespace SubmitVendorCredentialRequestBody$ {
|
|
63
|
+
/** @deprecated use `SubmitVendorCredentialRequestBody$inboundSchema` instead. */
|
|
64
|
+
export const inboundSchema = SubmitVendorCredentialRequestBody$inboundSchema;
|
|
65
|
+
/** @deprecated use `SubmitVendorCredentialRequestBody$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema =
|
|
67
|
+
SubmitVendorCredentialRequestBody$outboundSchema;
|
|
68
|
+
/** @deprecated use `SubmitVendorCredentialRequestBody$Outbound` instead. */
|
|
69
|
+
export type Outbound = SubmitVendorCredentialRequestBody$Outbound;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function submitVendorCredentialRequestBodyToJSON(
|
|
73
|
+
submitVendorCredentialRequestBody: SubmitVendorCredentialRequestBody,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
SubmitVendorCredentialRequestBody$outboundSchema.parse(
|
|
77
|
+
submitVendorCredentialRequestBody,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function submitVendorCredentialRequestBodyFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<SubmitVendorCredentialRequestBody, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) => SubmitVendorCredentialRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'SubmitVendorCredentialRequestBody' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const SubmitVendorCredentialRequest$inboundSchema: z.ZodType<
|
|
94
|
+
SubmitVendorCredentialRequest,
|
|
95
|
+
z.ZodTypeDef,
|
|
96
|
+
unknown
|
|
97
|
+
> = z.object({
|
|
98
|
+
vendor_credential_id: z.number().int(),
|
|
99
|
+
RequestBody: z.lazy(() => SubmitVendorCredentialRequestBody$inboundSchema),
|
|
100
|
+
}).transform((v) => {
|
|
101
|
+
return remap$(v, {
|
|
102
|
+
"vendor_credential_id": "vendorCredentialId",
|
|
103
|
+
"RequestBody": "requestBody",
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type SubmitVendorCredentialRequest$Outbound = {
|
|
109
|
+
vendor_credential_id: number;
|
|
110
|
+
RequestBody: SubmitVendorCredentialRequestBody$Outbound;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const SubmitVendorCredentialRequest$outboundSchema: z.ZodType<
|
|
115
|
+
SubmitVendorCredentialRequest$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
SubmitVendorCredentialRequest
|
|
118
|
+
> = z.object({
|
|
119
|
+
vendorCredentialId: z.number().int(),
|
|
120
|
+
requestBody: z.lazy(() => SubmitVendorCredentialRequestBody$outboundSchema),
|
|
121
|
+
}).transform((v) => {
|
|
122
|
+
return remap$(v, {
|
|
123
|
+
vendorCredentialId: "vendor_credential_id",
|
|
124
|
+
requestBody: "RequestBody",
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
131
|
+
*/
|
|
132
|
+
export namespace SubmitVendorCredentialRequest$ {
|
|
133
|
+
/** @deprecated use `SubmitVendorCredentialRequest$inboundSchema` instead. */
|
|
134
|
+
export const inboundSchema = SubmitVendorCredentialRequest$inboundSchema;
|
|
135
|
+
/** @deprecated use `SubmitVendorCredentialRequest$outboundSchema` instead. */
|
|
136
|
+
export const outboundSchema = SubmitVendorCredentialRequest$outboundSchema;
|
|
137
|
+
/** @deprecated use `SubmitVendorCredentialRequest$Outbound` instead. */
|
|
138
|
+
export type Outbound = SubmitVendorCredentialRequest$Outbound;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function submitVendorCredentialRequestToJSON(
|
|
142
|
+
submitVendorCredentialRequest: SubmitVendorCredentialRequest,
|
|
143
|
+
): string {
|
|
144
|
+
return JSON.stringify(
|
|
145
|
+
SubmitVendorCredentialRequest$outboundSchema.parse(
|
|
146
|
+
submitVendorCredentialRequest,
|
|
147
|
+
),
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function submitVendorCredentialRequestFromJSON(
|
|
152
|
+
jsonString: string,
|
|
153
|
+
): SafeParseResult<SubmitVendorCredentialRequest, SDKValidationError> {
|
|
154
|
+
return safeParse(
|
|
155
|
+
jsonString,
|
|
156
|
+
(x) => SubmitVendorCredentialRequest$inboundSchema.parse(JSON.parse(x)),
|
|
157
|
+
`Failed to parse 'SubmitVendorCredentialRequest' from JSON`,
|
|
158
|
+
);
|
|
159
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from "./vendorsListVendorScrubDetails.js";
|
|
|
40
40
|
export * from "./vendorsListVendorScrubPackages.js";
|
|
41
41
|
export * from "./vendorsListVendorScrubPurchases.js";
|
|
42
42
|
export * from "./vendorsPurchaseScrubCredits.js";
|
|
43
|
+
export * from "./vendorsSubmitVendorCredential.js";
|
|
43
44
|
export * from "./vendorsUpdateVendorDetails.js";
|
|
44
45
|
export * from "./vendorsUpdateVendorManagedByCompany.js";
|
|
45
46
|
export * from "./vendorsUpdateVendorScrubDetails.js";
|
|
@@ -49,6 +49,7 @@ export type VendorsGetVendorsDetailsQueryData = components.Vendor;
|
|
|
49
49
|
* vendor.payment_responsibility
|
|
50
50
|
* vendor.background_check_date_expires
|
|
51
51
|
* vendor.registration_data
|
|
52
|
+
* vendor.registration_finished
|
|
52
53
|
*/
|
|
53
54
|
export function useVendorsGetVendorsDetails(
|
|
54
55
|
request: operations.GetVendorsDetailsRequest,
|
|
@@ -86,6 +87,7 @@ export function useVendorsGetVendorsDetails(
|
|
|
86
87
|
* vendor.payment_responsibility
|
|
87
88
|
* vendor.background_check_date_expires
|
|
88
89
|
* vendor.registration_data
|
|
90
|
+
* vendor.registration_finished
|
|
89
91
|
*/
|
|
90
92
|
export function useVendorsGetVendorsDetailsSuspense(
|
|
91
93
|
request: operations.GetVendorsDetailsRequest,
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { vendorsSubmitVendorCredential } from "../funcs/vendorsSubmitVendorCredential.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 VendorsSubmitVendorCredentialMutationVariables = {
|
|
20
|
+
request: operations.SubmitVendorCredentialRequest;
|
|
21
|
+
options?: RequestOptions;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type VendorsSubmitVendorCredentialMutationData = boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Submit vendor credential
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* It will submit vendor credential
|
|
31
|
+
*/
|
|
32
|
+
export function useVendorsSubmitVendorCredentialMutation(
|
|
33
|
+
options?: MutationHookOptions<
|
|
34
|
+
VendorsSubmitVendorCredentialMutationData,
|
|
35
|
+
Error,
|
|
36
|
+
VendorsSubmitVendorCredentialMutationVariables
|
|
37
|
+
>,
|
|
38
|
+
): UseMutationResult<
|
|
39
|
+
VendorsSubmitVendorCredentialMutationData,
|
|
40
|
+
Error,
|
|
41
|
+
VendorsSubmitVendorCredentialMutationVariables
|
|
42
|
+
> {
|
|
43
|
+
const client = useGreenSecurityContext();
|
|
44
|
+
return useMutation({
|
|
45
|
+
...buildVendorsSubmitVendorCredentialMutation(client, options),
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function mutationKeyVendorsSubmitVendorCredential(): MutationKey {
|
|
51
|
+
return ["@greensecurity/javascript-sdk", "vendors", "submitVendorCredential"];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function buildVendorsSubmitVendorCredentialMutation(
|
|
55
|
+
client$: GreenSecurityCore,
|
|
56
|
+
hookOptions?: RequestOptions,
|
|
57
|
+
): {
|
|
58
|
+
mutationKey: MutationKey;
|
|
59
|
+
mutationFn: (
|
|
60
|
+
variables: VendorsSubmitVendorCredentialMutationVariables,
|
|
61
|
+
) => Promise<VendorsSubmitVendorCredentialMutationData>;
|
|
62
|
+
} {
|
|
63
|
+
return {
|
|
64
|
+
mutationKey: mutationKeyVendorsSubmitVendorCredential(),
|
|
65
|
+
mutationFn: function vendorsSubmitVendorCredentialMutationFn({
|
|
66
|
+
request,
|
|
67
|
+
options,
|
|
68
|
+
}): Promise<VendorsSubmitVendorCredentialMutationData> {
|
|
69
|
+
const mergedOptions = {
|
|
70
|
+
...hookOptions,
|
|
71
|
+
...options,
|
|
72
|
+
fetchOptions: {
|
|
73
|
+
...hookOptions?.fetchOptions,
|
|
74
|
+
...options?.fetchOptions,
|
|
75
|
+
signal: combineSignals(
|
|
76
|
+
hookOptions?.fetchOptions?.signal,
|
|
77
|
+
options?.fetchOptions?.signal,
|
|
78
|
+
),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
return unwrapAsync(vendorsSubmitVendorCredential(
|
|
82
|
+
client$,
|
|
83
|
+
request,
|
|
84
|
+
mergedOptions,
|
|
85
|
+
));
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { vendorsListVendorScrubDetails } from "../funcs/vendorsListVendorScrubDe
|
|
|
24
24
|
import { vendorsListVendorScrubPackages } from "../funcs/vendorsListVendorScrubPackages.js";
|
|
25
25
|
import { vendorsListVendorScrubPurchases } from "../funcs/vendorsListVendorScrubPurchases.js";
|
|
26
26
|
import { vendorsPurchaseScrubCredits } from "../funcs/vendorsPurchaseScrubCredits.js";
|
|
27
|
+
import { vendorsSubmitVendorCredential } from "../funcs/vendorsSubmitVendorCredential.js";
|
|
27
28
|
import { vendorsUpdateVendorDetails } from "../funcs/vendorsUpdateVendorDetails.js";
|
|
28
29
|
import { vendorsUpdateVendorManagedByCompany } from "../funcs/vendorsUpdateVendorManagedByCompany.js";
|
|
29
30
|
import { vendorsUpdateVendorScrubDetails } from "../funcs/vendorsUpdateVendorScrubDetails.js";
|
|
@@ -184,6 +185,23 @@ export class Vendors extends ClientSDK {
|
|
|
184
185
|
));
|
|
185
186
|
}
|
|
186
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Submit vendor credential
|
|
190
|
+
*
|
|
191
|
+
* @remarks
|
|
192
|
+
* It will submit vendor credential
|
|
193
|
+
*/
|
|
194
|
+
async submitVendorCredential(
|
|
195
|
+
request: operations.SubmitVendorCredentialRequest,
|
|
196
|
+
options?: RequestOptions,
|
|
197
|
+
): Promise<boolean> {
|
|
198
|
+
return unwrapAsync(vendorsSubmitVendorCredential(
|
|
199
|
+
this,
|
|
200
|
+
request,
|
|
201
|
+
options,
|
|
202
|
+
));
|
|
203
|
+
}
|
|
204
|
+
|
|
187
205
|
/**
|
|
188
206
|
* Expedite time remaining
|
|
189
207
|
*
|
|
@@ -361,6 +379,7 @@ export class Vendors extends ClientSDK {
|
|
|
361
379
|
* vendor.payment_responsibility
|
|
362
380
|
* vendor.background_check_date_expires
|
|
363
381
|
* vendor.registration_data
|
|
382
|
+
* vendor.registration_finished
|
|
364
383
|
*/
|
|
365
384
|
async getVendorsDetails(
|
|
366
385
|
request: operations.GetVendorsDetailsRequest,
|