@greensecurity/javascript-sdk 0.16.0 → 0.17.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 (159) hide show
  1. package/REACT_QUERY.md +68 -30
  2. package/README.md +43 -0
  3. package/bin/mcp-server.js +694 -51
  4. package/bin/mcp-server.js.map +28 -19
  5. package/funcs/organizationsListOrSearchFacilities.d.ts +4 -1
  6. package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
  7. package/funcs/organizationsListOrSearchFacilities.js +46 -9
  8. package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
  9. package/funcs/supportArticlesGetSupportArticle.js +1 -1
  10. package/funcs/supportArticlesGetSupportArticle.js.map +1 -1
  11. package/funcs/supportArticlesListOrSearchSupportArticles.d.ts +4 -1
  12. package/funcs/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
  13. package/funcs/supportArticlesListOrSearchSupportArticles.js +42 -7
  14. package/funcs/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  15. package/funcs/vendorsExpediteTimeRemaining.d.ts +17 -0
  16. package/funcs/vendorsExpediteTimeRemaining.d.ts.map +1 -0
  17. package/funcs/vendorsExpediteTimeRemaining.js +120 -0
  18. package/funcs/vendorsExpediteTimeRemaining.js.map +1 -0
  19. package/funcs/vendorsListVendorInvoices.d.ts +24 -0
  20. package/funcs/vendorsListVendorInvoices.d.ts.map +1 -0
  21. package/funcs/vendorsListVendorInvoices.js +166 -0
  22. package/funcs/vendorsListVendorInvoices.js.map +1 -0
  23. package/funcs/vendorsListVendorJobTitles.d.ts +4 -1
  24. package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
  25. package/funcs/vendorsListVendorJobTitles.js +39 -6
  26. package/funcs/vendorsListVendorJobTitles.js.map +1 -1
  27. package/jsr.json +1 -1
  28. package/lib/config.d.ts +2 -2
  29. package/lib/config.js +2 -2
  30. package/mcp-server/mcp-server.js +1 -1
  31. package/mcp-server/server.d.ts.map +1 -1
  32. package/mcp-server/server.js +5 -1
  33. package/mcp-server/server.js.map +1 -1
  34. package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
  35. package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -1
  36. package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
  37. package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  38. package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts +8 -0
  39. package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts.map +1 -0
  40. package/mcp-server/tools/vendorsExpediteTimeRemaining.js +64 -0
  41. package/mcp-server/tools/vendorsExpediteTimeRemaining.js.map +1 -0
  42. package/mcp-server/tools/vendorsListVendorInvoices.d.ts +8 -0
  43. package/mcp-server/tools/vendorsListVendorInvoices.d.ts.map +1 -0
  44. package/mcp-server/tools/vendorsListVendorInvoices.js +68 -0
  45. package/mcp-server/tools/vendorsListVendorInvoices.js.map +1 -0
  46. package/mcp-server/tools/vendorsListVendorJobTitles.js +1 -1
  47. package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -1
  48. package/models/components/expand.d.ts +3 -0
  49. package/models/components/expand.d.ts.map +1 -1
  50. package/models/components/expand.js +1 -0
  51. package/models/components/expand.js.map +1 -1
  52. package/models/components/index.d.ts +2 -0
  53. package/models/components/index.d.ts.map +1 -1
  54. package/models/components/index.js +2 -0
  55. package/models/components/index.js.map +1 -1
  56. package/models/components/invoice.d.ts +43 -0
  57. package/models/components/invoice.d.ts.map +1 -0
  58. package/models/components/invoice.js +91 -0
  59. package/models/components/invoice.js.map +1 -0
  60. package/models/components/invoiceitem.d.ts +40 -0
  61. package/models/components/invoiceitem.d.ts.map +1 -0
  62. package/models/components/invoiceitem.js +94 -0
  63. package/models/components/invoiceitem.js.map +1 -0
  64. package/models/operations/expeditetimeremaining.d.ts +60 -0
  65. package/models/operations/expeditetimeremaining.d.ts.map +1 -0
  66. package/models/operations/expeditetimeremaining.js +113 -0
  67. package/models/operations/expeditetimeremaining.js.map +1 -0
  68. package/models/operations/index.d.ts +2 -0
  69. package/models/operations/index.d.ts.map +1 -1
  70. package/models/operations/index.js +2 -0
  71. package/models/operations/index.js.map +1 -1
  72. package/models/operations/listorsearchfacilities.d.ts +25 -0
  73. package/models/operations/listorsearchfacilities.d.ts.map +1 -1
  74. package/models/operations/listorsearchfacilities.js +36 -1
  75. package/models/operations/listorsearchfacilities.js.map +1 -1
  76. package/models/operations/listorsearchsupportarticles.d.ts +25 -0
  77. package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
  78. package/models/operations/listorsearchsupportarticles.js +36 -1
  79. package/models/operations/listorsearchsupportarticles.js.map +1 -1
  80. package/models/operations/listvendorinvoices.d.ts +116 -0
  81. package/models/operations/listvendorinvoices.d.ts.map +1 -0
  82. package/models/operations/listvendorinvoices.js +155 -0
  83. package/models/operations/listvendorinvoices.js.map +1 -0
  84. package/models/operations/listvendorjobtitles.d.ts +25 -0
  85. package/models/operations/listvendorjobtitles.d.ts.map +1 -1
  86. package/models/operations/listvendorjobtitles.js +36 -1
  87. package/models/operations/listvendorjobtitles.js.map +1 -1
  88. package/package.json +1 -1
  89. package/react-query/index.d.ts +2 -0
  90. package/react-query/index.d.ts.map +1 -1
  91. package/react-query/index.js +2 -0
  92. package/react-query/index.js.map +1 -1
  93. package/react-query/organizationsListOrSearchFacilities.d.ts +54 -3
  94. package/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
  95. package/react-query/organizationsListOrSearchFacilities.js +89 -0
  96. package/react-query/organizationsListOrSearchFacilities.js.map +1 -1
  97. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +28 -3
  98. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
  99. package/react-query/supportArticlesListOrSearchSupportArticles.js +58 -0
  100. package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  101. package/react-query/vendorsExpediteTimeRemaining.d.ts +30 -0
  102. package/react-query/vendorsExpediteTimeRemaining.d.ts.map +1 -0
  103. package/react-query/vendorsExpediteTimeRemaining.js +96 -0
  104. package/react-query/vendorsExpediteTimeRemaining.js.map +1 -0
  105. package/react-query/vendorsListVendorInvoices.d.ts +96 -0
  106. package/react-query/vendorsListVendorInvoices.d.ts.map +1 -0
  107. package/react-query/vendorsListVendorInvoices.js +178 -0
  108. package/react-query/vendorsListVendorInvoices.js.map +1 -0
  109. package/react-query/vendorsListVendorJobTitles.d.ts +28 -3
  110. package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
  111. package/react-query/vendorsListVendorJobTitles.js +59 -0
  112. package/react-query/vendorsListVendorJobTitles.js.map +1 -1
  113. package/sdk/organizations.d.ts +4 -1
  114. package/sdk/organizations.d.ts.map +1 -1
  115. package/sdk/organizations.js +2 -1
  116. package/sdk/organizations.js.map +1 -1
  117. package/sdk/supportarticles.d.ts +4 -1
  118. package/sdk/supportarticles.d.ts.map +1 -1
  119. package/sdk/supportarticles.js +2 -1
  120. package/sdk/supportarticles.js.map +1 -1
  121. package/sdk/vendors.d.ts +24 -1
  122. package/sdk/vendors.d.ts.map +1 -1
  123. package/sdk/vendors.js +26 -1
  124. package/sdk/vendors.js.map +1 -1
  125. package/src/__tests__/supportarticles.test.ts +2 -1
  126. package/src/__tests__/vendors.test.ts +58 -1
  127. package/src/funcs/organizationsListOrSearchFacilities.ts +116 -42
  128. package/src/funcs/supportArticlesGetSupportArticle.ts +1 -1
  129. package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +100 -31
  130. package/src/funcs/vendorsExpediteTimeRemaining.ts +171 -0
  131. package/src/funcs/vendorsListVendorInvoices.ts +255 -0
  132. package/src/funcs/vendorsListVendorJobTitles.ts +101 -33
  133. package/src/lib/config.ts +2 -2
  134. package/src/mcp-server/mcp-server.ts +1 -1
  135. package/src/mcp-server/server.ts +5 -1
  136. package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
  137. package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
  138. package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +37 -0
  139. package/src/mcp-server/tools/vendorsListVendorInvoices.ts +41 -0
  140. package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +1 -1
  141. package/src/models/components/expand.ts +1 -0
  142. package/src/models/components/index.ts +2 -0
  143. package/src/models/components/invoice.ts +99 -0
  144. package/src/models/components/invoiceitem.ts +98 -0
  145. package/src/models/operations/expeditetimeremaining.ts +152 -0
  146. package/src/models/operations/index.ts +2 -0
  147. package/src/models/operations/listorsearchfacilities.ts +72 -0
  148. package/src/models/operations/listorsearchsupportarticles.ts +75 -0
  149. package/src/models/operations/listvendorinvoices.ts +252 -0
  150. package/src/models/operations/listvendorjobtitles.ts +68 -0
  151. package/src/react-query/index.ts +2 -0
  152. package/src/react-query/organizationsListOrSearchFacilities.ts +179 -1
  153. package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +149 -1
  154. package/src/react-query/vendorsExpediteTimeRemaining.ts +165 -0
  155. package/src/react-query/vendorsListVendorInvoices.ts +364 -0
  156. package/src/react-query/vendorsListVendorJobTitles.ts +149 -1
  157. package/src/sdk/organizations.ts +5 -2
  158. package/src/sdk/supportarticles.ts +8 -2
  159. package/src/sdk/vendors.ts +47 -2
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.16.0",
34175
+ sdkVersion: "0.17.0",
34176
34176
  genVersion: "2.541.0",
