@greensecurity/javascript-sdk 0.30.31 → 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 +526 -514
- package/bin/mcp-server.js.map +24 -24
- 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 +2 -2
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/funcs/organizationsListOrSearchFacilities.js +2 -0
- package/dist/commonjs/funcs/organizationsListOrSearchFacilities.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/funcs/vendorsListVendorInvoices.js +2 -2
- package/dist/commonjs/funcs/vendorsListVendorInvoices.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/models/operations/listorsearchfacilities.d.ts +10 -0
- package/dist/commonjs/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listorsearchfacilities.js +4 -0
- package/dist/commonjs/models/operations/listorsearchfacilities.js.map +1 -1
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.d.ts +6 -0
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.js +4 -0
- package/dist/commonjs/react-query/organizationsListOrSearchFacilities.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 +2 -2
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/funcs/organizationsListOrSearchFacilities.js +2 -0
- package/dist/esm/funcs/organizationsListOrSearchFacilities.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/funcs/vendorsListVendorInvoices.js +2 -2
- package/dist/esm/funcs/vendorsListVendorInvoices.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/models/operations/listorsearchfacilities.d.ts +10 -0
- package/dist/esm/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/dist/esm/models/operations/listorsearchfacilities.js +4 -0
- package/dist/esm/models/operations/listorsearchfacilities.js.map +1 -1
- package/dist/esm/react-query/organizationsListOrSearchFacilities.d.ts +6 -0
- package/dist/esm/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/dist/esm/react-query/organizationsListOrSearchFacilities.js +4 -0
- package/dist/esm/react-query/organizationsListOrSearchFacilities.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 +2 -2
- package/src/funcs/organizationsListOrSearchFacilities.ts +2 -0
- package/src/funcs/vendorsCreateVendorRegistration.ts +10 -9
- package/src/funcs/vendorsListVendorInvoices.ts +2 -2
- 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/models/operations/listorsearchfacilities.ts +14 -0
- package/src/react-query/organizationsListOrSearchFacilities.ts +10 -0
- package/src/react-query/vendorsCreateVendorRegistration.ts +2 -2
- package/src/sdk/vendors.ts +1 -3
|
@@ -124,6 +124,8 @@ async function $do(
|
|
|
124
124
|
"active_status": payload.active_status,
|
|
125
125
|
"desc": payload.desc,
|
|
126
126
|
"items_per_page": payload.items_per_page,
|
|
127
|
+
"latitude": payload.latitude,
|
|
128
|
+
"longitude": payload.longitude,
|
|
127
129
|
"name_like": payload.name_like,
|
|
128
130
|
"page": payload.page,
|
|
129
131
|
"sort": payload.sort,
|
|
@@ -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 });
|
|
@@ -163,7 +163,7 @@ async function $do(
|
|
|
163
163
|
|
|
164
164
|
const doResult = await client._do(req, {
|
|
165
165
|
context,
|
|
166
|
-
errorCodes: ["400", "401", "4XX", "5XX"],
|
|
166
|
+
errorCodes: ["400", "401", "403", "4XX", "5XX"],
|
|
167
167
|
retryConfig: context.retryConfig,
|
|
168
168
|
retryCodes: context.retryCodes,
|
|
169
169
|
});
|
|
@@ -190,7 +190,7 @@ async function $do(
|
|
|
190
190
|
M.json(200, operations.ListVendorInvoicesResponse$inboundSchema, {
|
|
191
191
|
key: "Result",
|
|
192
192
|
}),
|
|
193
|
-
M.jsonErr([400, 401], errors.ApiErrorResponse$inboundSchema),
|
|
193
|
+
M.jsonErr([400, 401, 403], errors.ApiErrorResponse$inboundSchema),
|
|
194
194
|
M.fail("4XX"),
|
|
195
195
|
M.fail("5XX"),
|
|
196
196
|
)(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
|
-
}
|
|
@@ -50,6 +50,14 @@ export type ListOrSearchFacilitiesRequest = {
|
|
|
50
50
|
* > NOTE: There may be times where it makes sense to show only active objects, active and inactive, or deleted. Some objects may have a separate property for `visible` which should override this state.
|
|
51
51
|
*/
|
|
52
52
|
activeStatus?: components.ActiveStatus | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The latitude of the current Geo coordinates
|
|
55
|
+
*/
|
|
56
|
+
latitude?: number | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The longitude of the current Geo coordinates
|
|
59
|
+
*/
|
|
60
|
+
longitude?: number | undefined;
|
|
53
61
|
};
|
|
54
62
|
|
|
55
63
|
/**
|
|
@@ -82,6 +90,8 @@ export const ListOrSearchFacilitiesRequest$inboundSchema: z.ZodType<
|
|
|
82
90
|
name_like: z.string().optional(),
|
|
83
91
|
state_like: z.string().optional(),
|
|
84
92
|
active_status: components.ActiveStatus$inboundSchema.default("Active"),
|
|
93
|
+
latitude: z.number().optional(),
|
|
94
|
+
longitude: z.number().optional(),
|
|
85
95
|
}).transform((v) => {
|
|
86
96
|
return remap$(v, {
|
|
87
97
|
"items_per_page": "itemsPerPage",
|
|
@@ -103,6 +113,8 @@ export type ListOrSearchFacilitiesRequest$Outbound = {
|
|
|
103
113
|
name_like?: string | undefined;
|
|
104
114
|
state_like?: string | undefined;
|
|
105
115
|
active_status: string;
|
|
116
|
+
latitude?: number | undefined;
|
|
117
|
+
longitude?: number | undefined;
|
|
106
118
|
};
|
|
107
119
|
|
|
108
120
|
/** @internal */
|
|
@@ -120,6 +132,8 @@ export const ListOrSearchFacilitiesRequest$outboundSchema: z.ZodType<
|
|
|
120
132
|
nameLike: z.string().optional(),
|
|
121
133
|
stateLike: z.string().optional(),
|
|
122
134
|
activeStatus: components.ActiveStatus$outboundSchema.default("Active"),
|
|
135
|
+
latitude: z.number().optional(),
|
|
136
|
+
longitude: z.number().optional(),
|
|
123
137
|
}).transform((v) => {
|
|
124
138
|
return remap$(v, {
|
|
125
139
|
itemsPerPage: "items_per_page",
|
|
@@ -249,6 +249,8 @@ export function setOrganizationsListOrSearchFacilitiesData(
|
|
|
249
249
|
nameLike?: string | undefined;
|
|
250
250
|
stateLike?: string | undefined;
|
|
251
251
|
activeStatus?: components.ActiveStatus | undefined;
|
|
252
|
+
latitude?: number | undefined;
|
|
253
|
+
longitude?: number | undefined;
|
|
252
254
|
},
|
|
253
255
|
],
|
|
254
256
|
data: OrganizationsListOrSearchFacilitiesQueryData,
|
|
@@ -274,6 +276,8 @@ export function invalidateOrganizationsListOrSearchFacilities(
|
|
|
274
276
|
nameLike?: string | undefined;
|
|
275
277
|
stateLike?: string | undefined;
|
|
276
278
|
activeStatus?: components.ActiveStatus | undefined;
|
|
279
|
+
latitude?: number | undefined;
|
|
280
|
+
longitude?: number | undefined;
|
|
277
281
|
}]
|
|
278
282
|
>,
|
|
279
283
|
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
@@ -324,6 +328,8 @@ export function buildOrganizationsListOrSearchFacilitiesQuery(
|
|
|
324
328
|
nameLike: request.nameLike,
|
|
325
329
|
stateLike: request.stateLike,
|
|
326
330
|
activeStatus: request.activeStatus,
|
|
331
|
+
latitude: request.latitude,
|
|
332
|
+
longitude: request.longitude,
|
|
327
333
|
}),
|
|
328
334
|
queryFn: async function organizationsListOrSearchFacilitiesQueryFn(
|
|
329
335
|
ctx,
|
|
@@ -367,6 +373,8 @@ export function buildOrganizationsListOrSearchFacilitiesInfiniteQuery(
|
|
|
367
373
|
nameLike: request.nameLike,
|
|
368
374
|
stateLike: request.stateLike,
|
|
369
375
|
activeStatus: request.activeStatus,
|
|
376
|
+
latitude: request.latitude,
|
|
377
|
+
longitude: request.longitude,
|
|
370
378
|
}),
|
|
371
379
|
queryFn: async function organizationsListOrSearchFacilitiesQuery(
|
|
372
380
|
ctx,
|
|
@@ -408,6 +416,8 @@ export function queryKeyOrganizationsListOrSearchFacilities(
|
|
|
408
416
|
nameLike?: string | undefined;
|
|
409
417
|
stateLike?: string | undefined;
|
|
410
418
|
activeStatus?: components.ActiveStatus | undefined;
|
|
419
|
+
latitude?: number | undefined;
|
|
420
|
+
longitude?: number | undefined;
|
|
411
421
|
},
|
|
412
422
|
): QueryKey {
|
|
413
423
|
return [
|
|
@@ -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,
|