@greensecurity/javascript-sdk 0.18.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 (88) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +253 -38
  3. package/bin/mcp-server.js.map +17 -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/mcp-server.js +1 -1
  14. package/mcp-server/server.d.ts.map +1 -1
  15. package/mcp-server/server.js +3 -1
  16. package/mcp-server/server.js.map +1 -1
  17. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts +8 -0
  18. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  19. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +69 -0
  20. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js.map +1 -0
  21. package/models/components/expand.d.ts +3 -0
  22. package/models/components/expand.d.ts.map +1 -1
  23. package/models/components/expand.js +1 -0
  24. package/models/components/expand.js.map +1 -1
  25. package/models/components/index.d.ts +1 -0
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +1 -0
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/invoice.d.ts +13 -2
  30. package/models/components/invoice.d.ts.map +1 -1
  31. package/models/components/invoice.js +19 -2
  32. package/models/components/invoice.js.map +1 -1
  33. package/models/components/invoiceitem.d.ts +8 -0
  34. package/models/components/invoiceitem.d.ts.map +1 -1
  35. package/models/components/invoiceitem.js +12 -0
  36. package/models/components/invoiceitem.js.map +1 -1
  37. package/models/components/invoicetransaction.d.ts +44 -0
  38. package/models/components/invoicetransaction.d.ts.map +1 -0
  39. package/models/components/invoicetransaction.js +96 -0
  40. package/models/components/invoicetransaction.js.map +1 -0
  41. package/models/operations/getvendorinvoicedetails.d.ts +38 -0
  42. package/models/operations/getvendorinvoicedetails.d.ts.map +1 -0
  43. package/models/operations/getvendorinvoicedetails.js +72 -0
  44. package/models/operations/getvendorinvoicedetails.js.map +1 -0
  45. package/models/operations/index.d.ts +1 -0
  46. package/models/operations/index.d.ts.map +1 -1
  47. package/models/operations/index.js +1 -0
  48. package/models/operations/index.js.map +1 -1
  49. package/models/operations/listorsearchsupportarticles.d.ts +10 -0
  50. package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
  51. package/models/operations/listorsearchsupportarticles.js +4 -0
  52. package/models/operations/listorsearchsupportarticles.js.map +1 -1
  53. package/package.json +1 -1
  54. package/react-query/index.d.ts +1 -0
  55. package/react-query/index.d.ts.map +1 -1
  56. package/react-query/index.js +1 -0
  57. package/react-query/index.js.map +1 -1
  58. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +6 -0
  59. package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
  60. package/react-query/supportArticlesListOrSearchSupportArticles.js +4 -0
  61. package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
  62. package/react-query/vendorsGetVendorInvoiceDetails.d.ts +53 -0
  63. package/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -0
  64. package/react-query/vendorsGetVendorInvoiceDetails.js +109 -0
  65. package/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -0
  66. package/sdk/vendors.d.ts +13 -0
  67. package/sdk/vendors.d.ts.map +1 -1
  68. package/sdk/vendors.js +15 -0
  69. package/sdk/vendors.js.map +1 -1
  70. package/src/__tests__/vendors.test.ts +23 -0
  71. package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +2 -0
  72. package/src/funcs/vendorsGetVendorInvoiceDetails.ts +180 -0
  73. package/src/lib/config.ts +3 -3
  74. package/src/mcp-server/mcp-server.ts +1 -1
  75. package/src/mcp-server/server.ts +3 -1
  76. package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +43 -0
  77. package/src/models/components/expand.ts +1 -0
  78. package/src/models/components/index.ts +1 -0
  79. package/src/models/components/invoice.ts +36 -4
  80. package/src/models/components/invoiceitem.ts +20 -0
  81. package/src/models/components/invoicetransaction.ts +108 -0
  82. package/src/models/operations/getvendorinvoicedetails.ts +79 -0
  83. package/src/models/operations/index.ts +1 -0
  84. package/src/models/operations/listorsearchsupportarticles.ts +14 -0
  85. package/src/react-query/index.ts +1 -0
  86. package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +10 -0
  87. package/src/react-query/vendorsGetVendorInvoiceDetails.ts +187 -0
  88. 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.18.0",