34177
- userAgent: "speakeasy-sdk/typescript 0.16.0 2.541.0 0.0.3 @greensecurity/javascript-sdk"
34177
+ userAgent: "speakeasy-sdk/typescript 0.17.0 2.541.0 0.0.3 @greensecurity/javascript-sdk"
34178
34178
  };
34179
34179
  });
34180
34180
 
@@ -35853,7 +35853,8 @@ var init_expand = __esm(() => {
35853
35853
  SupportArticleDescription: "support_article.description",
35854
35854
  SupportArticlePublished: "support_article.published",
35855
35855
  SupportArticleNotes: "support_article.notes",
35856
- SupportArticleSupportCategory: "support_article.support_category"
35856
+ SupportArticleSupportCategory: "support_article.support_category",
35857
+ InvoiceLineItems: "invoice.line_items"
35857
35858
  };
35858
35859
  Expand$inboundSchema = nativeEnumType(Expand);
35859
35860
  Expand$outboundSchema = Expand$inboundSchema;
@@ -36440,6 +36441,85 @@ var init_facility = __esm(() => {
36440
36441
  })(Facility$ ||= {});
36441
36442
  });
36442
36443
 
36444
+ // src/models/components/invoiceitem.ts
36445
+ var InvoiceItem$inboundSchema, InvoiceItem$outboundSchema, InvoiceItem$;
36446
+ var init_invoiceitem = __esm(() => {
36447
+ init_lib();
36448
+ init_primitives();
36449
+ InvoiceItem$inboundSchema = objectType({
36450
+ item_id: numberType().int().optional(),
36451
+ date_starts: nullableType(stringType()).optional(),
36452
+ date_ends: nullableType(stringType()).optional(),
36453
+ is_subscription: nullableType(booleanType()).optional(),
36454
+ product_title: nullableType(stringType()).optional()
36455
+ }).transform((v2) => {
36456
+ return remap(v2, {
36457
+ item_id: "itemId",
36458
+ date_starts: "dateStarts",
36459
+ date_ends: "dateEnds",
36460
+ is_subscription: "isSubscription",
36461
+ product_title: "productTitle"
36462
+ });
36463
+ });
36464
+ InvoiceItem$outboundSchema = objectType({
36465
+ itemId: numberType().int().optional(),
36466
+ dateStarts: nullableType(stringType()).optional(),
36467
+ dateEnds: nullableType(stringType()).optional(),
36468
+ isSubscription: nullableType(booleanType()).optional(),
36469
+ productTitle: nullableType(stringType()).optional()
36470
+ }).transform((v2) => {
36471
+ return remap(v2, {
36472
+ itemId: "item_id",
36473
+ dateStarts: "date_starts",
36474
+ dateEnds: "date_ends",
36475
+ isSubscription: "is_subscription",
36476
+ productTitle: "product_title"
36477
+ });
36478
+ });
36479
+ ((InvoiceItem$) => {
36480
+ InvoiceItem$.inboundSchema = InvoiceItem$inboundSchema;
36481
+ InvoiceItem$.outboundSchema = InvoiceItem$outboundSchema;
36482
+ })(InvoiceItem$ ||= {});
36483
+ });
36484
+
36485
+ // src/models/components/invoice.ts
36486
+ var Invoice$inboundSchema, Invoice$outboundSchema, Invoice$;
36487
+ var init_invoice = __esm(() => {
36488
+ init_lib();
36489
+ init_primitives();
36490
+ init_invoiceitem();
36491
+ Invoice$inboundSchema = objectType({
36492
+ id: numberType().int(),
36493
+ invoice_number: nullableType(stringType()).optional(),
36494
+ amount: nullableType(numberType().int()).optional(),
36495
+ status: nullableType(stringType()).optional(),
36496
+ financial_status: nullableType(stringType()).optional(),
36497
+ items: arrayType(InvoiceItem$inboundSchema).optional()
36498
+ }).transform((v2) => {
36499
+ return remap(v2, {
36500
+ invoice_number: "invoiceNumber",
36501
+ financial_status: "financialStatus"
36502
+ });
36503
+ });
36504
+ Invoice$outboundSchema = objectType({
36505
+ id: numberType().int(),
36506
+ invoiceNumber: nullableType(stringType()).optional(),
36507
+ amount: nullableType(numberType().int()).optional(),
36508
+ status: nullableType(stringType()).optional(),
36509
+ financialStatus: nullableType(stringType()).optional(),
36510
+ items: arrayType(InvoiceItem$outboundSchema).optional()
36511
+ }).transform((v2) => {
36512
+ return remap(v2, {
36513
+ invoiceNumber: "invoice_number",
36514
+ financialStatus: "financial_status"
36515
+ });
36516
+ });
36517
+ ((Invoice$) => {
36518
+ Invoice$.inboundSchema = Invoice$inboundSchema;
36519
+ Invoice$.outboundSchema = Invoice$outboundSchema;
36520
+ })(Invoice$ ||= {});
36521
+ });
36522
+
36443
36523
  // src/models/components/loginemailandpassword.ts
36444
36524
  var LoginEmailAndPassword$inboundSchema, LoginEmailAndPassword$outboundSchema, LoginEmailAndPassword$;
