@greensecurity/javascript-sdk 0.21.1 → 0.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +314 -50
  3. package/bin/mcp-server.js.map +13 -9
  4. package/funcs/vendorsListVendorCredits.d.ts +20 -0
  5. package/funcs/vendorsListVendorCredits.d.ts.map +1 -0
  6. package/funcs/vendorsListVendorCredits.js +160 -0
  7. package/funcs/vendorsListVendorCredits.js.map +1 -0
  8. package/jsr.json +1 -1
  9. package/lib/config.d.ts +3 -3
  10. package/lib/config.js +3 -3
  11. package/mcp-server/mcp-server.js +1 -1
  12. package/mcp-server/server.d.ts.map +1 -1
  13. package/mcp-server/server.js +3 -1
  14. package/mcp-server/server.js.map +1 -1
  15. package/mcp-server/tools/vendorsListVendorCredits.d.ts +8 -0
  16. package/mcp-server/tools/vendorsListVendorCredits.d.ts.map +1 -0
  17. package/mcp-server/tools/vendorsListVendorCredits.js +64 -0
  18. package/mcp-server/tools/vendorsListVendorCredits.js.map +1 -0
  19. package/models/components/credit.d.ts +72 -0
  20. package/models/components/credit.d.ts.map +1 -0
  21. package/models/components/credit.js +114 -0
  22. package/models/components/credit.js.map +1 -0
  23. package/models/components/index.d.ts +1 -0
  24. package/models/components/index.d.ts.map +1 -1
  25. package/models/components/index.js +1 -0
  26. package/models/components/index.js.map +1 -1
  27. package/models/components/subscription.d.ts +2 -2
  28. package/models/components/subscription.d.ts.map +1 -1
  29. package/models/components/subscription.js +2 -2
  30. package/models/components/subscription.js.map +1 -1
  31. package/models/operations/index.d.ts +1 -0
  32. package/models/operations/index.d.ts.map +1 -1
  33. package/models/operations/index.js +1 -0
  34. package/models/operations/index.js.map +1 -1
  35. package/models/operations/listvendorcredits.d.ts +111 -0
  36. package/models/operations/listvendorcredits.d.ts.map +1 -0
  37. package/models/operations/listvendorcredits.js +153 -0
  38. package/models/operations/listvendorcredits.js.map +1 -0
  39. package/package.json +1 -1
  40. package/react-query/index.d.ts +1 -0
  41. package/react-query/index.d.ts.map +1 -1
  42. package/react-query/index.js +1 -0
  43. package/react-query/index.js.map +1 -1
  44. package/react-query/vendorsListVendorCredits.d.ts +77 -0
  45. package/react-query/vendorsListVendorCredits.d.ts.map +1 -0
  46. package/react-query/vendorsListVendorCredits.js +156 -0
  47. package/react-query/vendorsListVendorCredits.js.map +1 -0
  48. package/sdk/vendors.d.ts +9 -0
  49. package/sdk/vendors.d.ts.map +1 -1
  50. package/sdk/vendors.js +10 -0
  51. package/sdk/vendors.js.map +1 -1
  52. package/src/__tests__/vendors.test.ts +36 -0
  53. package/src/funcs/vendorsListVendorCredits.ts +251 -0
  54. package/src/lib/config.ts +3 -3
  55. package/src/mcp-server/mcp-server.ts +1 -1
  56. package/src/mcp-server/server.ts +3 -1
  57. package/src/mcp-server/tools/vendorsListVendorCredits.ts +37 -0
  58. package/src/models/components/credit.ts +123 -0
  59. package/src/models/components/index.ts +1 -0
  60. package/src/models/components/subscription.ts +4 -4
  61. package/src/models/operations/index.ts +1 -0
  62. package/src/models/operations/listvendorcredits.ts +245 -0
  63. package/src/react-query/index.ts +1 -0
  64. package/src/react-query/vendorsListVendorCredits.ts +334 -0
  65. package/src/sdk/vendors.ts +20 -0
