@greensecurity/javascript-sdk 0.30.11 → 0.30.15

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.
Files changed (119) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +458 -41
  3. package/bin/mcp-server.js.map +12 -9
  4. package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js +1 -1
  5. package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/vendors.test.js +18 -2
  7. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  9. package/dist/commonjs/funcs/vendorsListVendorJobTitles.js +1 -1
  10. package/dist/commonjs/funcs/vendorsListVendorJobTitles.js.map +1 -1
  11. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +17 -0
  12. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -0
  13. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +122 -0
  14. package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js.map +1 -0
  15. package/dist/commonjs/lib/config.d.ts +3 -3
  16. package/dist/commonjs/lib/config.js +3 -3
  17. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  18. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  19. package/dist/commonjs/mcp-server/server.js +3 -1
  20. package/dist/commonjs/mcp-server/server.js.map +1 -1
  21. package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorDetails.d.ts +8 -0
  22. package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorDetails.d.ts.map +1 -0
  23. package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorDetails.js +64 -0
  24. package/dist/commonjs/mcp-server/tools/vendorsUpdateVendorDetails.js.map +1 -0
  25. package/dist/commonjs/models/components/userlocation.d.ts +654 -1
  26. package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
  27. package/dist/commonjs/models/components/userlocation.js +257 -3
  28. package/dist/commonjs/models/components/userlocation.js.map +1 -1
  29. package/dist/commonjs/models/operations/index.d.ts +1 -0
  30. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  31. package/dist/commonjs/models/operations/index.js +1 -0
  32. package/dist/commonjs/models/operations/index.js.map +1 -1
  33. package/dist/commonjs/models/operations/listvendorcredentials.d.ts +1 -1
  34. package/dist/commonjs/models/operations/listvendorcredentials.d.ts.map +1 -1
  35. package/dist/commonjs/models/operations/listvendorcredentials.js +2 -2
  36. package/dist/commonjs/models/operations/listvendorcredentials.js.map +1 -1
  37. package/dist/commonjs/models/operations/updatevendordetails.d.ts +121 -0
  38. package/dist/commonjs/models/operations/updatevendordetails.d.ts.map +1 -0
  39. package/dist/commonjs/models/operations/updatevendordetails.js +154 -0
  40. package/dist/commonjs/models/operations/updatevendordetails.js.map +1 -0
  41. package/dist/commonjs/react-query/index.d.ts +1 -0
  42. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  43. package/dist/commonjs/react-query/index.js +1 -0
  44. package/dist/commonjs/react-query/index.js.map +1 -1
  45. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +23 -0
  46. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -0
  47. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +47 -0
  48. package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -0
  49. package/dist/commonjs/sdk/vendors.d.ts +7 -0
  50. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  51. package/dist/commonjs/sdk/vendors.js +10 -0
  52. package/dist/commonjs/sdk/vendors.js.map +1 -1
  53. package/dist/esm/__tests__/vendormanagedbycompanies.test.js +1 -1
  54. package/dist/esm/__tests__/vendormanagedbycompanies.test.js.map +1 -1
  55. package/dist/esm/__tests__/vendors.test.js +18 -2
  56. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  57. package/dist/esm/__tests__/webhooks.test.js +1 -1
  58. package/dist/esm/funcs/vendorsListVendorJobTitles.js +1 -1
  59. package/dist/esm/funcs/vendorsListVendorJobTitles.js.map +1 -1
  60. package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +17 -0
  61. package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -0
  62. package/dist/esm/funcs/vendorsUpdateVendorDetails.js +86 -0
  63. package/dist/esm/funcs/vendorsUpdateVendorDetails.js.map +1 -0
  64. package/dist/esm/lib/config.d.ts +3 -3
  65. package/dist/esm/lib/config.js +3 -3
  66. package/dist/esm/mcp-server/mcp-server.js +1 -1
  67. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  68. package/dist/esm/mcp-server/server.js +3 -1
  69. package/dist/esm/mcp-server/server.js.map +1 -1
  70. package/dist/esm/mcp-server/tools/vendorsUpdateVendorDetails.d.ts +8 -0
  71. package/dist/esm/mcp-server/tools/vendorsUpdateVendorDetails.d.ts.map +1 -0
  72. package/dist/esm/mcp-server/tools/vendorsUpdateVendorDetails.js +28 -0
  73. package/dist/esm/mcp-server/tools/vendorsUpdateVendorDetails.js.map +1 -0
  74. package/dist/esm/models/components/userlocation.d.ts +654 -1
  75. package/dist/esm/models/components/userlocation.d.ts.map +1 -1
  76. package/dist/esm/models/components/userlocation.js +256 -2
  77. package/dist/esm/models/components/userlocation.js.map +1 -1
  78. package/dist/esm/models/operations/index.d.ts +1 -0
  79. package/dist/esm/models/operations/index.d.ts.map +1 -1
  80. package/dist/esm/models/operations/index.js +1 -0
  81. package/dist/esm/models/operations/index.js.map +1 -1
  82. package/dist/esm/models/operations/listvendorcredentials.d.ts +1 -1
  83. package/dist/esm/models/operations/listvendorcredentials.d.ts.map +1 -1
  84. package/dist/esm/models/operations/listvendorcredentials.js +2 -2
  85. package/dist/esm/models/operations/listvendorcredentials.js.map +1 -1
  86. package/dist/esm/models/operations/updatevendordetails.d.ts +121 -0
  87. package/dist/esm/models/operations/updatevendordetails.d.ts.map +1 -0
  88. package/dist/esm/models/operations/updatevendordetails.js +114 -0
  89. package/dist/esm/models/operations/updatevendordetails.js.map +1 -0
  90. package/dist/esm/react-query/index.d.ts +1 -0
  91. package/dist/esm/react-query/index.d.ts.map +1 -1
  92. package/dist/esm/react-query/index.js +1 -0
  93. package/dist/esm/react-query/index.js.map +1 -1
  94. package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +23 -0
  95. package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -0
  96. package/dist/esm/react-query/vendorsUpdateVendorDetails.js +42 -0
  97. package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -0
  98. package/dist/esm/sdk/vendors.d.ts +7 -0
  99. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  100. package/dist/esm/sdk/vendors.js +10 -0
  101. package/dist/esm/sdk/vendors.js.map +1 -1
  102. package/jsr.json +1 -1
  103. package/package.json +1 -1
  104. package/src/__tests__/vendormanagedbycompanies.test.ts +1 -1
  105. package/src/__tests__/vendors.test.ts +21 -2
  106. package/src/__tests__/webhooks.test.ts +1 -1
  107. package/src/funcs/vendorsListVendorJobTitles.ts +1 -1
  108. package/src/funcs/vendorsUpdateVendorDetails.ts +175 -0
  109. package/src/lib/config.ts +3 -3
  110. package/src/mcp-server/mcp-server.ts +1 -1
  111. package/src/mcp-server/server.ts +3 -1
  112. package/src/mcp-server/tools/vendorsUpdateVendorDetails.ts +37 -0
  113. package/src/models/components/userlocation.ts +278 -3
  114. package/src/models/operations/index.ts +1 -0
  115. package/src/models/operations/listvendorcredentials.ts +3 -7
  116. package/src/models/operations/updatevendordetails.ts +224 -0
  117. package/src/react-query/index.ts +1 -0
  118. package/src/react-query/vendorsUpdateVendorDetails.ts +88 -0
  119. package/src/sdk/vendors.ts +18 -0
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { vendorsUpdateVendorDetails } from "../../funcs/vendorsUpdateVendorDetails.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.UpdateVendorDetailsRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$vendorsUpdateVendorDetails: ToolDefinition<typeof args> = {
14
+ name: "vendors-update-vendor-details",
15
+ description: `Update vendor details
16
+
17
+ It will update the vendor details`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await vendorsUpdateVendorDetails(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -3,10 +3,222 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
7
9
  import { Result as SafeParseResult } from "../../types/fp.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
 
12
+ export const State = {
13
+ Al: "AL",
14
+ Ak: "AK",
15
+ Az: "AZ",
16
+ Ar: "AR",
17
+ Ca: "CA",
18
+ Co: "CO",
19
+ Ct: "CT",
20
+ De: "DE",
21
+ Dc: "DC",
22
+ Fl: "FL",
23
+ Ga: "GA",
24
+ Hi: "HI",
25
+ Id: "ID",
26
+ Il: "IL",
27
+ In: "IN",
28
+ Ia: "IA",
29
+ Ks: "KS",
30
+ Ky: "KY",
31
+ La: "LA",
32
+ Me: "ME",
33
+ Md: "MD",
34
+ Ma: "MA",
35
+ Mi: "MI",
36
+ Mn: "MN",
37
+ Ms: "MS",
38
+ Mo: "MO",
39
+ Mt: "MT",
40
+ Ne: "NE",
41
+ Nv: "NV",
42
+ Nh: "NH",
43
+ Nj: "NJ",
44
+ Nm: "NM",
45
+ Ny: "NY",
46
+ Nc: "NC",
47
+ Nd: "ND",
48
+ Oh: "OH",
49
+ Ok: "OK",
50
+ Or: "OR",
51
+ Pa: "PA",
52
+ Ri: "RI",
53
+ Sc: "SC",
54
+ Sd: "SD",
55
+ Tn: "TN",
56
+ Tx: "TX",
57
+ Ut: "UT",
58
+ Vt: "VT",
59
+ Va: "VA",
60
+ Wa: "WA",
61
+ Wv: "WV",
62
+ Wi: "WI",
63
+ Wy: "WY",
64
+ } as const;
65
+ export type State = ClosedEnum<typeof State>;
66
+
67
+ export const Timezone = {
68
+ InternationalDateLineWest: "International Date Line West",
69
+ MidwayIsland: "Midway Island",
70
+ AmericanSamoa: "American Samoa",
71
+ Hawaii: "Hawaii",
72
+ Alaska: "Alaska",
73
+ PacificTimeUSAndCanada: "Pacific Time (US & Canada)",
74
+ Tijuana: "Tijuana",
75
+ MountainTimeUSAndCanada: "Mountain Time (US & Canada)",
76
+ Arizona: "Arizona",
77
+ Chihuahua: "Chihuahua",
78
+ Mazatlan: "Mazatlan",
79
+ CentralTimeUSAndCanada: "Central Time (US & Canada)",
80
+ Saskatchewan: "Saskatchewan",
81
+ Guadalajara: "Guadalajara",
82
+ MexicoCity: "Mexico City",
83
+ Monterrey: "Monterrey",
84
+ CentralAmerica: "Central America",
85
+ EasternTimeUSAndCanada: "Eastern Time (US & Canada)",
86
+ IndianaEast: "Indiana (East)",
87
+ Bogota: "Bogota",
88
+ Lima: "Lima",
89
+ Quito: "Quito",
90
+ AtlanticTimeCanada: "Atlantic Time (Canada)",
91
+ Caracas: "Caracas",
92
+ LaPaz: "La Paz",
93
+ Santiago: "Santiago",
94
+ Newfoundland: "Newfoundland",
95
+ Brasilia: "Brasilia",
96
+ BuenosAires: "Buenos Aires",
97
+ Montevideo: "Montevideo",
98
+ Georgetown: "Georgetown",
99
+ PuertoRico: "Puerto Rico",
100
+ Greenland: "Greenland",
101
+ MidAtlantic: "Mid-Atlantic",
102
+ Azores: "Azores",
103
+ CapeVerdeIs: "Cape Verde Is.",
104
+ Dublin: "Dublin",
105
+ Edinburgh: "Edinburgh",
106
+ Lisbon: "Lisbon",
107
+ London: "London",
108
+ Casablanca: "Casablanca",
109
+ Monrovia: "Monrovia",
110
+ Utc: "UTC",
111
+ Belgrade: "Belgrade",
112
+ Bratislava: "Bratislava",
113
+ Budapest: "Budapest",
114
+ Ljubljana: "Ljubljana",
115
+ Prague: "Prague",
116
+ Sarajevo: "Sarajevo",
117
+ Skopje: "Skopje",
118
+ Warsaw: "Warsaw",
119
+ Zagreb: "Zagreb",
120
+ Brussels: "Brussels",
121
+ Copenhagen: "Copenhagen",
122
+ Madrid: "Madrid",
123
+ Paris: "Paris",
124
+ Amsterdam: "Amsterdam",
125
+ Berlin: "Berlin",
126
+ Bern: "Bern",
127
+ Zurich: "Zurich",
128
+ Rome: "Rome",
129
+ Stockholm: "Stockholm",
130
+ Vienna: "Vienna",
131
+ WestCentralAfrica: "West Central Africa",
132
+ Bucharest: "Bucharest",
133
+ Cairo: "Cairo",
134
+ Helsinki: "Helsinki",
135
+ Kyiv: "Kyiv",
136
+ Riga: "Riga",
137
+ Sofia: "Sofia",
138
+ Tallinn: "Tallinn",
139
+ Vilnius: "Vilnius",
140
+ Athens: "Athens",
141
+ Istanbul: "Istanbul",
142
+ Minsk: "Minsk",
143
+ Jerusalem: "Jerusalem",
144
+ Harare: "Harare",
145
+ Pretoria: "Pretoria",
146
+ Kaliningrad: "Kaliningrad",
147
+ Moscow: "Moscow",
148
+ StPetersburg: "St. Petersburg",
149
+ Volgograd: "Volgograd",
150
+ Samara: "Samara",
151
+ Kuwait: "Kuwait",
152
+ Riyadh: "Riyadh",
153
+ Nairobi: "Nairobi",
154
+ Baghdad: "Baghdad",
155
+ Tehran: "Tehran",
156
+ AbuDhabi: "Abu Dhabi",
157
+ Muscat: "Muscat",
158
+ Baku: "Baku",
159
+ Tbilisi: "Tbilisi",
160
+ Yerevan: "Yerevan",
161
+ Kabul: "Kabul",
162
+ Ekaterinburg: "Ekaterinburg",
163
+ Islamabad: "Islamabad",
164
+ Karachi: "Karachi",
165
+ Tashkent: "Tashkent",
166
+ Chennai: "Chennai",
167
+ Kolkata: "Kolkata",
168
+ Mumbai: "Mumbai",
169
+ NewDelhi: "New Delhi",
170
+ Kathmandu: "Kathmandu",
171
+ Astana: "Astana",
172
+ Dhaka: "Dhaka",
173
+ SriJayawardenepura: "Sri Jayawardenepura",
174
+ Almaty: "Almaty",
175
+ Novosibirsk: "Novosibirsk",
176
+ Rangoon: "Rangoon",
177
+ Bangkok: "Bangkok",
178
+ Hanoi: "Hanoi",
179
+ Jakarta: "Jakarta",
180
+ Krasnoyarsk: "Krasnoyarsk",
181
+ Beijing: "Beijing",
182
+ Chongqing: "Chongqing",
183
+ HongKong: "Hong Kong",
184
+ Urumqi: "Urumqi",
185
+ KualaLumpur: "Kuala Lumpur",
186
+ Singapore: "Singapore",
187
+ Taipei: "Taipei",
188
+ Perth: "Perth",
189
+ Irkutsk: "Irkutsk",
190
+ Ulaanbaatar: "Ulaanbaatar",
191
+ Seoul: "Seoul",
192
+ Osaka: "Osaka",
193
+ Sapporo: "Sapporo",
194
+ Tokyo: "Tokyo",
195
+ Yakutsk: "Yakutsk",
196
+ Darwin: "Darwin",
197
+ Adelaide: "Adelaide",
198
+ Canberra: "Canberra",
199
+ Melbourne: "Melbourne",
200
+ Sydney: "Sydney",
201
+ Brisbane: "Brisbane",
202
+ Hobart: "Hobart",
203
+ Vladivostok: "Vladivostok",
204
+ Guam: "Guam",
205
+ PortMoresby: "Port Moresby",
206
+ Magadan: "Magadan",
207
+ Srednekolymsk: "Srednekolymsk",
208
+ SolomonIs: "Solomon Is.",
209
+ NewCaledonia: "New Caledonia",
210
+ Fiji: "Fiji",
211
+ Kamchatka: "Kamchatka",
212
+ MarshallIs: "Marshall Is.",
213
+ Auckland: "Auckland",
214
+ Wellington: "Wellington",
215
+ NukuAlofa: "Nuku'alofa",
216
+ TokelauIs: "Tokelau Is.",
217
+ ChathamIs: "Chatham Is.",
218
+ Samoa: "Samoa",
219
+ } as const;
220
+ export type Timezone = ClosedEnum<typeof Timezone>;
221
+
10
222
  /**
11
223
  * Reduced list of attributes of the User Location
12
224
  */
@@ -15,11 +227,54 @@ export type UserLocation = {
15
227
  address1?: string | null | undefined;
16
228
  address2?: string | null | undefined;
17
229
  city?: string | null | undefined;
18
- state?: string | null | undefined;
230
+ state?: State | null | undefined;
19
231
  zip?: string | null | undefined;
232
+ phone?: string | null | undefined;
233
+ mobilePhone?: string | null | undefined;
234
+ fax?: string | null | undefined;
20
235
  country?: string | null | undefined;
236
+ timezone?: Timezone | null | undefined;
21
237
  };
22
238
 
239
+ /** @internal */
240
+ export const State$inboundSchema: z.ZodNativeEnum<typeof State> = z.nativeEnum(
241
+ State,
242
+ );
243
+
244
+ /** @internal */
245
+ export const State$outboundSchema: z.ZodNativeEnum<typeof State> =
246
+ State$inboundSchema;
247
+
248
+ /**
249
+ * @internal
250
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
251
+ */
252
+ export namespace State$ {
253
+ /** @deprecated use `State$inboundSchema` instead. */
254
+ export const inboundSchema = State$inboundSchema;
255
+ /** @deprecated use `State$outboundSchema` instead. */
256
+ export const outboundSchema = State$outboundSchema;
257
+ }
258
+
259
+ /** @internal */
260
+ export const Timezone$inboundSchema: z.ZodNativeEnum<typeof Timezone> = z
261
+ .nativeEnum(Timezone);
262
+
263
+ /** @internal */
264
+ export const Timezone$outboundSchema: z.ZodNativeEnum<typeof Timezone> =
265
+ Timezone$inboundSchema;
266
+
267
+ /**
268
+ * @internal
269
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
270
+ */
271
+ export namespace Timezone$ {
272
+ /** @deprecated use `Timezone$inboundSchema` instead. */
273
+ export const inboundSchema = Timezone$inboundSchema;
274
+ /** @deprecated use `Timezone$outboundSchema` instead. */
275
+ export const outboundSchema = Timezone$outboundSchema;
276
+ }
277
+
23
278
  /** @internal */
24
279
  export const UserLocation$inboundSchema: z.ZodType<
25
280
  UserLocation,
@@ -30,9 +285,17 @@ export const UserLocation$inboundSchema: z.ZodType<
30
285
  address1: z.nullable(z.string()).optional(),
31
286
  address2: z.nullable(z.string()).optional(),
32
287
  city: z.nullable(z.string()).optional(),
33
- state: z.nullable(z.string()).optional(),
288
+ state: z.nullable(State$inboundSchema).optional(),
34
289
  zip: z.nullable(z.string()).optional(),
290
+ phone: z.nullable(z.string()).optional(),
291
+ mobile_phone: z.nullable(z.string()).optional(),
292
+ fax: z.nullable(z.string()).optional(),
35
293
  country: z.nullable(z.string()).optional(),
294
+ timezone: z.nullable(Timezone$inboundSchema).optional(),
295
+ }).transform((v) => {
296
+ return remap$(v, {
297
+ "mobile_phone": "mobilePhone",
298
+ });
36
299
  });