36445
36525
  var init_loginemailandpassword = __esm(() => {
@@ -36989,6 +37069,8 @@ var init_components = __esm(() => {
36989
37069
  init_facility();
36990
37070
  init_facilitysummary();
36991
37071
  init_imageset();
37072
+ init_invoice();
37073
+ init_invoiceitem();
36992
37074
  init_loginemailandpassword();
36993
37075
  init_loginrequirementsfromemail();
36994
37076
  init_mfarequiredresponse();
@@ -37106,6 +37188,49 @@ var init_createvendorregistration = __esm(() => {
37106
37188
  })(CreateVendorRegistrationCreateVendorRegistrationCreated$ ||= {});
37107
37189
  });
37108
37190
 
37191
+ // src/models/operations/expeditetimeremaining.ts
37192
+ var ExpediteTimeRemainingRequest$inboundSchema, ExpediteTimeRemainingRequest$outboundSchema, ExpediteTimeRemainingRequest$, ExpediteTimeRemainingResponseBody$inboundSchema, ExpediteTimeRemainingResponseBody$outboundSchema, ExpediteTimeRemainingResponseBody$;
37193
+ var init_expeditetimeremaining = __esm(() => {
37194
+ init_lib();
37195
+ init_primitives();
37196
+ ExpediteTimeRemainingRequest$inboundSchema = objectType({
37197
+ vendor_id_or_me: stringType()
37198
+ }).transform((v2) => {
37199
+ return remap(v2, {
37200
+ vendor_id_or_me: "vendorIdOrMe"
37201
+ });
37202
+ });
37203
+ ExpediteTimeRemainingRequest$outboundSchema = objectType({
37204
+ vendorIdOrMe: stringType()
37205
+ }).transform((v2) => {
37206
+ return remap(v2, {
37207
+ vendorIdOrMe: "vendor_id_or_me"
37208
+ });
37209
+ });
37210
+ ((ExpediteTimeRemainingRequest$) => {
37211
+ ExpediteTimeRemainingRequest$.inboundSchema = ExpediteTimeRemainingRequest$inboundSchema;
37212
+ ExpediteTimeRemainingRequest$.outboundSchema = ExpediteTimeRemainingRequest$outboundSchema;
37213
+ })(ExpediteTimeRemainingRequest$ ||= {});
37214
+ ExpediteTimeRemainingResponseBody$inboundSchema = objectType({
37215
+ seconds_remaining: numberType().int()
37216
+ }).transform((v2) => {
37217
+ return remap(v2, {
37218
+ seconds_remaining: "secondsRemaining"
37219
+ });
37220
+ });
37221
+ ExpediteTimeRemainingResponseBody$outboundSchema = objectType({
37222
+ secondsRemaining: numberType().int()
37223
+ }).transform((v2) => {
37224
+ return remap(v2, {
37225
+ secondsRemaining: "seconds_remaining"
37226
+ });
37227
+ });
37228
+ ((ExpediteTimeRemainingResponseBody$) => {
37229
+ ExpediteTimeRemainingResponseBody$.inboundSchema = ExpediteTimeRemainingResponseBody$inboundSchema;
37230
+ ExpediteTimeRemainingResponseBody$.outboundSchema = ExpediteTimeRemainingResponseBody$outboundSchema;
37231
+ })(ExpediteTimeRemainingResponseBody$ ||= {});
37232
+ });
37233
+
37109
37234
  // src/models/operations/getfacility.ts
37110
37235
  var GetFacilityRequest$inboundSchema, GetFacilityRequest$outboundSchema, GetFacilityRequest$;
37111
37236
  var init_getfacility = __esm(() => {
@@ -37158,7 +37283,7 @@ var init_getuserbyid = __esm(() => {
37158
37283
  });
37159
37284
 
37160
37285
  // src/models/operations/listorsearchfacilities.ts
37161
- var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$;
37286
+ var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$, ListOrSearchFacilitiesResponse$inboundSchema, ListOrSearchFacilitiesResponse$outboundSchema, ListOrSearchFacilitiesResponse$;
37162
37287
  var init_listorsearchfacilities = __esm(() => {
37163
37288
  init_lib();
37164
37289
  init_primitives();
@@ -37217,10 +37342,28 @@ var init_listorsearchfacilities = __esm(() => {
37217
37342
  ListOrSearchFacilitiesListOrSearchFacilitiesOk$.inboundSchema = ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema;
37218
37343
  ListOrSearchFacilitiesListOrSearchFacilitiesOk$.outboundSchema = ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema;
37219
37344
  })(ListOrSearchFacilitiesListOrSearchFacilitiesOk$ ||= {});
37345
+ ListOrSearchFacilitiesResponse$inboundSchema = objectType({
37346
+ Result: lazyType(() => ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema)
37347
+ }).transform((v2) => {
37348
+ return remap(v2, {
37349
+ Result: "result"
37350
+ });
37351
+ });
37352
+ ListOrSearchFacilitiesResponse$outboundSchema = objectType({
37353
+ result: lazyType(() => ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema)
37354
+ }).transform((v2) => {
37355
+ return remap(v2, {
37356
+ result: "Result"
37357
+ });
37358
+ });
37359
+ ((ListOrSearchFacilitiesResponse$) => {
37360
+ ListOrSearchFacilitiesResponse$.inboundSchema = ListOrSearchFacilitiesResponse$inboundSchema;
37361
+ ListOrSearchFacilitiesResponse$.outboundSchema = ListOrSearchFacilitiesResponse$outboundSchema;
37362
+ })(ListOrSearchFacilitiesResponse$ ||= {});
37220
37363
  });
37221
37364
 
37222
37365
  // src/models/operations/listorsearchsupportarticles.ts
37223
- var ListOrSearchSupportArticlesRequest$inboundSchema, ListOrSearchSupportArticlesRequest$outboundSchema, ListOrSearchSupportArticlesRequest$, ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$;
37366
+ var ListOrSearchSupportArticlesRequest$inboundSchema, ListOrSearchSupportArticlesRequest$outboundSchema, ListOrSearchSupportArticlesRequest$, ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$, ListOrSearchSupportArticlesResponse$inboundSchema, ListOrSearchSupportArticlesResponse$outboundSchema, ListOrSearchSupportArticlesResponse$;
37224
37367
  var init_listorsearchsupportarticles = __esm(() => {
37225
37368
  init_lib();
37226
37369
  init_primitives();
@@ -37261,6 +37404,24 @@ var init_listorsearchsupportarticles = __esm(() => {
37261
37404
  ListOrSearchSupportArticlesListOrSearchArticlesOk$.inboundSchema = ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema;
37262
37405
  ListOrSearchSupportArticlesListOrSearchArticlesOk$.outboundSchema = ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema;
37263
37406
  })(ListOrSearchSupportArticlesListOrSearchArticlesOk$ ||= {});
37407
+ ListOrSearchSupportArticlesResponse$inboundSchema = objectType({
37408
+ Result: lazyType(() => ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema)
37409
+ }).transform((v2) => {
37410
+ return remap(v2, {
37411
+ Result: "result"
37412
+ });
37413
+ });
37414
+ ListOrSearchSupportArticlesResponse$outboundSchema = objectType({
37415
+ result: lazyType(() => ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema)
37416
+ }).transform((v2) => {
37417
+ return remap(v2, {
37418
+ result: "Result"
37419
+ });
37420
+ });
37421
+ ((ListOrSearchSupportArticlesResponse$) => {
37422
+ ListOrSearchSupportArticlesResponse$.inboundSchema = ListOrSearchSupportArticlesResponse$inboundSchema;
37423
+ ListOrSearchSupportArticlesResponse$.outboundSchema = ListOrSearchSupportArticlesResponse$outboundSchema;
37424
+ })(ListOrSearchSupportArticlesResponse$ ||= {});
37264
37425
  });
37265
37426
 
37266
37427
  // src/models/operations/listvendorcredentials.ts
@@ -37345,8 +37506,76 @@ var init_listvendorcredentials = __esm(() => {
37345
37506
  })(ListVendorCredentialsResponseBody$ ||= {});
37346
37507
  });
37347
37508
 
37509
+ // src/models/operations/listvendorinvoices.ts
37510
+ var ListVendorInvoicesRequest$inboundSchema, ListVendorInvoicesRequest$outboundSchema, ListVendorInvoicesRequest$, ListVendorInvoicesResponseBody$inboundSchema, ListVendorInvoicesResponseBody$outboundSchema, ListVendorInvoicesResponseBody$, ListVendorInvoicesResponse$inboundSchema, ListVendorInvoicesResponse$outboundSchema, ListVendorInvoicesResponse$;
37511
+ var init_listvendorinvoices = __esm(() => {
37512
+ init_lib();
37513
+ init_primitives();
37514
+ init_components();
37515
+ ListVendorInvoicesRequest$inboundSchema = objectType({
37516
+ sort: nullableType(stringType()).optional(),
37517
+ desc: Desc$inboundSchema.optional(),
37518
+ page: numberType().int().optional(),
37519
+ items_per_page: numberType().int().optional(),
37520
+ expand: arrayType(Expand$inboundSchema).optional(),
37521
+ vendor_id_or_me: stringType()
37522
+ }).transform((v2) => {
37523
+ return remap(v2, {
37524
+ items_per_page: "itemsPerPage",
37525
+ vendor_id_or_me: "vendorIdOrMe"
37526
+ });
37527
+ });
37528
+ ListVendorInvoicesRequest$outboundSchema = objectType({
37529
+ sort: nullableType(stringType()).optional(),
37530
+ desc: Desc$outboundSchema.optional(),
37531
+ page: numberType().int().optional(),
37532
+ itemsPerPage: numberType().int().optional(),
37533
+ expand: arrayType(Expand$outboundSchema).optional(),
37534
+ vendorIdOrMe: stringType()
37535
+ }).transform((v2) => {
37536
+ return remap(v2, {
37537
+ itemsPerPage: "items_per_page",
37538
+ vendorIdOrMe: "vendor_id_or_me"
37539
+ });
37540
+ });
37541
+ ((ListVendorInvoicesRequest$) => {
37542
+ ListVendorInvoicesRequest$.inboundSchema = ListVendorInvoicesRequest$inboundSchema;
37543
+ ListVendorInvoicesRequest$.outboundSchema = ListVendorInvoicesRequest$outboundSchema;
37544
+ })(ListVendorInvoicesRequest$ ||= {});
37545
+ ListVendorInvoicesResponseBody$inboundSchema = objectType({
37546
+ items: arrayType(Invoice$inboundSchema),
37547
+ pager: Pager$inboundSchema
37548
+ });
37549
+ ListVendorInvoicesResponseBody$outboundSchema = objectType({
37550
+ items: arrayType(Invoice$outboundSchema),
37551
+ pager: Pager$outboundSchema
37552
+ });
37553
+ ((ListVendorInvoicesResponseBody$) => {
37554
+ ListVendorInvoicesResponseBody$.inboundSchema = ListVendorInvoicesResponseBody$inboundSchema;
37555
+ ListVendorInvoicesResponseBody$.outboundSchema = ListVendorInvoicesResponseBody$outboundSchema;
37556
+ })(ListVendorInvoicesResponseBody$ ||= {});
37557
+ ListVendorInvoicesResponse$inboundSchema = objectType({
37558
+ Result: lazyType(() => ListVendorInvoicesResponseBody$inboundSchema)
37559
+ }).transform((v2) => {
37560
+ return remap(v2, {
37561
+ Result: "result"
37562
+ });
37563
+ });
37564
+ ListVendorInvoicesResponse$outboundSchema = objectType({
37565
+ result: lazyType(() => ListVendorInvoicesResponseBody$outboundSchema)
37566
+ }).transform((v2) => {
37567
+ return remap(v2, {
37568
+ result: "Result"
37569
+ });
37570
+ });
37571
+ ((ListVendorInvoicesResponse$) => {
37572
+ ListVendorInvoicesResponse$.inboundSchema = ListVendorInvoicesResponse$inboundSchema;
37573
+ ListVendorInvoicesResponse$.outboundSchema = ListVendorInvoicesResponse$outboundSchema;
37574
+ })(ListVendorInvoicesResponse$ ||= {});
37575
+ });
37576
+
37348
37577
  // src/models/operations/listvendorjobtitles.ts
37349
- var ListVendorJobTitlesRequest$inboundSchema, ListVendorJobTitlesRequest$outboundSchema, ListVendorJobTitlesRequest$, ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$;
37578
+ var ListVendorJobTitlesRequest$inboundSchema, ListVendorJobTitlesRequest$outboundSchema, ListVendorJobTitlesRequest$, ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$, ListVendorJobTitlesResponse$inboundSchema, ListVendorJobTitlesResponse$outboundSchema, ListVendorJobTitlesResponse$;
37350
37579
  var init_listvendorjobtitles = __esm(() => {
37351
37580
  init_lib();
37352
37581
  init_primitives();
@@ -37391,6 +37620,24 @@ var init_listvendorjobtitles = __esm(() => {
37391
37620
  ListVendorJobTitlesListVendorJobTitlesOk$.inboundSchema = ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema;
37392
37621
  ListVendorJobTitlesListVendorJobTitlesOk$.outboundSchema = ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema;
37393
37622
  })(ListVendorJobTitlesListVendorJobTitlesOk$ ||= {});
37623
+ ListVendorJobTitlesResponse$inboundSchema = objectType({
37624
+ Result: lazyType(() => ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema)
37625
+ }).transform((v2) => {
37626
+ return remap(v2, {
37627
+ Result: "result"
37628
+ });
37629
+ });
37630
+ ListVendorJobTitlesResponse$outboundSchema = objectType({
37631
+ result: lazyType(() => ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema)
37632
+ }).transform((v2) => {
37633
+ return remap(v2, {
37634
+ result: "Result"
37635
+ });
37636
+ });
37637
+ ((ListVendorJobTitlesResponse$) => {
37638
+ ListVendorJobTitlesResponse$.inboundSchema = ListVendorJobTitlesResponse$inboundSchema;
37639
+ ListVendorJobTitlesResponse$.outboundSchema = ListVendorJobTitlesResponse$outboundSchema;
37640
+ })(ListVendorJobTitlesResponse$ ||= {});
37394
37641
  });
37395
37642
 
37396
37643
  // src/models/operations/logsuserintothesystem.ts
@@ -37562,12 +37809,14 @@ var init_passwordresetrequest = __esm(() => {
37562
37809
  // src/models/operations/index.ts
37563
37810
  var init_operations = __esm(() => {
37564
37811
  init_createvendorregistration();
37812
+ init_expeditetimeremaining();
37565
37813
  init_getfacility();
37566
37814
  init_getsupportarticle();
37567
37815
  init_getuserbyid();
37568
37816
  init_listorsearchfacilities();
37569
37817
  init_listorsearchsupportarticles();
37570
37818
  init_listvendorcredentials();
37819
+ init_listvendorinvoices();
37571
37820
  init_listvendorjobtitles();
37572
37821
  init_logsuserintothesystem();
37573
37822
  init_magiclink();
@@ -37707,6 +37956,38 @@ Retrieve an individual facility.`,
37707
37956
  };
37708
37957
  });
37709
37958
 
37959
+ // src/types/operations.ts
37960
+ function createPageIterator(page, halt) {
37961
+ return {
37962
+ [Symbol.asyncIterator]: async function* paginator() {
37963
+ yield page;
37964
+ if (halt(page)) {
37965
+ return;
37966
+ }
37967
+ let p = page;
37968
+ for (p = await p.next();p != null; p = await p.next()) {
37969
+ yield p;
37970
+ if (halt(p)) {
37971
+ return;
37972
+ }
37973
+ }
37974
+ }
37975
+ };
37976
+ }
37977
+ function haltIterator(v2) {
37978
+ return {
37979
+ ...v2,
37980
+ next: () => null,
37981
+ [Symbol.asyncIterator]: async function* paginator() {
37982
+ yield v2;
37983
+ }
37984
+ };
37985
+ }
37986
+ var URL_OVERRIDE;
37987
+ var init_operations2 = __esm(() => {
37988
+ URL_OVERRIDE = Symbol("URL_OVERRIDE");
37989
+ });
37990
+
37710
37991
  // src/funcs/organizationsListOrSearchFacilities.ts
37711
37992
  function organizationsListOrSearchFacilities(client, request, options) {
37712
37993
  return new APIPromise($do2(client, request, options));
@@ -37714,22 +37995,23 @@ function organizationsListOrSearchFacilities(client, request, options) {
37714
37995
  async function $do2(client, request, options) {
37715
37996
  const parsed = safeParse(request, (value) => ListOrSearchFacilitiesRequest$outboundSchema.parse(value), "Input validation failed");
37716
37997
  if (!parsed.ok) {
37717
- return [parsed, { status: "invalid" }];
37998
+ return [haltIterator(parsed), { status: "invalid" }];
37718
37999
  }
37719
38000
  const payload = parsed.value;
37720
38001
  const body = null;
37721
38002
  const path = pathToFunc("/facilities")();
37722
- const query = encodeFormQuery({
38003
+ const query = queryJoin(encodeFormQuery({
38004
+ expand: payload.expand
38005
+ }, { explode: false }), encodeFormQuery({
37723
38006
  active_status: payload.active_status,
37724
38007
  desc: payload.desc,
37725
- expand: payload.expand,
37726
38008
  items_per_page: payload.items_per_page,
37727
38009
  name_like: payload.name_like,
37728
38010
  page: payload.page,
37729
38011
  sort: payload.sort,
37730
38012
  state_like: payload.state_like,
37731
38013
  system_id: payload.system_id
37732
- });
38014
+ }));
37733
38015
  const headers = new Headers(compactMap({
37734
38016
  Accept: "application/json"
37735
38017
  }));
@@ -37755,7 +38037,7 @@ async function $do2(client, request, options) {
37755
38037
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37756
38038
  }, options);
37757
38039
  if (!requestRes.ok) {
37758
- return [requestRes, { status: "invalid" }];
38040
+ return [haltIterator(requestRes), { status: "invalid" }];
37759
38041
  }
37760
38042
  const req = requestRes.value;
37761
38043
  const doResult = await client._do(req, {
@@ -37765,14 +38047,48 @@ async function $do2(client, request, options) {
37765
38047
  retryCodes: context.retryCodes
37766
38048
  });
37767
38049
  if (!doResult.ok) {
37768
- return [doResult, { status: "request-error", request: req }];
38050
+ return [haltIterator(doResult), { status: "request-error", request: req }];
37769
38051
  }
37770
38052
  const response = doResult.value;
37771
- const [result] = await match(json(200, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema), fail("4XX"), fail("5XX"))(response);
38053
+ const responseFields = {
38054
+ HttpMeta: { Response: response, Request: req }
38055
+ };
38056
+ const [result, raw] = await match(json(200, ListOrSearchFacilitiesResponse$inboundSchema, {
38057
+ key: "Result"
38058
+ }), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
37772
38059
  if (!result.ok) {
37773
- return [result, { status: "complete", request: req, response }];
37774
- }
37775
- return [result, { status: "complete", request: req, response }];
38060
+ return [haltIterator(result), {
38061
+ status: "complete",
38062
+ request: req,
38063
+ response
38064
+ }];
38065
+ }
38066
+ const nextFunc = (responseData) => {
38067
+ const page2 = request?.page ?? 1;
38068
+ const nextPage = page2 + 1;
38069
+ if (!responseData) {
38070
+ return { next: () => null };
38071
+ }
38072
+ const results = dlv(responseData, "items");
38073
+ if (!Array.isArray(results) || !results.length) {
38074
+ return { next: () => null };
38075
+ }
38076
+ const limit = request?.itemsPerPage ?? 0;
38077
+ if (results.length < limit) {
38078
+ return { next: () => null };
38079
+ }
38080
+ const nextVal = () => organizationsListOrSearchFacilities(client, {
38081
+ ...request,
38082
+ page: nextPage
38083
+ }, options);
38084
+ return { next: nextVal, "~next": { page: nextPage } };
38085
+ };
38086
+ const page = { ...result, ...nextFunc(raw) };
38087
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
38088
+ status: "complete",
38089
+ request: req,
38090
+ response
38091
+ }];
37776
38092
  }
37777
38093
  var init_organizationsListOrSearchFacilities = __esm(() => {
37778
38094
  init_encodings();
@@ -37783,6 +38099,7 @@ var init_organizationsListOrSearchFacilities = __esm(() => {
37783
38099
  init_url();
37784
38100
  init_operations();
37785
38101
  init_async();
38102
+ init_operations2();
37786
38103
  });
37787
38104
 
37788
38105
  // src/mcp-server/tools/organizationsListOrSearchFacilities.ts
@@ -37821,7 +38138,7 @@ Available \`expand\` scopes are:
37821
38138
  isError: true
37822
38139
  };
37823
38140
  }
37824
- const value = result.value;
38141
+ const value = result.value.result;
37825
38142
  return formatResult(value, apiCall);
37826
38143
  }
37827
38144
  };
@@ -37847,7 +38164,7 @@ async function $do3(client, request, options) {
37847
38164
  const path = pathToFunc("/support_articles/{id}")(pathParams);
37848
38165
  const query = encodeFormQuery({
37849
38166
  expand: payload.expand
37850
- });
38167
+ }, { explode: false });
37851
38168
  const headers = new Headers(compactMap({
37852
38169
  Accept: "application/json"
37853
38170
  }));
@@ -37951,7 +38268,7 @@ function supportArticlesListOrSearchSupportArticles(client, request, options) {
37951
38268
  async function $do4(client, request, options) {
37952
38269
  const parsed = safeParse(request, (value) => ListOrSearchSupportArticlesRequest$outboundSchema.parse(value), "Input validation failed");
37953
38270
  if (!parsed.ok) {
37954
- return [parsed, { status: "invalid" }];
38271
+ return [haltIterator(parsed), { status: "invalid" }];
37955
38272
  }
37956
38273
  const payload = parsed.value;
37957
38274
  const body = null;
@@ -37987,7 +38304,7 @@ async function $do4(client, request, options) {
37987
38304
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37988
38305
  }, options);
37989
38306
  if (!requestRes.ok) {
37990
- return [requestRes, { status: "invalid" }];
38307
+ return [haltIterator(requestRes), { status: "invalid" }];
37991
38308
  }
37992
38309
  const req = requestRes.value;
37993
38310
  const doResult = await client._do(req, {
@@ -37997,14 +38314,48 @@ async function $do4(client, request, options) {
37997
38314
  retryCodes: context.retryCodes
37998
38315
  });
37999
38316
  if (!doResult.ok) {
38000
- return [doResult, { status: "request-error", request: req }];
38317
+ return [haltIterator(doResult), { status: "request-error", request: req }];
38001
38318
  }
38002
38319
  const response = doResult.value;
38003
- const [result] = await match(json(200, ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema), fail("4XX"), fail("5XX"))(response);
38320
+ const responseFields = {
38321
+ HttpMeta: { Response: response, Request: req }
38322
+ };
38323
+ const [result, raw] = await match(json(200, ListOrSearchSupportArticlesResponse$inboundSchema, {
38324
+ key: "Result"
38325
+ }), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
38004
38326
  if (!result.ok) {
38005
- return [result, { status: "complete", request: req, response }];
38006
- }
38007
- return [result, { status: "complete", request: req, response }];
38327
+ return [haltIterator(result), {
38328
+ status: "complete",
38329
+ request: req,
38330
+ response
38331
+ }];
38332
+ }
38333
+ const nextFunc = (responseData) => {
38334
+ const page2 = request?.page ?? 1;
38335
+ const nextPage = page2 + 1;
38336
+ if (!responseData) {
38337
+ return { next: () => null };
38338
+ }
38339
+ const results = dlv(responseData, "items");
38340
+ if (!Array.isArray(results) || !results.length) {
38341
+ return { next: () => null };
38342
+ }
38343
+ const limit = request?.itemsPerPage ?? 0;
38344
+ if (results.length < limit) {
38345
+ return { next: () => null };
38346
+ }
38347
+ const nextVal = () => supportArticlesListOrSearchSupportArticles(client, {
38348
+ ...request,
38349
+ page: nextPage
38350
+ }, options);
38351
+ return { next: nextVal, "~next": { page: nextPage } };
38352
+ };
38353
+ const page = { ...result, ...nextFunc(raw) };
38354
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
38355
+ status: "complete",
38356
+ request: req,
38357
+ response
38358
+ }];
38008
38359
  }
38009
38360
  var init_supportArticlesListOrSearchSupportArticles = __esm(() => {
38010
38361
  init_encodings();
@@ -38015,6 +38366,7 @@ var init_supportArticlesListOrSearchSupportArticles = __esm(() => {
38015
38366
  init_url();
38016
38367
  init_operations();
38017
38368
  init_async();
38369
+ init_operations2();
38018
38370
  });
38019
38371
 
38020
38372
  // src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts
@@ -38040,7 +38392,7 @@ List or search support articles for FAQ.`,
38040
38392
  isError: true
38041
38393
  };
38042
38394
  }
38043
- const value = result.value;
38395
+ const value = result.value.result;
38044
38396
  return formatResult(value, apiCall);
38045
38397
  }
38046
38398
  };
@@ -38760,11 +39112,116 @@ Create an initial vendor registration. Once successful, the vendor will be able
38760
39112
  };
38761
39113
  });
