@greensecurity/javascript-sdk 0.30.33 → 0.30.35
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 +6 -0
- package/bin/mcp-server.js +516 -510
- package/bin/mcp-server.js.map +21 -21
- package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js +1 -1
- package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- 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/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.js +3 -3
- package/dist/commonjs/funcs/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/user.d.ts +6 -6
- package/dist/commonjs/models/components/user.d.ts.map +1 -1
- package/dist/commonjs/models/components/user.js +6 -6
- package/dist/commonjs/models/components/user.js.map +1 -1
- package/dist/commonjs/models/operations/createvendorregistration.d.ts +0 -49
- package/dist/commonjs/models/operations/createvendorregistration.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createvendorregistration.js +1 -54
- package/dist/commonjs/models/operations/createvendorregistration.js.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/commonjs/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +1 -1
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/vendormanagedbycompanies.test.js +1 -1
- package/dist/esm/__tests__/vendormanagedbycompanies.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- 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/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/esm/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsCreateVendorRegistration.js +3 -3
- package/dist/esm/funcs/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/user.d.ts +6 -6
- package/dist/esm/models/components/user.d.ts.map +1 -1
- package/dist/esm/models/components/user.js +6 -6
- package/dist/esm/models/components/user.js.map +1 -1
- package/dist/esm/models/operations/createvendorregistration.d.ts +0 -49
- package/dist/esm/models/operations/createvendorregistration.d.ts.map +1 -1
- package/dist/esm/models/operations/createvendorregistration.js +0 -49
- package/dist/esm/models/operations/createvendorregistration.js.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendorRegistration.d.ts +2 -1
- package/dist/esm/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsCreateVendorRegistration.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +1 -1
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- 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 +1 -1
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/funcs/vendorsCreateVendorRegistration.ts +10 -9
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/user.ts +12 -12
- package/src/models/operations/createvendorregistration.ts +0 -113
- package/src/react-query/vendorsCreateVendorRegistration.ts +2 -2
- package/src/sdk/vendors.ts +1 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendors.js","sourceRoot":"","sources":["../../../src/sdk/vendors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,mCAAmC,EAAE,MAAM,iDAAiD,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,yCAAyC,EAAE,MAAM,uDAAuD,CAAC;AAClH,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,mCAAmC,EAAE,MAAM,iDAAiD,CAAC;AACtG,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAA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D,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,4BAA4B,CAChC,OAAuD,EACvD,OAAwB;QAExB,OAAO,WAAW,CAAC,mCAAmC,CACpD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAA+C,EAC/C,OAAwB;QAExB,OAAO,WAAW,CAAC,2BAA2B,CAC5C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ test("Webhooks List All Webhook Endpoints", async () => {
|
|
|
20
20
|
const testWebhookListForVendorUserResult = await greenSecurity.webhooks
|
|
21
21
|
.listAllWebhookEndpoints({
|
|
22
22
|
itemsPerPage: 25,
|
|
23
|
-
desc:
|
|
23
|
+
desc: true,
|
|
24
24
|
sort: "",
|
|
25
25
|
});
|
|
26
26
|
expect(testWebhookListForVendorUserResult).toBeDefined();
|
|
@@ -9,6 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as components from "../models/components/index.js";
|
|
12
13
|
import { APIError } from "../models/errors/apierror.js";
|
|
13
14
|
import {
|
|
14
15
|
ConnectionError,
|
|
@@ -35,7 +36,8 @@ export function vendorsCreateVendorRegistration(
|
|
|
35
36
|
options?: RequestOptions,
|
|
36
37
|
): APIPromise<
|
|
37
38
|
Result<
|
|
38
|
-
|
|
39
|
+
components.User,
|
|
40
|
+
| errors.ApiErrorResponse
|
|
39
41
|
| errors.ApiErrorResponse
|
|
40
42
|
| APIError
|
|
41
43
|
| SDKValidationError
|
|
@@ -60,7 +62,8 @@ async function $do(
|
|
|
60
62
|
): Promise<
|
|
61
63
|
[
|
|
62
64
|
Result<
|
|
63
|
-
|
|
65
|
+
components.User,
|
|
66
|
+
| errors.ApiErrorResponse
|
|
64
67
|
| errors.ApiErrorResponse
|
|
65
68
|
| APIError
|
|
66
69
|
| SDKValidationError
|
|
@@ -123,7 +126,7 @@ async function $do(
|
|
|
123
126
|
|
|
124
127
|
const doResult = await client._do(req, {
|
|
125
128
|
context,
|
|
126
|
-
errorCodes: ["400", "401", "403", "409", "4XX", "5XX"],
|
|
129
|
+
errorCodes: ["400", "401", "403", "409", "4XX", "500", "5XX"],
|
|
127
130
|
retryConfig: context.retryConfig,
|
|
128
131
|
retryCodes: context.retryCodes,
|
|
129
132
|
});
|
|
@@ -137,7 +140,8 @@ async function $do(
|
|
|
137
140
|
};
|
|
138
141
|
|
|
139
142
|
const [result] = await M.match<
|
|
140
|
-
|
|
143
|
+
components.User,
|
|
144
|
+
| errors.ApiErrorResponse
|
|
141
145
|
| errors.ApiErrorResponse
|
|
142
146
|
| APIError
|
|
143
147
|
| SDKValidationError
|
|
@@ -147,12 +151,9 @@ async function $do(
|
|
|
147
151
|
| RequestTimeoutError
|
|
148
152
|
| ConnectionError
|
|
149
153
|
>(
|
|
150
|
-
M.json(
|
|
151
|
-
201,
|
|
152
|
-
operations
|
|
153
|
-
.CreateVendorRegistrationCreateVendorRegistrationCreated$inboundSchema,
|
|
154
|
-
),
|
|
154
|
+
M.json(201, components.User$inboundSchema),
|
|
155
155
|
M.jsonErr([400, 401, 403, 409], errors.ApiErrorResponse$inboundSchema),
|
|
156
|
+
M.jsonErr(500, errors.ApiErrorResponse$inboundSchema),
|
|
156
157
|
M.fail("4XX"),
|
|
157
158
|
M.fail("5XX"),
|
|
158
159
|
)(response, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -72,8 +72,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
72
72
|
export const SDK_METADATA = {
|
|
73
73
|
language: "typescript",
|
|
74
74
|
openapiDocVersion: "0.0.3",
|
|
75
|
-
sdkVersion: "0.30.
|
|
76
|
-
genVersion: "2.
|
|
75
|
+
sdkVersion: "0.30.35",
|
|
76
|
+
genVersion: "2.593.3",
|
|
77
77
|
userAgent:
|
|
78
|
-
"speakeasy-sdk/typescript 0.30.
|
|
78
|
+
"speakeasy-sdk/typescript 0.30.35 2.593.3 0.0.3 @greensecurity/javascript-sdk",
|
|
79
79
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -66,11 +66,11 @@ export type UserUser = {
|
|
|
66
66
|
/**
|
|
67
67
|
* First name of the user
|
|
68
68
|
*/
|
|
69
|
-
firstName?: string | undefined;
|
|
69
|
+
firstName?: string | null | undefined;
|
|
70
70
|
/**
|
|
71
71
|
* Last name of the user
|
|
72
72
|
*/
|
|
73
|
-
lastName?: string | undefined;
|
|
73
|
+
lastName?: string | null | undefined;
|
|
74
74
|
/**
|
|
75
75
|
* Email address (not always valid)
|
|
76
76
|
*/
|
|
@@ -128,7 +128,7 @@ export type User = {
|
|
|
128
128
|
/**
|
|
129
129
|
* A `gatekeeper` is a special type of service user. This type of service user is assigned to Kiosks and Apps to verify Vendors using APIs that have some access to facility data.
|
|
130
130
|
*/
|
|
131
|
-
isGatekeeper
|
|
131
|
+
isGatekeeper?: boolean | undefined;
|
|
132
132
|
success: boolean;
|
|
133
133
|
user: UserUser;
|
|
134
134
|
userToken: UserToken;
|
|
@@ -173,8 +173,8 @@ export const UserUser$inboundSchema: z.ZodType<
|
|
|
173
173
|
unknown
|
|
174
174
|
> = z.object({
|
|
175
175
|
id: z.number().int(),
|
|
176
|
-
first_name: z.string().optional(),
|
|
177
|
-
last_name: z.string().optional(),
|
|
176
|
+
first_name: z.nullable(z.string()).optional(),
|
|
177
|
+
last_name: z.nullable(z.string()).optional(),
|
|
178
178
|
email: z.string(),
|
|
179
179
|
phone: z.nullable(z.string()).optional(),
|
|
180
180
|
mobile_phone: z.nullable(z.string()).optional(),
|
|
@@ -196,8 +196,8 @@ export const UserUser$inboundSchema: z.ZodType<
|
|
|
196
196
|
/** @internal */
|
|
197
197
|
export type UserUser$Outbound = {
|
|
198
198
|
id: number;
|
|
199
|
-
first_name?: string | undefined;
|
|
200
|
-
last_name?: string | undefined;
|
|
199
|
+
first_name?: string | null | undefined;
|
|
200
|
+
last_name?: string | null | undefined;
|
|
201
201
|
email: string;
|
|
202
202
|
phone?: string | null | undefined;
|
|
203
203
|
mobile_phone?: string | null | undefined;
|
|
@@ -215,8 +215,8 @@ export const UserUser$outboundSchema: z.ZodType<
|
|
|
215
215
|
UserUser
|
|
216
216
|
> = z.object({
|
|
217
217
|
id: z.number().int(),
|
|
218
|
-
firstName: z.string().optional(),
|
|
219
|
-
lastName: z.string().optional(),
|
|
218
|
+
firstName: z.nullable(z.string()).optional(),
|
|
219
|
+
lastName: z.nullable(z.string()).optional(),
|
|
220
220
|
email: z.string(),
|
|
221
221
|
phone: z.nullable(z.string()).optional(),
|
|
222
222
|
mobilePhone: z.nullable(z.string()).optional(),
|
|
@@ -393,7 +393,7 @@ export function inventoryManagerFromJSON(
|
|
|
393
393
|
/** @internal */
|
|
394
394
|
export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
|
|
395
395
|
.object({
|
|
396
|
-
is_gatekeeper: z.boolean(),
|
|
396
|
+
is_gatekeeper: z.boolean().optional(),
|
|
397
397
|
success: z.boolean(),
|
|
398
398
|
user: z.lazy(() => UserUser$inboundSchema),
|
|
399
399
|
user_token: z.lazy(() => UserToken$inboundSchema),
|
|
@@ -411,7 +411,7 @@ export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
|
|
|
411
411
|
|
|
412
412
|
/** @internal */
|
|
413
413
|
export type User$Outbound = {
|
|
414
|
-
is_gatekeeper
|
|
414
|
+
is_gatekeeper?: boolean | undefined;
|
|
415
415
|
success: boolean;
|
|
416
416
|
user: UserUser$Outbound;
|
|
417
417
|
user_token: UserToken$Outbound;
|
|
@@ -424,7 +424,7 @@ export type User$Outbound = {
|
|
|
424
424
|
/** @internal */
|
|
425
425
|
export const User$outboundSchema: z.ZodType<User$Outbound, z.ZodTypeDef, User> =
|
|
426
426
|
z.object({
|
|
427
|
-
isGatekeeper: z.boolean(),
|
|
427
|
+
isGatekeeper: z.boolean().optional(),
|
|
428
428
|
success: z.boolean(),
|
|
429
429
|
user: z.lazy(() => UserUser$outboundSchema),
|
|
430
430
|
userToken: z.lazy(() => UserToken$outboundSchema),
|
|
@@ -44,15 +44,6 @@ export type CreateVendorRegistrationRequestBody = {
|
|
|
44
44
|
managingCompanyId?: number | undefined;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export type Data = {};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The request was successful, and a new resource was created.
|
|
51
|
-
*/
|
|
52
|
-
export type CreateVendorRegistrationCreateVendorRegistrationCreated = {
|
|
53
|
-
data: Data;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
47
|
/** @internal */
|
|
57
48
|
export const CreateVendorRegistrationRequestBody$inboundSchema: z.ZodType<
|
|
58
49
|
CreateVendorRegistrationRequestBody,
|
|
@@ -138,107 +129,3 @@ export function createVendorRegistrationRequestBodyFromJSON(
|
|
|
138
129
|
`Failed to parse 'CreateVendorRegistrationRequestBody' from JSON`,
|
|
139
130
|
);
|
|
140
131
|
}
|
|
141
|
-
|
|
142
|
-
/** @internal */
|
|
143
|
-
export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
|
|
144
|
-
.object({});
|
|
145
|
-
|
|
146
|
-
/** @internal */
|
|
147
|
-
export type Data$Outbound = {};
|
|
148
|
-
|
|
149
|
-
/** @internal */
|
|
150
|
-
export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
|
|
151
|
-
z.object({});
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @internal
|
|
155
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
156
|
-
*/
|
|
157
|
-
export namespace Data$ {
|
|
158
|
-
/** @deprecated use `Data$inboundSchema` instead. */
|
|
159
|
-
export const inboundSchema = Data$inboundSchema;
|
|
160
|
-
/** @deprecated use `Data$outboundSchema` instead. */
|
|
161
|
-
export const outboundSchema = Data$outboundSchema;
|
|
162
|
-
/** @deprecated use `Data$Outbound` instead. */
|
|
163
|
-
export type Outbound = Data$Outbound;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export function dataToJSON(data: Data): string {
|
|
167
|
-
return JSON.stringify(Data$outboundSchema.parse(data));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export function dataFromJSON(
|
|
171
|
-
jsonString: string,
|
|
172
|
-
): SafeParseResult<Data, SDKValidationError> {
|
|
173
|
-
return safeParse(
|
|
174
|
-
jsonString,
|
|
175
|
-
(x) => Data$inboundSchema.parse(JSON.parse(x)),
|
|
176
|
-
`Failed to parse 'Data' from JSON`,
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/** @internal */
|
|
181
|
-
export const CreateVendorRegistrationCreateVendorRegistrationCreated$inboundSchema:
|
|
182
|
-
z.ZodType<
|
|
183
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated,
|
|
184
|
-
z.ZodTypeDef,
|
|
185
|
-
unknown
|
|
186
|
-
> = z.object({
|
|
187
|
-
data: z.lazy(() => Data$inboundSchema),
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
/** @internal */
|
|
191
|
-
export type CreateVendorRegistrationCreateVendorRegistrationCreated$Outbound = {
|
|
192
|
-
data: Data$Outbound;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
/** @internal */
|
|
196
|
-
export const CreateVendorRegistrationCreateVendorRegistrationCreated$outboundSchema:
|
|
197
|
-
z.ZodType<
|
|
198
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated$Outbound,
|
|
199
|
-
z.ZodTypeDef,
|
|
200
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated
|
|
201
|
-
> = z.object({
|
|
202
|
-
data: z.lazy(() => Data$outboundSchema),
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @internal
|
|
207
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
208
|
-
*/
|
|
209
|
-
export namespace CreateVendorRegistrationCreateVendorRegistrationCreated$ {
|
|
210
|
-
/** @deprecated use `CreateVendorRegistrationCreateVendorRegistrationCreated$inboundSchema` instead. */
|
|
211
|
-
export const inboundSchema =
|
|
212
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated$inboundSchema;
|
|
213
|
-
/** @deprecated use `CreateVendorRegistrationCreateVendorRegistrationCreated$outboundSchema` instead. */
|
|
214
|
-
export const outboundSchema =
|
|
215
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated$outboundSchema;
|
|
216
|
-
/** @deprecated use `CreateVendorRegistrationCreateVendorRegistrationCreated$Outbound` instead. */
|
|
217
|
-
export type Outbound =
|
|
218
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated$Outbound;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export function createVendorRegistrationCreateVendorRegistrationCreatedToJSON(
|
|
222
|
-
createVendorRegistrationCreateVendorRegistrationCreated:
|
|
223
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated,
|
|
224
|
-
): string {
|
|
225
|
-
return JSON.stringify(
|
|
226
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated$outboundSchema
|
|
227
|
-
.parse(createVendorRegistrationCreateVendorRegistrationCreated),
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export function createVendorRegistrationCreateVendorRegistrationCreatedFromJSON(
|
|
232
|
-
jsonString: string,
|
|
233
|
-
): SafeParseResult<
|
|
234
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated,
|
|
235
|
-
SDKValidationError
|
|
236
|
-
> {
|
|
237
|
-
return safeParse(
|
|
238
|
-
jsonString,
|
|
239
|
-
(x) =>
|
|
240
|
-
CreateVendorRegistrationCreateVendorRegistrationCreated$inboundSchema
|
|
241
|
-
.parse(JSON.parse(x)),
|
|
242
|
-
`Failed to parse 'CreateVendorRegistrationCreateVendorRegistrationCreated' from JSON`,
|
|
243
|
-
);
|
|
244
|
-
}
|
|
@@ -11,6 +11,7 @@ import { GreenSecurityCore } from "../core.js";
|
|
|
11
11
|
import { vendorsCreateVendorRegistration } from "../funcs/vendorsCreateVendorRegistration.js";
|
|
12
12
|
import { combineSignals } from "../lib/primitives.js";
|
|
13
13
|
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
14
15
|
import * as operations from "../models/operations/index.js";
|
|
15
16
|
import { unwrapAsync } from "../types/fp.js";
|
|
16
17
|
import { useGreenSecurityContext } from "./_context.js";
|
|
@@ -21,8 +22,7 @@ export type VendorsCreateVendorRegistrationMutationVariables = {
|
|
|
21
22
|
options?: RequestOptions;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
export type VendorsCreateVendorRegistrationMutationData =
|
|
25
|
-
operations.CreateVendorRegistrationCreateVendorRegistrationCreated;
|
|
25
|
+
export type VendorsCreateVendorRegistrationMutationData = components.User;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Create vendor registration
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -39,9 +39,7 @@ export class Vendors extends ClientSDK {
|
|
|
39
39
|
async createVendorRegistration(
|
|
40
40
|
request: operations.CreateVendorRegistrationRequestBody,
|
|
41
41
|
options?: RequestOptions,
|
|
42
|
-
): Promise<
|
|
43
|
-
operations.CreateVendorRegistrationCreateVendorRegistrationCreated
|
|
44
|
-
> {
|
|
42
|
+
): Promise<components.User> {
|
|
45
43
|
return unwrapAsync(vendorsCreateVendorRegistration(
|
|
46
44
|
this,
|
|
47
45
|
request,
|