@greensecurity/javascript-sdk 0.30.19 → 0.30.23

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 (139) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +254 -60
  3. package/bin/mcp-server.js.map +15 -11
  4. package/dist/commonjs/__tests__/vendormanagedbycompanies.test.js +1 -1
  5. package/dist/commonjs/__tests__/vendors.test.js +21 -2
  6. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  7. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  8. package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.d.ts +17 -0
  9. package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.js +121 -0
  11. package/dist/commonjs/funcs/vendorsPurchaseScrubCredits.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +3 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts +8 -0
  19. package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.js +64 -0
  21. package/dist/commonjs/mcp-server/tools/vendorsPurchaseScrubCredits.js.map +1 -0
  22. package/dist/commonjs/models/components/index.d.ts +1 -0
  23. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/index.js +1 -0
  25. package/dist/commonjs/models/components/index.js.map +1 -1
  26. package/dist/commonjs/models/components/invoice.d.ts +2 -0
  27. package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/invoice.js +2 -0
  29. package/dist/commonjs/models/components/invoice.js.map +1 -1
  30. package/dist/commonjs/models/components/supervisor.d.ts +36 -0
  31. package/dist/commonjs/models/components/supervisor.d.ts.map +1 -0
  32. package/dist/commonjs/models/components/supervisor.js +73 -0
  33. package/dist/commonjs/models/components/supervisor.js.map +1 -0
  34. package/dist/commonjs/models/components/vendor.d.ts +6 -31
  35. package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/vendor.js +4 -34
  37. package/dist/commonjs/models/components/vendor.js.map +1 -1
  38. package/dist/commonjs/models/operations/index.d.ts +1 -0
  39. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  40. package/dist/commonjs/models/operations/index.js +1 -0
  41. package/dist/commonjs/models/operations/index.js.map +1 -1
  42. package/dist/commonjs/models/operations/purchasescrubcredits.d.ts +91 -0
  43. package/dist/commonjs/models/operations/purchasescrubcredits.d.ts.map +1 -0
  44. package/dist/commonjs/models/operations/purchasescrubcredits.js +160 -0
  45. package/dist/commonjs/models/operations/purchasescrubcredits.js.map +1 -0
  46. package/dist/commonjs/models/operations/updatevendordetails.d.ts +5 -0
  47. package/dist/commonjs/models/operations/updatevendordetails.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/updatevendordetails.js +2 -0
  49. package/dist/commonjs/models/operations/updatevendordetails.js.map +1 -1
  50. package/dist/commonjs/react-query/index.d.ts +1 -0
  51. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  52. package/dist/commonjs/react-query/index.js +1 -0
  53. package/dist/commonjs/react-query/index.js.map +1 -1
  54. package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.d.ts +23 -0
  55. package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.d.ts.map +1 -0
  56. package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.js +47 -0
  57. package/dist/commonjs/react-query/vendorsPurchaseScrubCredits.js.map +1 -0
  58. package/dist/commonjs/sdk/vendors.d.ts +7 -0
  59. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  60. package/dist/commonjs/sdk/vendors.js +10 -0
  61. package/dist/commonjs/sdk/vendors.js.map +1 -1
  62. package/dist/esm/__tests__/vendormanagedbycompanies.test.js +1 -1
  63. package/dist/esm/__tests__/vendors.test.js +21 -2
  64. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  65. package/dist/esm/__tests__/webhooks.test.js +1 -1
  66. package/dist/esm/funcs/vendorsPurchaseScrubCredits.d.ts +17 -0
  67. package/dist/esm/funcs/vendorsPurchaseScrubCredits.d.ts.map +1 -0
  68. package/dist/esm/funcs/vendorsPurchaseScrubCredits.js +85 -0
  69. package/dist/esm/funcs/vendorsPurchaseScrubCredits.js.map +1 -0
  70. package/dist/esm/lib/config.d.ts +3 -3
  71. package/dist/esm/lib/config.js +3 -3
  72. package/dist/esm/mcp-server/mcp-server.js +1 -1
  73. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  74. package/dist/esm/mcp-server/server.js +3 -1
  75. package/dist/esm/mcp-server/server.js.map +1 -1
  76. package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts +8 -0
  77. package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.d.ts.map +1 -0
  78. package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.js +28 -0
  79. package/dist/esm/mcp-server/tools/vendorsPurchaseScrubCredits.js.map +1 -0
  80. package/dist/esm/models/components/index.d.ts +1 -0
  81. package/dist/esm/models/components/index.d.ts.map +1 -1
  82. package/dist/esm/models/components/index.js +1 -0
  83. package/dist/esm/models/components/index.js.map +1 -1
  84. package/dist/esm/models/components/invoice.d.ts +2 -0
  85. package/dist/esm/models/components/invoice.d.ts.map +1 -1
  86. package/dist/esm/models/components/invoice.js +2 -0
  87. package/dist/esm/models/components/invoice.js.map +1 -1
  88. package/dist/esm/models/components/supervisor.d.ts +36 -0
  89. package/dist/esm/models/components/supervisor.d.ts.map +1 -0
  90. package/dist/esm/models/components/supervisor.js +35 -0
  91. package/dist/esm/models/components/supervisor.js.map +1 -0
  92. package/dist/esm/models/components/vendor.d.ts +6 -31
  93. package/dist/esm/models/components/vendor.d.ts.map +1 -1
  94. package/dist/esm/models/components/vendor.js +3 -31
  95. package/dist/esm/models/components/vendor.js.map +1 -1
  96. package/dist/esm/models/operations/index.d.ts +1 -0
  97. package/dist/esm/models/operations/index.d.ts.map +1 -1
  98. package/dist/esm/models/operations/index.js +1 -0
  99. package/dist/esm/models/operations/index.js.map +1 -1
  100. package/dist/esm/models/operations/purchasescrubcredits.d.ts +91 -0
  101. package/dist/esm/models/operations/purchasescrubcredits.d.ts.map +1 -0
  102. package/dist/esm/models/operations/purchasescrubcredits.js +118 -0
  103. package/dist/esm/models/operations/purchasescrubcredits.js.map +1 -0
  104. package/dist/esm/models/operations/updatevendordetails.d.ts +5 -0
  105. package/dist/esm/models/operations/updatevendordetails.d.ts.map +1 -1
  106. package/dist/esm/models/operations/updatevendordetails.js +2 -0
  107. package/dist/esm/models/operations/updatevendordetails.js.map +1 -1
  108. package/dist/esm/react-query/index.d.ts +1 -0
  109. package/dist/esm/react-query/index.d.ts.map +1 -1
  110. package/dist/esm/react-query/index.js +1 -0
  111. package/dist/esm/react-query/index.js.map +1 -1
  112. package/dist/esm/react-query/vendorsPurchaseScrubCredits.d.ts +23 -0
  113. package/dist/esm/react-query/vendorsPurchaseScrubCredits.d.ts.map +1 -0
  114. package/dist/esm/react-query/vendorsPurchaseScrubCredits.js +42 -0
  115. package/dist/esm/react-query/vendorsPurchaseScrubCredits.js.map +1 -0
  116. package/dist/esm/sdk/vendors.d.ts +7 -0
  117. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  118. package/dist/esm/sdk/vendors.js +10 -0
  119. package/dist/esm/sdk/vendors.js.map +1 -1
  120. package/jsr.json +1 -1
  121. package/package.json +1 -1
  122. package/src/__tests__/vendormanagedbycompanies.test.ts +1 -1
  123. package/src/__tests__/vendors.test.ts +24 -2
  124. package/src/__tests__/webhooks.test.ts +1 -1
  125. package/src/funcs/vendorsPurchaseScrubCredits.ts +176 -0
  126. package/src/lib/config.ts +3 -3
  127. package/src/mcp-server/mcp-server.ts +1 -1
  128. package/src/mcp-server/server.ts +3 -1
  129. package/src/mcp-server/tools/vendorsPurchaseScrubCredits.ts +37 -0
  130. package/src/models/components/index.ts +1 -0
  131. package/src/models/components/invoice.ts +4 -0
  132. package/src/models/components/supervisor.ts +73 -0
  133. package/src/models/components/vendor.ts +13 -66
  134. package/src/models/operations/index.ts +1 -0
  135. package/src/models/operations/purchasescrubcredits.ts +237 -0
  136. package/src/models/operations/updatevendordetails.ts +7 -0
  137. package/src/react-query/index.ts +1 -0
  138. package/src/react-query/vendorsPurchaseScrubCredits.ts +89 -0
  139. package/src/sdk/vendors.ts +18 -0
