@greensecurity/javascript-sdk 0.17.0 → 0.18.2

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 (98) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +289 -38
  3. package/bin/mcp-server.js.map +18 -13
  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/jsr.json +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/mcp-server/extensions.d.ts +9 -0
  14. package/mcp-server/extensions.d.ts.map +1 -0
  15. package/mcp-server/extensions.js +6 -0
  16. package/mcp-server/extensions.js.map +1 -0
  17. package/mcp-server/mcp-server.js +1 -1
  18. package/mcp-server/resources.d.ts +9 -4
  19. package/mcp-server/resources.d.ts.map +1 -1
  20. package/mcp-server/resources.js +36 -9
  21. package/mcp-server/resources.js.map +1 -1
  22. package/mcp-server/server.d.ts.map +1 -1
  23. package/mcp-server/server.js +8 -1
  24. package/mcp-server/server.js.map +1 -1
  25. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts +8 -0
  26. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  27. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +69 -0
  28. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js.map +1 -0
  29. package/models/components/expand.d.ts +3 -0
  30. package/models/components/expand.d.ts.map +1 -1
  31. package/models/components/expand.js +1 -0
  32. package/models/components/expand.js.map +1 -1
  33. package/models/components/index.d.ts +1 -0
  34. package/models/components/index.d.ts.map +1 -1
  35. package/models/components/index.js +1 -0
  36. package/models/components/index.js.map +1 -1
  37. package/models/components/invoice.d.ts +13 -2
  38. package/models/components/invoice.d.ts.map +1 -1
  39. package/models/components/invoice.js +19 -2
  40. package/models/components/invoice.js.map +1 -1
  41. package/models/components/invoiceitem.d.ts +8 -0
  42. package/models/components/invoiceitem.d.ts.map +1 -1
  43. package/models/components/invoiceitem.js +12 -0
  44. package/models/components/invoiceitem.js.map +1 -1
  45. package/models/components/invoicetransaction.d.ts +44 -0
  46. package/models/components/invoicetransaction.d.ts.map +1 -0
  47. package/models/components/invoicetransaction.js +96 -0
  48. package/models/components/invoicetransaction.js.map +1 -0
  49. package/models/operations/getvendorinvoicedetails.d.ts +38 -0
  50. package/models/operations/getvendorinvoicedetails.d.ts.map +1 -0
  51. package/models/operations/getvendorinvoicedetails.js +72 -0
  52. package/models/operations/getvendorinvoicedetails.js.map +1 -0
  53. package/models/operations/index.d.ts +1 -0
  54. package/models/operations/index.d.ts.map +1 -1
  55. package/models/operations/index.js +1 -0
  56. package/models/operations/index.js.map +1 -1
  57. package/models/operations/listorsearchsupportarticles.d.ts +10 -0
  58. package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
  59. package/models/operations/listorsearchsupportarticles.js +4 -0
  60. package/models/operations/listorsearchsupportarticles.js.map +1 -1
  61. package/package.json +1 -1
  62. package/react-query/index.d.ts +1 -0
  63. package/react-query/index.d.ts.map +1 -1
  64. package/react-query/index.js +1 -0
  65. package/react-query/index.js.map +1 -1
  66. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +6 -0
  67. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
  68. package/react-query/supportArticlesListOrSearchSupportArticles.js +4 -0
  69. package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  70. package/react-query/vendorsGetVendorInvoiceDetails.d.ts +53 -0
  71. package/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  72. package/react-query/vendorsGetVendorInvoiceDetails.js +109 -0
  73. package/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -0
  74. package/sdk/vendors.d.ts +13 -0
  75. package/sdk/vendors.d.ts.map +1 -1
  76. package/sdk/vendors.js +15 -0
  77. package/sdk/vendors.js.map +1 -1
  78. package/src/__tests__/vendors.test.ts +23 -0
  79. package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +2 -0
  80. package/src/funcs/vendorsGetVendorInvoiceDetails.ts +180 -0
  81. package/src/lib/config.ts +3 -3
  82. package/src/mcp-server/extensions.ts +13 -0
  83. package/src/mcp-server/mcp-server.ts +1 -1
  84. package/src/mcp-server/resources.ts +75 -14
  85. package/src/mcp-server/server.ts +18 -1
  86. package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +43 -0
  87. package/src/models/components/expand.ts +1 -0
  88. package/src/models/components/index.ts +1 -0
  89. package/src/models/components/invoice.ts +36 -4
  90. package/src/models/components/invoiceitem.ts +20 -0
  91. package/src/models/components/invoicetransaction.ts +108 -0
  92. package/src/models/operations/getvendorinvoicedetails.ts +79 -0
  93. package/src/models/operations/index.ts +1 -0
  94. package/src/models/operations/listorsearchsupportarticles.ts +14 -0
  95. package/src/react-query/index.ts +1 -0
  96. package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +10 -0
  97. package/src/react-query/vendorsGetVendorInvoiceDetails.ts +187 -0
  98. package/src/sdk/vendors.ts +24 -0