34176
- genVersion: "2.545.4",
34177
- userAgent: "speakeasy-sdk/typescript 0.18.0 2.545.4 0.0.3 @greensecurity/javascript-sdk"
34175
+ sdkVersion: "0.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
 
@@ -35886,7 +35886,8 @@ var init_expand = __esm(() => {
35886
35886
  SupportArticlePublished: "support_article.published",
35887
35887
  SupportArticleNotes: "support_article.notes",
35888
35888
  SupportArticleSupportCategory: "support_article.support_category",
35889
- InvoiceLineItems: "invoice.line_items"
35889
+ InvoiceLineItems: "invoice.line_items",
35890
+ InvoiceInvoiceTransactions: "invoice.invoice_transactions"
35890
35891
  };
35891
35892
  Expand$inboundSchema = nativeEnumType(Expand);
35892
35893
  Expand$outboundSchema = Expand$inboundSchema;
@@ -36483,14 +36484,20 @@ var init_invoiceitem = __esm(() => {
36483
36484
  date_starts: nullableType(stringType()).optional(),
36484
36485
  date_ends: nullableType(stringType()).optional(),
36485
36486
  is_subscription: nullableType(booleanType()).optional(),
36486
- product_title: nullableType(stringType()).optional()
36487
+ product_title: nullableType(stringType()).optional(),
36488
+ item_title: nullableType(stringType()).optional(),
36489
+ quantity: nullableType(numberType()).optional(),
36490
+ unit_price: nullableType(numberType().int()).optional(),
36491
+ subtotal: nullableType(numberType().int()).optional()
36487
36492
  }).transform((v2) => {
36488
36493
  return remap(v2, {
36489
36494
  item_id: "itemId",
36490
36495
  date_starts: "dateStarts",
36491
36496
  date_ends: "dateEnds",
36492
36497
  is_subscription: "isSubscription",
36493
- product_title: "productTitle"
36498
+ product_title: "productTitle",
36499
+ item_title: "itemTitle",
36500
+ unit_price: "unitPrice"
36494
36501
  });
36495
36502
  });
36496
36503
  InvoiceItem$outboundSchema = objectType({
@@ -36498,14 +36505,20 @@ var init_invoiceitem = __esm(() => {
36498
36505
  dateStarts: nullableType(stringType()).optional(),
36499
36506
  dateEnds: nullableType(stringType()).optional(),
36500
36507
  isSubscription: nullableType(booleanType()).optional(),
36501
- productTitle: nullableType(stringType()).optional()
36508
+ productTitle: nullableType(stringType()).optional(),
36509
+ itemTitle: nullableType(stringType()).optional(),
36510
+ quantity: nullableType(numberType()).optional(),
36511
+ unitPrice: nullableType(numberType().int()).optional(),
36512
+ subtotal: nullableType(numberType().int()).optional()
36502
36513
  }).transform((v2) => {
36503
36514
  return remap(v2, {
36504
36515
  itemId: "item_id",
36505
36516
  dateStarts: "date_starts",
36506
36517
  dateEnds: "date_ends",
36507
36518
  isSubscription: "is_subscription",
36508
- productTitle: "product_title"
36519
+ productTitle: "product_title",
36520
+ itemTitle: "item_title",
36521
+ unitPrice: "unit_price"
36509
36522
  });
36510
36523
  });
36511
36524
  ((InvoiceItem$) => {
@@ -36514,23 +36527,74 @@ var init_invoiceitem = __esm(() => {
36514
36527
  })(InvoiceItem$ ||= {});
36515
36528
  });
36516
36529
 
36530
+ // src/models/components/invoicetransaction.ts
36531
+ var InvoiceTransaction$inboundSchema, InvoiceTransaction$outboundSchema, InvoiceTransaction$;
36532
+ var init_invoicetransaction = __esm(() => {
36533
+ init_lib();
36534
+ init_primitives();
36535
+ InvoiceTransaction$inboundSchema = objectType({
36536
+ date_processed: nullableType(stringType()).optional(),
36537
+ payee: nullableType(stringType()).optional(),
36538
+ amount: nullableType(numberType().int()).optional(),
36539
+ credit_id: nullableType(numberType().int()).optional(),
36540
+ transaction_id: nullableType(stringType()).optional(),
36541
+ success: nullableType(booleanType()).optional(),
36542
+ card_last4: nullableType(stringType()).optional()
36543
+ }).transform((v2) => {
36544
+ return remap(v2, {
36545
+ date_processed: "dateProcessed",
36546
+ credit_id: "creditId",
36547
+ transaction_id: "transactionId",
36548
+ card_last4: "cardLast4"
36549
+ });
36550
+ });
36551
+ InvoiceTransaction$outboundSchema = objectType({
36552
+ dateProcessed: nullableType(stringType()).optional(),
36553
+ payee: nullableType(stringType()).optional(),
36554
+ amount: nullableType(numberType().int()).optional(),
36555
+ creditId: nullableType(numberType().int()).optional(),
36556
+ transactionId: nullableType(stringType()).optional(),
36557
+ success: nullableType(booleanType()).optional(),
36558
+ cardLast4: nullableType(stringType()).optional()
36559
+ }).transform((v2) => {
36560
+ return remap(v2, {
36561
+ dateProcessed: "date_processed",
36562
+ creditId: "credit_id",
36563
+ transactionId: "transaction_id",
36564
+ cardLast4: "card_last4"
36565
+ });
36566
+ });
36567
+ ((InvoiceTransaction$) => {
36568
+ InvoiceTransaction$.inboundSchema = InvoiceTransaction$inboundSchema;
36569
+ InvoiceTransaction$.outboundSchema = InvoiceTransaction$outboundSchema;
36570
+ })(InvoiceTransaction$ ||= {});
36571
+ });
36572
+
36517
36573
  // src/models/components/invoice.ts
36518
36574
  var Invoice$inboundSchema, Invoice$outboundSchema, Invoice$;
36519
36575
  var init_invoice = __esm(() => {
36520
36576
  init_lib();
36521
36577
  init_primitives();
36522
36578
  init_invoiceitem();
36579
+ init_invoicetransaction();
36523
36580
  Invoice$inboundSchema = objectType({
36524
36581
  id: numberType().int(),
36525
36582
  invoice_number: nullableType(stringType()).optional(),
36526
36583
  amount: nullableType(numberType().int()).optional(),
36527
36584
  status: nullableType(stringType()).optional(),
36528
36585
  financial_status: nullableType(stringType()).optional(),
36529
- items: arrayType(InvoiceItem$inboundSchema).optional()
36586
+ amount_not_paid: nullableType(numberType().int()).optional(),
36587
+ tax: nullableType(numberType().int()).optional(),
36588
+ convenience_fee: nullableType(numberType()).optional(),
36589
+ shipping: nullableType(numberType().int()).optional(),
36590
+ items: nullableType(arrayType(InvoiceItem$inboundSchema)).optional(),
36591
+ transactions: nullableType(arrayType(InvoiceTransaction$inboundSchema)).optional()
36530
36592
  }).transform((v2) => {
36531
36593
  return remap(v2, {
36532
36594
  invoice_number: "invoiceNumber",
36533
- financial_status: "financialStatus"
36595
+ financial_status: "financialStatus",
36596
+ amount_not_paid: "amountNotPaid",
36597
+ convenience_fee: "convenienceFee"
36534
36598
  });
36535
36599
  });
36536
36600
  Invoice$outboundSchema = objectType({
@@ -36539,11 +36603,18 @@ var init_invoice = __esm(() => {
36539
36603
  amount: nullableType(numberType().int()).optional(),
36540
36604
  status: nullableType(stringType()).optional(),
36541
36605
  financialStatus: nullableType(stringType()).optional(),
36542
- items: arrayType(InvoiceItem$outboundSchema).optional()
36606
+ amountNotPaid: nullableType(numberType().int()).optional(),
36607
+ tax: nullableType(numberType().int()).optional(),
36608
+ convenienceFee: nullableType(numberType()).optional(),
36609
+ shipping: nullableType(numberType().int()).optional(),
36610
+ items: nullableType(arrayType(InvoiceItem$outboundSchema)).optional(),
36611
+ transactions: nullableType(arrayType(InvoiceTransaction$outboundSchema)).optional()
36543
36612
  }).transform((v2) => {
36544
36613
  return remap(v2, {
36545
36614
  invoiceNumber: "invoice_number",
36546
- financialStatus: "financial_status"
36615
+ financialStatus: "financial_status",
36616
+ amountNotPaid: "amount_not_paid",
36617
+ convenienceFee: "convenience_fee"
36547
36618
  });
36548
36619
  });
36549
36620
  ((Invoice$) => {
@@ -37103,6 +37174,7 @@ var init_components = __esm(() => {
37103
37174
  init_imageset();
37104
37175
  init_invoice();
37105
37176
  init_invoiceitem();
37177
+ init_invoicetransaction();
37106
37178
  init_loginemailandpassword();
37107
37179
  init_loginrequirementsfromemail();
37108
37180
  init_mfarequiredresponse();
@@ -37314,6 +37386,25 @@ var init_getuserbyid = __esm(() => {
37314
37386
  })(GetUserByIdRequest$ ||= {});
37315
37387
  });
37316
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
+
37317
37408
  // src/models/operations/listorsearchfacilities.ts
37318
37409
  var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$, ListOrSearchFacilitiesResponse$inboundSchema, ListOrSearchFacilitiesResponse$outboundSchema, ListOrSearchFacilitiesResponse$;
37319
37410
  var init_listorsearchfacilities = __esm(() => {
@@ -37404,7 +37495,9 @@ var init_listorsearchsupportarticles = __esm(() => {
37404
37495
  sort: nullableType(stringType()).optional(),
37405
37496
  desc: Desc$inboundSchema.optional(),
37406
37497
  page: numberType().int().optional(),
37407
- items_per_page: numberType().int().optional()
37498
+ items_per_page: numberType().int().optional(),
37499
+ category: stringType().optional(),
37500
+ search: stringType().optional()
37408
37501
  }).transform((v2) => {
37409
37502
  return remap(v2, {
37410
37503
  items_per_page: "itemsPerPage"
@@ -37414,7 +37507,9 @@ var init_listorsearchsupportarticles = __esm(() => {
37414
37507
  sort: nullableType(stringType()).optional(),
37415
37508
  desc: Desc$outboundSchema.optional(),
37416
37509
  page: numberType().int().optional(),
37417
- itemsPerPage: numberType().int().optional()
37510
+ itemsPerPage: numberType().int().optional(),
37511
+ category: stringType().optional(),
37512
+ search: stringType().optional()
37418
37513
  }).transform((v2) => {
37419
37514
  return remap(v2, {
37420
37515
  itemsPerPage: "items_per_page"
@@ -37845,6 +37940,7 @@ var init_operations = __esm(() => {
37845
37940
  init_getfacility();
37846
37941
  init_getsupportarticle();
37847
37942
  init_getuserbyid();
37943
+ init_getvendorinvoicedetails();
37848
37944
  init_listorsearchfacilities();
37849
37945
  init_listorsearchsupportarticles();
37850
37946
  init_listvendorcredentials();
@@ -38306,9 +38402,11 @@ async function $do4(client, request, options) {
38306
38402
  const body = null;
38307
38403
  const path = pathToFunc("/support_articles")();
38308
38404
  const query = encodeFormQuery({
38405
+ category: payload.category,
38309
38406
  desc: payload.desc,
38310
38407
  items_per_page: payload.items_per_page,
38311
38408
  page: payload.page,
38409
+ search: payload.search,
38312
38410
  sort: payload.sort
38313
38411
  });
38314
38412
  const headers = new Headers(compactMap({
@@ -39249,11 +39347,126 @@ For vendors who have a paid 24-hour expedite credentials invoice, get the remain
39249
39347
  };
39250
39348
  });
39251
39349
 
39252
- // src/funcs/vendorsListVendorCredentials.ts
39253
- function vendorsListVendorCredentials(client, request, options) {
39350
+ // src/funcs/vendorsGetVendorInvoiceDetails.ts
39351
+ function vendorsGetVendorInvoiceDetails(client, request, options) {
39254
39352
  return new APIPromise($do13(client, request, options));
39255
39353
  }
39256
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) {
39257
39470
  const parsed = safeParse(request, (value) => ListVendorCredentialsRequest$outboundSchema.parse(value), "Input validation failed");
39258
39471
  if (!parsed.ok) {
39259
39472
  return [parsed, { status: "invalid" }];
@@ -39330,12 +39543,12 @@ var init_vendorsListVendorCredentials = __esm(() => {
39330
39543
  });
39331
39544
 
39332
39545
  // src/mcp-server/tools/vendorsListVendorCredentials.ts
39333
- var args12, tool$vendorsListVendorCredentials;
39546
+ var args13, tool$vendorsListVendorCredentials;
39334
39547
  var init_vendorsListVendorCredentials2 = __esm(() => {
39335
39548
  init_vendorsListVendorCredentials();
39336
39549
  init_operations();
39337
39550
  init_tools();
39338
- args12 = {
39551
+ args13 = {
39339
39552
  request: ListVendorCredentialsRequest$inboundSchema
39340
39553
  };
39341
39554
  tool$vendorsListVendorCredentials = {
@@ -39343,9 +39556,9 @@ var init_vendorsListVendorCredentials2 = __esm(() => {
39343
39556
  description: `List Vendor Credentials
39344
39557
 
39345
39558
  Lists vendor credentials, required credentials, and company credentials. Utilized in Vendor Dashboard.`,
39346
- args: args12,
39347
- tool: async (client, args13, ctx) => {
39348
- const [result, apiCall] = await vendorsListVendorCredentials(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39559
+ args: args13,
39560
+ tool: async (client, args14, ctx) => {
39561
+ const [result, apiCall] = await vendorsListVendorCredentials(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39349
39562
  if (!result.ok) {
39350
39563
  return {
39351
39564
  content: [{ type: "text", text: result.error.message }],
@@ -39360,9 +39573,9 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
39360
39573
 
39361
39574
  // src/funcs/vendorsListVendorInvoices.ts
39362
39575
  function vendorsListVendorInvoices(client, request, options) {
39363
- return new APIPromise($do14(client, request, options));
39576
+ return new APIPromise($do15(client, request, options));
39364
39577
  }
39365
- async function $do14(client, request, options) {
39578
+ async function $do15(client, request, options) {
39366
39579
  const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
39367
39580
  if (!parsed.ok) {
39368
39581
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39476,12 +39689,12 @@ var init_vendorsListVendorInvoices = __esm(() => {
39476
39689
  });
39477
39690
 
39478
39691
  // src/mcp-server/tools/vendorsListVendorInvoices.ts
39479
- var args13, tool$vendorsListVendorInvoices;
39692
+ var args14, tool$vendorsListVendorInvoices;
39480
39693
  var init_vendorsListVendorInvoices2 = __esm(() => {
39481
39694
  init_vendorsListVendorInvoices();
39482
39695
  init_operations();
39483
39696
  init_tools();
39484
- args13 = {
39697
+ args14 = {
39485
39698
  request: ListVendorInvoicesRequest$inboundSchema
39486
39699
  };
39487
39700
  tool$vendorsListVendorInvoices = {
@@ -39493,9 +39706,9 @@ List invoices for Vendors
39493
39706
  Available \`expand\` scopes are:
39494
39707
 
39495
39708
  invoice.line_items`,
39496
- args: args13,
39497
- tool: async (client, args14, ctx) => {
39498
- const [result, apiCall] = await vendorsListVendorInvoices(client, args14.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39709
+ args: args14,
39710
+ tool: async (client, args15, ctx) => {
39711
+ const [result, apiCall] = await vendorsListVendorInvoices(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39499
39712
  if (!result.ok) {
39500
39713
  return {
39501
39714
  content: [{ type: "text", text: result.error.message }],
@@ -39510,9 +39723,9 @@ invoice.line_items`,
39510
39723
 
39511
39724
  // src/funcs/vendorsListVendorJobTitles.ts
39512
39725
  function vendorsListVendorJobTitles(client, request, options) {
39513
- return new APIPromise($do15(client, request, options));
39726
+ return new APIPromise($do16(client, request, options));
39514
39727
  }
39515
- async function $do15(client, request, options) {
39728
+ async function $do16(client, request, options) {
39516
39729
  const parsed = safeParse(request, (value) => ListVendorJobTitlesRequest$outboundSchema.parse(value), "Input validation failed");
39517
39730
  if (!parsed.ok) {
39518
39731
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39615,12 +39828,12 @@ var init_vendorsListVendorJobTitles = __esm(() => {
39615
39828
  });
39616
39829
 
39617
39830
  // src/mcp-server/tools/vendorsListVendorJobTitles.ts
39618
- var args14, tool$vendorsListVendorJobTitles;
39831
+ var args15, tool$vendorsListVendorJobTitles;
39619
39832
  var init_vendorsListVendorJobTitles2 = __esm(() => {
39620
39833
  init_vendorsListVendorJobTitles();
39621
39834
  init_operations();
39622
39835
  init_tools();
39623
- args14 = {
39836
+ args15 = {
39624
39837
  request: ListVendorJobTitlesRequest$inboundSchema
39625
39838
  };
39626
39839
  tool$vendorsListVendorJobTitles = {
@@ -39628,9 +39841,9 @@ var init_vendorsListVendorJobTitles2 = __esm(() => {
39628
39841
  description: `List vendor job titles
39629
39842
 
39630
39843
  List valid job titles for Vendors. This can be used during sign up or in a filter.`,
39631
- args: args14,
39632
- tool: async (client, args15, ctx) => {
39633
- const [result, apiCall] = await vendorsListVendorJobTitles(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39844
+ args: args15,
39845
+ tool: async (client, args16, ctx) => {
39846
+ const [result, apiCall] = await vendorsListVendorJobTitles(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39634
39847
  if (!result.ok) {
39635
39848
  return {
39636
39849
  content: [{ type: "text", text: result.error.message }],
@@ -39647,7 +39860,7 @@ List valid job titles for Vendors. This can be used during sign up or in a filte
39647
39860
  function createMCPServer(deps) {
39648
39861
  const server = new McpServer({
39649
39862
  name: "GreenSecurity",
39650
- version: "0.18.0"
39863
+ version: "0.18.2"
39651
39864
  });
39652
39865
  const client = new GreenSecurityCore({
39653
39866
  security: deps.security,
@@ -39665,6 +39878,7 @@ function createMCPServer(deps) {
39665
39878
  tool(tool$vendorsListVendorCredentials);
39666
39879
  tool(tool$vendorsExpediteTimeRemaining);
39667
39880
  tool(tool$vendorsListVendorInvoices);
39881
+ tool(tool$vendorsGetVendorInvoiceDetails);
39668
39882
  tool(tool$usersGetCurrentUser);
39669
39883
  tool(tool$usersGetUserById);
39670
39884
  tool(tool$usersLogsUserIntoTheSystem);
@@ -39695,6 +39909,7 @@ var init_server2 = __esm(() => {
39695
39909
  init_usersPasswordResetRequest2();
39696
39910
  init_vendorsCreateVendorRegistration2();
39697
39911
  init_vendorsExpediteTimeRemaining2();
39912
+ init_vendorsGetVendorInvoiceDetails2();
39698
39913
  init_vendorsListVendorCredentials2();
39699
39914
  init_vendorsListVendorInvoices2();
39700
39915
  init_vendorsListVendorJobTitles2();
@@ -40895,7 +41110,7 @@ var routes = rn({
40895
41110
  var app = Ve(routes, {
40896
41111
  name: "mcp",
40897
41112
  versionInfo: {
40898
- currentVersion: "0.18.0"
41113
+ currentVersion: "0.18.2"
40899
41114
  }
40900
41115
  });
40901
41116
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -40903,5 +41118,5 @@ export {
40903
41118
  app
40904
41119
  };
40905
41120
 
40906
- //# debugId=1B380E6F955E33BE64756E2164756E21
41121
+ //# debugId=5513584B61D4C26A64756E2164756E21
40907
41122
  //# sourceMappingURL=mcp-server.js.map