37
300
 
38
301
  /** @internal */
@@ -43,7 +306,11 @@ export type UserLocation$Outbound = {
43
306
  city?: string | null | undefined;
44
307
  state?: string | null | undefined;
45
308
  zip?: string | null | undefined;
309
+ phone?: string | null | undefined;
310
+ mobile_phone?: string | null | undefined;
311
+ fax?: string | null | undefined;
46
312
  country?: string | null | undefined;
313
+ timezone?: string | null | undefined;
47
314
  };
48
315
 
49
316
  /** @internal */
@@ -56,9 +323,17 @@ export const UserLocation$outboundSchema: z.ZodType<
56
323
  address1: z.nullable(z.string()).optional(),
57
324
  address2: z.nullable(z.string()).optional(),
58
325
  city: z.nullable(z.string()).optional(),
59
- state: z.nullable(z.string()).optional(),
326
+ state: z.nullable(State$outboundSchema).optional(),
60
327
  zip: z.nullable(z.string()).optional(),
328
+ phone: z.nullable(z.string()).optional(),
329
+ mobilePhone: z.nullable(z.string()).optional(),
330
+ fax: z.nullable(z.string()).optional(),
61
331
  country: z.nullable(z.string()).optional(),
332
+ timezone: z.nullable(Timezone$outboundSchema).optional(),
333
+ }).transform((v) => {
334
+ return remap$(v, {
335
+ mobilePhone: "mobile_phone",
336
+ });
62
337
  });