package/README.md CHANGED
@@ -255,6 +255,7 @@ run();
255
255
  * [listVendorCredentials](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
256
256
  * [expediteTimeRemaining](docs/sdks/vendors/README.md#expeditetimeremaining) - Expedite time remaining
257
257
  * [listVendorInvoices](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
258
+ * [getVendorInvoiceDetails](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
258
259
 
259
260
  </details>
260
261
  <!-- End Available Resources and Operations [operations] -->
@@ -286,6 +287,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
286
287
  - [`usersPasswordResetRequest`](docs/sdks/users/README.md#passwordresetrequest) - Password reset request
287
288
  - [`vendorsCreateVendorRegistration`](docs/sdks/vendors/README.md#createvendorregistration) - Create vendor registration
288
289
  - [`vendorsExpediteTimeRemaining`](docs/sdks/vendors/README.md#expeditetimeremaining) - Expedite time remaining
290
+ - [`vendorsGetVendorInvoiceDetails`](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
289
291
  - [`vendorsListVendorCredentials`](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
290
292
  - [`vendorsListVendorInvoices`](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
291
293
  - [`vendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
@@ -327,6 +329,7 @@ To learn about this feature and how to get started, check
327
329
  - [`useUsersPasswordResetRequestMutation`](docs/sdks/users/README.md#passwordresetrequest) - Password reset request
328
330
  - [`useVendorsCreateVendorRegistrationMutation`](docs/sdks/vendors/README.md#createvendorregistration) - Create vendor registration
329
331
  - [`useVendorsExpediteTimeRemaining`](docs/sdks/vendors/README.md#expeditetimeremaining) - Expedite time remaining
332
+ - [`useVendorsGetVendorInvoiceDetails`](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
330
333
  - [`useVendorsListVendorCredentials`](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
331
334
  - [`useVendorsListVendorInvoices`](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
332
335
  - [`useVendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
package/bin/mcp-server.js CHANGED
@@ -34172,9 +34172,9 @@ var init_config = __esm(() => {
34172
34172
  SDK_METADATA = {
34173
34173
  language: "typescript",
34174
34174
  openapiDocVersion: "0.0.3",
34175
- sdkVersion: "0.17.0",
34176
- genVersion: "2.541.0",
34177
- userAgent: "speakeasy-sdk/typescript 0.17.0 2.541.0 0.0.3 @greensecurity/javascript-sdk"
34175
+ sdkVersion: "0.18.2",
34176
+ genVersion: "2.546.0",
34177
+ userAgent: "speakeasy-sdk/typescript 0.18.2 2.546.0 0.0.3 @greensecurity/javascript-sdk"
34178
34178
  };
34179
34179
  });
34180
34180
 
@@ -35026,6 +35026,38 @@ var init_shared = __esm(() => {
35026
35026
  base64Schema = stringType().base64();
35027
35027
  });
35028
35028
 
35029
+ // src/mcp-server/resources.ts
35030
+ function createRegisterResource(logger, server, sdk, allowedScopes) {
35031
+ return (resource) => {
35032
+ const scopes = resource.scopes ?? [];
35033
+ if (!scopes.every((s) => allowedScopes.has(s))) {
35034
+ return;
35035
+ }
35036
+ const metadata = {
35037
+ ...resource.metadata,
35038
+ description: resource.description
35039
+ };
35040
+ server.resource(resource.name, resource.resource, metadata, async (uri, ctx) => resource.read(sdk, uri, ctx));
35041
+ logger.debug("Registered resource", { name: resource.name });
35042
+ };
35043
+ }
35044
+ function createRegisterResourceTemplate(logger, server, sdk, allowedScopes) {
35045
+ return (resource) => {
35046
+ const scopes = resource.scopes ?? [];
35047
+ if (!scopes.every((s) => allowedScopes.has(s))) {
35048
+ return;
35049
+ }
35050
+ const metadata = {
35051
+ ...resource.metadata,
35052
+ description: resource.description
35053
+ };
35054
+ server.resource(resource.name, resource.resource, metadata, async (uri, vars, ctx) => resource.read(sdk, uri, vars, ctx));
35055
+ logger.debug("Registered resource template", { name: resource.name });
35056
+ };
35057
+ }
35058
+ var init_resources = () => {
35059
+ };
35060
+
35029
35061
  // src/mcp-server/tools.ts
35030
35062
  async function formatResult(value, init) {
35031
35063
  if (typeof value === "undefined") {
@@ -35854,7 +35886,8 @@ var init_expand = __esm(() => {
35854
35886
  SupportArticlePublished: "support_article.published",
35855
35887
  SupportArticleNotes: "support_article.notes",
35856
35888
  SupportArticleSupportCategory: "support_article.support_category",
35857
- InvoiceLineItems: "invoice.line_items"
35889
+ InvoiceLineItems: "invoice.line_items",
35890
+ InvoiceInvoiceTransactions: "invoice.invoice_transactions"
35858
35891
  };
35859
35892
  Expand$inboundSchema = nativeEnumType(Expand);
35860
35893
  Expand$outboundSchema = Expand$inboundSchema;
@@ -36451,14 +36484,20 @@ var init_invoiceitem = __esm(() => {
36451
36484
  date_starts: nullableType(stringType()).optional(),
36452
36485
  date_ends: nullableType(stringType()).optional(),
36453
36486
  is_subscription: nullableType(booleanType()).optional(),
36454
- 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()
36455
36492
  }).transform((v2) => {
36456
36493
  return remap(v2, {
36457
36494
  item_id: "itemId",
36458
36495
  date_starts: "dateStarts",
36459
36496
  date_ends: "dateEnds",
36460
36497
  is_subscription: "isSubscription",
36461
- product_title: "productTitle"
36498
+ product_title: "productTitle",
36499
+ item_title: "itemTitle",
36500
+ unit_price: "unitPrice"
36462
36501
  });
36463
36502
  });
36464
36503
  InvoiceItem$outboundSchema = objectType({
@@ -36466,14 +36505,20 @@ var init_invoiceitem = __esm(() => {
36466
36505
  dateStarts: nullableType(stringType()).optional(),
36467
36506
  dateEnds: nullableType(stringType()).optional(),
36468
36507
  isSubscription: nullableType(booleanType()).optional(),
36469
- 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()
36470
36513
  }).transform((v2) => {
36471
36514
  return remap(v2, {
36472
36515
  itemId: "item_id",
36473
36516
  dateStarts: "date_starts",
36474
36517
  dateEnds: "date_ends",
36475
36518
  isSubscription: "is_subscription",
36476
- productTitle: "product_title"
36519
+ productTitle: "product_title",
36520
+ itemTitle: "item_title",
36521
+ unitPrice: "unit_price"
36477
36522
  });
36478
36523
  });
36479
36524
  ((InvoiceItem$) => {
@@ -36482,23 +36527,74 @@ var init_invoiceitem = __esm(() => {
36482
36527
  })(InvoiceItem$ ||= {});
36483
36528
  });
36484
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
+
36485
36573
  // src/models/components/invoice.ts
36486
36574
  var Invoice$inboundSchema, Invoice$outboundSchema, Invoice$;
36487
36575
  var init_invoice = __esm(() => {
36488
36576
  init_lib();
36489
36577
  init_primitives();
36490
36578
  init_invoiceitem();
36579
+ init_invoicetransaction();
36491
36580
  Invoice$inboundSchema = objectType({
36492
36581
  id: numberType().int(),
36493
36582
  invoice_number: nullableType(stringType()).optional(),
36494
36583
  amount: nullableType(numberType().int()).optional(),
36495
36584
  status: nullableType(stringType()).optional(),
36496
36585
  financial_status: nullableType(stringType()).optional(),
36497
- 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()
36498
36592
  }).transform((v2) => {
36499
36593
  return remap(v2, {
36500
36594
  invoice_number: "invoiceNumber",
36501
- financial_status: "financialStatus"
36595
+ financial_status: "financialStatus",
36596
+ amount_not_paid: "amountNotPaid",
36597
+ convenience_fee: "convenienceFee"
36502
36598
  });
36503
36599
  });
36504
36600
  Invoice$outboundSchema = objectType({
@@ -36507,11 +36603,18 @@ var init_invoice = __esm(() => {
36507
36603
  amount: nullableType(numberType().int()).optional(),
36508
36604
  status: nullableType(stringType()).optional(),
36509
36605
  financialStatus: nullableType(stringType()).optional(),
36510
- 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()
36511
36612
  }).transform((v2) => {
36512
36613
  return remap(v2, {
36513
36614
  invoiceNumber: "invoice_number",
36514
- financialStatus: "financial_status"
36615
+ financialStatus: "financial_status",
36616
+ amountNotPaid: "amount_not_paid",
36617
+ convenienceFee: "convenience_fee"
36515
36618
  });
36516
36619
  });
36517
36620
  ((Invoice$) => {
@@ -37071,6 +37174,7 @@ var init_components = __esm(() => {
37071
37174
  init_imageset();
37072
37175
  init_invoice();
37073
37176
  init_invoiceitem();
37177
+ init_invoicetransaction();
37074
37178
  init_loginemailandpassword();
37075
37179
  init_loginrequirementsfromemail();
37076
37180
  init_mfarequiredresponse();
@@ -37282,6 +37386,25 @@ var init_getuserbyid = __esm(() => {
37282
37386
  })(GetUserByIdRequest$ ||= {});
37283
37387
  });
37284
37388
 
37389
+ // src/models/operations/getvendorinvoicedetails.ts
37390
+ var GetVendorInvoiceDetailsRequest$inboundSchema, GetVendorInvoiceDetailsRequest$outboundSchema, GetVendorInvoiceDetailsRequest$;
37391
+ var init_getvendorinvoicedetails = __esm(() => {
37392
+ init_lib();
37393
+ init_components();
37394
+ GetVendorInvoiceDetailsRequest$inboundSchema = objectType({
37395
+ id: numberType().int(),
37396
+ expand: arrayType(Expand$inboundSchema).optional()
37397
+ });
37398
+ GetVendorInvoiceDetailsRequest$outboundSchema = objectType({
37399
+ id: numberType().int(),
37400
+ expand: arrayType(Expand$outboundSchema).optional()
37401
+ });
37402
+ ((GetVendorInvoiceDetailsRequest$) => {
37403
+ GetVendorInvoiceDetailsRequest$.inboundSchema = GetVendorInvoiceDetailsRequest$inboundSchema;
37404
+ GetVendorInvoiceDetailsRequest$.outboundSchema = GetVendorInvoiceDetailsRequest$outboundSchema;
37405
+ })(GetVendorInvoiceDetailsRequest$ ||= {});
37406
+ });
37407
+
37285
37408
  // src/models/operations/listorsearchfacilities.ts
37286
37409
  var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$, ListOrSearchFacilitiesResponse$inboundSchema, ListOrSearchFacilitiesResponse$outboundSchema, ListOrSearchFacilitiesResponse$;
37287
37410
  var init_listorsearchfacilities = __esm(() => {
@@ -37372,7 +37495,9 @@ var init_listorsearchsupportarticles = __esm(() => {
37372
37495
  sort: nullableType(stringType()).optional(),
37373
37496
  desc: Desc$inboundSchema.optional(),
37374
37497
  page: numberType().int().optional(),
37375
- items_per_page: numberType().int().optional()
37498
+ items_per_page: numberType().int().optional(),
37499
+ category: stringType().optional(),
37500
+ search: stringType().optional()
37376
37501
  }).transform((v2) => {
37377
37502
  return remap(v2, {
37378
37503
  items_per_page: "itemsPerPage"
@@ -37382,7 +37507,9 @@ var init_listorsearchsupportarticles = __esm(() => {
37382
37507
  sort: nullableType(stringType()).optional(),
37383
37508
  desc: Desc$outboundSchema.optional(),
37384
37509
  page: numberType().int().optional(),
37385
- itemsPerPage: numberType().int().optional()
37510
+ itemsPerPage: numberType().int().optional(),
37511
+ category: stringType().optional(),
37512
+ search: stringType().optional()
37386
37513
  }).transform((v2) => {
37387
37514
  return remap(v2, {
37388
37515
  itemsPerPage: "items_per_page"
@@ -37813,6 +37940,7 @@ var init_operations = __esm(() => {
37813
37940
  init_getfacility();
37814
37941
  init_getsupportarticle();
37815
37942
  init_getuserbyid();
37943
+ init_getvendorinvoicedetails();
37816
37944
  init_listorsearchfacilities();
37817
37945
  init_listorsearchsupportarticles();
37818
37946
  init_listvendorcredentials();
@@ -38274,9 +38402,11 @@ async function $do4(client, request, options) {
38274
38402
  const body = null;
38275
38403
  const path = pathToFunc("/support_articles")();
38276
38404
  const query = encodeFormQuery({
38405
+ category: payload.category,
38277
38406
  desc: payload.desc,
38278
38407
  items_per_page: payload.items_per_page,
38279
38408
  page: payload.page,
38409
+ search: payload.search,
38280
38410
  sort: payload.sort
38281
38411
  });
38282
38412
  const headers = new Headers(compactMap({
@@ -39217,11 +39347,126 @@ For vendors who have a paid 24-hour expedite credentials invoice, get the remain
39217
39347
  };
39218
39348
  });
39219
39349
 
39220
- // src/funcs/vendorsListVendorCredentials.ts
39221
- function vendorsListVendorCredentials(client, request, options) {
39350
+ // src/funcs/vendorsGetVendorInvoiceDetails.ts
39351
+ function vendorsGetVendorInvoiceDetails(client, request, options) {
39222
39352
  return new APIPromise($do13(client, request, options));
39223
39353
  }
39224
39354
  async function $do13(client, request, options) {
39355
+ const parsed = safeParse(request, (value) => GetVendorInvoiceDetailsRequest$outboundSchema.parse(value), "Input validation failed");
39356
+ if (!parsed.ok) {
39357
+ return [parsed, { status: "invalid" }];
39358
+ }
39359
+ const payload = parsed.value;
39360
+ const body = null;
39361
+ const pathParams = {
39362
+ id: encodeSimple("id", payload.id, {
39363
+ explode: false,
39364
+ charEncoding: "percent"
39365
+ })
39366
+ };
39367
+ const path = pathToFunc("/vendors/invoices/{id}")(pathParams);
39368
+ const query = encodeFormQuery({
39369
+ expand: payload.expand
39370
+ }, { explode: false });
39371
+ const headers = new Headers(compactMap({
39372
+ Accept: "application/json"
39373
+ }));
39374
+ const securityInput = await extractSecurity(client._options.security);
39375
+ const requestSecurity = resolveGlobalSecurity(securityInput);
39376
+ const context = {
39377
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
39378
+ operationID: "getVendorInvoiceDetails",
39379
+ oAuth2Scopes: [],
39380
+ resolvedSecurity: requestSecurity,
39381
+ securitySource: client._options.security,
39382
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
39383
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
39384
+ };
39385
+ const requestRes = client._createRequest(context, {
39386
+ security: requestSecurity,
39387
+ method: "GET",
39388
+ baseURL: options?.serverURL,
39389
+ path,
39390
+ headers,
39391
+ query,
39392
+ body,
39393
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
39394
+ }, options);
39395
+ if (!requestRes.ok) {
39396
+ return [requestRes, { status: "invalid" }];
39397
+ }
39398
+ const req = requestRes.value;
39399
+ const doResult = await client._do(req, {
39400
+ context,
39401
+ errorCodes: ["401", "404", "4XX", "5XX"],
39402
+ retryConfig: context.retryConfig,
39403
+ retryCodes: context.retryCodes
39404
+ });
39405
+ if (!doResult.ok) {
39406
+ return [doResult, { status: "request-error", request: req }];
39407
+ }
39408
+ const response = doResult.value;
39409
+ const responseFields = {
39410
+ HttpMeta: { Response: response, Request: req }
39411
+ };
39412
+ const [result] = await match(json(200, Invoice$inboundSchema), jsonErr([401, 404], ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39413
+ if (!result.ok) {
39414
+ return [result, { status: "complete", request: req, response }];
39415
+ }
39416
+ return [result, { status: "complete", request: req, response }];
39417
+ }
39418
+ var init_vendorsGetVendorInvoiceDetails = __esm(() => {
39419
+ init_encodings();
39420
+ init_matchers();
39421
+ init_primitives();
39422
+ init_schemas();
39423
+ init_security();
39424
+ init_url();
39425
+ init_components();
39426
+ init_errors();
39427
+ init_operations();
39428
+ init_async();
39429
+ });
39430
+
39431
+ // src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts
39432
+ var args12, tool$vendorsGetVendorInvoiceDetails;
39433
+ var init_vendorsGetVendorInvoiceDetails2 = __esm(() => {
39434
+ init_vendorsGetVendorInvoiceDetails();
39435
+ init_operations();
39436
+ init_tools();
39437
+ args12 = {
39438
+ request: GetVendorInvoiceDetailsRequest$inboundSchema
39439
+ };
39440
+ tool$vendorsGetVendorInvoiceDetails = {
39441
+ name: "vendors_get-vendor-invoice-details",
39442
+ description: `Get vendor invoice details
39443
+
39444
+ Retrieve an individual vendor invoice detais.
39445
+
39446
+ Available \`expand\` scopes are:
39447
+
39448
+ invoice.line_items
39449
+ invoice.invoice_transactions`,
39450
+ args: args12,
39451
+ tool: async (client, args13, ctx) => {
39452
+ const [result, apiCall] = await vendorsGetVendorInvoiceDetails(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39453
+ if (!result.ok) {
39454
+ return {
39455
+ content: [{ type: "text", text: result.error.message }],
39456
+ isError: true
39457
+ };
39458
+ }
39459
+ const value = result.value;
39460
+ return formatResult(value, apiCall);
39461
+ }
39462
+ };
39463
+ });
39464
+
39465
+ // src/funcs/vendorsListVendorCredentials.ts
39466
+ function vendorsListVendorCredentials(client, request, options) {
39467
+ return new APIPromise($do14(client, request, options));
39468
+ }
39469
+ async function $do14(client, request, options) {
39225
39470
  const parsed = safeParse(request, (value) => ListVendorCredentialsRequest$outboundSchema.parse(value), "Input validation failed");
39226
39471
  if (!parsed.ok) {
39227
39472
  return [parsed, { status: "invalid" }];
@@ -39298,12 +39543,12 @@ var init_vendorsListVendorCredentials = __esm(() => {
39298
39543
  });
39299
39544
 
39300
39545
  // src/mcp-server/tools/vendorsListVendorCredentials.ts
39301
- var args12, tool$vendorsListVendorCredentials;
39546
+ var args13, tool$vendorsListVendorCredentials;
39302
39547
  var init_vendorsListVendorCredentials2 = __esm(() => {
39303
39548
  init_vendorsListVendorCredentials();
39304
39549
  init_operations();
39305
39550
  init_tools();
39306
- args12 = {
39551
+ args13 = {
39307
39552
  request: ListVendorCredentialsRequest$inboundSchema
39308
39553
  };
39309
39554
  tool$vendorsListVendorCredentials = {
@@ -39311,9 +39556,9 @@ var init_vendorsListVendorCredentials2 = __esm(() => {
39311
39556
  description: `List Vendor Credentials
39312
39557
 
39313
39558
  Lists vendor credentials, required credentials, and company credentials. Utilized in Vendor Dashboard.`,
39314
- args: args12,
39315
- tool: async (client, args13, ctx) => {
39316
- const [result, apiCall] = await vendorsListVendorCredentials(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39559
+ args: args13,
39560
+ tool: async (client, args14, ctx) => {
39561
+ const [result, apiCall] = await vendorsListVendorCredentials(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39317
39562
  if (!result.ok) {
39318
39563
  return {
39319
39564
  content: [{ type: "text", text: result.error.message }],
@@ -39328,9 +39573,9 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
39328
39573
 
39329
39574
  // src/funcs/vendorsListVendorInvoices.ts
39330
39575
  function vendorsListVendorInvoices(client, request, options) {
39331
- return new APIPromise($do14(client, request, options));
39576
+ return new APIPromise($do15(client, request, options));
39332
39577
  }
39333
- async function $do14(client, request, options) {
39578
+ async function $do15(client, request, options) {
39334
39579
  const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
39335
39580
  if (!parsed.ok) {
39336
39581
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39444,12 +39689,12 @@ var init_vendorsListVendorInvoices = __esm(() => {
39444
39689
  });
39445
39690
 
39446
39691
  // src/mcp-server/tools/vendorsListVendorInvoices.ts
39447
- var args13, tool$vendorsListVendorInvoices;
39692
+ var args14, tool$vendorsListVendorInvoices;
39448
39693
  var init_vendorsListVendorInvoices2 = __esm(() => {
39449
39694
  init_vendorsListVendorInvoices();
39450
39695
  init_operations();
39451
39696
  init_tools();
39452
- args13 = {
39697
+ args14 = {
39453
39698
  request: ListVendorInvoicesRequest$inboundSchema
39454
39699
  };
39455
39700
  tool$vendorsListVendorInvoices = {
@@ -39461,9 +39706,9 @@ List invoices for Vendors
39461
39706
  Available \`expand\` scopes are:
39462
39707
 
39463
39708
  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();
39709
+ args: args14,
39710
+ tool: async (client, args15, ctx) => {
39711
+ const [result, apiCall] = await vendorsListVendorInvoices(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39467
39712
  if (!result.ok) {
39468
39713
  return {
39469
39714
  content: [{ type: "text", text: result.error.message }],
@@ -39478,9 +39723,9 @@ invoice.line_items`,
39478
39723
 
39479
39724
  // src/funcs/vendorsListVendorJobTitles.ts
39480
39725
  function vendorsListVendorJobTitles(client, request, options) {
39481
- return new APIPromise($do15(client, request, options));
39726
+ return new APIPromise($do16(client, request, options));
39482
39727
  }
39483
- async function $do15(client, request, options) {
39728
+ async function $do16(client, request, options) {
39484
39729
  const parsed = safeParse(request, (value) => ListVendorJobTitlesRequest$outboundSchema.parse(value), "Input validation failed");
39485
39730
  if (!parsed.ok) {
39486
39731
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39583,12 +39828,12 @@ var init_vendorsListVendorJobTitles = __esm(() => {
39583
39828
  });
39584
39829
 
39585
39830
  // src/mcp-server/tools/vendorsListVendorJobTitles.ts
39586
- var args14, tool$vendorsListVendorJobTitles;
39831
+ var args15, tool$vendorsListVendorJobTitles;
39587
39832
  var init_vendorsListVendorJobTitles2 = __esm(() => {
39588
39833
  init_vendorsListVendorJobTitles();
39589
39834
  init_operations();
39590
39835
  init_tools();
39591
- args14 = {
39836
+ args15 = {
39592
39837
  request: ListVendorJobTitlesRequest$inboundSchema
39593
39838
  };
39594
39839
  tool$vendorsListVendorJobTitles = {
@@ -39596,9 +39841,9 @@ var init_vendorsListVendorJobTitles2 = __esm(() => {
39596
39841
  description: `List vendor job titles
39597
39842
 
39598
39843
  List valid job titles for Vendors. This can be used during sign up or in a filter.`,
39599
- args: args14,
39600
- tool: async (client, args15, ctx) => {
39601
- const [result, apiCall] = await vendorsListVendorJobTitles(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39844
+ args: args15,
39845
+ tool: async (client, args16, ctx) => {
39846
+ const [result, apiCall] = await vendorsListVendorJobTitles(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39602
39847
  if (!result.ok) {
39603
39848
  return {
39604
39849
  content: [{ type: "text", text: result.error.message }],
@@ -39615,7 +39860,7 @@ List valid job titles for Vendors. This can be used during sign up or in a filte
39615
39860
  function createMCPServer(deps) {
39616
39861
  const server = new McpServer({
39617
39862
  name: "GreenSecurity",
39618
- version: "0.17.0"
39863
+ version: "0.18.2"
39619
39864
  });
39620
39865
  const client = new GreenSecurityCore({
39621
39866
  security: deps.security,
@@ -39625,11 +39870,15 @@ function createMCPServer(deps) {
39625
39870
  const scopes = new Set(deps.scopes ?? mcpScopes);
39626
39871
  const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
39627
39872
  const tool = createRegisterTool(deps.logger, server, client, scopes, allowedTools);
39873
+ const resource = createRegisterResource(deps.logger, server, client, scopes);
39874
+ const resourceTemplate = createRegisterResourceTemplate(deps.logger, server, client, scopes);
39875
+ const register = { tool, resource, resourceTemplate };
39628
39876
  tool(tool$vendorsCreateVendorRegistration);
39629
39877
  tool(tool$vendorsListVendorJobTitles);
39630
39878
  tool(tool$vendorsListVendorCredentials);
39631
39879
  tool(tool$vendorsExpediteTimeRemaining);
39632
39880
  tool(tool$vendorsListVendorInvoices);
39881
+ tool(tool$vendorsGetVendorInvoiceDetails);
39633
39882
  tool(tool$usersGetCurrentUser);
39634
39883
  tool(tool$usersGetUserById);
39635
39884
  tool(tool$usersLogsUserIntoTheSystem);
@@ -39645,6 +39894,7 @@ function createMCPServer(deps) {
39645
39894
  var init_server2 = __esm(() => {
39646
39895
  init_mcp();
39647
39896
  init_core();
39897
+ init_resources();
39648
39898
  init_scopes();
39649
39899
  init_tools();
39650
39900
  init_organizationsGetFacility2();
@@ -39659,6 +39909,7 @@ var init_server2 = __esm(() => {
39659
39909
  init_usersPasswordResetRequest2();
39660
39910
  init_vendorsCreateVendorRegistration2();
39661
39911
  init_vendorsExpediteTimeRemaining2();
39912
+ init_vendorsGetVendorInvoiceDetails2();
39662
39913
  init_vendorsListVendorCredentials2();
39663
39914
  init_vendorsListVendorInvoices2();
39664
39915
  init_vendorsListVendorJobTitles2();
@@ -40859,7 +41110,7 @@ var routes = rn({
40859
41110
  var app = Ve(routes, {
40860
41111
  name: "mcp",
40861
41112
  versionInfo: {
40862
- currentVersion: "0.17.0"
41113
+ currentVersion: "0.18.2"
40863
41114
  }
40864
41115
  });
40865
41116
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -40867,5 +41118,5 @@ export {
40867
41118
  app
40868
41119
  };
40869
41120
 
40870
- //# debugId=629EB133BA9BB64C64756E2164756E21
41121
+ //# debugId=5513584B61D4C26A64756E2164756E21
40871
41122
  //# sourceMappingURL=mcp-server.js.map