38762
39114
 
38763
- // src/funcs/vendorsListVendorCredentials.ts
38764
- function vendorsListVendorCredentials(client, request, options) {
39115
+ // src/funcs/vendorsExpediteTimeRemaining.ts
39116
+ function vendorsExpediteTimeRemaining(client, request, options) {
38765
39117
  return new APIPromise($do12(client, request, options));
38766
39118
  }
38767
39119
  async function $do12(client, request, options) {
39120
+ const parsed = safeParse(request, (value) => ExpediteTimeRemainingRequest$outboundSchema.parse(value), "Input validation failed");
39121
+ if (!parsed.ok) {
39122
+ return [parsed, { status: "invalid" }];
39123
+ }
39124
+ const payload = parsed.value;
39125
+ const body = null;
39126
+ const pathParams = {
39127
+ vendor_id_or_me: encodeSimple("vendor_id_or_me", payload.vendor_id_or_me, {
39128
+ explode: false,
39129
+ charEncoding: "percent"
39130
+ })
39131
+ };
39132
+ const path = pathToFunc("/vendors/{vendor_id_or_me}/expedite-time-remaining")(pathParams);
39133
+ const headers = new Headers(compactMap({
39134
+ Accept: "application/json"
39135
+ }));
39136
+ const securityInput = await extractSecurity(client._options.security);
39137
+ const requestSecurity = resolveGlobalSecurity(securityInput);
39138
+ const context = {
39139
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
39140
+ operationID: "expediteTimeRemaining",
39141
+ oAuth2Scopes: [],
39142
+ resolvedSecurity: requestSecurity,
39143
+ securitySource: client._options.security,
39144
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
39145
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
39146
+ };
39147
+ const requestRes = client._createRequest(context, {
39148
+ security: requestSecurity,
39149
+ method: "GET",
39150
+ baseURL: options?.serverURL,
39151
+ path,
39152
+ headers,
39153
+ body,
39154
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
39155
+ }, options);
39156
+ if (!requestRes.ok) {
39157
+ return [requestRes, { status: "invalid" }];
39158
+ }
39159
+ const req = requestRes.value;
39160
+ const doResult = await client._do(req, {
39161
+ context,
39162
+ errorCodes: ["400", "401", "4XX", "5XX"],
39163
+ retryConfig: context.retryConfig,
39164
+ retryCodes: context.retryCodes
39165
+ });
39166
+ if (!doResult.ok) {
39167
+ return [doResult, { status: "request-error", request: req }];
39168
+ }
39169
+ const response = doResult.value;
39170
+ const responseFields = {
39171
+ HttpMeta: { Response: response, Request: req }
39172
+ };
39173
+ const [result] = await match(json(200, ExpediteTimeRemainingResponseBody$inboundSchema), jsonErr([400, 401], ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39174
+ if (!result.ok) {
39175
+ return [result, { status: "complete", request: req, response }];
39176
+ }
39177
+ return [result, { status: "complete", request: req, response }];
39178
+ }
39179
+ var init_vendorsExpediteTimeRemaining = __esm(() => {
39180
+ init_encodings();
39181
+ init_matchers();
39182
+ init_primitives();
39183
+ init_schemas();
39184
+ init_security();
39185
+ init_url();
39186
+ init_errors();
39187
+ init_operations();
39188
+ init_async();
39189
+ });
39190
+
39191
+ // src/mcp-server/tools/vendorsExpediteTimeRemaining.ts
39192
+ var args11, tool$vendorsExpediteTimeRemaining;
39193
+ var init_vendorsExpediteTimeRemaining2 = __esm(() => {
39194
+ init_vendorsExpediteTimeRemaining();
39195
+ init_operations();
39196
+ init_tools();
39197
+ args11 = {
39198
+ request: ExpediteTimeRemainingRequest$inboundSchema
39199
+ };
39200
+ tool$vendorsExpediteTimeRemaining = {
39201
+ name: "vendors_expedite-time-remaining",
39202
+ description: `Expedite time remaining
39203
+
39204
+ For vendors who have a paid 24-hour expedite credentials invoice, get the remaining time (in seconds) for which submitted credentials will be expedited.`,
39205
+ args: args11,
39206
+ tool: async (client, args12, ctx) => {
39207
+ const [result, apiCall] = await vendorsExpediteTimeRemaining(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39208
+ if (!result.ok) {
39209
+ return {
39210
+ content: [{ type: "text", text: result.error.message }],
39211
+ isError: true
39212
+ };
39213
+ }
39214
+ const value = result.value;
39215
+ return formatResult(value, apiCall);
39216
+ }
39217
+ };
39218
+ });
39219
+
39220
+ // src/funcs/vendorsListVendorCredentials.ts
39221
+ function vendorsListVendorCredentials(client, request, options) {
39222
+ return new APIPromise($do13(client, request, options));
39223
+ }
39224
+ async function $do13(client, request, options) {
38768
39225
  const parsed = safeParse(request, (value) => ListVendorCredentialsRequest$outboundSchema.parse(value), "Input validation failed");
38769
39226
  if (!parsed.ok) {
38770
39227
  return [parsed, { status: "invalid" }];
@@ -38841,12 +39298,12 @@ var init_vendorsListVendorCredentials = __esm(() => {
38841
39298
  });
38842
39299
 
38843
39300
  // src/mcp-server/tools/vendorsListVendorCredentials.ts
38844
- var args11, tool$vendorsListVendorCredentials;
39301
+ var args12, tool$vendorsListVendorCredentials;
38845
39302
  var init_vendorsListVendorCredentials2 = __esm(() => {
38846
39303
  init_vendorsListVendorCredentials();
38847
39304
  init_operations();
38848
39305
  init_tools();
38849
- args11 = {
39306
+ args12 = {
38850
39307
  request: ListVendorCredentialsRequest$inboundSchema
38851
39308
  };
38852
39309
  tool$vendorsListVendorCredentials = {
@@ -38854,9 +39311,9 @@ var init_vendorsListVendorCredentials2 = __esm(() => {
38854
39311
  description: `List Vendor Credentials
38855
39312
 
38856
39313
  Lists vendor credentials, required credentials, and company credentials. Utilized in Vendor Dashboard.`,
38857
- args: args11,
38858
- tool: async (client, args12, ctx) => {
38859
- const [result, apiCall] = await vendorsListVendorCredentials(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39314
+ args: args12,
39315
+ tool: async (client, args13, ctx) => {
39316
+ const [result, apiCall] = await vendorsListVendorCredentials(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38860
39317
  if (!result.ok) {
38861
39318
  return {
38862
39319
  content: [{ type: "text", text: result.error.message }],
@@ -38869,14 +39326,164 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
38869
39326
  };
38870
39327
  });
38871
39328
 
39329
+ // src/funcs/vendorsListVendorInvoices.ts
39330
+ function vendorsListVendorInvoices(client, request, options) {
39331
+ return new APIPromise($do14(client, request, options));
39332
+ }
39333
+ async function $do14(client, request, options) {
39334
+ const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
39335
+ if (!parsed.ok) {
39336
+ return [haltIterator(parsed), { status: "invalid" }];
39337
+ }
39338
+ const payload = parsed.value;
39339
+ const body = null;
39340
+ const pathParams = {
39341
+ vendor_id_or_me: encodeSimple("vendor_id_or_me", payload.vendor_id_or_me, {
39342
+ explode: false,
39343
+ charEncoding: "percent"
39344
+ })
39345
+ };
39346
+ const path = pathToFunc("/vendors/{vendor_id_or_me}/invoices")(pathParams);
39347
+ const query = queryJoin(encodeFormQuery({
39348
+ expand: payload.expand
39349
+ }, { explode: false }), encodeFormQuery({
39350
+ desc: payload.desc,
39351
+ items_per_page: payload.items_per_page,
39352
+ page: payload.page,
39353
+ sort: payload.sort
39354
+ }));
39355
+ const headers = new Headers(compactMap({
39356
+ Accept: "application/json"
39357
+ }));
39358
+ const securityInput = await extractSecurity(client._options.security);
39359
+ const requestSecurity = resolveGlobalSecurity(securityInput);
39360
+ const context = {
39361
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
39362
+ operationID: "listVendorInvoices",
39363
+ oAuth2Scopes: [],
39364
+ resolvedSecurity: requestSecurity,
39365
+ securitySource: client._options.security,
39366
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
39367
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
39368
+ };
39369
+ const requestRes = client._createRequest(context, {
39370
+ security: requestSecurity,
39371
+ method: "GET",
39372
+ baseURL: options?.serverURL,
39373
+ path,
39374
+ headers,
39375
+ query,
39376
+ body,
39377
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
39378
+ }, options);
39379
+ if (!requestRes.ok) {
39380
+ return [haltIterator(requestRes), { status: "invalid" }];
39381
+ }
39382
+ const req = requestRes.value;
39383
+ const doResult = await client._do(req, {
39384
+ context,
39385
+ errorCodes: ["400", "401", "4XX", "5XX"],
39386
+ retryConfig: context.retryConfig,
39387
+ retryCodes: context.retryCodes
39388
+ });
39389
+ if (!doResult.ok) {
39390
+ return [haltIterator(doResult), { status: "request-error", request: req }];
39391
+ }
39392
+ const response = doResult.value;
39393
+ const responseFields = {
39394
+ HttpMeta: { Response: response, Request: req }
39395
+ };
39396
+ const [result, raw] = await match(json(200, ListVendorInvoicesResponse$inboundSchema, {
39397
+ key: "Result"
39398
+ }), jsonErr([400, 401], ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39399
+ if (!result.ok) {
39400
+ return [haltIterator(result), {
39401
+ status: "complete",
39402
+ request: req,
39403
+ response
39404
+ }];
39405
+ }
39406
+ const nextFunc = (responseData) => {
39407
+ const page2 = request?.page ?? 1;
39408
+ const nextPage = page2 + 1;
39409
+ if (!responseData) {
39410
+ return { next: () => null };
39411
+ }
39412
+ const results = dlv(responseData, "items");
39413
+ if (!Array.isArray(results) || !results.length) {
39414
+ return { next: () => null };
39415
+ }
39416
+ const limit = request?.itemsPerPage ?? 0;
39417
+ if (results.length < limit) {
39418
+ return { next: () => null };
39419
+ }
39420
+ const nextVal = () => vendorsListVendorInvoices(client, {
39421
+ ...request,
39422
+ page: nextPage
39423
+ }, options);
39424
+ return { next: nextVal, "~next": { page: nextPage } };
39425
+ };
39426
+ const page = { ...result, ...nextFunc(raw) };
39427
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
39428
+ status: "complete",
39429
+ request: req,
39430
+ response
39431
+ }];
39432
+ }
39433
+ var init_vendorsListVendorInvoices = __esm(() => {
39434
+ init_encodings();
39435
+ init_matchers();
39436
+ init_primitives();
39437
+ init_schemas();
39438
+ init_security();
39439
+ init_url();
39440
+ init_errors();
39441
+ init_operations();
39442
+ init_async();
39443
+ init_operations2();
39444
+ });
39445
+
39446
+ // src/mcp-server/tools/vendorsListVendorInvoices.ts
39447
+ var args13, tool$vendorsListVendorInvoices;
39448
+ var init_vendorsListVendorInvoices2 = __esm(() => {
39449
+ init_vendorsListVendorInvoices();
39450
+ init_operations();
39451
+ init_tools();
39452
+ args13 = {
39453
+ request: ListVendorInvoicesRequest$inboundSchema
39454
+ };
39455
+ tool$vendorsListVendorInvoices = {
39456
+ name: "vendors_list-vendor-invoices",
39457
+ description: `List vendor invoices
39458
+
39459
+ List invoices for Vendors
39460
+
39461
+ Available \`expand\` scopes are:
39462
+
39463
+ invoice.line_items`,
39464
+ args: args13,
39465
+ tool: async (client, args14, ctx) => {
39466
+ const [result, apiCall] = await vendorsListVendorInvoices(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39467
+ if (!result.ok) {
39468
+ return {
39469
+ content: [{ type: "text", text: result.error.message }],
39470
+ isError: true
39471
+ };
39472
+ }
39473
+ const value = result.value.result;
39474
+ return formatResult(value, apiCall);
39475
+ }
39476
+ };
39477
+ });
39478
+
38872
39479
  // src/funcs/vendorsListVendorJobTitles.ts
38873
39480
  function vendorsListVendorJobTitles(client, request, options) {
38874
- return new APIPromise($do13(client, request, options));
39481
+ return new APIPromise($do15(client, request, options));
38875
39482
  }
38876
- async function $do13(client, request, options) {
39483
+ async function $do15(client, request, options) {
38877
39484
  const parsed = safeParse(request, (value) => ListVendorJobTitlesRequest$outboundSchema.parse(value), "Input validation failed");
38878
39485
  if (!parsed.ok) {
38879
- return [parsed, { status: "invalid" }];
39486
+ return [haltIterator(parsed), { status: "invalid" }];
38880
39487
  }
38881
39488
  const payload = parsed.value;
38882
39489
  const body = null;
@@ -38910,7 +39517,7 @@ async function $do13(client, request, options) {
38910
39517
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
38911
39518
  }, options);
38912
39519
  if (!requestRes.ok) {
38913
- return [requestRes, { status: "invalid" }];
39520
+ return [haltIterator(requestRes), { status: "invalid" }];
38914
39521
  }
38915
39522
  const req = requestRes.value;
38916
39523
  const doResult = await client._do(req, {
@@ -38920,17 +39527,48 @@ async function $do13(client, request, options) {
38920
39527
  retryCodes: context.retryCodes
38921
39528
  });
38922
39529
  if (!doResult.ok) {
38923
- return [doResult, { status: "request-error", request: req }];
39530
+ return [haltIterator(doResult), { status: "request-error", request: req }];
38924
39531
  }
38925
39532
  const response = doResult.value;
38926
39533
  const responseFields = {
38927
39534
  HttpMeta: { Response: response, Request: req }
38928
39535
  };
38929
- const [result] = await match(json(200, ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema), jsonErr(403, ApiErrorResponse$inboundSchema), jsonErr(500, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39536
+ const [result, raw] = await match(json(200, ListVendorJobTitlesResponse$inboundSchema, {
39537
+ key: "Result"
39538
+ }), jsonErr(403, ApiErrorResponse$inboundSchema), jsonErr(500, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
38930
39539
  if (!result.ok) {
38931
- return [result, { status: "complete", request: req, response }];
38932
- }
38933
- return [result, { status: "complete", request: req, response }];
39540
+ return [haltIterator(result), {
39541
+ status: "complete",
39542
+ request: req,
39543
+ response
39544
+ }];
39545
+ }
39546
+ const nextFunc = (responseData) => {
39547
+ const page2 = request?.page ?? 1;
39548
+ const nextPage = page2 + 1;
39549
+ if (!responseData) {
39550
+ return { next: () => null };
39551
+ }
39552
+ const results = dlv(responseData, "items");
39553
+ if (!Array.isArray(results) || !results.length) {
39554
+ return { next: () => null };
39555
+ }
39556
+ const limit = request?.itemsPerPage ?? 0;
39557
+ if (results.length < limit) {
39558
+ return { next: () => null };
39559
+ }
39560
+ const nextVal = () => vendorsListVendorJobTitles(client, {
39561
+ ...request,
39562
+ page: nextPage
39563
+ }, options);
39564
+ return { next: nextVal, "~next": { page: nextPage } };
39565
+ };
39566
+ const page = { ...result, ...nextFunc(raw) };
39567
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
39568
+ status: "complete",
39569
+ request: req,
39570
+ response
39571
+ }];
38934
39572
  }
38935
39573
  var init_vendorsListVendorJobTitles = __esm(() => {
38936
39574
  init_encodings();
@@ -38941,15 +39579,16 @@ var init_vendorsListVendorJobTitles = __esm(() => {
38941
39579
  init_errors();
38942
39580
  init_operations();
38943
39581
  init_async();
39582
+ init_operations2();
38944
39583
  });
38945
39584
 
38946
39585
  // src/mcp-server/tools/vendorsListVendorJobTitles.ts
38947
- var args12, tool$vendorsListVendorJobTitles;
39586
+ var args14, tool$vendorsListVendorJobTitles;
38948
39587
  var init_vendorsListVendorJobTitles2 = __esm(() => {
38949
39588
  init_vendorsListVendorJobTitles();
38950
39589
  init_operations();
38951
39590
  init_tools();
38952
- args12 = {
39591
+ args14 = {
38953
39592
  request: ListVendorJobTitlesRequest$inboundSchema
38954
39593
  };
38955
39594
  tool$vendorsListVendorJobTitles = {
@@ -38957,16 +39596,16 @@ var init_vendorsListVendorJobTitles2 = __esm(() => {
38957
39596
  description: `List vendor job titles
38958
39597
 
38959
39598
  List valid job titles for Vendors. This can be used during sign up or in a filter.`,
38960
- args: args12,
38961
- tool: async (client, args13, ctx) => {
38962
- const [result, apiCall] = await vendorsListVendorJobTitles(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39599
+ args: args14,
39600
+ tool: async (client, args15, ctx) => {
39601
+ const [result, apiCall] = await vendorsListVendorJobTitles(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
38963
39602
  if (!result.ok) {
38964
39603
  return {
38965
39604
  content: [{ type: "text", text: result.error.message }],
38966
39605
  isError: true
38967
39606
  };
38968
39607
  }
38969
- const value = result.value;
39608
+ const value = result.value.result;
38970
39609
  return formatResult(value, apiCall);
38971
39610
  }
38972
39611
  };
@@ -38976,7 +39615,7 @@ List valid job titles for Vendors. This can be used during sign up or in a filte
38976
39615
  function createMCPServer(deps) {
38977
39616
  const server = new McpServer({
38978
39617
  name: "GreenSecurity",
38979
- version: "0.16.0"
39618
+ version: "0.17.0"
38980
39619
  });
38981
39620
  const client = new GreenSecurityCore({
38982
39621
  security: deps.security,
@@ -38989,6 +39628,8 @@ function createMCPServer(deps) {
38989
39628
  tool(tool$vendorsCreateVendorRegistration);
38990
39629
  tool(tool$vendorsListVendorJobTitles);
38991
39630
  tool(tool$vendorsListVendorCredentials);
39631
+ tool(tool$vendorsExpediteTimeRemaining);
39632
+ tool(tool$vendorsListVendorInvoices);
38992
39633
  tool(tool$usersGetCurrentUser);
38993
39634
  tool(tool$usersGetUserById);
38994
39635
  tool(tool$usersLogsUserIntoTheSystem);
@@ -39017,7 +39658,9 @@ var init_server2 = __esm(() => {
39017
39658
  init_usersPassword2();
39018
39659
  init_usersPasswordResetRequest2();
39019
39660
  init_vendorsCreateVendorRegistration2();
39661
+ init_vendorsExpediteTimeRemaining2();
39020
39662
  init_vendorsListVendorCredentials2();
39663
+ init_vendorsListVendorInvoices2();
39021
39664
  init_vendorsListVendorJobTitles2();
39022
39665
  });
39023
39666
 
@@ -40216,7 +40859,7 @@ var routes = rn({
40216
40859
  var app = Ve(routes, {
40217
40860
  name: "mcp",
40218
40861
  versionInfo: {
40219
- currentVersion: "0.16.0"
40862
+ currentVersion: "0.17.0"
40220
40863
  }
40221
40864
  });
40222
40865
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -40224,5 +40867,5 @@ export {
40224
40867
  app
40225
40868
  };
40226
40869
 
40227
- //# debugId=F2901ED8C472B56664756E2164756E21
40870
+ //# debugId=629EB133BA9BB64C64756E2164756E21
40228
40871
  //# sourceMappingURL=mcp-server.js.map