@greensecurity/javascript-sdk 0.21.3 → 0.21.6
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 +367 -56
- package/bin/mcp-server.js.map +17 -12
- package/funcs/vendorsListVendorCredits.d.ts +20 -0
- package/funcs/vendorsListVendorCredits.d.ts.map +1 -0
- package/funcs/vendorsListVendorCredits.js +160 -0
- package/funcs/vendorsListVendorCredits.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/vendorsListVendorCredits.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorCredits.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorCredits.js +64 -0
- package/mcp-server/tools/vendorsListVendorCredits.js.map +1 -0
- package/models/components/company.d.ts +2 -2
- package/models/components/company.d.ts.map +1 -1
- package/models/components/company.js +2 -2
- package/models/components/company.js.map +1 -1
- package/models/components/credit.d.ts +72 -0
- package/models/components/credit.d.ts.map +1 -0
- package/models/components/credit.js +114 -0
- package/models/components/credit.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/subscription.d.ts +2 -2
- package/models/components/subscription.d.ts.map +1 -1
- package/models/components/subscription.js +2 -2
- package/models/components/subscription.js.map +1 -1
- package/models/components/user.d.ts +10 -0
- package/models/components/user.d.ts.map +1 -1
- package/models/components/user.js +9 -0
- package/models/components/user.js.map +1 -1
- package/models/components/userlocation.d.ts +44 -0
- package/models/components/userlocation.d.ts.map +1 -0
- package/models/components/userlocation.js +81 -0
- package/models/components/userlocation.js.map +1 -0
- package/models/components/vendor.d.ts +10 -0
- package/models/components/vendor.d.ts.map +1 -1
- package/models/components/vendor.js +9 -0
- package/models/components/vendor.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listvendorcredits.d.ts +111 -0
- package/models/operations/listvendorcredits.d.ts.map +1 -0
- package/models/operations/listvendorcredits.js +153 -0
- package/models/operations/listvendorcredits.js.map +1 -0
- package/package.json +1 -1
- package/react-query/index.d.ts +1 -0
- package/react-query/index.d.ts.map +1 -1
- package/react-query/index.js +1 -0
- package/react-query/index.js.map +1 -1
- package/react-query/vendorsListVendorCredits.d.ts +77 -0
- package/react-query/vendorsListVendorCredits.d.ts.map +1 -0
- package/react-query/vendorsListVendorCredits.js +156 -0
- package/react-query/vendorsListVendorCredits.js.map +1 -0
- package/sdk/vendors.d.ts +9 -0
- package/sdk/vendors.d.ts.map +1 -1
- package/sdk/vendors.js +10 -0
- package/sdk/vendors.js.map +1 -1
- package/src/__tests__/vendors.test.ts +36 -0
- package/src/funcs/vendorsListVendorCredits.ts +251 -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/vendorsListVendorCredits.ts +37 -0
- package/src/models/components/company.ts +4 -4
- package/src/models/components/credit.ts +123 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/subscription.ts +4 -4
- package/src/models/components/user.ts +23 -0
- package/src/models/components/userlocation.ts +89 -0
- package/src/models/components/vendor.ts +23 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listvendorcredits.ts +245 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/vendorsListVendorCredits.ts +334 -0
- package/src/sdk/vendors.ts +20 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const Action = {
|
|
13
|
+
Credit: "credit",
|
|
14
|
+
Debit: "debit",
|
|
15
|
+
Transfer: "transfer",
|
|
16
|
+
} as const;
|
|
17
|
+
export type Action = ClosedEnum<typeof Action>;
|
|
18
|
+
|
|
19
|
+
export type Credit = {
|
|
20
|
+
id?: number | undefined;
|
|
21
|
+
date?: string | null | undefined;
|
|
22
|
+
action?: Action | undefined;
|
|
23
|
+
amount?: number | undefined;
|
|
24
|
+
balance?: number | undefined;
|
|
25
|
+
from?: string | null | undefined;
|
|
26
|
+
to?: string | null | undefined;
|
|
27
|
+
invoiceId?: number | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const Action$inboundSchema: z.ZodNativeEnum<typeof Action> = z
|
|
32
|
+
.nativeEnum(Action);
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const Action$outboundSchema: z.ZodNativeEnum<typeof Action> =
|
|
36
|
+
Action$inboundSchema;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
41
|
+
*/
|
|
42
|
+
export namespace Action$ {
|
|
43
|
+
/** @deprecated use `Action$inboundSchema` instead. */
|
|
44
|
+
export const inboundSchema = Action$inboundSchema;
|
|
45
|
+
/** @deprecated use `Action$outboundSchema` instead. */
|
|
46
|
+
export const outboundSchema = Action$outboundSchema;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const Credit$inboundSchema: z.ZodType<Credit, z.ZodTypeDef, unknown> = z
|
|
51
|
+
.object({
|
|
52
|
+
id: z.number().int().optional(),
|
|
53
|
+
date: z.nullable(z.string()).optional(),
|
|
54
|
+
action: Action$inboundSchema.optional(),
|
|
55
|
+
amount: z.number().int().optional(),
|
|
56
|
+
balance: z.number().int().optional(),
|
|
57
|
+
from: z.nullable(z.string()).optional(),
|
|
58
|
+
to: z.nullable(z.string()).optional(),
|
|
59
|
+
invoice_id: z.nullable(z.number().int()).optional(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
"invoice_id": "invoiceId",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type Credit$Outbound = {
|
|
68
|
+
id?: number | undefined;
|
|
69
|
+
date?: string | null | undefined;
|
|
70
|
+
action?: string | undefined;
|
|
71
|
+
amount?: number | undefined;
|
|
72
|
+
balance?: number | undefined;
|
|
73
|
+
from?: string | null | undefined;
|
|
74
|
+
to?: string | null | undefined;
|
|
75
|
+
invoice_id?: number | null | undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const Credit$outboundSchema: z.ZodType<
|
|
80
|
+
Credit$Outbound,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
Credit
|
|
83
|
+
> = z.object({
|
|
84
|
+
id: z.number().int().optional(),
|
|
85
|
+
date: z.nullable(z.string()).optional(),
|
|
86
|
+
action: Action$outboundSchema.optional(),
|
|
87
|
+
amount: z.number().int().optional(),
|
|
88
|
+
balance: z.number().int().optional(),
|
|
89
|
+
from: z.nullable(z.string()).optional(),
|
|
90
|
+
to: z.nullable(z.string()).optional(),
|
|
91
|
+
invoiceId: z.nullable(z.number().int()).optional(),
|
|
92
|
+
}).transform((v) => {
|
|
93
|
+
return remap$(v, {
|
|
94
|
+
invoiceId: "invoice_id",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace Credit$ {
|
|
103
|
+
/** @deprecated use `Credit$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = Credit$inboundSchema;
|
|
105
|
+
/** @deprecated use `Credit$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = Credit$outboundSchema;
|
|
107
|
+
/** @deprecated use `Credit$Outbound` instead. */
|
|
108
|
+
export type Outbound = Credit$Outbound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function creditToJSON(credit: Credit): string {
|
|
112
|
+
return JSON.stringify(Credit$outboundSchema.parse(credit));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function creditFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<Credit, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => Credit$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'Credit' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from "./activestatus.js";
|
|
|
6
6
|
export * from "./company.js";
|
|
7
7
|
export * from "./contact.js";
|
|
8
8
|
export * from "./credentialstatus.js";
|
|
9
|
+
export * from "./credit.js";
|
|
9
10
|
export * from "./department.js";
|
|
10
11
|
export * from "./departmentsummary.js";
|
|
11
12
|
export * from "./desc.js";
|
|
@@ -28,6 +29,7 @@ export * from "./subscription.js";
|
|
|
28
29
|
export * from "./supportarticle.js";
|
|
29
30
|
export * from "./systemsummary.js";
|
|
30
31
|
export * from "./user.js";
|
|
32
|
+
export * from "./userlocation.js";
|
|
31
33
|
export * from "./vendor.js";
|
|
32
34
|
export * from "./vendorcredentialslim.js";
|
|
33
35
|
export * from "./vendorfacilitystatusview.js";
|
|
@@ -17,7 +17,7 @@ export type Subscription = {
|
|
|
17
17
|
dateEnds?: string | null | undefined;
|
|
18
18
|
status?: string | null | undefined;
|
|
19
19
|
locked?: boolean | null | undefined;
|
|
20
|
-
variantTitle?:
|
|
20
|
+
variantTitle?: string | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/** @internal */
|
|
@@ -31,7 +31,7 @@ export const Subscription$inboundSchema: z.ZodType<
|
|
|
31
31
|
date_ends: z.nullable(z.string()).optional(),
|
|
32
32
|
status: z.nullable(z.string()).optional(),
|
|
33
33
|
locked: z.nullable(z.boolean()).optional(),
|
|
34
|
-
variant_title: z.nullable(z.
|
|
34
|
+
variant_title: z.nullable(z.string()).optional(),
|
|
35
35
|
}).transform((v) => {
|
|
36
36
|
return remap$(v, {
|
|
37
37
|
"date_started": "dateStarted",
|
|
@@ -47,7 +47,7 @@ export type Subscription$Outbound = {
|
|
|
47
47
|
date_ends?: string | null | undefined;
|
|
48
48
|
status?: string | null | undefined;
|
|
49
49
|
locked?: boolean | null | undefined;
|
|
50
|
-
variant_title?:
|
|
50
|
+
variant_title?: string | null | undefined;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
/** @internal */
|
|
@@ -61,7 +61,7 @@ export const Subscription$outboundSchema: z.ZodType<
|
|
|
61
61
|
dateEnds: z.nullable(z.string()).optional(),
|
|
62
62
|
status: z.nullable(z.string()).optional(),
|
|
63
63
|
locked: z.nullable(z.boolean()).optional(),
|
|
64
|
-
variantTitle: z.nullable(z.
|
|
64
|
+
variantTitle: z.nullable(z.string()).optional(),
|
|
65
65
|
}).transform((v) => {
|
|
66
66
|
return remap$(v, {
|
|
67
67
|
dateStarted: "date_started",
|
|
@@ -26,6 +26,12 @@ import {
|
|
|
26
26
|
ImageSet$Outbound,
|
|
27
27
|
ImageSet$outboundSchema,
|
|
28
28
|
} from "./imageset.js";
|
|
29
|
+
import {
|
|
30
|
+
UserLocation,
|
|
31
|
+
UserLocation$inboundSchema,
|
|
32
|
+
UserLocation$Outbound,
|
|
33
|
+
UserLocation$outboundSchema,
|
|
34
|
+
} from "./userlocation.js";
|
|
29
35
|
import {
|
|
30
36
|
Vendor,
|
|
31
37
|
Vendor$inboundSchema,
|
|
@@ -70,6 +76,8 @@ export type UserUser = {
|
|
|
70
76
|
*/
|
|
71
77
|
email: string;
|
|
72
78
|
phone?: string | null | undefined;
|
|
79
|
+
mobilePhone?: string | null | undefined;
|
|
80
|
+
fax?: string | null | undefined;
|
|
73
81
|
/**
|
|
74
82
|
* The flavor of user will determine the most relevant user experience for this user as well as permissions
|
|
75
83
|
*/
|
|
@@ -82,6 +90,10 @@ export type UserUser = {
|
|
|
82
90
|
* A set of images in different sizes
|
|
83
91
|
*/
|
|
84
92
|
imageUrls?: ImageSet | null | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Reduced list of attributes of the User Location
|
|
95
|
+
*/
|
|
96
|
+
location?: UserLocation | null | undefined;
|
|
85
97
|
};
|
|
86
98
|
|
|
87
99
|
/**
|
|
@@ -165,13 +177,17 @@ export const UserUser$inboundSchema: z.ZodType<
|
|
|
165
177
|
last_name: z.string().optional(),
|
|
166
178
|
email: z.string(),
|
|
167
179
|
phone: z.nullable(z.string()).optional(),
|
|
180
|
+
mobile_phone: z.nullable(z.string()).optional(),
|
|
181
|
+
fax: z.nullable(z.string()).optional(),
|
|
168
182
|
user_type: UserType$inboundSchema,
|
|
169
183
|
timezone: z.nullable(z.string()).optional(),
|
|
170
184
|
image_urls: z.nullable(ImageSet$inboundSchema).optional(),
|
|
185
|
+
location: z.nullable(UserLocation$inboundSchema).optional(),
|
|
171
186
|
}).transform((v) => {
|
|
172
187
|
return remap$(v, {
|
|
173
188
|
"first_name": "firstName",
|
|
174
189
|
"last_name": "lastName",
|
|
190
|
+
"mobile_phone": "mobilePhone",
|
|
175
191
|
"user_type": "userType",
|
|
176
192
|
"image_urls": "imageUrls",
|
|
177
193
|
});
|
|
@@ -184,9 +200,12 @@ export type UserUser$Outbound = {
|
|
|
184
200
|
last_name?: string | undefined;
|
|
185
201
|
email: string;
|
|
186
202
|
phone?: string | null | undefined;
|
|
203
|
+
mobile_phone?: string | null | undefined;
|
|
204
|
+
fax?: string | null | undefined;
|
|
187
205
|
user_type: string;
|
|
188
206
|
timezone?: string | null | undefined;
|
|
189
207
|
image_urls?: ImageSet$Outbound | null | undefined;
|
|
208
|
+
location?: UserLocation$Outbound | null | undefined;
|
|
190
209
|
};
|
|
191
210
|
|
|
192
211
|
/** @internal */
|
|
@@ -200,13 +219,17 @@ export const UserUser$outboundSchema: z.ZodType<
|
|
|
200
219
|
lastName: z.string().optional(),
|
|
201
220
|
email: z.string(),
|
|
202
221
|
phone: z.nullable(z.string()).optional(),
|
|
222
|
+
mobilePhone: z.nullable(z.string()).optional(),
|
|
223
|
+
fax: z.nullable(z.string()).optional(),
|
|
203
224
|
userType: UserType$outboundSchema,
|
|
204
225
|
timezone: z.nullable(z.string()).optional(),
|
|
205
226
|
imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
|
|
227
|
+
location: z.nullable(UserLocation$outboundSchema).optional(),
|
|
206
228
|
}).transform((v) => {
|
|
207
229
|
return remap$(v, {
|
|
208
230
|
firstName: "first_name",
|
|
209
231
|
lastName: "last_name",
|
|
232
|
+
mobilePhone: "mobile_phone",
|
|
210
233
|
userType: "user_type",
|
|
211
234
|
imageUrls: "image_urls",
|
|
212
235
|
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Reduced list of attributes of the User Location
|
|
12
|
+
*/
|
|
13
|
+
export type UserLocation = {
|
|
14
|
+
address?: string | null | undefined;
|
|
15
|
+
address1?: string | null | undefined;
|
|
16
|
+
address2?: string | null | undefined;
|
|
17
|
+
city?: string | null | undefined;
|
|
18
|
+
state?: string | null | undefined;
|
|
19
|
+
zip?: string | null | undefined;
|
|
20
|
+
country?: string | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const UserLocation$inboundSchema: z.ZodType<
|
|
25
|
+
UserLocation,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
address: z.nullable(z.string()).optional(),
|
|
30
|
+
address1: z.nullable(z.string()).optional(),
|
|
31
|
+
address2: z.nullable(z.string()).optional(),
|
|
32
|
+
city: z.nullable(z.string()).optional(),
|
|
33
|
+
state: z.nullable(z.string()).optional(),
|
|
34
|
+
zip: z.nullable(z.string()).optional(),
|
|
35
|
+
country: z.nullable(z.string()).optional(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type UserLocation$Outbound = {
|
|
40
|
+
address?: string | null | undefined;
|
|
41
|
+
address1?: string | null | undefined;
|
|
42
|
+
address2?: string | null | undefined;
|
|
43
|
+
city?: string | null | undefined;
|
|
44
|
+
state?: string | null | undefined;
|
|
45
|
+
zip?: string | null | undefined;
|
|
46
|
+
country?: string | null | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const UserLocation$outboundSchema: z.ZodType<
|
|
51
|
+
UserLocation$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
UserLocation
|
|
54
|
+
> = z.object({
|
|
55
|
+
address: z.nullable(z.string()).optional(),
|
|
56
|
+
address1: z.nullable(z.string()).optional(),
|
|
57
|
+
address2: z.nullable(z.string()).optional(),
|
|
58
|
+
city: z.nullable(z.string()).optional(),
|
|
59
|
+
state: z.nullable(z.string()).optional(),
|
|
60
|
+
zip: z.nullable(z.string()).optional(),
|
|
61
|
+
country: z.nullable(z.string()).optional(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace UserLocation$ {
|
|
69
|
+
/** @deprecated use `UserLocation$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = UserLocation$inboundSchema;
|
|
71
|
+
/** @deprecated use `UserLocation$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = UserLocation$outboundSchema;
|
|
73
|
+
/** @deprecated use `UserLocation$Outbound` instead. */
|
|
74
|
+
export type Outbound = UserLocation$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function userLocationToJSON(userLocation: UserLocation): string {
|
|
78
|
+
return JSON.stringify(UserLocation$outboundSchema.parse(userLocation));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function userLocationFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<UserLocation, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => UserLocation$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'UserLocation' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -37,6 +37,12 @@ import {
|
|
|
37
37
|
Subscription$Outbound,
|
|
38
38
|
Subscription$outboundSchema,
|
|
39
39
|
} from "./subscription.js";
|
|
40
|
+
import {
|
|
41
|
+
UserLocation,
|
|
42
|
+
UserLocation$inboundSchema,
|
|
43
|
+
UserLocation$Outbound,
|
|
44
|
+
UserLocation$outboundSchema,
|
|
45
|
+
} from "./userlocation.js";
|
|
40
46
|
|
|
41
47
|
export type One = {
|
|
42
48
|
id?: number | undefined;
|
|
@@ -44,6 +50,8 @@ export type One = {
|
|
|
44
50
|
lastName?: any | undefined;
|
|
45
51
|
email?: string | null | undefined;
|
|
46
52
|
phone?: string | null | undefined;
|
|
53
|
+
mobilePhone?: string | null | undefined;
|
|
54
|
+
fax?: string | null | undefined;
|
|
47
55
|
userType?: string | null | undefined;
|
|
48
56
|
timezone?: string | null | undefined;
|
|
49
57
|
qrCode?: string | null | undefined;
|
|
@@ -51,6 +59,10 @@ export type One = {
|
|
|
51
59
|
* A set of images in different sizes
|
|
52
60
|
*/
|
|
53
61
|
imageUrls?: ImageSet | null | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Reduced list of attributes of the User Location
|
|
64
|
+
*/
|
|
65
|
+
location?: UserLocation | null | undefined;
|
|
54
66
|
};
|
|
55
67
|
|
|
56
68
|
export type VendorUser = One | number;
|
|
@@ -160,14 +172,18 @@ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
|
|
|
160
172
|
last_name: z.any().optional(),
|
|
161
173
|
email: z.nullable(z.string()).optional(),
|
|
162
174
|
phone: z.nullable(z.string()).optional(),
|
|
175
|
+
mobile_phone: z.nullable(z.string()).optional(),
|
|
176
|
+
fax: z.nullable(z.string()).optional(),
|
|
163
177
|
user_type: z.nullable(z.string()).optional(),
|
|
164
178
|
timezone: z.nullable(z.string()).optional(),
|
|
165
179
|
qr_code: z.nullable(z.string()).optional(),
|
|
166
180
|
image_urls: z.nullable(ImageSet$inboundSchema).optional(),
|
|
181
|
+
location: z.nullable(UserLocation$inboundSchema).optional(),
|
|
167
182
|
}).transform((v) => {
|
|
168
183
|
return remap$(v, {
|
|
169
184
|
"first_name": "firstName",
|
|
170
185
|
"last_name": "lastName",
|
|
186
|
+
"mobile_phone": "mobilePhone",
|
|
171
187
|
"user_type": "userType",
|
|
172
188
|
"qr_code": "qrCode",
|
|
173
189
|
"image_urls": "imageUrls",
|
|
@@ -181,10 +197,13 @@ export type One$Outbound = {
|
|
|
181
197
|
last_name?: any | undefined;
|
|
182
198
|
email?: string | null | undefined;
|
|
183
199
|
phone?: string | null | undefined;
|
|
200
|
+
mobile_phone?: string | null | undefined;
|
|
201
|
+
fax?: string | null | undefined;
|
|
184
202
|
user_type?: string | null | undefined;
|
|
185
203
|
timezone?: string | null | undefined;
|
|
186
204
|
qr_code?: string | null | undefined;
|
|
187
205
|
image_urls?: ImageSet$Outbound | null | undefined;
|
|
206
|
+
location?: UserLocation$Outbound | null | undefined;
|
|
188
207
|
};
|
|
189
208
|
|
|
190
209
|
/** @internal */
|
|
@@ -195,14 +214,18 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
|
195
214
|
lastName: z.any().optional(),
|
|
196
215
|
email: z.nullable(z.string()).optional(),
|
|
197
216
|
phone: z.nullable(z.string()).optional(),
|
|
217
|
+
mobilePhone: z.nullable(z.string()).optional(),
|
|
218
|
+
fax: z.nullable(z.string()).optional(),
|
|
198
219
|
userType: z.nullable(z.string()).optional(),
|
|
199
220
|
timezone: z.nullable(z.string()).optional(),
|
|
200
221
|
qrCode: z.nullable(z.string()).optional(),
|
|
201
222
|
imageUrls: z.nullable(ImageSet$outboundSchema).optional(),
|
|
223
|
+
location: z.nullable(UserLocation$outboundSchema).optional(),
|
|
202
224
|
}).transform((v) => {
|
|
203
225
|
return remap$(v, {
|
|
204
226
|
firstName: "first_name",
|
|
205
227
|
lastName: "last_name",
|
|
228
|
+
mobilePhone: "mobile_phone",
|
|
206
229
|
userType: "user_type",
|
|
207
230
|
qrCode: "qr_code",
|
|
208
231
|
imageUrls: "image_urls",
|
|
@@ -14,6 +14,7 @@ export * from "./listallwebhookendpoints.js";
|
|
|
14
14
|
export * from "./listorsearchfacilities.js";
|
|
15
15
|
export * from "./listorsearchsupportarticles.js";
|
|
16
16
|
export * from "./listvendorcredentials.js";
|
|
17
|
+
export * from "./listvendorcredits.js";
|
|
17
18
|
export * from "./listvendorfacilitystatuses.js";
|
|
18
19
|
export * from "./listvendorinvoices.js";
|
|
19
20
|
export * from "./listvendorjobtitles.js";
|
|
@@ -0,0 +1,245 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ListVendorCreditsRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* A comma-separated list of object attributes to sort on.
|
|
15
|
+
*/
|
|
16
|
+
sort?: string | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Sort desc
|
|
19
|
+
*/
|
|
20
|
+
desc?: components.Desc | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* A 1-based offset for which page to request (defaults to 1)
|
|
23
|
+
*/
|
|
24
|
+
page?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Number of items to show in a given page
|
|
27
|
+
*/
|
|
28
|
+
itemsPerPage?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
|
|
31
|
+
*/
|
|
32
|
+
vendorIdOrMe: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The request was successful, and the server has returned the requested resource in the response body.
|
|
37
|
+
*/
|
|
38
|
+
export type ListVendorCreditsResponseBody = {
|
|
39
|
+
items: Array<components.Credit>;
|
|
40
|
+
/**
|
|
41
|
+
* Pagination information for a pageable list
|
|
42
|
+
*/
|
|
43
|
+
pager: components.Pager;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type ListVendorCreditsResponse = {
|
|
47
|
+
result: ListVendorCreditsResponseBody;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const ListVendorCreditsRequest$inboundSchema: z.ZodType<
|
|
52
|
+
ListVendorCreditsRequest,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.object({
|
|
56
|
+
sort: z.nullable(z.string()).optional(),
|
|
57
|
+
desc: components.Desc$inboundSchema.optional(),
|
|
58
|
+
page: z.number().int().optional(),
|
|
59
|
+
items_per_page: z.number().int().optional(),
|
|
60
|
+
vendor_id_or_me: z.string(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
"items_per_page": "itemsPerPage",
|
|
64
|
+
"vendor_id_or_me": "vendorIdOrMe",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type ListVendorCreditsRequest$Outbound = {
|
|
70
|
+
sort?: string | null | undefined;
|
|
71
|
+
desc?: components.Desc$Outbound | undefined;
|
|
72
|
+
page?: number | undefined;
|
|
73
|
+
items_per_page?: number | undefined;
|
|
74
|
+
vendor_id_or_me: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ListVendorCreditsRequest$outboundSchema: z.ZodType<
|
|
79
|
+
ListVendorCreditsRequest$Outbound,
|
|
80
|
+
z.ZodTypeDef,
|
|
81
|
+
ListVendorCreditsRequest
|
|
82
|
+
> = z.object({
|
|
83
|
+
sort: z.nullable(z.string()).optional(),
|
|
84
|
+
desc: components.Desc$outboundSchema.optional(),
|
|
85
|
+
page: z.number().int().optional(),
|
|
86
|
+
itemsPerPage: z.number().int().optional(),
|
|
87
|
+
vendorIdOrMe: z.string(),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
itemsPerPage: "items_per_page",
|
|
91
|
+
vendorIdOrMe: "vendor_id_or_me",
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
|
+
*/
|
|
99
|
+
export namespace ListVendorCreditsRequest$ {
|
|
100
|
+
/** @deprecated use `ListVendorCreditsRequest$inboundSchema` instead. */
|
|
101
|
+
export const inboundSchema = ListVendorCreditsRequest$inboundSchema;
|
|
102
|
+
/** @deprecated use `ListVendorCreditsRequest$outboundSchema` instead. */
|
|
103
|
+
export const outboundSchema = ListVendorCreditsRequest$outboundSchema;
|
|
104
|
+
/** @deprecated use `ListVendorCreditsRequest$Outbound` instead. */
|
|
105
|
+
export type Outbound = ListVendorCreditsRequest$Outbound;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function listVendorCreditsRequestToJSON(
|
|
109
|
+
listVendorCreditsRequest: ListVendorCreditsRequest,
|
|
110
|
+
): string {
|
|
111
|
+
return JSON.stringify(
|
|
112
|
+
ListVendorCreditsRequest$outboundSchema.parse(listVendorCreditsRequest),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function listVendorCreditsRequestFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<ListVendorCreditsRequest, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => ListVendorCreditsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'ListVendorCreditsRequest' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const ListVendorCreditsResponseBody$inboundSchema: z.ZodType<
|
|
128
|
+
ListVendorCreditsResponseBody,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
unknown
|
|
131
|
+
> = z.object({
|
|
132
|
+
items: z.array(components.Credit$inboundSchema),
|
|
133
|
+
pager: components.Pager$inboundSchema,
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export type ListVendorCreditsResponseBody$Outbound = {
|
|
138
|
+
items: Array<components.Credit$Outbound>;
|
|
139
|
+
pager: components.Pager$Outbound;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const ListVendorCreditsResponseBody$outboundSchema: z.ZodType<
|
|
144
|
+
ListVendorCreditsResponseBody$Outbound,
|
|
145
|
+
z.ZodTypeDef,
|
|
146
|
+
ListVendorCreditsResponseBody
|
|
147
|
+
> = z.object({
|
|
148
|
+
items: z.array(components.Credit$outboundSchema),
|
|
149
|
+
pager: components.Pager$outboundSchema,
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
155
|
+
*/
|
|
156
|
+
export namespace ListVendorCreditsResponseBody$ {
|
|
157
|
+
/** @deprecated use `ListVendorCreditsResponseBody$inboundSchema` instead. */
|
|
158
|
+
export const inboundSchema = ListVendorCreditsResponseBody$inboundSchema;
|
|
159
|
+
/** @deprecated use `ListVendorCreditsResponseBody$outboundSchema` instead. */
|
|
160
|
+
export const outboundSchema = ListVendorCreditsResponseBody$outboundSchema;
|
|
161
|
+
/** @deprecated use `ListVendorCreditsResponseBody$Outbound` instead. */
|
|
162
|
+
export type Outbound = ListVendorCreditsResponseBody$Outbound;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function listVendorCreditsResponseBodyToJSON(
|
|
166
|
+
listVendorCreditsResponseBody: ListVendorCreditsResponseBody,
|
|
167
|
+
): string {
|
|
168
|
+
return JSON.stringify(
|
|
169
|
+
ListVendorCreditsResponseBody$outboundSchema.parse(
|
|
170
|
+
listVendorCreditsResponseBody,
|
|
171
|
+
),
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function listVendorCreditsResponseBodyFromJSON(
|
|
176
|
+
jsonString: string,
|
|
177
|
+
): SafeParseResult<ListVendorCreditsResponseBody, SDKValidationError> {
|
|
178
|
+
return safeParse(
|
|
179
|
+
jsonString,
|
|
180
|
+
(x) => ListVendorCreditsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
181
|
+
`Failed to parse 'ListVendorCreditsResponseBody' from JSON`,
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
export const ListVendorCreditsResponse$inboundSchema: z.ZodType<
|
|
187
|
+
ListVendorCreditsResponse,
|
|
188
|
+
z.ZodTypeDef,
|
|
189
|
+
unknown
|
|
190
|
+
> = z.object({
|
|
191
|
+
Result: z.lazy(() => ListVendorCreditsResponseBody$inboundSchema),
|
|
192
|
+
}).transform((v) => {
|
|
193
|
+
return remap$(v, {
|
|
194
|
+
"Result": "result",
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export type ListVendorCreditsResponse$Outbound = {
|
|
200
|
+
Result: ListVendorCreditsResponseBody$Outbound;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export const ListVendorCreditsResponse$outboundSchema: z.ZodType<
|
|
205
|
+
ListVendorCreditsResponse$Outbound,
|
|
206
|
+
z.ZodTypeDef,
|
|
207
|
+
ListVendorCreditsResponse
|
|
208
|
+
> = z.object({
|
|
209
|
+
result: z.lazy(() => ListVendorCreditsResponseBody$outboundSchema),
|
|
210
|
+
}).transform((v) => {
|
|
211
|
+
return remap$(v, {
|
|
212
|
+
result: "Result",
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @internal
|
|
218
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
219
|
+
*/
|
|
220
|
+
export namespace ListVendorCreditsResponse$ {
|
|
221
|
+
/** @deprecated use `ListVendorCreditsResponse$inboundSchema` instead. */
|
|
222
|
+
export const inboundSchema = ListVendorCreditsResponse$inboundSchema;
|
|
223
|
+
/** @deprecated use `ListVendorCreditsResponse$outboundSchema` instead. */
|
|
224
|
+
export const outboundSchema = ListVendorCreditsResponse$outboundSchema;
|
|
225
|
+
/** @deprecated use `ListVendorCreditsResponse$Outbound` instead. */
|
|
226
|
+
export type Outbound = ListVendorCreditsResponse$Outbound;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function listVendorCreditsResponseToJSON(
|
|
230
|
+
listVendorCreditsResponse: ListVendorCreditsResponse,
|
|
231
|
+
): string {
|
|
232
|
+
return JSON.stringify(
|
|
233
|
+
ListVendorCreditsResponse$outboundSchema.parse(listVendorCreditsResponse),
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function listVendorCreditsResponseFromJSON(
|
|
238
|
+
jsonString: string,
|
|
239
|
+
): SafeParseResult<ListVendorCreditsResponse, SDKValidationError> {
|
|
240
|
+
return safeParse(
|
|
241
|
+
jsonString,
|
|
242
|
+
(x) => ListVendorCreditsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
243
|
+
`Failed to parse 'ListVendorCreditsResponse' from JSON`,
|
|
244
|
+
);
|
|
245
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from "./vendorsExpediteTimeRemaining.js";
|
|
|
21
21
|
export * from "./vendorsGetVendorInvoiceDetails.js";
|
|
22
22
|
export * from "./vendorsGetVendorsDetails.js";
|
|
23
23
|
export * from "./vendorsListVendorCredentials.js";
|
|
24
|
+
export * from "./vendorsListVendorCredits.js";
|
|
24
25
|
export * from "./vendorsListVendorFacilityStatuses.js";
|
|
25
26
|
export * from "./vendorsListVendorInvoices.js";
|
|
26
27
|
export * from "./vendorsListVendorJobTitles.js";
|