package/README.md CHANGED
@@ -320,6 +320,7 @@ run();
320
320
  * [listVendorScrubPurchases](docs/sdks/vendors/README.md#listvendorscrubpurchases) - List vendor scrub purchases
321
321
  * [listVendorScrubDetails](docs/sdks/vendors/README.md#listvendorscrubdetails) - List vendor scrub details
322
322
  * [getVendorsDetails](docs/sdks/vendors/README.md#getvendorsdetails) - Get vendors details
323
+ * [listVendorCredits](docs/sdks/vendors/README.md#listvendorcredits) - List vendor credits
323
324
 
324
325
  ### [vendorScans](docs/sdks/vendorscans/README.md)
325
326
 
@@ -364,6 +365,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
364
365
  - [`vendorsGetVendorInvoiceDetails`](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
365
366
  - [`vendorsGetVendorsDetails`](docs/sdks/vendors/README.md#getvendorsdetails) - Get vendors details
366
367
  - [`vendorsListVendorCredentials`](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
368
+ - [`vendorsListVendorCredits`](docs/sdks/vendors/README.md#listvendorcredits) - List vendor credits
367
369
  - [`vendorsListVendorFacilityStatuses`](docs/sdks/vendors/README.md#listvendorfacilitystatuses) - List vendor facility statuses
368
370
  - [`vendorsListVendorInvoices`](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
369
371
  - [`vendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
@@ -413,6 +415,7 @@ To learn about this feature and how to get started, check
413
415
  - [`useVendorsGetVendorInvoiceDetails`](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
414
416
  - [`useVendorsGetVendorsDetails`](docs/sdks/vendors/README.md#getvendorsdetails) - Get vendors details
415
417
  - [`useVendorsListVendorCredentials`](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
418
+ - [`useVendorsListVendorCredits`](docs/sdks/vendors/README.md#listvendorcredits) - List vendor credits
416
419
  - [`useVendorsListVendorFacilityStatuses`](docs/sdks/vendors/README.md#listvendorfacilitystatuses) - List vendor facility statuses
417
420
  - [`useVendorsListVendorInvoices`](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
418
421
  - [`useVendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
package/bin/mcp-server.js CHANGED
@@ -34172,9 +34172,9 @@ var init_config = __esm(() => {
34172
34172
  SDK_METADATA = {
34173
34173
  language: "typescript",
34174
34174
  openapiDocVersion: "0.0.3",
34175
- sdkVersion: "0.21.1",
34176
- genVersion: "2.558.2",
34177
- userAgent: "speakeasy-sdk/typescript 0.21.1 2.558.2 0.0.3 @greensecurity/javascript-sdk"
34175
+ sdkVersion: "0.21.4",
34176
+ genVersion: "2.559.0",
34177
+ userAgent: "speakeasy-sdk/typescript 0.21.4 2.559.0 0.0.3 @greensecurity/javascript-sdk"
34178
34178
  };
34179
34179
  });
34180
34180
 
@@ -35877,6 +35877,56 @@ var init_credentialstatus = __esm(() => {
35877
35877
  })(CredentialStatus$ ||= {});
35878
35878
  });
35879
35879
 
35880
+ // src/models/components/credit.ts
35881
+ var Action, Action$inboundSchema, Action$outboundSchema, Action$, Credit$inboundSchema, Credit$outboundSchema, Credit$;
35882
+ var init_credit = __esm(() => {
35883
+ init_lib();
35884
+ init_primitives();
35885
+ Action = {
35886
+ Credit: "credit",
35887
+ Debit: "debit",
35888
+ Transfer: "transfer"
35889
+ };
35890
+ Action$inboundSchema = nativeEnumType(Action);
35891
+ Action$outboundSchema = Action$inboundSchema;
35892
+ ((Action$) => {
35893
+ Action$.inboundSchema = Action$inboundSchema;
35894
+ Action$.outboundSchema = Action$outboundSchema;
35895
+ })(Action$ ||= {});
35896
+ Credit$inboundSchema = objectType({
35897
+ id: numberType().int().optional(),
35898
+ date: nullableType(stringType()).optional(),
35899
+ action: Action$inboundSchema.optional(),
35900
+ amount: numberType().int().optional(),
35901
+ balance: numberType().int().optional(),
35902
+ from: nullableType(stringType()).optional(),
35903
+ to: nullableType(stringType()).optional(),
35904
+ invoice_id: nullableType(numberType().int()).optional()
35905
+ }).transform((v2) => {
35906
+ return remap(v2, {
35907
+ invoice_id: "invoiceId"
35908
+ });
35909
+ });
35910
+ Credit$outboundSchema = objectType({
35911
+ id: numberType().int().optional(),
35912
+ date: nullableType(stringType()).optional(),
35913
+ action: Action$outboundSchema.optional(),
35914
+ amount: numberType().int().optional(),
35915
+ balance: numberType().int().optional(),
35916
+ from: nullableType(stringType()).optional(),
35917
+ to: nullableType(stringType()).optional(),
35918
+ invoiceId: nullableType(numberType().int()).optional()
35919
+ }).transform((v2) => {
35920
+ return remap(v2, {
35921
+ invoiceId: "invoice_id"
35922
+ });
35923
+ });
35924
+ ((Credit$) => {
35925
+ Credit$.inboundSchema = Credit$inboundSchema;
35926
+ Credit$.outboundSchema = Credit$outboundSchema;
35927
+ })(Credit$ ||= {});
35928
+ });
35929
+
35880
35930
  // src/models/components/department.ts
35881
35931
  var Department$inboundSchema, Department$outboundSchema, Department$;
35882
35932
  var init_department = __esm(() => {
@@ -36959,7 +37009,7 @@ var init_subscription = __esm(() => {
36959
37009
  date_ends: nullableType(stringType()).optional(),
36960
37010
  status: nullableType(stringType()).optional(),
36961
37011
  locked: nullableType(booleanType()).optional(),
36962
- variant_title: nullableType(anyType()).optional()
37012
+ variant_title: nullableType(stringType()).optional()
36963
37013
  }).transform((v2) => {
36964
37014
  return remap(v2, {
36965
37015
  date_started: "dateStarted",
@@ -36973,7 +37023,7 @@ var init_subscription = __esm(() => {
36973
37023
  dateEnds: nullableType(stringType()).optional(),
36974
37024
  status: nullableType(stringType()).optional(),
36975
37025
  locked: nullableType(booleanType()).optional(),
36976
- variantTitle: nullableType(anyType()).optional()
37026
+ variantTitle: nullableType(stringType()).optional()
36977
37027
  }).transform((v2) => {
36978
37028
  return remap(v2, {
36979
37029
  dateStarted: "date_started",
@@ -37780,6 +37830,7 @@ var init_components = __esm(() => {
37780
37830
  init_company();
37781
37831
  init_contact();
37782
37832
  init_credentialstatus();
37833
+ init_credit();
37783
37834
  init_department();
37784
37835
  init_departmentsummary();
37785
37836
  init_desc();
@@ -38383,6 +38434,72 @@ var init_listvendorcredentials = __esm(() => {
38383
38434
  })(ListVendorCredentialsResponse$ ||= {});
38384
38435
  });
38385
38436
 
38437
+ // src/models/operations/listvendorcredits.ts
38438
+ var ListVendorCreditsRequest$inboundSchema, ListVendorCreditsRequest$outboundSchema, ListVendorCreditsRequest$, ListVendorCreditsResponseBody$inboundSchema, ListVendorCreditsResponseBody$outboundSchema, ListVendorCreditsResponseBody$, ListVendorCreditsResponse$inboundSchema, ListVendorCreditsResponse$outboundSchema, ListVendorCreditsResponse$;
38439
+ var init_listvendorcredits = __esm(() => {
38440
+ init_lib();
38441
+ init_primitives();
38442
+ init_components();
38443
+ ListVendorCreditsRequest$inboundSchema = objectType({
38444
+ sort: nullableType(stringType()).optional(),
38445
+ desc: Desc$inboundSchema.optional(),
38446
+ page: numberType().int().optional(),
38447
+ items_per_page: numberType().int().optional(),
38448
+ vendor_id_or_me: stringType()
38449
+ }).transform((v2) => {
38450
+ return remap(v2, {
38451
+ items_per_page: "itemsPerPage",
38452
+ vendor_id_or_me: "vendorIdOrMe"
38453
+ });
38454
+ });
38455
+ ListVendorCreditsRequest$outboundSchema = objectType({
38456
+ sort: nullableType(stringType()).optional(),
38457
+ desc: Desc$outboundSchema.optional(),
38458
+ page: numberType().int().optional(),
38459
+ itemsPerPage: numberType().int().optional(),
38460
+ vendorIdOrMe: stringType()
38461
+ }).transform((v2) => {
38462
+ return remap(v2, {
38463
+ itemsPerPage: "items_per_page",
38464
+ vendorIdOrMe: "vendor_id_or_me"
38465
+ });
38466
+ });
38467
+ ((ListVendorCreditsRequest$) => {
38468
+ ListVendorCreditsRequest$.inboundSchema = ListVendorCreditsRequest$inboundSchema;
38469
+ ListVendorCreditsRequest$.outboundSchema = ListVendorCreditsRequest$outboundSchema;
38470
+ })(ListVendorCreditsRequest$ ||= {});
38471
+ ListVendorCreditsResponseBody$inboundSchema = objectType({
38472
+ items: arrayType(Credit$inboundSchema),
38473
+ pager: Pager$inboundSchema
38474
+ });
38475
+ ListVendorCreditsResponseBody$outboundSchema = objectType({
38476
+ items: arrayType(Credit$outboundSchema),
38477
+ pager: Pager$outboundSchema
38478
+ });
38479
+ ((ListVendorCreditsResponseBody$) => {
38480
+ ListVendorCreditsResponseBody$.inboundSchema = ListVendorCreditsResponseBody$inboundSchema;
38481
+ ListVendorCreditsResponseBody$.outboundSchema = ListVendorCreditsResponseBody$outboundSchema;
38482
+ })(ListVendorCreditsResponseBody$ ||= {});
38483
+ ListVendorCreditsResponse$inboundSchema = objectType({
38484
+ Result: lazyType(() => ListVendorCreditsResponseBody$inboundSchema)
38485
+ }).transform((v2) => {
38486
+ return remap(v2, {
38487
+ Result: "result"
38488
+ });
38489
+ });
38490
+ ListVendorCreditsResponse$outboundSchema = objectType({
38491
+ result: lazyType(() => ListVendorCreditsResponseBody$outboundSchema)
38492
+ }).transform((v2) => {
38493
+ return remap(v2, {
38494
+ result: "Result"
38495
+ });
38496
+ });
38497
+ ((ListVendorCreditsResponse$) => {
38498
+ ListVendorCreditsResponse$.inboundSchema = ListVendorCreditsResponse$inboundSchema;
38499
+ ListVendorCreditsResponse$.outboundSchema = ListVendorCreditsResponse$outboundSchema;
38500
+ })(ListVendorCreditsResponse$ ||= {});
38501
+ });
38502
+
38386
38503
  // src/models/operations/listvendorfacilitystatuses.ts
38387
38504
  var ListVendorFacilityStatusesRequest$inboundSchema, ListVendorFacilityStatusesRequest$outboundSchema, ListVendorFacilityStatusesRequest$, ListVendorFacilityStatusesResponseBody$inboundSchema, ListVendorFacilityStatusesResponseBody$outboundSchema, ListVendorFacilityStatusesResponseBody$, ListVendorFacilityStatusesResponse$inboundSchema, ListVendorFacilityStatusesResponse$outboundSchema, ListVendorFacilityStatusesResponse$;
38388
38505
  var init_listvendorfacilitystatuses = __esm(() => {
@@ -38904,6 +39021,7 @@ var init_operations = __esm(() => {
38904
39021
  init_listorsearchfacilities();
38905
39022
  init_listorsearchsupportarticles();
38906
39023
  init_listvendorcredentials();
39024
+ init_listvendorcredits();
38907
39025
  init_listvendorfacilitystatuses();
38908
39026
  init_listvendorinvoices();
38909
39027
  init_listvendorjobtitles();
@@ -40804,11 +40922,155 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
40804
40922
  };
40805
40923
  });
40806
40924
 
40807
- // src/funcs/vendorsListVendorFacilityStatuses.ts
40808
- function vendorsListVendorFacilityStatuses(client, request, options) {
40925
+ // src/funcs/vendorsListVendorCredits.ts
40926
+ function vendorsListVendorCredits(client, request, options) {
40809
40927
  return new APIPromise($do17(client, request, options));
40810
40928
  }
40811
40929
  async function $do17(client, request, options) {
40930
+ const parsed = safeParse(request, (value) => ListVendorCreditsRequest$outboundSchema.parse(value), "Input validation failed");
40931
+ if (!parsed.ok) {
40932
+ return [haltIterator(parsed), { status: "invalid" }];
40933
+ }
40934
+ const payload = parsed.value;
40935
+ const body = null;
40936
+ const pathParams = {
40937
+ vendor_id_or_me: encodeSimple("vendor_id_or_me", payload.vendor_id_or_me, {
40938
+ explode: false,
40939
+ charEncoding: "percent"
40940
+ })
40941
+ };
40942
+ const path = pathToFunc("/vendors/{vendor_id_or_me}/credits")(pathParams);
40943
+ const query = encodeFormQuery({
40944
+ desc: payload.desc,
40945
+ items_per_page: payload.items_per_page,
40946
+ page: payload.page,
40947
+ sort: payload.sort
40948
+ });
40949
+ const headers = new Headers(compactMap({
40950
+ Accept: "application/json"
40951
+ }));
40952
+ const securityInput = await extractSecurity(client._options.security);
40953
+ const requestSecurity = resolveGlobalSecurity(securityInput);
40954
+ const context = {
40955
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
40956
+ operationID: "listVendorCredits",
40957
+ oAuth2Scopes: [],
40958
+ resolvedSecurity: requestSecurity,
40959
+ securitySource: client._options.security,
40960
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
40961
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
40962
+ };
40963
+ const requestRes = client._createRequest(context, {
40964
+ security: requestSecurity,
40965
+ method: "GET",
40966
+ baseURL: options?.serverURL,
40967
+ path,
40968
+ headers,
40969
+ query,
40970
+ body,
40971
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
40972
+ }, options);
40973
+ if (!requestRes.ok) {
40974
+ return [haltIterator(requestRes), { status: "invalid" }];
40975
+ }
40976
+ const req = requestRes.value;
40977
+ const doResult = await client._do(req, {
40978
+ context,
40979
+ errorCodes: ["400", "401", "4XX", "500", "5XX"],
40980
+ retryConfig: context.retryConfig,
40981
+ retryCodes: context.retryCodes
40982
+ });
40983
+ if (!doResult.ok) {
40984
+ return [haltIterator(doResult), { status: "request-error", request: req }];
40985
+ }
40986
+ const response = doResult.value;
40987
+ const responseFields = {
40988
+ HttpMeta: { Response: response, Request: req }
40989
+ };
40990
+ const [result, raw] = await match(json(200, ListVendorCreditsResponse$inboundSchema, {
40991
+ key: "Result"
40992
+ }), jsonErr([400, 401], ApiErrorResponse$inboundSchema), jsonErr(500, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
40993
+ if (!result.ok) {
40994
+ return [haltIterator(result), {
40995
+ status: "complete",
40996
+ request: req,
40997
+ response
40998
+ }];
40999
+ }
41000
+ const nextFunc = (responseData) => {
41001
+ const page2 = request?.page ?? 1;
41002
+ const nextPage = page2 + 1;
41003
+ if (!responseData) {
41004
+ return { next: () => null };
41005
+ }
41006
+ const results = dlv(responseData, "items");
41007
+ if (!Array.isArray(results) || !results.length) {
41008
+ return { next: () => null };
41009
+ }
41010
+ const limit = request?.itemsPerPage ?? 0;
41011
+ if (results.length < limit) {
41012
+ return { next: () => null };
41013
+ }
41014
+ const nextVal = () => vendorsListVendorCredits(client, {
41015
+ ...request,
41016
+ page: nextPage
41017
+ }, options);
41018
+ return { next: nextVal, "~next": { page: nextPage } };
41019
+ };
41020
+ const page = { ...result, ...nextFunc(raw) };
41021
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
41022
+ status: "complete",
41023
+ request: req,
41024
+ response
41025
+ }];
41026
+ }
41027
+ var init_vendorsListVendorCredits = __esm(() => {
41028
+ init_encodings();
41029
+ init_matchers();
41030
+ init_primitives();
41031
+ init_schemas();
41032
+ init_security();
41033
+ init_url();
41034
+ init_errors();
41035
+ init_operations();
41036
+ init_async();
41037
+ init_operations2();
41038
+ });
41039
+
41040
+ // src/mcp-server/tools/vendorsListVendorCredits.ts
41041
+ var args16, tool$vendorsListVendorCredits;
41042
+ var init_vendorsListVendorCredits2 = __esm(() => {
41043
+ init_vendorsListVendorCredits();
41044
+ init_operations();
41045
+ init_tools();
41046
+ args16 = {
41047
+ request: ListVendorCreditsRequest$inboundSchema
41048
+ };
41049
+ tool$vendorsListVendorCredits = {
41050
+ name: "vendors-list-vendor-credits",
41051
+ description: `List vendor credits
41052
+
41053
+ List the credits for the vendor`,
41054
+ args: args16,
41055
+ tool: async (client, args17, ctx) => {
41056
+ const [result, apiCall] = await vendorsListVendorCredits(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41057
+ if (!result.ok) {
41058
+ return {
41059
+ content: [{ type: "text", text: result.error.message }],
41060
+ isError: true
41061
+ };
41062
+ }
41063
+ const value = result.value.result;
41064
+ return formatResult(value, apiCall);
41065
+ }
41066
+ };
41067
+ });
41068
+
41069
+ // src/funcs/vendorsListVendorFacilityStatuses.ts
41070
+ function vendorsListVendorFacilityStatuses(client, request, options) {
41071
+ return new APIPromise($do18(client, request, options));
41072
+ }
41073
+ async function $do18(client, request, options) {
40812
41074
  const parsed = safeParse(request, (value) => ListVendorFacilityStatusesRequest$outboundSchema.parse(value), "Input validation failed");
40813
41075
  if (!parsed.ok) {
40814
41076
  return [haltIterator(parsed), { status: "invalid" }];
@@ -40915,12 +41177,12 @@ var init_vendorsListVendorFacilityStatuses = __esm(() => {
40915
41177
  });
40916
41178
 
40917
41179
  // src/mcp-server/tools/vendorsListVendorFacilityStatuses.ts
40918
- var args16, tool$vendorsListVendorFacilityStatuses;
41180
+ var args17, tool$vendorsListVendorFacilityStatuses;
40919
41181
  var init_vendorsListVendorFacilityStatuses2 = __esm(() => {
40920
41182
  init_vendorsListVendorFacilityStatuses();
40921
41183
  init_operations();
40922
41184
  init_tools();
40923
- args16 = {
41185
+ args17 = {
40924
41186
  request: ListVendorFacilityStatusesRequest$inboundSchema
40925
41187
  };
40926
41188
  tool$vendorsListVendorFacilityStatuses = {
@@ -40928,9 +41190,9 @@ var init_vendorsListVendorFacilityStatuses2 = __esm(() => {
40928
41190
  description: `List vendor facility statuses
40929
41191
 
40930
41192
  List the facilities for the vendor`,
40931
- args: args16,
40932
- tool: async (client, args17, ctx) => {
40933
- const [result, apiCall] = await vendorsListVendorFacilityStatuses(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41193
+ args: args17,
41194
+ tool: async (client, args18, ctx) => {
41195
+ const [result, apiCall] = await vendorsListVendorFacilityStatuses(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
40934
41196
  if (!result.ok) {
40935
41197
  return {
40936
41198
  content: [{ type: "text", text: result.error.message }],
@@ -40945,9 +41207,9 @@ List the facilities for the vendor`,
40945
41207
 
40946
41208
  // src/funcs/vendorsListVendorInvoices.ts
40947
41209
  function vendorsListVendorInvoices(client, request, options) {
40948
- return new APIPromise($do18(client, request, options));
41210
+ return new APIPromise($do19(client, request, options));
40949
41211
  }
40950
- async function $do18(client, request, options) {
41212
+ async function $do19(client, request, options) {
40951
41213
  const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
40952
41214
  if (!parsed.ok) {
40953
41215
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41061,12 +41323,12 @@ var init_vendorsListVendorInvoices = __esm(() => {
41061
41323
  });
41062
41324
 
41063
41325
  // src/mcp-server/tools/vendorsListVendorInvoices.ts
41064
- var args17, tool$vendorsListVendorInvoices;
41326
+ var args18, tool$vendorsListVendorInvoices;
41065
41327
  var init_vendorsListVendorInvoices2 = __esm(() => {
41066
41328
  init_vendorsListVendorInvoices();
41067
41329
  init_operations();
41068
41330
  init_tools();
41069
- args17 = {
41331
+ args18 = {
41070
41332
  request: ListVendorInvoicesRequest$inboundSchema
41071
41333
  };
41072
41334
  tool$vendorsListVendorInvoices = {
@@ -41078,9 +41340,9 @@ List invoices for Vendors
41078
41340
  Available \`expand\` scopes are:
41079
41341
 
41080
41342
  invoice.line_items`,
41081
- args: args17,
41082
- tool: async (client, args18, ctx) => {
41083
- const [result, apiCall] = await vendorsListVendorInvoices(client, args18.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41343
+ args: args18,
41344
+ tool: async (client, args19, ctx) => {
41345
+ const [result, apiCall] = await vendorsListVendorInvoices(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41084
41346
  if (!result.ok) {
41085
41347
  return {
41086
41348
  content: [{ type: "text", text: result.error.message }],
@@ -41095,9 +41357,9 @@ invoice.line_items`,
41095
41357
 
41096
41358
  // src/funcs/vendorsListVendorScrubDetails.ts
41097
41359
  function vendorsListVendorScrubDetails(client, request, options) {
41098
- return new APIPromise($do19(client, request, options));
41360
+ return new APIPromise($do20(client, request, options));
41099
41361
  }
41100
- async function $do19(client, request, options) {
41362
+ async function $do20(client, request, options) {
41101
41363
  const parsed = safeParse(request, (value) => ListVendorScrubDetailsRequest$outboundSchema.parse(value), "Input validation failed");
41102
41364
  if (!parsed.ok) {
41103
41365
  return [parsed, { status: "invalid" }];
@@ -41171,12 +41433,12 @@ var init_vendorsListVendorScrubDetails = __esm(() => {
41171
41433
  });
41172
41434
 
41173
41435
  // src/mcp-server/tools/vendorsListVendorScrubDetails.ts
41174
- var args18, tool$vendorsListVendorScrubDetails;
41436
+ var args19, tool$vendorsListVendorScrubDetails;
41175
41437
  var init_vendorsListVendorScrubDetails2 = __esm(() => {
41176
41438
  init_vendorsListVendorScrubDetails();
41177
41439
  init_operations();
41178
41440
  init_tools();
41179
- args18 = {
41441
+ args19 = {
41180
41442
  request: ListVendorScrubDetailsRequest$inboundSchema
41181
41443
  };
41182
41444
  tool$vendorsListVendorScrubDetails = {
@@ -41184,9 +41446,9 @@ var init_vendorsListVendorScrubDetails2 = __esm(() => {
41184
41446
  description: `List vendor scrub details
41185
41447
 
41186
41448
  List vendor scrub details`,
41187
- args: args18,
41188
- tool: async (client, args19, ctx) => {
41189
- const [result, apiCall] = await vendorsListVendorScrubDetails(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41449
+ args: args19,
41450
+ tool: async (client, args20, ctx) => {
41451
+ const [result, apiCall] = await vendorsListVendorScrubDetails(client, args20.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41190
41452
  if (!result.ok) {
41191
41453
  return {
41192
41454
  content: [{ type: "text", text: result.error.message }],
@@ -41201,9 +41463,9 @@ List vendor scrub details`,
41201
41463
 
41202
41464
  // src/funcs/vendorsListVendorScrubPurchases.ts
41203
41465
  function vendorsListVendorScrubPurchases(client, request, options) {
41204
- return new APIPromise($do20(client, request, options));
41466
+ return new APIPromise($do21(client, request, options));
41205
41467
  }
41206
- async function $do20(client, request, options) {
41468
+ async function $do21(client, request, options) {
41207
41469
  const parsed = safeParse(request, (value) => ListVendorScrubPurchasesRequest$outboundSchema.parse(value), "Input validation failed");
41208
41470
  if (!parsed.ok) {
41209
41471
  return [haltIterator(parsed), { status: "invalid" }];
@@ -41315,12 +41577,12 @@ var init_vendorsListVendorScrubPurchases = __esm(() => {
41315
41577
  });
41316
41578
 
41317
41579
  // src/mcp-server/tools/vendorsListVendorScrubPurchases.ts
41318
- var args19, tool$vendorsListVendorScrubPurchases;
41580
+ var args20, tool$vendorsListVendorScrubPurchases;
41319
41581
  var init_vendorsListVendorScrubPurchases2 = __esm(() => {
41320
41582
  init_vendorsListVendorScrubPurchases();
41321
41583
  init_operations();
41322
41584
  init_tools();
41323
- args19 = {
41585
+ args20 = {
41324
41586
  request: ListVendorScrubPurchasesRequest$inboundSchema
41325
41587
  };
41326
41588
  tool$vendorsListVendorScrubPurchases = {
@@ -41328,9 +41590,9 @@ var init_vendorsListVendorScrubPurchases2 = __esm(() => {
41328
41590
  description: `List vendor scrub purchases
41329
41591
 
41330
41592
  List vendor scrub purchases`,
41331
- args: args19,
41332
- tool: async (client, args20, ctx) => {
41333
- const [result, apiCall] = await vendorsListVendorScrubPurchases(client, args20.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41593
+ args: args20,
41594
+ tool: async (client, args21, ctx) => {
41595
+ const [result, apiCall] = await vendorsListVendorScrubPurchases(client, args21.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41334
41596
  if (!result.ok) {
41335
41597
  return {
41336
41598
  content: [{ type: "text", text: result.error.message }],
@@ -41345,9 +41607,9 @@ List vendor scrub purchases`,
41345
41607
 
41346
41608
  // src/funcs/webhooksGetWebhookEndpoint.ts
41347
41609
  function webhooksGetWebhookEndpoint(client, request, options) {
41348
- return new APIPromise($do21(client, request, options));
41610
+ return new APIPromise($do22(client, request, options));
41349
41611
  }
41350
- async function $do21(client, request, options) {
41612
+ async function $do22(client, request, options) {
41351
41613
  const parsed = safeParse(request, (value) => GetWebhookEndpointRequest$outboundSchema.parse(value), "Input validation failed");
41352
41614
  if (!parsed.ok) {
41353
41615
  return [parsed, { status: "invalid" }];
@@ -41421,12 +41683,12 @@ var init_webhooksGetWebhookEndpoint = __esm(() => {
41421
41683
  });
41422
41684
 
41423
41685
  // src/mcp-server/tools/webhooksGetWebhookEndpoint.ts
41424
- var args20, tool$webhooksGetWebhookEndpoint;
41686
+ var args21, tool$webhooksGetWebhookEndpoint;
41425
41687
  var init_webhooksGetWebhookEndpoint2 = __esm(() => {
41426
41688
  init_webhooksGetWebhookEndpoint();
41427
41689
  init_operations();
41428
41690
  init_tools();
41429
- args20 = {
41691
+ args21 = {
41430
41692
  request: GetWebhookEndpointRequest$inboundSchema
41431
41693
  };
41432
41694
  tool$webhooksGetWebhookEndpoint = {
@@ -41434,9 +41696,9 @@ var init_webhooksGetWebhookEndpoint2 = __esm(() => {
41434
41696
  description: `Retrieves the webhook endpoint with the given ID.
41435
41697
 
41436
41698
  Returns the definition of a webhook endpoint by ID.`,
41437
- args: args20,
41438
- tool: async (client, args21, ctx) => {
41439
- const [result, apiCall] = await webhooksGetWebhookEndpoint(client, args21.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41699
+ args: args21,
41700
+ tool: async (client, args22, ctx) => {
41701
+ const [result, apiCall] = await webhooksGetWebhookEndpoint(client, args22.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41440
41702
  if (!result.ok) {
41441
41703
  return {
41442
41704
  content: [{ type: "text", text: result.error.message }],
@@ -41451,9 +41713,9 @@ Returns the definition of a webhook endpoint by ID.`,
41451
41713
 
41452
41714
  // src/funcs/webhooksListAllWebhookEndpoints.ts
41453
41715
  function webhooksListAllWebhookEndpoints(client, request, options) {
41454
- return new APIPromise($do22(client, request, options));
41716
+ return new APIPromise($do23(client, request, options));
41455
41717
  }
41456
- async function $do22(client, request, options) {
41718
+ async function $do23(client, request, options) {
41457
41719
  const parsed = safeParse(request, (value) => ListAllWebhookEndpointsRequest$outboundSchema.parse(value), "Input validation failed");
41458
41720
  if (!parsed.ok) {
41459
41721
  return [parsed, { status: "invalid" }];
@@ -41527,12 +41789,12 @@ var init_webhooksListAllWebhookEndpoints = __esm(() => {
41527
41789
  });
41528
41790
 
41529
41791
  // src/mcp-server/tools/webhooksListAllWebhookEndpoints.ts
41530
- var args21, tool$webhooksListAllWebhookEndpoints;
41792
+ var args22, tool$webhooksListAllWebhookEndpoints;
41531
41793
  var init_webhooksListAllWebhookEndpoints2 = __esm(() => {
41532
41794
  init_webhooksListAllWebhookEndpoints();
41533
41795
  init_operations();
41534
41796
  init_tools();
41535
- args21 = {
41797
+ args22 = {
41536
41798
  request: ListAllWebhookEndpointsRequest$inboundSchema
41537
41799
  };
41538
41800
  tool$webhooksListAllWebhookEndpoints = {
@@ -41540,9 +41802,9 @@ var init_webhooksListAllWebhookEndpoints2 = __esm(() => {
41540
41802
  description: `List all webhook endpoints
41541
41803
 
41542
41804
  Returns a list of your webhook endpoints.`,
41543
- args: args21,
41544
- tool: async (client, args22, ctx) => {
41545
- const [result, apiCall] = await webhooksListAllWebhookEndpoints(client, args22.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41805
+ args: args22,
41806
+ tool: async (client, args23, ctx) => {
41807
+ const [result, apiCall] = await webhooksListAllWebhookEndpoints(client, args23.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
41546
41808
  if (!result.ok) {
41547
41809
  return {
41548
41810
  content: [{ type: "text", text: result.error.message }],
@@ -41559,7 +41821,7 @@ Returns a list of your webhook endpoints.`,
41559
41821
  function createMCPServer(deps) {
41560
41822
  const server = new McpServer({
41561
41823
  name: "GreenSecurity",
41562
- version: "0.21.1"
41824
+ version: "0.21.4"
41563
41825
  });
41564
41826
  const client = new GreenSecurityCore({
41565
41827
  security: deps.security,
@@ -41582,6 +41844,7 @@ function createMCPServer(deps) {
41582
41844
  tool(tool$vendorsListVendorScrubPurchases);
41583
41845
  tool(tool$vendorsListVendorScrubDetails);
41584
41846
  tool(tool$vendorsGetVendorsDetails);
41847
+ tool(tool$vendorsListVendorCredits);
41585
41848
  tool(tool$usersGetCurrentUser);
41586
41849
  tool(tool$usersGetUserById);
41587
41850
  tool(tool$usersLogsUserIntoTheSystem);
@@ -41619,6 +41882,7 @@ var init_server2 = __esm(() => {
41619
41882
  init_vendorsGetVendorInvoiceDetails2();
41620
41883
  init_vendorsGetVendorsDetails2();
41621
41884
  init_vendorsListVendorCredentials2();
41885
+ init_vendorsListVendorCredits2();
41622
41886
  init_vendorsListVendorFacilityStatuses2();
41623
41887
  init_vendorsListVendorInvoices2();
41624
41888
  init_vendorsListVendorScrubDetails2();
@@ -42822,7 +43086,7 @@ var routes = rn({
42822
43086
  var app = Ve(routes, {
42823
43087
  name: "mcp",
42824
43088
  versionInfo: {
42825
- currentVersion: "0.21.1"
43089
+ currentVersion: "0.21.4"
42826
43090
  }
42827
43091
  });
42828
43092
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -42830,5 +43094,5 @@ export {
42830
43094
  app
42831
43095
  };
42832
43096
 
42833
- //# debugId=C0435E41104ED51164756E2164756E21
43097
+ //# debugId=F3C55F750B6E7FBF64756E2164756E21
42834
43098
  //# sourceMappingURL=mcp-server.js.map