63
338
 
64
339
  /**
@@ -30,6 +30,7 @@ export * from "./logsuserintothesystem.js";
30
30
  export * from "./magiclink.js";
31
31
  export * from "./password.js";
32
32
  export * from "./passwordresetrequest.js";
33
+ export * from "./updatevendordetails.js";
33
34
  export * from "./updatevendormanagedbycompany.js";
34
35
  export * from "./updatevendorscrubdetails.js";
35
36
  export * from "./vendorscanout.js";
@@ -101,9 +101,7 @@ export const ListVendorCredentialsRequest$inboundSchema: z.ZodType<
101
101
  desc: components.Desc$inboundSchema.optional(),
102
102
  page: z.number().int().optional(),
103
103
  items_per_page: z.number().int().optional(),
104
- credential_status: components.CredentialStatus$inboundSchema.default(
105
- "Pending Vendor",
106
- ),
104
+ credential_status: components.CredentialStatus$inboundSchema.optional(),
107
105
  facility_id: z.number().optional(),
108
106
  include_vc: z.number().optional(),
109
107
  include_cc: z.number().optional(),
@@ -127,7 +125,7 @@ export type ListVendorCredentialsRequest$Outbound = {
127
125
  desc?: components.Desc$Outbound | undefined;
128
126
  page?: number | undefined;
129
127
  items_per_page?: number | undefined;
130
- credential_status: string;
128
+ credential_status?: string | undefined;
131
129
  facility_id?: number | undefined;
132
130
  include_vc?: number | undefined;
133
131
  include_cc?: number | undefined;
@@ -146,9 +144,7 @@ export const ListVendorCredentialsRequest$outboundSchema: z.ZodType<
146
144
  desc: components.Desc$outboundSchema.optional(),
147
145
  page: z.number().int().optional(),
148
146
  itemsPerPage: z.number().int().optional(),
149
- credentialStatus: components.CredentialStatus$outboundSchema.default(
150
- "Pending Vendor",
151
- ),
147
+ credentialStatus: components.CredentialStatus$outboundSchema.optional(),
152
148
  facilityId: z.number().optional(),
153
149
  includeVc: z.number().optional(),
154
150
  includeCc: z.number().optional(),
@@ -0,0 +1,224 @@
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 * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ /**
14
+ * The vendor's email_recepient value to update
15
+ */
16
+ export const EmailRecepient = {
17
+ NoEmail: "No email",
18
+ Vendor: "Vendor",
19
+ CompanyManager: "Company manager",
20
+ VendorAndCompanyManager: "Vendor and company manager",
21
+ } as const;
22
+ /**
23
+ * The vendor's email_recepient value to update
24
+ */
25
+ export type EmailRecepient = ClosedEnum<typeof EmailRecepient>;
26
+
27
+ export type UpdateVendorDetailsRequestBody = {
28
+ /**
29
+ * The QR code value
30
+ */
31
+ qrCode?: string | undefined;
32
+ /**
33
+ * The vendor's email_recepient value to update
34
+ */
35
+ emailRecepient?: EmailRecepient | undefined;
36
+ /**
37
+ * The vendor's send_weekly_summary_email value to update
38
+ */
39
+ sendWeeklySummaryEmail?: boolean | undefined;
40
+ /**
41
+ * The vendor's title value to update
42
+ */
43
+ title?: string | undefined;
44
+ /**
45
+ * Reduced list of attributes of the User Location
46
+ */
47
+ location?: components.UserLocation | null | undefined;
48
+ };
49
+
50
+ export type UpdateVendorDetailsRequest = {
51
+ /**
52
+ * Either the ID of the vendor rep or the keyword "me" to represent the current vendor.
53
+ */
54
+ vendorIdOrMe: string;
55
+ requestBody: UpdateVendorDetailsRequestBody;
56
+ };
57
+
58
+ /** @internal */
59
+ export const EmailRecepient$inboundSchema: z.ZodNativeEnum<
60
+ typeof EmailRecepient
61
+ > = z.nativeEnum(EmailRecepient);
62
+
63
+ /** @internal */
64
+ export const EmailRecepient$outboundSchema: z.ZodNativeEnum<
65
+ typeof EmailRecepient
66
+ > = EmailRecepient$inboundSchema;
67
+
68
+ /**
69
+ * @internal
70
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
71
+ */
72
+ export namespace EmailRecepient$ {
73
+ /** @deprecated use `EmailRecepient$inboundSchema` instead. */
74
+ export const inboundSchema = EmailRecepient$inboundSchema;
75
+ /** @deprecated use `EmailRecepient$outboundSchema` instead. */
76
+ export const outboundSchema = EmailRecepient$outboundSchema;
77
+ }
78
+
79
+ /** @internal */
80
+ export const UpdateVendorDetailsRequestBody$inboundSchema: z.ZodType<
81
+ UpdateVendorDetailsRequestBody,
82
+ z.ZodTypeDef,
83
+ unknown
84
+ > = z.object({
85
+ qr_code: z.string().optional(),
86
+ email_recepient: EmailRecepient$inboundSchema.optional(),
87
+ send_weekly_summary_email: z.boolean().optional(),
88
+ title: z.string().optional(),
89
+ location: z.nullable(components.UserLocation$inboundSchema).optional(),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "qr_code": "qrCode",
93
+ "email_recepient": "emailRecepient",
94
+ "send_weekly_summary_email": "sendWeeklySummaryEmail",
95
+ });
96
+ });
97
+
98
+ /** @internal */
99
+ export type UpdateVendorDetailsRequestBody$Outbound = {
100
+ qr_code?: string | undefined;
101
+ email_recepient?: string | undefined;
102
+ send_weekly_summary_email?: boolean | undefined;
103
+ title?: string | undefined;
104
+ location?: components.UserLocation$Outbound | null | undefined;
105
+ };
106
+
107
+ /** @internal */
108
+ export const UpdateVendorDetailsRequestBody$outboundSchema: z.ZodType<
109
+ UpdateVendorDetailsRequestBody$Outbound,
110
+ z.ZodTypeDef,
111
+ UpdateVendorDetailsRequestBody
112
+ > = z.object({
113
+ qrCode: z.string().optional(),
114
+ emailRecepient: EmailRecepient$outboundSchema.optional(),
115
+ sendWeeklySummaryEmail: z.boolean().optional(),
116
+ title: z.string().optional(),
117
+ location: z.nullable(components.UserLocation$outboundSchema).optional(),
118
+ }).transform((v) => {
119
+ return remap$(v, {
120
+ qrCode: "qr_code",
121
+ emailRecepient: "email_recepient",
122
+ sendWeeklySummaryEmail: "send_weekly_summary_email",
123
+ });
124
+ });
125
+
126
+ /**
127
+ * @internal
128
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
129
+ */
130
+ export namespace UpdateVendorDetailsRequestBody$ {
131
+ /** @deprecated use `UpdateVendorDetailsRequestBody$inboundSchema` instead. */
132
+ export const inboundSchema = UpdateVendorDetailsRequestBody$inboundSchema;
133
+ /** @deprecated use `UpdateVendorDetailsRequestBody$outboundSchema` instead. */
134
+ export const outboundSchema = UpdateVendorDetailsRequestBody$outboundSchema;
135
+ /** @deprecated use `UpdateVendorDetailsRequestBody$Outbound` instead. */
136
+ export type Outbound = UpdateVendorDetailsRequestBody$Outbound;
137
+ }
138
+
139
+ export function updateVendorDetailsRequestBodyToJSON(
140
+ updateVendorDetailsRequestBody: UpdateVendorDetailsRequestBody,
141
+ ): string {
142
+ return JSON.stringify(
143
+ UpdateVendorDetailsRequestBody$outboundSchema.parse(
144
+ updateVendorDetailsRequestBody,
145
+ ),
146
+ );
147
+ }
148
+
149
+ export function updateVendorDetailsRequestBodyFromJSON(
150
+ jsonString: string,
151
+ ): SafeParseResult<UpdateVendorDetailsRequestBody, SDKValidationError> {
152
+ return safeParse(
153
+ jsonString,
154
+ (x) => UpdateVendorDetailsRequestBody$inboundSchema.parse(JSON.parse(x)),
155
+ `Failed to parse 'UpdateVendorDetailsRequestBody' from JSON`,
156
+ );
157
+ }
158
+
159
+ /** @internal */
160
+ export const UpdateVendorDetailsRequest$inboundSchema: z.ZodType<
161
+ UpdateVendorDetailsRequest,
162
+ z.ZodTypeDef,
163
+ unknown
164
+ > = z.object({
165
+ vendor_id_or_me: z.string(),
166
+ RequestBody: z.lazy(() => UpdateVendorDetailsRequestBody$inboundSchema),
167
+ }).transform((v) => {
168
+ return remap$(v, {
169
+ "vendor_id_or_me": "vendorIdOrMe",
170
+ "RequestBody": "requestBody",
171
+ });
172
+ });
173
+
174
+ /** @internal */
175
+ export type UpdateVendorDetailsRequest$Outbound = {
176
+ vendor_id_or_me: string;
177
+ RequestBody: UpdateVendorDetailsRequestBody$Outbound;
178
+ };
179
+
180
+ /** @internal */
181
+ export const UpdateVendorDetailsRequest$outboundSchema: z.ZodType<
182
+ UpdateVendorDetailsRequest$Outbound,
183
+ z.ZodTypeDef,
184
+ UpdateVendorDetailsRequest
185
+ > = z.object({
186
+ vendorIdOrMe: z.string(),
187
+ requestBody: z.lazy(() => UpdateVendorDetailsRequestBody$outboundSchema),
188
+ }).transform((v) => {
189
+ return remap$(v, {
190
+ vendorIdOrMe: "vendor_id_or_me",
191
+ requestBody: "RequestBody",
192
+ });
193
+ });
194
+
195
+ /**
196
+ * @internal
197
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
198
+ */
199
+ export namespace UpdateVendorDetailsRequest$ {
200
+ /** @deprecated use `UpdateVendorDetailsRequest$inboundSchema` instead. */
201
+ export const inboundSchema = UpdateVendorDetailsRequest$inboundSchema;
202
+ /** @deprecated use `UpdateVendorDetailsRequest$outboundSchema` instead. */
203
+ export const outboundSchema = UpdateVendorDetailsRequest$outboundSchema;
204
+ /** @deprecated use `UpdateVendorDetailsRequest$Outbound` instead. */
205
+ export type Outbound = UpdateVendorDetailsRequest$Outbound;
206
+ }
207
+
208
+ export function updateVendorDetailsRequestToJSON(
209
+ updateVendorDetailsRequest: UpdateVendorDetailsRequest,
210
+ ): string {
211
+ return JSON.stringify(
212
+ UpdateVendorDetailsRequest$outboundSchema.parse(updateVendorDetailsRequest),
213
+ );
214
+ }
215
+
216
+ export function updateVendorDetailsRequestFromJSON(
217
+ jsonString: string,
218
+ ): SafeParseResult<UpdateVendorDetailsRequest, SDKValidationError> {
219
+ return safeParse(
220
+ jsonString,
221
+ (x) => UpdateVendorDetailsRequest$inboundSchema.parse(JSON.parse(x)),
222
+ `Failed to parse 'UpdateVendorDetailsRequest' from JSON`,
223
+ );
224
+ }
@@ -33,6 +33,7 @@ export * from "./vendorsListVendorManagedByCompanies.js";
33
33
  export * from "./vendorsListVendorScrubDetails.js";
34
34
  export * from "./vendorsListVendorScrubPackages.js";
35
35
  export * from "./vendorsListVendorScrubPurchases.js";
36
+ export * from "./vendorsUpdateVendorDetails.js";
36
37
  export * from "./vendorsUpdateVendorManagedByCompany.js";
37
38
  export * from "./vendorsUpdateVendorScrubDetails.js";
38
39
  export * from "./webhooksGetWebhookEndpoint.js";