@greensecurity/javascript-sdk 0.18.0 → 0.19.0

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 (151) hide show
  1. package/README.md +6 -0
  2. package/bin/mcp-server.js +522 -58
  3. package/bin/mcp-server.js.map +38 -30
  4. package/funcs/supportArticlesListOrSearchSupportArticles.js +2 -0
  5. package/funcs/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  6. package/funcs/vendorsGetVendorInvoiceDetails.d.ts +23 -0
  7. package/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  8. package/funcs/vendorsGetVendorInvoiceDetails.js +130 -0
  9. package/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -0
  10. package/funcs/vendorsListVendorFacilityStatuses.d.ts +20 -0
  11. package/funcs/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  12. package/funcs/vendorsListVendorFacilityStatuses.js +154 -0
  13. package/funcs/vendorsListVendorFacilityStatuses.js.map +1 -0
  14. package/jsr.json +1 -1
  15. package/lib/config.d.ts +3 -3
  16. package/lib/config.js +3 -3
  17. package/lib/sdks.d.ts.map +1 -1
  18. package/lib/sdks.js +2 -8
  19. package/lib/sdks.js.map +1 -1
  20. package/mcp-server/mcp-server.js +1 -1
  21. package/mcp-server/server.d.ts.map +1 -1
  22. package/mcp-server/server.js +5 -1
  23. package/mcp-server/server.js.map +1 -1
  24. package/mcp-server/tools/organizationsGetFacility.js +1 -1
  25. package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
  26. package/mcp-server/tools/supportArticlesGetSupportArticle.js +1 -1
  27. package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
  28. package/mcp-server/tools/usersGetCurrentUser.js +1 -1
  29. package/mcp-server/tools/usersGetUserById.js +1 -1
  30. package/mcp-server/tools/usersLogsUserIntoTheSystem.js +1 -1
  31. package/mcp-server/tools/usersMagiclink.js +1 -1
  32. package/mcp-server/tools/usersPassword.js +1 -1
  33. package/mcp-server/tools/usersPasswordResetRequest.js +1 -1
  34. package/mcp-server/tools/vendorsCreateVendorRegistration.js +1 -1
  35. package/mcp-server/tools/vendorsExpediteTimeRemaining.js +1 -1
  36. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts +8 -0
  37. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  38. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +69 -0
  39. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js.map +1 -0
  40. package/mcp-server/tools/vendorsListVendorCredentials.js +1 -1
  41. package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts +8 -0
  42. package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  43. package/mcp-server/tools/vendorsListVendorFacilityStatuses.js +64 -0
  44. package/mcp-server/tools/vendorsListVendorFacilityStatuses.js.map +1 -0
  45. package/mcp-server/tools/vendorsListVendorInvoices.js +1 -1
  46. package/mcp-server/tools/vendorsListVendorJobTitles.js +1 -1
  47. package/mcp-server/tools.d.ts.map +1 -1
  48. package/mcp-server/tools.js +3 -0
  49. package/mcp-server/tools.js.map +1 -1
  50. package/models/components/expand.d.ts +3 -0
  51. package/models/components/expand.d.ts.map +1 -1
  52. package/models/components/expand.js +1 -0
  53. package/models/components/expand.js.map +1 -1
  54. package/models/components/index.d.ts +2 -0
  55. package/models/components/index.d.ts.map +1 -1
  56. package/models/components/index.js +2 -0
  57. package/models/components/index.js.map +1 -1
  58. package/models/components/invoice.d.ts +13 -2
  59. package/models/components/invoice.d.ts.map +1 -1
  60. package/models/components/invoice.js +19 -2
  61. package/models/components/invoice.js.map +1 -1
  62. package/models/components/invoiceitem.d.ts +8 -0
  63. package/models/components/invoiceitem.d.ts.map +1 -1
  64. package/models/components/invoiceitem.js +12 -0
  65. package/models/components/invoiceitem.js.map +1 -1
  66. package/models/components/invoicetransaction.d.ts +44 -0
  67. package/models/components/invoicetransaction.d.ts.map +1 -0
  68. package/models/components/invoicetransaction.js +96 -0
  69. package/models/components/invoicetransaction.js.map +1 -0
  70. package/models/components/vendorfacilitystatusview.d.ts +42 -0
  71. package/models/components/vendorfacilitystatusview.d.ts.map +1 -0
  72. package/models/components/vendorfacilitystatusview.js +98 -0
  73. package/models/components/vendorfacilitystatusview.js.map +1 -0
  74. package/models/operations/getvendorinvoicedetails.d.ts +38 -0
  75. package/models/operations/getvendorinvoicedetails.d.ts.map +1 -0
  76. package/models/operations/getvendorinvoicedetails.js +72 -0
  77. package/models/operations/getvendorinvoicedetails.js.map +1 -0
  78. package/models/operations/index.d.ts +2 -0
  79. package/models/operations/index.d.ts.map +1 -1
  80. package/models/operations/index.js +2 -0
  81. package/models/operations/index.js.map +1 -1
  82. package/models/operations/listorsearchsupportarticles.d.ts +10 -0
  83. package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
  84. package/models/operations/listorsearchsupportarticles.js +4 -0
  85. package/models/operations/listorsearchsupportarticles.js.map +1 -1
  86. package/models/operations/listvendorfacilitystatuses.d.ts +106 -0
  87. package/models/operations/listvendorfacilitystatuses.d.ts.map +1 -0
  88. package/models/operations/listvendorfacilitystatuses.js +149 -0
  89. package/models/operations/listvendorfacilitystatuses.js.map +1 -0
  90. package/package.json +1 -1
  91. package/react-query/index.d.ts +2 -0
  92. package/react-query/index.d.ts.map +1 -1
  93. package/react-query/index.js +2 -0
  94. package/react-query/index.js.map +1 -1
  95. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +6 -0
  96. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
  97. package/react-query/supportArticlesListOrSearchSupportArticles.js +4 -0
  98. package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  99. package/react-query/vendorsGetVendorInvoiceDetails.d.ts +53 -0
  100. package/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  101. package/react-query/vendorsGetVendorInvoiceDetails.js +109 -0
  102. package/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -0
  103. package/react-query/vendorsListVendorFacilityStatuses.d.ts +75 -0
  104. package/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  105. package/react-query/vendorsListVendorFacilityStatuses.js +159 -0
  106. package/react-query/vendorsListVendorFacilityStatuses.js.map +1 -0
  107. package/sdk/vendors.d.ts +22 -0
  108. package/sdk/vendors.d.ts.map +1 -1
  109. package/sdk/vendors.js +25 -0
  110. package/sdk/vendors.js.map +1 -1
  111. package/src/__tests__/vendors.test.ts +58 -0
  112. package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +2 -0
  113. package/src/funcs/vendorsGetVendorInvoiceDetails.ts +180 -0
  114. package/src/funcs/vendorsListVendorFacilityStatuses.ts +240 -0
  115. package/src/lib/config.ts +3 -3
  116. package/src/lib/sdks.ts +2 -7
  117. package/src/mcp-server/mcp-server.ts +1 -1
  118. package/src/mcp-server/server.ts +5 -1
  119. package/src/mcp-server/tools/organizationsGetFacility.ts +1 -1
  120. package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
  121. package/src/mcp-server/tools/supportArticlesGetSupportArticle.ts +1 -1
  122. package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
  123. package/src/mcp-server/tools/usersGetCurrentUser.ts +1 -1
  124. package/src/mcp-server/tools/usersGetUserById.ts +1 -1
  125. package/src/mcp-server/tools/usersLogsUserIntoTheSystem.ts +1 -1
  126. package/src/mcp-server/tools/usersMagiclink.ts +1 -1
  127. package/src/mcp-server/tools/usersPassword.ts +1 -1
  128. package/src/mcp-server/tools/usersPasswordResetRequest.ts +1 -1
  129. package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +1 -1
  130. package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +1 -1
  131. package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +43 -0
  132. package/src/mcp-server/tools/vendorsListVendorCredentials.ts +1 -1
  133. package/src/mcp-server/tools/vendorsListVendorFacilityStatuses.ts +39 -0
  134. package/src/mcp-server/tools/vendorsListVendorInvoices.ts +1 -1
  135. package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +1 -1
  136. package/src/mcp-server/tools.ts +4 -0
  137. package/src/models/components/expand.ts +1 -0
  138. package/src/models/components/index.ts +2 -0
  139. package/src/models/components/invoice.ts +36 -4
  140. package/src/models/components/invoiceitem.ts +20 -0
  141. package/src/models/components/invoicetransaction.ts +108 -0
  142. package/src/models/components/vendorfacilitystatusview.ts +108 -0
  143. package/src/models/operations/getvendorinvoicedetails.ts +79 -0
  144. package/src/models/operations/index.ts +2 -0
  145. package/src/models/operations/listorsearchsupportarticles.ts +14 -0
  146. package/src/models/operations/listvendorfacilitystatuses.ts +247 -0
  147. package/src/react-query/index.ts +2 -0
  148. package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +10 -0
  149. package/src/react-query/vendorsGetVendorInvoiceDetails.ts +187 -0
  150. package/src/react-query/vendorsListVendorFacilityStatuses.ts +342 -0
  151. package/src/sdk/vendors.ts +47 -0
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.18.0",
34176
- genVersion: "2.545.4",
34177
- userAgent: "speakeasy-sdk/typescript 0.18.0 2.545.4 0.0.3 @greensecurity/javascript-sdk"
34175
+ sdkVersion: "0.19.0",
34176
+ genVersion: "2.548.5",
34177
+ userAgent: "speakeasy-sdk/typescript 0.19.0 2.548.5 0.0.3 @greensecurity/javascript-sdk"
34178
34178
  };