package/README.md CHANGED
@@ -332,6 +332,7 @@ run();
332
332
  * [addVendorManagedByCompany](docs/sdks/vendors/README.md#addvendormanagedbycompany) - Add vendor managed by company
333
333
  * [deleteVendorManagedByCompany](docs/sdks/vendors/README.md#deletevendormanagedbycompany) - Delete vendor managed by company
334
334
  * [updateVendorManagedByCompany](docs/sdks/vendors/README.md#updatevendormanagedbycompany) - Update vendor managed by company access rights
335
+ * [purchaseScrubCredits](docs/sdks/vendors/README.md#purchasescrubcredits) - Purchase scrub credits
335
336
 
336
337
  ### [vendorScans](docs/sdks/vendorscans/README.md)
337
338
 
@@ -388,6 +389,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
388
389
  - [`vendorsListVendorScrubDetails`](docs/sdks/vendors/README.md#listvendorscrubdetails) - List vendor scrub details
389
390
  - [`vendorsListVendorScrubPackages`](docs/sdks/vendors/README.md#listvendorscrubpackages) - List vendor scrub packages
390
391
  - [`vendorsListVendorScrubPurchases`](docs/sdks/vendors/README.md#listvendorscrubpurchases) - List vendor scrub purchases
392
+ - [`vendorsPurchaseScrubCredits`](docs/sdks/vendors/README.md#purchasescrubcredits) - Purchase scrub credits
391
393
  - [`vendorsUpdateVendorDetails`](docs/sdks/vendors/README.md#updatevendordetails) - Update vendor details
392
394
  - [`vendorsUpdateVendorManagedByCompany`](docs/sdks/vendors/README.md#updatevendormanagedbycompany) - Update vendor managed by company access rights
393
395
  - [`vendorsUpdateVendorScrubDetails`](docs/sdks/vendors/README.md#updatevendorscrubdetails) - Update vendor scrub details
@@ -447,6 +449,7 @@ To learn about this feature and how to get started, check
447
449
  - [`useVendorsListVendorScrubDetails`](docs/sdks/vendors/README.md#listvendorscrubdetails) - List vendor scrub details
448
450
  - [`useVendorsListVendorScrubPackages`](docs/sdks/vendors/README.md#listvendorscrubpackages) - List vendor scrub packages
449
451
  - [`useVendorsListVendorScrubPurchases`](docs/sdks/vendors/README.md#listvendorscrubpurchases) - List vendor scrub purchases
452
+ - [`useVendorsPurchaseScrubCreditsMutation`](docs/sdks/vendors/README.md#purchasescrubcredits) - Purchase scrub credits
450
453
  - [`useVendorsUpdateVendorDetailsMutation`](docs/sdks/vendors/README.md#updatevendordetails) - Update vendor details
451
454
  - [`useVendorsUpdateVendorManagedByCompanyMutation`](docs/sdks/vendors/README.md#updatevendormanagedbycompany) - Update vendor managed by company access rights
452
455
  - [`useVendorsUpdateVendorScrubDetailsMutation`](docs/sdks/vendors/README.md#updatevendorscrubdetails) - Update vendor scrub details
package/bin/mcp-server.js CHANGED
@@ -34166,9 +34166,9 @@ var init_config = __esm(() => {
34166
34166
  SDK_METADATA = {
34167
34167
  language: "typescript",
34168
34168
  openapiDocVersion: "0.0.3",
34169
- sdkVersion: "0.30.19",
34170
- genVersion: "2.568.2",
34171
- userAgent: "speakeasy-sdk/typescript 0.30.19 2.568.2 0.0.3 @greensecurity/javascript-sdk"
34169
+ sdkVersion: "0.30.23",
34170
+ genVersion: "2.570.3",
34171
+ userAgent: "speakeasy-sdk/typescript 0.30.23 2.570.3 0.0.3 @greensecurity/javascript-sdk"
34172
34172
  };
34173
34173
  });
34174
34174
 
@@ -36697,6 +36697,7 @@ var init_invoice = __esm(() => {
36697
36697
  tax: nullableType(numberType().int()).optional(),
36698
36698
  convenience_fee: nullableType(numberType()).optional(),
36699
36699
  shipping: nullableType(numberType().int()).optional(),
36700
+ discount: numberType().int().optional(),
36700
36701
  items: nullableType(arrayType(InvoiceItem$inboundSchema)).optional(),
36701
36702
  transactions: nullableType(arrayType(InvoiceTransaction$inboundSchema)).optional()
36702
36703
  }).transform((v2) => {
@@ -36719,6 +36720,7 @@ var init_invoice = __esm(() => {
36719
36720
  tax: nullableType(numberType().int()).optional(),
36720
36721
  convenienceFee: nullableType(numberType()).optional(),
36721
36722
  shipping: nullableType(numberType().int()).optional(),
36723
+ discount: numberType().int().optional(),
36722
36724
  items: nullableType(arrayType(InvoiceItem$outboundSchema)).optional(),
36723
36725
  transactions: nullableType(arrayType(InvoiceTransaction$outboundSchema)).optional()
36724
36726
  }).transform((v2) => {
@@ -37065,6 +37067,26 @@ var init_subscription = __esm(() => {
37065
37067
  })(Subscription$ ||= {});
37066
37068
  });
37067
37069
 
37070
+ // src/models/components/supervisor.ts
37071
+ var Supervisor$inboundSchema, Supervisor$outboundSchema, Supervisor$;
37072
+ var init_supervisor = __esm(() => {
37073
+ init_lib();
37074
+ Supervisor$inboundSchema = objectType({
37075
+ name: nullableType(stringType()).optional(),
37076
+ email: anyType().optional(),
37077
+ phone: nullableType(stringType()).optional()
37078
+ });
37079
+ Supervisor$outboundSchema = objectType({
37080
+ name: nullableType(stringType()).optional(),
37081
+ email: anyType().optional(),
37082
+ phone: nullableType(stringType()).optional()
37083
+ });
37084
+ ((Supervisor$) => {
37085
+ Supervisor$.inboundSchema = Supervisor$inboundSchema;
37086
+ Supervisor$.outboundSchema = Supervisor$outboundSchema;
37087
+ })(Supervisor$ ||= {});
37088
+ });
37089
+
37068
37090
  // src/models/components/supportarticle.ts
37069
37091
  var SupportArticle$inboundSchema, SupportArticle$outboundSchema, SupportArticle$;
37070
37092
  var init_supportarticle = __esm(() => {
@@ -37368,7 +37390,7 @@ var init_userlocation = __esm(() => {
37368
37390
  });
37369
37391
 
37370
37392
  // src/models/components/vendor.ts
37371
- var One$inboundSchema, One$outboundSchema, One$, VendorUser$inboundSchema, VendorUser$outboundSchema, VendorUser$, VendorType1$inboundSchema, VendorType1$outboundSchema, VendorType1$, VendorVendorType$inboundSchema, VendorVendorType$outboundSchema, VendorVendorType$, Supervisor$inboundSchema, Supervisor$outboundSchema, Supervisor$, PaymentProfile1$inboundSchema, PaymentProfile1$outboundSchema, PaymentProfile1$, PaymentProfilePaymentProfile$inboundSchema, PaymentProfilePaymentProfile$outboundSchema, PaymentProfilePaymentProfile$, PaymentProfile$inboundSchema, PaymentProfile$outboundSchema, PaymentProfile$, PaymentResponsibility$inboundSchema, PaymentResponsibility$outboundSchema, PaymentResponsibility$, Vendor$inboundSchema, Vendor$outboundSchema, Vendor$;
37393
+ var One$inboundSchema, One$outboundSchema, One$, VendorUser$inboundSchema, VendorUser$outboundSchema, VendorUser$, VendorType1$inboundSchema, VendorType1$outboundSchema, VendorType1$, VendorVendorType$inboundSchema, VendorVendorType$outboundSchema, VendorVendorType$, PaymentProfile1$inboundSchema, PaymentProfile1$outboundSchema, PaymentProfile1$, PaymentProfilePaymentProfile$inboundSchema, PaymentProfilePaymentProfile$outboundSchema, PaymentProfilePaymentProfile$, PaymentProfile$inboundSchema, PaymentProfile$outboundSchema, PaymentProfile$, PaymentResponsibility$inboundSchema, PaymentResponsibility$outboundSchema, PaymentResponsibility$, Vendor$inboundSchema, Vendor$outboundSchema, Vendor$;
37372
37394
  var init_vendor = __esm(() => {
37373
37395
  init_lib();
37374
37396
  init_primitives();
@@ -37377,6 +37399,7 @@ var init_vendor = __esm(() => {
37377
37399
  init_facility();
37378
37400
  init_imageset();
37379
37401
  init_subscription();
37402
+ init_supervisor();
37380
37403
  init_userlocation();
37381
37404
  One$inboundSchema = objectType({
37382
37405
  id: numberType().int().optional(),
@@ -37452,20 +37475,6 @@ var init_vendor = __esm(() => {
37452
37475
  VendorVendorType$.inboundSchema = VendorVendorType$inboundSchema;
37453
37476
  VendorVendorType$.outboundSchema = VendorVendorType$outboundSchema;
37454
37477
  })(VendorVendorType$ ||= {});
37455
- Supervisor$inboundSchema = objectType({
37456
- name: nullableType(stringType()).optional(),
37457
- email: nullableType(stringType()).optional(),
37458
- phone: nullableType(stringType()).optional()
37459
- });
37460
- Supervisor$outboundSchema = objectType({
37461
- name: nullableType(stringType()).optional(),
37462
- email: nullableType(stringType()).optional(),
37463
- phone: nullableType(stringType()).optional()
37464
- });
37465
- ((Supervisor$) => {
37466
- Supervisor$.inboundSchema = Supervisor$inboundSchema;
37467
- Supervisor$.outboundSchema = Supervisor$outboundSchema;
37468
- })(Supervisor$ ||= {});
37469
37478
  PaymentProfile1$inboundSchema = objectType({
37470
37479
  id: numberType().int().optional(),
37471
37480
  is_valid: nullableType(booleanType()).optional(),
@@ -37603,7 +37612,7 @@ var init_vendor = __esm(() => {
37603
37612
  title: nullableType(stringType()).optional(),
37604
37613
  user: unionType([lazyType(() => One$inboundSchema), numberType().int()]).optional(),
37605
37614
  vendor_type: nullableType(unionType([lazyType(() => VendorType1$inboundSchema), numberType().int()])).optional(),
37606
- supervisor: lazyType(() => Supervisor$inboundSchema).optional(),
37615
+ supervisor: nullableType(Supervisor$inboundSchema).optional(),
37607
37616
  qr_code: nullableType(stringType()).optional(),
37608
37617
  head_shot: nullableType(ImageSet$inboundSchema).optional(),
37609
37618
  drivers_license: nullableType(ImageSet$inboundSchema).optional(),
@@ -37647,7 +37656,7 @@ var init_vendor = __esm(() => {
37647
37656
  title: nullableType(stringType()).optional(),
37648
37657
  user: unionType([lazyType(() => One$outboundSchema), numberType().int()]).optional(),
37649
37658
  vendorType: nullableType(unionType([lazyType(() => VendorType1$outboundSchema), numberType().int()])).optional(),
37650
- supervisor: lazyType(() => Supervisor$outboundSchema).optional(),
37659
+ supervisor: nullableType(Supervisor$outboundSchema).optional(),
37651
37660
  qrCode: nullableType(stringType()).optional(),
37652
37661
  headShot: nullableType(ImageSet$outboundSchema).optional(),
37653
37662
  driversLicense: nullableType(ImageSet$outboundSchema).optional(),
@@ -38276,6 +38285,7 @@ var init_components = __esm(() => {
38276
38285
  init_scantype();
38277
38286
  init_security2();
38278
38287
  init_subscription();
38288
+ init_supervisor();
38279
38289
  init_supportarticle();
38280
38290
  init_systemsummary();
38281
38291
  init_user();
@@ -39804,6 +39814,79 @@ var init_passwordresetrequest = __esm(() => {
39804
39814
  })(PasswordResetRequestPasswordResetRequestOk$ ||= {});
39805
39815
  });
39806
39816
 
39817
+ // src/models/operations/purchasescrubcredits.ts
39818
+ var PurchaseScrubCreditsRequestBody$inboundSchema, PurchaseScrubCreditsRequestBody$outboundSchema, PurchaseScrubCreditsRequestBody$, PurchaseScrubCreditsRequest$inboundSchema, PurchaseScrubCreditsRequest$outboundSchema, PurchaseScrubCreditsRequest$, PurchaseScrubCreditsResponseBody$inboundSchema, PurchaseScrubCreditsResponseBody$outboundSchema, PurchaseScrubCreditsResponseBody$;
39819
+ var init_purchasescrubcredits = __esm(() => {
39820
+ init_lib();
39821
+ init_primitives();
39822
+ PurchaseScrubCreditsRequestBody$inboundSchema = objectType({
39823
+ pay_later: booleanType(),
39824
+ variant_id: numberType().int()
39825
+ }).transform((v2) => {
39826
+ return remap(v2, {
39827
+ pay_later: "payLater",
39828
+ variant_id: "variantId"
39829
+ });
39830
+ });
39831
+ PurchaseScrubCreditsRequestBody$outboundSchema = objectType({
39832
+ payLater: booleanType(),
39833
+ variantId: numberType().int()
39834
+ }).transform((v2) => {
39835
+ return remap(v2, {
39836
+ payLater: "pay_later",
39837
+ variantId: "variant_id"
39838
+ });
39839
+ });
39840
+ ((PurchaseScrubCreditsRequestBody$) => {
39841
+ PurchaseScrubCreditsRequestBody$.inboundSchema = PurchaseScrubCreditsRequestBody$inboundSchema;
39842
+ PurchaseScrubCreditsRequestBody$.outboundSchema = PurchaseScrubCreditsRequestBody$outboundSchema;
39843
+ })(PurchaseScrubCreditsRequestBody$ ||= {});
39844
+ PurchaseScrubCreditsRequest$inboundSchema = objectType({
39845
+ vendor_id_or_me: stringType(),
39846
+ RequestBody: lazyType(() => PurchaseScrubCreditsRequestBody$inboundSchema)
39847
+ }).transform((v2) => {
39848
+ return remap(v2, {
39849
+ vendor_id_or_me: "vendorIdOrMe",
39850
+ RequestBody: "requestBody"
39851
+ });
39852
+ });
39853
+ PurchaseScrubCreditsRequest$outboundSchema = objectType({
39854
+ vendorIdOrMe: stringType(),
39855
+ requestBody: lazyType(() => PurchaseScrubCreditsRequestBody$outboundSchema)
39856
+ }).transform((v2) => {
39857
+ return remap(v2, {
39858
+ vendorIdOrMe: "vendor_id_or_me",
39859
+ requestBody: "RequestBody"
39860
+ });
39861
+ });
39862
+ ((PurchaseScrubCreditsRequest$) => {
39863
+ PurchaseScrubCreditsRequest$.inboundSchema = PurchaseScrubCreditsRequest$inboundSchema;
39864
+ PurchaseScrubCreditsRequest$.outboundSchema = PurchaseScrubCreditsRequest$outboundSchema;
39865
+ })(PurchaseScrubCreditsRequest$ ||= {});
39866
+ PurchaseScrubCreditsResponseBody$inboundSchema = objectType({
39867
+ invoice_id: numberType().int().optional(),
39868
+ credit_balance: numberType().int().optional()
39869
+ }).transform((v2) => {
39870
+ return remap(v2, {
39871
+ invoice_id: "invoiceId",
39872
+ credit_balance: "creditBalance"
39873
+ });
39874
+ });
39875
+ PurchaseScrubCreditsResponseBody$outboundSchema = objectType({
39876
+ invoiceId: numberType().int().optional(),
39877
+ creditBalance: numberType().int().optional()
39878
+ }).transform((v2) => {
39879
+ return remap(v2, {
39880
+ invoiceId: "invoice_id",
39881
+ creditBalance: "credit_balance"
39882
+ });
39883
+ });
39884
+ ((PurchaseScrubCreditsResponseBody$) => {
39885
+ PurchaseScrubCreditsResponseBody$.inboundSchema = PurchaseScrubCreditsResponseBody$inboundSchema;
39886
+ PurchaseScrubCreditsResponseBody$.outboundSchema = PurchaseScrubCreditsResponseBody$outboundSchema;
39887
+ })(PurchaseScrubCreditsResponseBody$ ||= {});
39888
+ });
39889
+
39807
39890
  // src/models/operations/updatevendordetails.ts
39808
39891
  var EmailRecepient, EmailRecepient$inboundSchema, EmailRecepient$outboundSchema, EmailRecepient$, UpdateVendorDetailsRequestBody$inboundSchema, UpdateVendorDetailsRequestBody$outboundSchema, UpdateVendorDetailsRequestBody$, UpdateVendorDetailsRequest$inboundSchema, UpdateVendorDetailsRequest$outboundSchema, UpdateVendorDetailsRequest$;
39809
39892
  var init_updatevendordetails = __esm(() => {
@@ -39827,7 +39910,8 @@ var init_updatevendordetails = __esm(() => {
39827
39910
  email_recepient: EmailRecepient$inboundSchema.optional(),
39828
39911
  send_weekly_summary_email: booleanType().optional(),
39829
39912
  title: stringType().optional(),
39830
- location: nullableType(UserLocation$inboundSchema).optional()
39913
+ location: nullableType(UserLocation$inboundSchema).optional(),
39914
+ supervisor: nullableType(Supervisor$inboundSchema).optional()
39831
39915
  }).transform((v2) => {
39832
39916
  return remap(v2, {
39833
39917
  qr_code: "qrCode",
@@ -39840,7 +39924,8 @@ var init_updatevendordetails = __esm(() => {
39840
39924
  emailRecepient: EmailRecepient$outboundSchema.optional(),
39841
39925
  sendWeeklySummaryEmail: booleanType().optional(),
39842
39926
  title: stringType().optional(),
39843
- location: nullableType(UserLocation$outboundSchema).optional()
39927
+ location: nullableType(UserLocation$outboundSchema).optional(),
39928
+ supervisor: nullableType(Supervisor$outboundSchema).optional()
39844
39929
  }).transform((v2) => {
39845
39930
  return remap(v2, {
39846
39931
  qrCode: "qr_code",
@@ -40111,6 +40196,7 @@ var init_operations = __esm(() => {
40111
40196
  init_magiclink();
40112
40197
  init_password();
40113
40198
  init_passwordresetrequest();
40199
+ init_purchasescrubcredits();
40114
40200
  init_updatevendordetails();
40115
40201
  init_updatevendormanagedbycompany();
40116
40202
  init_updatevendorscrubdetails();
@@ -43439,11 +43525,117 @@ List vendor scrub purchases`,
43439
43525
  };
43440
43526
  });
43441
43527
 
43442
- // src/funcs/vendorsUpdateVendorDetails.ts
43443
- function vendorsUpdateVendorDetails(client, request, options) {
43528
+ // src/funcs/vendorsPurchaseScrubCredits.ts
43529
+ function vendorsPurchaseScrubCredits(client, request, options) {
43444
43530
  return new APIPromise($do28(client, request, options));
43445
43531
  }
43446
43532
  async function $do28(client, request, options) {
43533
+ const parsed = safeParse(request, (value) => PurchaseScrubCreditsRequest$outboundSchema.parse(value), "Input validation failed");
43534
+ if (!parsed.ok) {
43535
+ return [parsed, { status: "invalid" }];
43536
+ }
43537
+ const payload = parsed.value;
43538
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
43539
+ const pathParams = {
43540
+ vendor_id_or_me: encodeSimple("vendor_id_or_me", payload.vendor_id_or_me, {
43541
+ explode: false,
43542
+ charEncoding: "percent"
43543
+ })
43544
+ };
43545
+ const path = pathToFunc("/vendors/{vendor_id_or_me}/scrub_credits/order")(pathParams);
43546
+ const headers = new Headers(compactMap({
43547
+ "Content-Type": "application/json",
43548
+ Accept: "application/json"
43549
+ }));
43550
+ const securityInput = await extractSecurity(client._options.security);
43551
+ const requestSecurity = resolveGlobalSecurity(securityInput);
43552
+ const context = {
43553
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
43554
+ operationID: "purchaseScrubCredits",
43555
+ oAuth2Scopes: [],
43556
+ resolvedSecurity: requestSecurity,
43557
+ securitySource: client._options.security,
43558
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
43559
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
43560
+ };
43561
+ const requestRes = client._createRequest(context, {
43562
+ security: requestSecurity,
43563
+ method: "POST",
43564
+ baseURL: options?.serverURL,
43565
+ path,
43566
+ headers,
43567
+ body,
43568
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
43569
+ }, options);
43570
+ if (!requestRes.ok) {
43571
+ return [requestRes, { status: "invalid" }];
43572
+ }
43573
+ const req = requestRes.value;
43574
+ const doResult = await client._do(req, {
43575
+ context,
43576
+ errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
43577
+ retryConfig: context.retryConfig,
43578
+ retryCodes: context.retryCodes
43579
+ });
43580
+ if (!doResult.ok) {
43581
+ return [doResult, { status: "request-error", request: req }];
43582
+ }
43583
+ const response = doResult.value;
43584
+ const responseFields = {
43585
+ HttpMeta: { Response: response, Request: req }
43586
+ };
43587
+ const [result] = await match(json(200, PurchaseScrubCreditsResponseBody$inboundSchema), jsonErr([400, 401, 403, 404], ApiErrorResponse$inboundSchema), jsonErr(500, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
43588
+ if (!result.ok) {
43589
+ return [result, { status: "complete", request: req, response }];
43590
+ }
43591
+ return [result, { status: "complete", request: req, response }];
43592
+ }
43593
+ var init_vendorsPurchaseScrubCredits = __esm(() => {
43594
+ init_encodings();
43595
+ init_matchers();
43596
+ init_primitives();
43597
+ init_schemas();
43598
+ init_security();
43599
+ init_url();
43600
+ init_errors();
43601
+ init_operations();
43602
+ init_async();
43603
+ });
43604
+
43605
+ // src/mcp-server/tools/vendorsPurchaseScrubCredits.ts
43606
+ var args27, tool$vendorsPurchaseScrubCredits;
43607
+ var init_vendorsPurchaseScrubCredits2 = __esm(() => {
43608
+ init_vendorsPurchaseScrubCredits();
43609
+ init_operations();
43610
+ init_tools();
43611
+ args27 = {
43612
+ request: PurchaseScrubCreditsRequest$inboundSchema
43613
+ };
43614
+ tool$vendorsPurchaseScrubCredits = {
43615
+ name: "vendors-purchase-scrub-credits",
43616
+ description: `Purchase scrub credits
43617
+
43618
+ Purchase scrub credits`,
43619
+ args: args27,
43620
+ tool: async (client, args28, ctx) => {
43621
+ const [result, apiCall] = await vendorsPurchaseScrubCredits(client, args28.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43622
+ if (!result.ok) {
43623
+ return {
43624
+ content: [{ type: "text", text: result.error.message }],
43625
+ isError: true
43626
+ };
43627
+ }
43628
+ const value = result.value;
43629
+ return formatResult(value, apiCall);
43630
+ }
43631
+ };
43632
+ });
43633
+
43634
+ // src/funcs/vendorsUpdateVendorDetails.ts
43635
+ function vendorsUpdateVendorDetails(client, request, options) {
43636
+ return new APIPromise($do29(client, request, options));
43637
+ }
43638
+ async function $do29(client, request, options) {
43447
43639
  const parsed = safeParse(request, (value) => UpdateVendorDetailsRequest$outboundSchema.parse(value), "Input validation failed");
43448
43640
  if (!parsed.ok) {
43449
43641
  return [parsed, { status: "invalid" }];
@@ -43518,12 +43710,12 @@ var init_vendorsUpdateVendorDetails = __esm(() => {
43518
43710
  });
43519
43711
 
43520
43712
  // src/mcp-server/tools/vendorsUpdateVendorDetails.ts
43521
- var args27, tool$vendorsUpdateVendorDetails;
43713
+ var args28, tool$vendorsUpdateVendorDetails;
43522
43714
  var init_vendorsUpdateVendorDetails2 = __esm(() => {
43523
43715
  init_vendorsUpdateVendorDetails();
43524
43716
  init_operations();
43525
43717
  init_tools();
43526
- args27 = {
43718
+ args28 = {
43527
43719
  request: UpdateVendorDetailsRequest$inboundSchema
43528
43720
  };
43529
43721
  tool$vendorsUpdateVendorDetails = {
@@ -43531,9 +43723,9 @@ var init_vendorsUpdateVendorDetails2 = __esm(() => {
43531
43723
  description: `Update vendor details
43532
43724
 
43533
43725
  It will update the vendor details`,
43534
- args: args27,
43535
- tool: async (client, args28, ctx) => {
43536
- const [result, apiCall] = await vendorsUpdateVendorDetails(client, args28.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43726
+ args: args28,
43727
+ tool: async (client, args29, ctx) => {
43728
+ const [result, apiCall] = await vendorsUpdateVendorDetails(client, args29.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43537
43729
  if (!result.ok) {
43538
43730
  return {
43539
43731
  content: [{ type: "text", text: result.error.message }],
@@ -43548,9 +43740,9 @@ It will update the vendor details`,
43548
43740
 
43549
43741
  // src/funcs/vendorsUpdateVendorManagedByCompany.ts
43550
43742
  function vendorsUpdateVendorManagedByCompany(client, request, options) {
43551
- return new APIPromise($do29(client, request, options));
43743
+ return new APIPromise($do30(client, request, options));
43552
43744
  }
43553
- async function $do29(client, request, options) {
43745
+ async function $do30(client, request, options) {
43554
43746
  const parsed = safeParse(request, (value) => UpdateVendorManagedByCompanyRequest$outboundSchema.parse(value), "Input validation failed");
43555
43747
  if (!parsed.ok) {
43556
43748
  return [parsed, { status: "invalid" }];
@@ -43624,12 +43816,12 @@ var init_vendorsUpdateVendorManagedByCompany = __esm(() => {
43624
43816
  });
43625
43817
 
43626
43818
  // src/mcp-server/tools/vendorsUpdateVendorManagedByCompany.ts
43627
- var args28, tool$vendorsUpdateVendorManagedByCompany;
43819
+ var args29, tool$vendorsUpdateVendorManagedByCompany;
43628
43820
  var init_vendorsUpdateVendorManagedByCompany2 = __esm(() => {
43629
43821
  init_vendorsUpdateVendorManagedByCompany();
43630
43822
  init_operations();
43631
43823
  init_tools();
43632
- args28 = {
43824
+ args29 = {
43633
43825
  request: UpdateVendorManagedByCompanyRequest$inboundSchema
43634
43826
  };
43635
43827
  tool$vendorsUpdateVendorManagedByCompany = {
@@ -43637,9 +43829,9 @@ var init_vendorsUpdateVendorManagedByCompany2 = __esm(() => {
43637
43829
  description: `Update vendor managed by company access rights
43638
43830
 
43639
43831
  It will update the vendor managed by company access rights`,
43640
- args: args28,
43641
- tool: async (client, args29, ctx) => {
43642
- const [result, apiCall] = await vendorsUpdateVendorManagedByCompany(client, args29.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43832
+ args: args29,
43833
+ tool: async (client, args30, ctx) => {
43834
+ const [result, apiCall] = await vendorsUpdateVendorManagedByCompany(client, args30.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43643
43835
  if (!result.ok) {
43644
43836
  return {
43645
43837
  content: [{ type: "text", text: result.error.message }],
@@ -43654,9 +43846,9 @@ It will update the vendor managed by company access rights`,
43654
43846
 
43655
43847
  // src/funcs/vendorsUpdateVendorScrubDetails.ts
43656
43848
  function vendorsUpdateVendorScrubDetails(client, request, options) {
43657
- return new APIPromise($do30(client, request, options));
43849
+ return new APIPromise($do31(client, request, options));
43658
43850
  }
43659
- async function $do30(client, request, options) {
43851
+ async function $do31(client, request, options) {
43660
43852
  const parsed = safeParse(request, (value) => UpdateVendorScrubDetailsRequest$outboundSchema.parse(value), "Input validation failed");
43661
43853
  if (!parsed.ok) {
43662
43854
  return [parsed, { status: "invalid" }];
@@ -43731,12 +43923,12 @@ var init_vendorsUpdateVendorScrubDetails = __esm(() => {
43731
43923
  });
43732
43924
 
43733
43925
  // src/mcp-server/tools/vendorsUpdateVendorScrubDetails.ts
43734
- var args29, tool$vendorsUpdateVendorScrubDetails;
43926
+ var args30, tool$vendorsUpdateVendorScrubDetails;
43735
43927
  var init_vendorsUpdateVendorScrubDetails2 = __esm(() => {
43736
43928
  init_vendorsUpdateVendorScrubDetails();
43737
43929
  init_operations();
43738
43930
  init_tools();
43739
- args29 = {
43931
+ args30 = {
43740
43932
  request: UpdateVendorScrubDetailsRequest$inboundSchema
43741
43933
  };
43742
43934
  tool$vendorsUpdateVendorScrubDetails = {
@@ -43744,9 +43936,9 @@ var init_vendorsUpdateVendorScrubDetails2 = __esm(() => {
43744
43936
  description: `Update vendor scrub details
43745
43937
 
43746
43938
  Update vendor scrub details`,
43747
- args: args29,
43748
- tool: async (client, args30, ctx) => {
43749
- const [result, apiCall] = await vendorsUpdateVendorScrubDetails(client, args30.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43939
+ args: args30,
43940
+ tool: async (client, args31, ctx) => {
43941
+ const [result, apiCall] = await vendorsUpdateVendorScrubDetails(client, args31.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43750
43942
  if (!result.ok) {
43751
43943
  return {
43752
43944
  content: [{ type: "text", text: result.error.message }],
@@ -43761,9 +43953,9 @@ Update vendor scrub details`,
43761
43953
 
43762
43954
  // src/funcs/webhooksGetWebhookEndpoint.ts
43763
43955
  function webhooksGetWebhookEndpoint(client, request, options) {
43764
- return new APIPromise($do31(client, request, options));
43956
+ return new APIPromise($do32(client, request, options));
43765
43957
  }
43766
- async function $do31(client, request, options) {
43958
+ async function $do32(client, request, options) {
43767
43959
  const parsed = safeParse(request, (value) => GetWebhookEndpointRequest$outboundSchema.parse(value), "Input validation failed");
43768
43960
  if (!parsed.ok) {
43769
43961
  return [parsed, { status: "invalid" }];
@@ -43837,12 +44029,12 @@ var init_webhooksGetWebhookEndpoint = __esm(() => {
43837
44029
  });
43838
44030
 
43839
44031
  // src/mcp-server/tools/webhooksGetWebhookEndpoint.ts
43840
- var args30, tool$webhooksGetWebhookEndpoint;
44032
+ var args31, tool$webhooksGetWebhookEndpoint;
43841
44033
  var init_webhooksGetWebhookEndpoint2 = __esm(() => {
43842
44034
  init_webhooksGetWebhookEndpoint();
43843
44035
  init_operations();
43844
44036
  init_tools();
43845
- args30 = {
44037
+ args31 = {
43846
44038
  request: GetWebhookEndpointRequest$inboundSchema
43847
44039
  };
43848
44040
  tool$webhooksGetWebhookEndpoint = {
@@ -43850,9 +44042,9 @@ var init_webhooksGetWebhookEndpoint2 = __esm(() => {
43850
44042
  description: `Retrieves the webhook endpoint with the given ID.
43851
44043
 
43852
44044
  Returns the definition of a webhook endpoint by ID.`,
43853
- args: args30,
43854
- tool: async (client, args31, ctx) => {
43855
- const [result, apiCall] = await webhooksGetWebhookEndpoint(client, args31.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
44045
+ args: args31,
44046
+ tool: async (client, args32, ctx) => {
44047
+ const [result, apiCall] = await webhooksGetWebhookEndpoint(client, args32.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43856
44048
  if (!result.ok) {
43857
44049
  return {
43858
44050
  content: [{ type: "text", text: result.error.message }],
@@ -43867,9 +44059,9 @@ Returns the definition of a webhook endpoint by ID.`,
43867
44059
 
43868
44060
  // src/funcs/webhooksListAllWebhookEndpoints.ts
43869
44061
  function webhooksListAllWebhookEndpoints(client, request, options) {
43870
- return new APIPromise($do32(client, request, options));
44062
+ return new APIPromise($do33(client, request, options));
43871
44063
  }
43872
- async function $do32(client, request, options) {
44064
+ async function $do33(client, request, options) {
43873
44065
  const parsed = safeParse(request, (value) => ListAllWebhookEndpointsRequest$outboundSchema.parse(value), "Input validation failed");
43874
44066
  if (!parsed.ok) {
43875
44067
  return [parsed, { status: "invalid" }];
@@ -43943,12 +44135,12 @@ var init_webhooksListAllWebhookEndpoints = __esm(() => {
43943
44135
  });
43944
44136
 
43945
44137
  // src/mcp-server/tools/webhooksListAllWebhookEndpoints.ts
43946
- var args31, tool$webhooksListAllWebhookEndpoints;
44138
+ var args32, tool$webhooksListAllWebhookEndpoints;
43947
44139
  var init_webhooksListAllWebhookEndpoints2 = __esm(() => {
43948
44140
  init_webhooksListAllWebhookEndpoints();
43949
44141
  init_operations();
43950
44142
  init_tools();
43951
- args31 = {
44143
+ args32 = {
43952
44144
  request: ListAllWebhookEndpointsRequest$inboundSchema
43953
44145
  };
43954
44146
  tool$webhooksListAllWebhookEndpoints = {
@@ -43956,9 +44148,9 @@ var init_webhooksListAllWebhookEndpoints2 = __esm(() => {
43956
44148
  description: `List all webhook endpoints
43957
44149
 
43958
44150
  Returns a list of your webhook endpoints.`,
43959
- args: args31,
43960
- tool: async (client, args32, ctx) => {
43961
- const [result, apiCall] = await webhooksListAllWebhookEndpoints(client, args32.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
44151
+ args: args32,
44152
+ tool: async (client, args33, ctx) => {
44153
+ const [result, apiCall] = await webhooksListAllWebhookEndpoints(client, args33.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
43962
44154
  if (!result.ok) {
43963
44155
  return {
43964
44156
  content: [{ type: "text", text: result.error.message }],
@@ -43975,7 +44167,7 @@ Returns a list of your webhook endpoints.`,
43975
44167
  function createMCPServer(deps) {
43976
44168
  const server = new McpServer({
43977
44169
  name: "GreenSecurity",
43978
- version: "0.30.19"
44170
+ version: "0.30.23"
43979
44171
  });
43980
44172
  const client = new GreenSecurityCore({
43981
44173
  security: deps.security,
@@ -44007,6 +44199,7 @@ function createMCPServer(deps) {
44007
44199
  tool(tool$vendorsAddVendorManagedByCompany);
44008
44200
  tool(tool$vendorsDeleteVendorManagedByCompany);
44009
44201
  tool(tool$vendorsUpdateVendorManagedByCompany);
44202
+ tool(tool$vendorsPurchaseScrubCredits);
44010
44203
  tool(tool$usersGetCurrentUser);
44011
44204
  tool(tool$usersGetUserById);
44012
44205
  tool(tool$usersLogsUserIntoTheSystem);
@@ -44055,6 +44248,7 @@ var init_server2 = __esm(() => {
44055
44248
  init_vendorsListVendorScrubDetails2();
44056
44249
  init_vendorsListVendorScrubPackages2();
44057
44250
  init_vendorsListVendorScrubPurchases2();
44251
+ init_vendorsPurchaseScrubCredits2();
44058
44252
  init_vendorsUpdateVendorDetails2();
44059
44253
  init_vendorsUpdateVendorManagedByCompany2();
44060
44254
  init_vendorsUpdateVendorScrubDetails2();
@@ -45261,7 +45455,7 @@ var routes = rn({
45261
45455
  var app = Ve(routes, {
45262
45456
  name: "mcp",
45263
45457
  versionInfo: {
45264
- currentVersion: "0.30.19"
45458
+ currentVersion: "0.30.23"
45265
45459
  }
45266
45460
  });
45267
45461
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -45269,5 +45463,5 @@ export {
45269
45463
  app
45270
45464
  };
45271
45465
 
45272
- //# debugId=7F0406B5FC5812EC64756E2164756E21
45466
+ //# debugId=753CBC826C75A78364756E2164756E21
45273
45467
  //# sourceMappingURL=mcp-server.js.map