34179
34179
  });
34180
34180
 
@@ -34818,12 +34818,9 @@ class ClientSDK {
34818
34818
  }
34819
34819
  if (conf.body instanceof ReadableStream) {
34820
34820
  if (!fetchOptions) {
34821
- fetchOptions = {
34822
- duplex: "half"
34823
- };
34824
- } else {
34825
- fetchOptions.duplex = "half";
34821
+ fetchOptions = {};
34826
34822
  }
34823
+ Object.assign(fetchOptions, { duplex: "half" });
34827
34824
  }
34828
34825
  let input;
34829
34826
  try {
@@ -35103,6 +35100,9 @@ function createRegisterTool(logger, server, sdk, allowedScopes, allowedTools) {
35103
35100
  return;
35104
35101
  }
35105
35102
  const toolScopes = tool.scopes ?? [];
35103
+ if (allowedScopes.size > 0 && toolScopes.length === 0) {
35104
+ return;
35105
+ }
35106
35106
  if (!toolScopes.every((s) => allowedScopes.has(s))) {
35107
35107
  return;
35108
35108
  }
@@ -35886,7 +35886,8 @@ var init_expand = __esm(() => {
35886
35886
  SupportArticlePublished: "support_article.published",
35887
35887
  SupportArticleNotes: "support_article.notes",
35888
35888
  SupportArticleSupportCategory: "support_article.support_category",
35889
- InvoiceLineItems: "invoice.line_items"
35889
+ InvoiceLineItems: "invoice.line_items",
35890
+ InvoiceInvoiceTransactions: "invoice.invoice_transactions"
35890
35891
  };
35891
35892
  Expand$inboundSchema = nativeEnumType(Expand);
35892
35893
  Expand$outboundSchema = Expand$inboundSchema;
@@ -36483,14 +36484,20 @@ var init_invoiceitem = __esm(() => {
36483
36484
  date_starts: nullableType(stringType()).optional(),
36484
36485
  date_ends: nullableType(stringType()).optional(),
36485
36486
  is_subscription: nullableType(booleanType()).optional(),
36486
- product_title: nullableType(stringType()).optional()
36487
+ product_title: nullableType(stringType()).optional(),
36488
+ item_title: nullableType(stringType()).optional(),
36489
+ quantity: nullableType(numberType()).optional(),
36490
+ unit_price: nullableType(numberType().int()).optional(),
36491
+ subtotal: nullableType(numberType().int()).optional()
36487
36492
  }).transform((v2) => {
36488
36493
  return remap(v2, {
36489
36494
  item_id: "itemId",
36490
36495
  date_starts: "dateStarts",
36491
36496
  date_ends: "dateEnds",
36492
36497
  is_subscription: "isSubscription",
36493
- product_title: "productTitle"
36498
+ product_title: "productTitle",
36499
+ item_title: "itemTitle",
36500
+ unit_price: "unitPrice"
36494
36501
  });
36495
36502
  });
36496
36503
  InvoiceItem$outboundSchema = objectType({
@@ -36498,14 +36505,20 @@ var init_invoiceitem = __esm(() => {
36498
36505
  dateStarts: nullableType(stringType()).optional(),
36499
36506
  dateEnds: nullableType(stringType()).optional(),
36500
36507
  isSubscription: nullableType(booleanType()).optional(),
36501
- productTitle: nullableType(stringType()).optional()
36508
+ productTitle: nullableType(stringType()).optional(),
36509
+ itemTitle: nullableType(stringType()).optional(),
36510
+ quantity: nullableType(numberType()).optional(),
36511
+ unitPrice: nullableType(numberType().int()).optional(),
36512
+ subtotal: nullableType(numberType().int()).optional()
36502
36513
  }).transform((v2) => {
36503
36514
  return remap(v2, {
36504
36515
  itemId: "item_id",
36505
36516
  dateStarts: "date_starts",
36506
36517
  dateEnds: "date_ends",
36507
36518
  isSubscription: "is_subscription",
36508
- productTitle: "product_title"
36519
+ productTitle: "product_title",
36520
+ itemTitle: "item_title",
36521
+ unitPrice: "unit_price"
36509
36522
  });
36510
36523
  });
36511
36524
  ((InvoiceItem$) => {
@@ -36514,23 +36527,74 @@ var init_invoiceitem = __esm(() => {
36514
36527
  })(InvoiceItem$ ||= {});
36515
36528
  });
36516
36529
 
36530
+ // src/models/components/invoicetransaction.ts
36531
+ var InvoiceTransaction$inboundSchema, InvoiceTransaction$outboundSchema, InvoiceTransaction$;
36532
+ var init_invoicetransaction = __esm(() => {
36533
+ init_lib();
36534
+ init_primitives();
36535
+ InvoiceTransaction$inboundSchema = objectType({
36536
+ date_processed: nullableType(stringType()).optional(),
36537
+ payee: nullableType(stringType()).optional(),
36538
+ amount: nullableType(numberType().int()).optional(),
36539
+ credit_id: nullableType(numberType().int()).optional(),
36540
+ transaction_id: nullableType(stringType()).optional(),
36541
+ success: nullableType(booleanType()).optional(),
36542
+ card_last4: nullableType(stringType()).optional()
36543
+ }).transform((v2) => {
36544
+ return remap(v2, {
36545
+ date_processed: "dateProcessed",
36546
+ credit_id: "creditId",
36547
+ transaction_id: "transactionId",
36548
+ card_last4: "cardLast4"
36549
+ });
36550
+ });
36551
+ InvoiceTransaction$outboundSchema = objectType({
36552
+ dateProcessed: nullableType(stringType()).optional(),
36553
+ payee: nullableType(stringType()).optional(),
36554
+ amount: nullableType(numberType().int()).optional(),
36555
+ creditId: nullableType(numberType().int()).optional(),
36556
+ transactionId: nullableType(stringType()).optional(),
36557
+ success: nullableType(booleanType()).optional(),
36558
+ cardLast4: nullableType(stringType()).optional()
36559
+ }).transform((v2) => {
36560
+ return remap(v2, {
36561
+ dateProcessed: "date_processed",
36562
+ creditId: "credit_id",
36563
+ transactionId: "transaction_id",
36564
+ cardLast4: "card_last4"
36565
+ });
36566
+ });
36567
+ ((InvoiceTransaction$) => {
36568
+ InvoiceTransaction$.inboundSchema = InvoiceTransaction$inboundSchema;
36569
+ InvoiceTransaction$.outboundSchema = InvoiceTransaction$outboundSchema;
36570
+ })(InvoiceTransaction$ ||= {});
36571
+ });
36572
+
36517
36573
  // src/models/components/invoice.ts
36518
36574
  var Invoice$inboundSchema, Invoice$outboundSchema, Invoice$;
36519
36575
  var init_invoice = __esm(() => {
36520
36576
  init_lib();
36521
36577
  init_primitives();
36522
36578
  init_invoiceitem();
36579
+ init_invoicetransaction();
36523
36580
  Invoice$inboundSchema = objectType({
36524
36581
  id: numberType().int(),
36525
36582
  invoice_number: nullableType(stringType()).optional(),
36526
36583
  amount: nullableType(numberType().int()).optional(),
36527
36584
  status: nullableType(stringType()).optional(),
36528
36585
  financial_status: nullableType(stringType()).optional(),
36529
- items: arrayType(InvoiceItem$inboundSchema).optional()
36586
+ amount_not_paid: nullableType(numberType().int()).optional(),
36587
+ tax: nullableType(numberType().int()).optional(),
36588
+ convenience_fee: nullableType(numberType()).optional(),
36589
+ shipping: nullableType(numberType().int()).optional(),
36590
+ items: nullableType(arrayType(InvoiceItem$inboundSchema)).optional(),
36591
+ transactions: nullableType(arrayType(InvoiceTransaction$inboundSchema)).optional()
36530
36592
  }).transform((v2) => {
36531
36593
  return remap(v2, {
36532
36594
  invoice_number: "invoiceNumber",
36533
- financial_status: "financialStatus"
36595
+ financial_status: "financialStatus",
36596
+ amount_not_paid: "amountNotPaid",
36597
+ convenience_fee: "convenienceFee"
36534
36598
  });
36535
36599
  });
36536
36600
  Invoice$outboundSchema = objectType({
@@ -36539,11 +36603,18 @@ var init_invoice = __esm(() => {
36539
36603
  amount: nullableType(numberType().int()).optional(),
36540
36604
  status: nullableType(stringType()).optional(),
36541
36605
  financialStatus: nullableType(stringType()).optional(),
36542
- items: arrayType(InvoiceItem$outboundSchema).optional()
36606
+ amountNotPaid: nullableType(numberType().int()).optional(),
36607
+ tax: nullableType(numberType().int()).optional(),
36608
+ convenienceFee: nullableType(numberType()).optional(),
36609
+ shipping: nullableType(numberType().int()).optional(),
36610
+ items: nullableType(arrayType(InvoiceItem$outboundSchema)).optional(),
36611
+ transactions: nullableType(arrayType(InvoiceTransaction$outboundSchema)).optional()
36543
36612
  }).transform((v2) => {
36544
36613
  return remap(v2, {
36545
36614
  invoiceNumber: "invoice_number",
36546
- financialStatus: "financial_status"
36615
+ financialStatus: "financial_status",
36616
+ amountNotPaid: "amount_not_paid",
36617
+ convenienceFee: "convenience_fee"
36547
36618
  });
36548
36619
  });
36549
36620
  ((Invoice$) => {
@@ -37028,6 +37099,51 @@ var init_vendorcredentialslim = __esm(() => {
37028
37099
  })(VendorCredentialSlim$ ||= {});
37029
37100
  });
37030
37101
 
37102
+ // src/models/components/vendorfacilitystatusview.ts
37103
+ var VendorFacilityStatusView$inboundSchema, VendorFacilityStatusView$outboundSchema, VendorFacilityStatusView$;
37104
+ var init_vendorfacilitystatusview = __esm(() => {
37105
+ init_lib();
37106
+ init_primitives();
37107
+ VendorFacilityStatusView$inboundSchema = objectType({
37108
+ vendor_id: numberType().int().optional(),
37109
+ facility_id: numberType().int().optional(),
37110
+ facility_name: stringType().optional(),
37111
+ facility_status: nullableType(stringType()).optional(),
37112
+ vendor_scan_id: nullableType(numberType().int()).optional(),
37113
+ vendor_scan_type: nullableType(numberType().int()).optional()
37114
+ }).transform((v2) => {
37115
+ return remap(v2, {
37116
+ vendor_id: "vendorId",
37117
+ facility_id: "facilityId",
37118
+ facility_name: "facilityName",
37119
+ facility_status: "facilityStatus",
37120
+ vendor_scan_id: "vendorScanId",
37121
+ vendor_scan_type: "vendorScanType"
37122
+ });
37123
+ });
37124
+ VendorFacilityStatusView$outboundSchema = objectType({
37125
+ vendorId: numberType().int().optional(),
37126
+ facilityId: numberType().int().optional(),
37127
+ facilityName: stringType().optional(),
37128
+ facilityStatus: nullableType(stringType()).optional(),
37129
+ vendorScanId: nullableType(numberType().int()).optional(),
37130
+ vendorScanType: nullableType(numberType().int()).optional()
37131
+ }).transform((v2) => {
37132
+ return remap(v2, {
37133
+ vendorId: "vendor_id",
37134
+ facilityId: "facility_id",
37135
+ facilityName: "facility_name",
37136
+ facilityStatus: "facility_status",
37137
+ vendorScanId: "vendor_scan_id",
37138
+ vendorScanType: "vendor_scan_type"
37139
+ });
37140
+ });
37141
+ ((VendorFacilityStatusView$) => {
37142
+ VendorFacilityStatusView$.inboundSchema = VendorFacilityStatusView$inboundSchema;
37143
+ VendorFacilityStatusView$.outboundSchema = VendorFacilityStatusView$outboundSchema;
37144
+ })(VendorFacilityStatusView$ ||= {});
37145
+ });
37146
+
37031
37147
  // src/models/components/vendorjobtitle.ts
37032
37148
  var VendorJobTitle$inboundSchema, VendorJobTitle$outboundSchema, VendorJobTitle$;
37033
37149
  var init_vendorjobtitle = __esm(() => {
@@ -37103,6 +37219,7 @@ var init_components = __esm(() => {
37103
37219
  init_imageset();
37104
37220
  init_invoice();
37105
37221
  init_invoiceitem();
37222
+ init_invoicetransaction();
37106
37223
  init_loginemailandpassword();
37107
37224
  init_loginrequirementsfromemail();
37108
37225
  init_mfarequiredresponse();
@@ -37114,6 +37231,7 @@ var init_components = __esm(() => {
37114
37231
  init_systemsummary();
37115
37232
  init_user();
37116
37233
  init_vendorcredentialslim();
37234
+ init_vendorfacilitystatusview();
37117
37235
  init_vendorjobtitle();
37118
37236
  init_vendorrequiredcredential();
37119
37237
  init_vendortype();
@@ -37314,6 +37432,25 @@ var init_getuserbyid = __esm(() => {
37314
37432
  })(GetUserByIdRequest$ ||= {});
37315
37433
  });
37316
37434
 
37435
+ // src/models/operations/getvendorinvoicedetails.ts
37436
+ var GetVendorInvoiceDetailsRequest$inboundSchema, GetVendorInvoiceDetailsRequest$outboundSchema, GetVendorInvoiceDetailsRequest$;
37437
+ var init_getvendorinvoicedetails = __esm(() => {
37438
+ init_lib();
37439
+ init_components();
37440
+ GetVendorInvoiceDetailsRequest$inboundSchema = objectType({
37441
+ id: numberType().int(),
37442
+ expand: arrayType(Expand$inboundSchema).optional()
37443
+ });
37444
+ GetVendorInvoiceDetailsRequest$outboundSchema = objectType({
37445
+ id: numberType().int(),
37446
+ expand: arrayType(Expand$outboundSchema).optional()
37447
+ });
37448
+ ((GetVendorInvoiceDetailsRequest$) => {
37449
+ GetVendorInvoiceDetailsRequest$.inboundSchema = GetVendorInvoiceDetailsRequest$inboundSchema;
37450
+ GetVendorInvoiceDetailsRequest$.outboundSchema = GetVendorInvoiceDetailsRequest$outboundSchema;
37451
+ })(GetVendorInvoiceDetailsRequest$ ||= {});
37452
+ });
37453
+
37317
37454
  // src/models/operations/listorsearchfacilities.ts
37318
37455
  var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$, ListOrSearchFacilitiesResponse$inboundSchema, ListOrSearchFacilitiesResponse$outboundSchema, ListOrSearchFacilitiesResponse$;
37319
37456
  var init_listorsearchfacilities = __esm(() => {
@@ -37404,7 +37541,9 @@ var init_listorsearchsupportarticles = __esm(() => {
37404
37541
  sort: nullableType(stringType()).optional(),
37405
37542
  desc: Desc$inboundSchema.optional(),
37406
37543
  page: numberType().int().optional(),
37407
- items_per_page: numberType().int().optional()
37544
+ items_per_page: numberType().int().optional(),
37545
+ category: stringType().optional(),
37546
+ search: stringType().optional()
37408
37547
  }).transform((v2) => {
37409
37548
  return remap(v2, {
37410
37549
  items_per_page: "itemsPerPage"
@@ -37414,7 +37553,9 @@ var init_listorsearchsupportarticles = __esm(() => {
37414
37553
  sort: nullableType(stringType()).optional(),
37415
37554
  desc: Desc$outboundSchema.optional(),
37416
37555
  page: numberType().int().optional(),
37417
- itemsPerPage: numberType().int().optional()
37556
+ itemsPerPage: numberType().int().optional(),
37557
+ category: stringType().optional(),
37558
+ search: stringType().optional()
37418
37559
  }).transform((v2) => {
37419
37560
  return remap(v2, {
37420
37561
  itemsPerPage: "items_per_page"
@@ -37538,6 +37679,68 @@ var init_listvendorcredentials = __esm(() => {
37538
37679
  })(ListVendorCredentialsResponseBody$ ||= {});
37539
37680
  });
37540
37681
 
37682
+ // src/models/operations/listvendorfacilitystatuses.ts
37683
+ var ListVendorFacilityStatusesRequest$inboundSchema, ListVendorFacilityStatusesRequest$outboundSchema, ListVendorFacilityStatusesRequest$, ListVendorFacilityStatusesResponseBody$inboundSchema, ListVendorFacilityStatusesResponseBody$outboundSchema, ListVendorFacilityStatusesResponseBody$, ListVendorFacilityStatusesResponse$inboundSchema, ListVendorFacilityStatusesResponse$outboundSchema, ListVendorFacilityStatusesResponse$;
37684
+ var init_listvendorfacilitystatuses = __esm(() => {
37685
+ init_lib();
37686
+ init_primitives();
37687
+ init_components();
37688
+ ListVendorFacilityStatusesRequest$inboundSchema = objectType({
37689
+ sort: nullableType(stringType()).optional(),
37690
+ desc: Desc$inboundSchema.optional(),
37691
+ page: numberType().int().optional(),
37692
+ items_per_page: numberType().int().optional()
37693
+ }).transform((v2) => {
37694
+ return remap(v2, {
37695
+ items_per_page: "itemsPerPage"
37696
+ });
37697
+ });
37698
+ ListVendorFacilityStatusesRequest$outboundSchema = objectType({
37699
+ sort: nullableType(stringType()).optional(),
37700
+ desc: Desc$outboundSchema.optional(),
37701
+ page: numberType().int().optional(),
37702
+ itemsPerPage: numberType().int().optional()
37703
+ }).transform((v2) => {
37704
+ return remap(v2, {
37705
+ itemsPerPage: "items_per_page"
37706
+ });
37707
+ });
37708
+ ((ListVendorFacilityStatusesRequest$) => {
37709
+ ListVendorFacilityStatusesRequest$.inboundSchema = ListVendorFacilityStatusesRequest$inboundSchema;
37710
+ ListVendorFacilityStatusesRequest$.outboundSchema = ListVendorFacilityStatusesRequest$outboundSchema;
37711
+ })(ListVendorFacilityStatusesRequest$ ||= {});
37712
+ ListVendorFacilityStatusesResponseBody$inboundSchema = objectType({
37713
+ items: arrayType(VendorFacilityStatusView$inboundSchema),
37714
+ pager: Pager$inboundSchema
37715
+ });
37716
+ ListVendorFacilityStatusesResponseBody$outboundSchema = objectType({
37717
+ items: arrayType(VendorFacilityStatusView$outboundSchema),
37718
+ pager: Pager$outboundSchema
37719
+ });
37720
+ ((ListVendorFacilityStatusesResponseBody$) => {
37721
+ ListVendorFacilityStatusesResponseBody$.inboundSchema = ListVendorFacilityStatusesResponseBody$inboundSchema;
37722
+ ListVendorFacilityStatusesResponseBody$.outboundSchema = ListVendorFacilityStatusesResponseBody$outboundSchema;
37723
+ })(ListVendorFacilityStatusesResponseBody$ ||= {});
37724
+ ListVendorFacilityStatusesResponse$inboundSchema = objectType({
37725
+ Result: lazyType(() => ListVendorFacilityStatusesResponseBody$inboundSchema)
37726
+ }).transform((v2) => {
37727
+ return remap(v2, {
37728
+ Result: "result"
37729
+ });
37730
+ });
37731
+ ListVendorFacilityStatusesResponse$outboundSchema = objectType({
37732
+ result: lazyType(() => ListVendorFacilityStatusesResponseBody$outboundSchema)
37733
+ }).transform((v2) => {
37734
+ return remap(v2, {
37735
+ result: "Result"
37736
+ });
37737
+ });
37738
+ ((ListVendorFacilityStatusesResponse$) => {
37739
+ ListVendorFacilityStatusesResponse$.inboundSchema = ListVendorFacilityStatusesResponse$inboundSchema;
37740
+ ListVendorFacilityStatusesResponse$.outboundSchema = ListVendorFacilityStatusesResponse$outboundSchema;
37741
+ })(ListVendorFacilityStatusesResponse$ ||= {});
37742
+ });
37743
+
37541
37744
  // src/models/operations/listvendorinvoices.ts
37542
37745
  var ListVendorInvoicesRequest$inboundSchema, ListVendorInvoicesRequest$outboundSchema, ListVendorInvoicesRequest$, ListVendorInvoicesResponseBody$inboundSchema, ListVendorInvoicesResponseBody$outboundSchema, ListVendorInvoicesResponseBody$, ListVendorInvoicesResponse$inboundSchema, ListVendorInvoicesResponse$outboundSchema, ListVendorInvoicesResponse$;
37543
37746
  var init_listvendorinvoices = __esm(() => {
@@ -37845,9 +38048,11 @@ var init_operations = __esm(() => {
37845
38048
  init_getfacility();
37846
38049
  init_getsupportarticle();
37847
38050
  init_getuserbyid();
38051
+ init_getvendorinvoicedetails();
37848
38052
  init_listorsearchfacilities();
37849
38053
  init_listorsearchsupportarticles();
37850
38054
  init_listvendorcredentials();
38055
+ init_listvendorfacilitystatuses();
37851
38056
  init_listvendorinvoices();
37852
38057
  init_listvendorjobtitles();
37853
38058
  init_logsuserintothesystem();
@@ -37969,7 +38174,7 @@ var init_organizationsGetFacility2 = __esm(() => {
37969
38174
  request: GetFacilityRequest$inboundSchema
37970
38175
  };
37971
38176
  tool$organizationsGetFacility = {
37972
- name: "organizations_get-facility",
38177
+ name: "organizations-get-facility",
37973
38178
  description: `Get facility
37974
38179
 
37975
38180
  Retrieve an individual facility.`,
@@ -38144,7 +38349,7 @@ var init_organizationsListOrSearchFacilities2 = __esm(() => {
38144
38349
  request: ListOrSearchFacilitiesRequest$inboundSchema
38145
38350
  };
38146
38351
  tool$organizationsListOrSearchFacilities = {
38147
- name: "organizations_list-or-search-facilities",
38352
+ name: "organizations-list-or-search-facilities",
38148
38353
  description: `List or search facilities
38149
38354
 
38150
38355
  List or search facilities.
@@ -38267,7 +38472,7 @@ var init_supportArticlesGetSupportArticle2 = __esm(() => {
38267
38472
  request: GetSupportArticleRequest$inboundSchema
38268
38473
  };
38269
38474
  tool$supportArticlesGetSupportArticle = {
38270
- name: "support-articles_get-support-article",
38475
+ name: "support-articles-get-support-article",
38271
38476
  description: `Get support article
38272
38477
 
38273
38478
  Retrieve an individual support article.
@@ -38306,9 +38511,11 @@ async function $do4(client, request, options) {
38306
38511
  const body = null;
38307
38512
  const path = pathToFunc("/support_articles")();
38308
38513
  const query = encodeFormQuery({
38514
+ category: payload.category,
38309
38515
  desc: payload.desc,
38310
38516
  items_per_page: payload.items_per_page,
38311
38517
  page: payload.page,
38518
+ search: payload.search,
38312
38519
  sort: payload.sort
38313
38520
  });
38314
38521
  const headers = new Headers(compactMap({
@@ -38411,7 +38618,7 @@ var init_supportArticlesListOrSearchSupportArticles2 = __esm(() => {
38411
38618
  request: ListOrSearchSupportArticlesRequest$inboundSchema
38412
38619
  };
38413
38620
  tool$supportArticlesListOrSearchSupportArticles = {
38414
- name: "support-articles_list-or-search-support-articles",
38621
+ name: "support-articles-list-or-search-support-articles",
38415
38622
  description: `List or search support articles
38416
38623
 
38417
38624
  List or search support articles for FAQ.`,
@@ -38497,7 +38704,7 @@ var init_usersGetCurrentUser2 = __esm(() => {
38497
38704
  init_usersGetCurrentUser();
38498
38705
  init_tools();
38499
38706
  tool$usersGetCurrentUser = {
38500
- name: "users_get-current-user",
38707
+ name: "users-get-current-user",
38501
38708
  description: `Get current user
38502
38709
 
38503
38710
  Returns a user object for the user represented by the authorization token`,
@@ -38602,7 +38809,7 @@ var init_usersGetUserById2 = __esm(() => {
38602
38809
  request: GetUserByIdRequest$inboundSchema
38603
38810
  };
38604
38811
  tool$usersGetUserById = {
38605
- name: "users_get-user-by-id",
38812
+ name: "users-get-user-by-id",
38606
38813
  description: `Get user by id
38607
38814
 
38608
38815
  Returns a user object for the user represented by the identifier in the path.`,
@@ -38698,7 +38905,7 @@ var init_usersLogsUserIntoTheSystem2 = __esm(() => {
38698
38905
  request: LogsUserIntoTheSystemRequestBody$inboundSchema
38699
38906
  };
38700
38907
  tool$usersLogsUserIntoTheSystem = {
38701
- name: "users_logs-user-into-the-system",
38908
+ name: "users-logs-user-into-the-system",
38702
38909
  description: `Logs user into the system
38703
38910
 
38704
38911
  This endpoint allows a user to authenticate themselves and retrieve a permanent token for access.
@@ -38828,7 +39035,7 @@ var init_usersMagiclink2 = __esm(() => {
38828
39035
  request: MagiclinkRequestBody$inboundSchema
38829
39036
  };
38830
39037
  tool$usersMagiclink = {
38831
- name: "users_magiclink",
39038
+ name: "users-magiclink",
38832
39039
  description: `Magic link
38833
39040
 
38834
39041
  It sends an email with a magic link to allow the user to log in.`,
@@ -38928,7 +39135,7 @@ var init_usersPassword2 = __esm(() => {
38928
39135
  request: PasswordRequestBody$inboundSchema
38929
39136
  };
38930
39137
  tool$usersPassword = {
38931
- name: "users_password",
39138
+ name: "users-password",
38932
39139
  description: `Password reset
38933
39140
 
38934
39141
  Resets the a user's password using a password_reset_id that was sent to them via email.
@@ -39029,7 +39236,7 @@ var init_usersPasswordResetRequest2 = __esm(() => {
39029
39236
  request: PasswordResetRequestRequestBody$inboundSchema
39030
39237
  };
39031
39238
  tool$usersPasswordResetRequest = {
39032
- name: "users_password-reset-request",
39239
+ name: "users-password-reset-request",
39033
39240
  description: `Password reset request
39034
39241
 
39035
39242
  It sends an email with a link for resetting a user's password.`,
@@ -39125,7 +39332,7 @@ var init_vendorsCreateVendorRegistration2 = __esm(() => {
39125
39332
  request: CreateVendorRegistrationRequestBody$inboundSchema
39126
39333
  };
39127
39334
  tool$vendorsCreateVendorRegistration = {
39128
- name: "vendors_create-vendor-registration",
39335
+ name: "vendors-create-vendor-registration",
39129
39336
  description: `Create vendor registration
39130
39337
 
39131
39338
  Create an initial vendor registration. Once successful, the vendor will be able to continue to filling out the rest of their onboarding profile.`,
@@ -39230,7 +39437,7 @@ var init_vendorsExpediteTimeRemaining2 = __esm(() => {
39230
39437
  request: ExpediteTimeRemainingRequest$inboundSchema
39231
39438
  };
39232
39439
  tool$vendorsExpediteTimeRemaining = {
39233
- name: "vendors_expedite-time-remaining",
39440
+ name: "vendors-expedite-time-remaining",
39234
39441
  description: `Expedite time remaining
39235
39442
 
39236
39443
  For vendors who have a paid 24-hour expedite credentials invoice, get the remaining time (in seconds) for which submitted credentials will be expedited.`,
@@ -39249,11 +39456,126 @@ For vendors who have a paid 24-hour expedite credentials invoice, get the remain
39249
39456
  };
39250
39457
  });
39251
39458
 
39252
- // src/funcs/vendorsListVendorCredentials.ts
39253
- function vendorsListVendorCredentials(client, request, options) {
39459
+ // src/funcs/vendorsGetVendorInvoiceDetails.ts
39460
+ function vendorsGetVendorInvoiceDetails(client, request, options) {
39254
39461
  return new APIPromise($do13(client, request, options));
39255
39462
  }
39256
39463
  async function $do13(client, request, options) {
39464
+ const parsed = safeParse(request, (value) => GetVendorInvoiceDetailsRequest$outboundSchema.parse(value), "Input validation failed");
39465
+ if (!parsed.ok) {
39466
+ return [parsed, { status: "invalid" }];
39467
+ }
39468
+ const payload = parsed.value;
39469
+ const body = null;
39470
+ const pathParams = {
39471
+ id: encodeSimple("id", payload.id, {
39472
+ explode: false,
39473
+ charEncoding: "percent"
39474
+ })
39475
+ };
39476
+ const path = pathToFunc("/vendors/invoices/{id}")(pathParams);
39477
+ const query = encodeFormQuery({
39478
+ expand: payload.expand
39479
+ }, { explode: false });
39480
+ const headers = new Headers(compactMap({
39481
+ Accept: "application/json"
39482
+ }));
39483
+ const securityInput = await extractSecurity(client._options.security);
39484
+ const requestSecurity = resolveGlobalSecurity(securityInput);
39485
+ const context = {
39486
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
39487
+ operationID: "getVendorInvoiceDetails",
39488
+ oAuth2Scopes: [],
39489
+ resolvedSecurity: requestSecurity,
39490
+ securitySource: client._options.security,
39491
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
39492
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
39493
+ };
39494
+ const requestRes = client._createRequest(context, {
39495
+ security: requestSecurity,
39496
+ method: "GET",
39497
+ baseURL: options?.serverURL,
39498
+ path,
39499
+ headers,
39500
+ query,
39501
+ body,
39502
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
39503
+ }, options);
39504
+ if (!requestRes.ok) {
39505
+ return [requestRes, { status: "invalid" }];
39506
+ }
39507
+ const req = requestRes.value;
39508
+ const doResult = await client._do(req, {
39509
+ context,
39510
+ errorCodes: ["401", "404", "4XX", "5XX"],
39511
+ retryConfig: context.retryConfig,
39512
+ retryCodes: context.retryCodes
39513
+ });
39514
+ if (!doResult.ok) {
39515
+ return [doResult, { status: "request-error", request: req }];
39516
+ }
39517
+ const response = doResult.value;
39518
+ const responseFields = {
39519
+ HttpMeta: { Response: response, Request: req }
39520
+ };
39521
+ const [result] = await match(json(200, Invoice$inboundSchema), jsonErr([401, 404], ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39522
+ if (!result.ok) {
39523
+ return [result, { status: "complete", request: req, response }];
39524
+ }
39525
+ return [result, { status: "complete", request: req, response }];
39526
+ }
39527
+ var init_vendorsGetVendorInvoiceDetails = __esm(() => {
39528
+ init_encodings();
39529
+ init_matchers();
39530
+ init_primitives();
39531
+ init_schemas();
39532
+ init_security();
39533
+ init_url();
39534
+ init_components();
39535
+ init_errors();
39536
+ init_operations();
39537
+ init_async();
39538
+ });
39539
+
39540
+ // src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts
39541
+ var args12, tool$vendorsGetVendorInvoiceDetails;
39542
+ var init_vendorsGetVendorInvoiceDetails2 = __esm(() => {
39543
+ init_vendorsGetVendorInvoiceDetails();
39544
+ init_operations();
39545
+ init_tools();
39546
+ args12 = {
39547
+ request: GetVendorInvoiceDetailsRequest$inboundSchema
39548
+ };
39549
+ tool$vendorsGetVendorInvoiceDetails = {
39550
+ name: "vendors-get-vendor-invoice-details",
39551
+ description: `Get vendor invoice details
39552
+
39553
+ Retrieve an individual vendor invoice detais.
39554
+
39555
+ Available \`expand\` scopes are:
39556
+
39557
+ invoice.line_items
39558
+ invoice.invoice_transactions`,
39559
+ args: args12,
39560
+ tool: async (client, args13, ctx) => {
39561
+ const [result, apiCall] = await vendorsGetVendorInvoiceDetails(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39562
+ if (!result.ok) {
39563
+ return {
39564
+ content: [{ type: "text", text: result.error.message }],
39565
+ isError: true
39566
+ };
39567
+ }
39568
+ const value = result.value;
39569
+ return formatResult(value, apiCall);
39570
+ }
39571
+ };
39572
+ });
39573
+
39574
+ // src/funcs/vendorsListVendorCredentials.ts
39575
+ function vendorsListVendorCredentials(client, request, options) {
39576
+ return new APIPromise($do14(client, request, options));
39577
+ }
39578
+ async function $do14(client, request, options) {
39257
39579
  const parsed = safeParse(request, (value) => ListVendorCredentialsRequest$outboundSchema.parse(value), "Input validation failed");
39258
39580
  if (!parsed.ok) {
39259
39581
  return [parsed, { status: "invalid" }];
@@ -39330,22 +39652,22 @@ var init_vendorsListVendorCredentials = __esm(() => {
39330
39652
  });
39331
39653
 
39332
39654
  // src/mcp-server/tools/vendorsListVendorCredentials.ts
39333
- var args12, tool$vendorsListVendorCredentials;
39655
+ var args13, tool$vendorsListVendorCredentials;
39334
39656
  var init_vendorsListVendorCredentials2 = __esm(() => {
39335
39657
  init_vendorsListVendorCredentials();
39336
39658
  init_operations();
39337
39659
  init_tools();
39338
- args12 = {
39660
+ args13 = {
39339
39661
  request: ListVendorCredentialsRequest$inboundSchema
39340
39662
  };
39341
39663
  tool$vendorsListVendorCredentials = {
39342
- name: "vendors_list-vendor-credentials",
39664
+ name: "vendors-list-vendor-credentials",
39343
39665
  description: `List Vendor Credentials
39344
39666
 
39345
39667
  Lists vendor credentials, required credentials, and company credentials. Utilized in Vendor Dashboard.`,
39346
- args: args12,
39347
- tool: async (client, args13, ctx) => {
39348
- const [result, apiCall] = await vendorsListVendorCredentials(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39668
+ args: args13,
39669
+ tool: async (client, args14, ctx) => {
39670
+ const [result, apiCall] = await vendorsListVendorCredentials(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39349
39671
  if (!result.ok) {
39350
39672
  return {
39351
39673
  content: [{ type: "text", text: result.error.message }],
@@ -39358,11 +39680,149 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
39358
39680
  };
39359
39681
  });
39360
39682
 
39683
+ // src/funcs/vendorsListVendorFacilityStatuses.ts
39684
+ function vendorsListVendorFacilityStatuses(client, request, options) {
39685
+ return new APIPromise($do15(client, request, options));
39686
+ }
39687
+ async function $do15(client, request, options) {
39688
+ const parsed = safeParse(request, (value) => ListVendorFacilityStatusesRequest$outboundSchema.parse(value), "Input validation failed");
39689
+ if (!parsed.ok) {
39690
+ return [haltIterator(parsed), { status: "invalid" }];
39691
+ }
39692
+ const payload = parsed.value;
39693
+ const body = null;
39694
+ const path = pathToFunc("/vendors/facility_statuses")();
39695
+ const query = encodeFormQuery({
39696
+ desc: payload.desc,
39697
+ items_per_page: payload.items_per_page,
39698
+ page: payload.page,
39699
+ sort: payload.sort
39700
+ });
39701
+ const headers = new Headers(compactMap({
39702
+ Accept: "application/json"
39703
+ }));
39704
+ const securityInput = await extractSecurity(client._options.security);
39705
+ const requestSecurity = resolveGlobalSecurity(securityInput);
39706
+ const context = {
39707
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
39708
+ operationID: "listVendorFacilityStatuses",
39709
+ oAuth2Scopes: [],
39710
+ resolvedSecurity: requestSecurity,
39711
+ securitySource: client._options.security,
39712
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
39713
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
39714
+ };
39715
+ const requestRes = client._createRequest(context, {
39716
+ security: requestSecurity,
39717
+ method: "GET",
39718
+ baseURL: options?.serverURL,
39719
+ path,
39720
+ headers,
39721
+ query,
39722
+ body,
39723
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
39724
+ }, options);
39725
+ if (!requestRes.ok) {
39726
+ return [haltIterator(requestRes), { status: "invalid" }];
39727
+ }
39728
+ const req = requestRes.value;
39729
+ const doResult = await client._do(req, {
39730
+ context,
39731
+ errorCodes: ["401", "4XX", "5XX"],
39732
+ retryConfig: context.retryConfig,
39733
+ retryCodes: context.retryCodes
39734
+ });
39735
+ if (!doResult.ok) {
39736
+ return [haltIterator(doResult), { status: "request-error", request: req }];
39737
+ }
39738
+ const response = doResult.value;
39739
+ const responseFields = {
39740
+ HttpMeta: { Response: response, Request: req }
39741
+ };
39742
+ const [result, raw] = await match(json(200, ListVendorFacilityStatusesResponse$inboundSchema, {
39743
+ key: "Result"
39744
+ }), jsonErr(401, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39745
+ if (!result.ok) {
39746
+ return [haltIterator(result), {
39747
+ status: "complete",
39748
+ request: req,
39749
+ response
39750
+ }];
39751
+ }
39752
+ const nextFunc = (responseData) => {
39753
+ const page2 = request?.page ?? 1;
39754
+ const nextPage = page2 + 1;
39755
+ if (!responseData) {
39756
+ return { next: () => null };
39757
+ }
39758
+ const results = dlv(responseData, "items");
39759
+ if (!Array.isArray(results) || !results.length) {
39760
+ return { next: () => null };
39761
+ }
39762
+ const limit = request?.itemsPerPage ?? 0;
39763
+ if (results.length < limit) {
39764
+ return { next: () => null };
39765
+ }
39766
+ const nextVal = () => vendorsListVendorFacilityStatuses(client, {
39767
+ ...request,
39768
+ page: nextPage
39769
+ }, options);
39770
+ return { next: nextVal, "~next": { page: nextPage } };
39771
+ };
39772
+ const page = { ...result, ...nextFunc(raw) };
39773
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
39774
+ status: "complete",
39775
+ request: req,
39776
+ response
39777
+ }];
39778
+ }
39779
+ var init_vendorsListVendorFacilityStatuses = __esm(() => {
39780
+ init_encodings();
39781
+ init_matchers();
39782
+ init_primitives();
39783
+ init_schemas();
39784
+ init_security();
39785
+ init_url();
39786
+ init_errors();
39787
+ init_operations();
39788
+ init_async();
39789
+ init_operations2();
39790
+ });
39791
+
39792
+ // src/mcp-server/tools/vendorsListVendorFacilityStatuses.ts
39793
+ var args14, tool$vendorsListVendorFacilityStatuses;
39794
+ var init_vendorsListVendorFacilityStatuses2 = __esm(() => {
39795
+ init_vendorsListVendorFacilityStatuses();
39796
+ init_operations();
39797
+ init_tools();
39798
+ args14 = {
39799
+ request: ListVendorFacilityStatusesRequest$inboundSchema
39800
+ };
39801
+ tool$vendorsListVendorFacilityStatuses = {
39802
+ name: "vendors-list-vendor-facility-statuses",
39803
+ description: `List vendor facility statuses
39804
+
39805
+ List the facilities for the vendor`,
39806
+ args: args14,
39807
+ tool: async (client, args15, ctx) => {
39808
+ const [result, apiCall] = await vendorsListVendorFacilityStatuses(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39809
+ if (!result.ok) {
39810
+ return {
39811
+ content: [{ type: "text", text: result.error.message }],
39812
+ isError: true
39813
+ };
39814
+ }
39815
+ const value = result.value.result;
39816
+ return formatResult(value, apiCall);
39817
+ }
39818
+ };
39819
+ });
39820
+
39361
39821
  // src/funcs/vendorsListVendorInvoices.ts
39362
39822
  function vendorsListVendorInvoices(client, request, options) {
39363
- return new APIPromise($do14(client, request, options));
39823
+ return new APIPromise($do16(client, request, options));
39364
39824
  }
39365
- async function $do14(client, request, options) {
39825
+ async function $do16(client, request, options) {
39366
39826
  const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
39367
39827
  if (!parsed.ok) {
39368
39828
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39476,16 +39936,16 @@ var init_vendorsListVendorInvoices = __esm(() => {
39476
39936
  });
39477
39937
 
39478
39938
  // src/mcp-server/tools/vendorsListVendorInvoices.ts
39479
- var args13, tool$vendorsListVendorInvoices;
39939
+ var args15, tool$vendorsListVendorInvoices;
39480
39940
  var init_vendorsListVendorInvoices2 = __esm(() => {
39481
39941
  init_vendorsListVendorInvoices();
39482
39942
  init_operations();
39483
39943
  init_tools();
39484
- args13 = {
39944
+ args15 = {
39485
39945
  request: ListVendorInvoicesRequest$inboundSchema
39486
39946
  };
39487
39947
  tool$vendorsListVendorInvoices = {
39488
- name: "vendors_list-vendor-invoices",
39948
+ name: "vendors-list-vendor-invoices",
39489
39949
  description: `List vendor invoices
39490
39950
 
39491
39951
  List invoices for Vendors
@@ -39493,9 +39953,9 @@ List invoices for Vendors
39493
39953
  Available \`expand\` scopes are:
39494
39954
 
39495
39955
  invoice.line_items`,
39496
- args: args13,
39497
- tool: async (client, args14, ctx) => {
39498
- const [result, apiCall] = await vendorsListVendorInvoices(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39956
+ args: args15,
39957
+ tool: async (client, args16, ctx) => {
39958
+ const [result, apiCall] = await vendorsListVendorInvoices(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39499
39959
  if (!result.ok) {
39500
39960
  return {
39501
39961
  content: [{ type: "text", text: result.error.message }],
@@ -39510,9 +39970,9 @@ invoice.line_items`,
39510
39970
 
39511
39971
  // src/funcs/vendorsListVendorJobTitles.ts
39512
39972
  function vendorsListVendorJobTitles(client, request, options) {
39513
- return new APIPromise($do15(client, request, options));
39973
+ return new APIPromise($do17(client, request, options));
39514
39974
  }
39515
- async function $do15(client, request, options) {
39975
+ async function $do17(client, request, options) {
39516
39976
  const parsed = safeParse(request, (value) => ListVendorJobTitlesRequest$outboundSchema.parse(value), "Input validation failed");
39517
39977
  if (!parsed.ok) {
39518
39978
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39615,22 +40075,22 @@ var init_vendorsListVendorJobTitles = __esm(() => {
39615
40075
  });
39616
40076
 
39617
40077
  // src/mcp-server/tools/vendorsListVendorJobTitles.ts
39618
- var args14, tool$vendorsListVendorJobTitles;
40078
+ var args16, tool$vendorsListVendorJobTitles;
39619
40079
  var init_vendorsListVendorJobTitles2 = __esm(() => {
39620
40080
  init_vendorsListVendorJobTitles();
39621
40081
  init_operations();
39622
40082
  init_tools();
39623
- args14 = {
40083
+ args16 = {
39624
40084
  request: ListVendorJobTitlesRequest$inboundSchema
39625
40085
  };
39626
40086
  tool$vendorsListVendorJobTitles = {
39627
- name: "vendors_list-vendor-job-titles",
40087
+ name: "vendors-list-vendor-job-titles",
39628
40088
  description: `List vendor job titles
39629
40089
 
39630
40090
  List valid job titles for Vendors. This can be used during sign up or in a filter.`,
39631
- args: args14,
39632
- tool: async (client, args15, ctx) => {
39633
- const [result, apiCall] = await vendorsListVendorJobTitles(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
40091
+ args: args16,
40092
+ tool: async (client, args17, ctx) => {
40093
+ const [result, apiCall] = await vendorsListVendorJobTitles(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39634
40094
  if (!result.ok) {
39635
40095
  return {
39636
40096
  content: [{ type: "text", text: result.error.message }],
@@ -39647,7 +40107,7 @@ List valid job titles for Vendors. This can be used during sign up or in a filte
39647
40107
  function createMCPServer(deps) {
39648
40108
  const server = new McpServer({
39649
40109
  name: "GreenSecurity",
39650
- version: "0.18.0"
40110
+ version: "0.19.0"
39651
40111
  });
39652
40112
  const client = new GreenSecurityCore({
39653
40113
  security: deps.security,
@@ -39665,6 +40125,8 @@ function createMCPServer(deps) {
39665
40125
  tool(tool$vendorsListVendorCredentials);
39666
40126
  tool(tool$vendorsExpediteTimeRemaining);
39667
40127
  tool(tool$vendorsListVendorInvoices);
40128
+ tool(tool$vendorsGetVendorInvoiceDetails);
40129
+ tool(tool$vendorsListVendorFacilityStatuses);
39668
40130
  tool(tool$usersGetCurrentUser);
39669
40131
  tool(tool$usersGetUserById);
39670
40132
  tool(tool$usersLogsUserIntoTheSystem);
@@ -39695,7 +40157,9 @@ var init_server2 = __esm(() => {
39695
40157
  init_usersPasswordResetRequest2();
39696
40158
  init_vendorsCreateVendorRegistration2();
39697
40159
  init_vendorsExpediteTimeRemaining2();
40160
+ init_vendorsGetVendorInvoiceDetails2();
39698
40161
  init_vendorsListVendorCredentials2();
40162
+ init_vendorsListVendorFacilityStatuses2();
39699
40163
  init_vendorsListVendorInvoices2();
39700
40164
  init_vendorsListVendorJobTitles2();
39701
40165
  });
@@ -40895,7 +41359,7 @@ var routes = rn({
40895
41359
  var app = Ve(routes, {
40896
41360
  name: "mcp",
40897
41361
  versionInfo: {
40898
- currentVersion: "0.18.0"
41362
+ currentVersion: "0.19.0"
40899
41363
  }
40900
41364
  });
40901
41365
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -40903,5 +41367,5 @@ export {
40903
41367
  app
40904
41368
  };
40905
41369
 
40906
- //# debugId=1B380E6F955E33BE64756E2164756E21
41370
+ //# debugId=D2B894A3BF02623164756E2164756E21
40907
41371
  //# sourceMappingURL=mcp-server.js.map