@greensecurity/javascript-sdk 0.18.2 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +3 -0
  2. package/bin/mcp-server.js +290 -41
  3. package/bin/mcp-server.js.map +30 -26
  4. package/funcs/vendorsListVendorFacilityStatuses.d.ts +20 -0
  5. package/funcs/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  6. package/funcs/vendorsListVendorFacilityStatuses.js +154 -0
  7. package/funcs/vendorsListVendorFacilityStatuses.js.map +1 -0
  8. package/jsr.json +1 -1
  9. package/lib/config.d.ts +3 -3
  10. package/lib/config.js +3 -3
  11. package/lib/sdks.d.ts.map +1 -1
  12. package/lib/sdks.js +2 -8
  13. package/lib/sdks.js.map +1 -1
  14. package/mcp-server/mcp-server.js +1 -1
  15. package/mcp-server/server.d.ts.map +1 -1
  16. package/mcp-server/server.js +3 -1
  17. package/mcp-server/server.js.map +1 -1
  18. package/mcp-server/tools/organizationsGetFacility.js +1 -1
  19. package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
  20. package/mcp-server/tools/supportArticlesGetSupportArticle.js +1 -1
  21. package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
  22. package/mcp-server/tools/usersGetCurrentUser.js +1 -1
  23. package/mcp-server/tools/usersGetUserById.js +1 -1
  24. package/mcp-server/tools/usersLogsUserIntoTheSystem.js +1 -1
  25. package/mcp-server/tools/usersMagiclink.js +1 -1
  26. package/mcp-server/tools/usersPassword.js +1 -1
  27. package/mcp-server/tools/usersPasswordResetRequest.js +1 -1
  28. package/mcp-server/tools/vendorsCreateVendorRegistration.js +1 -1
  29. package/mcp-server/tools/vendorsExpediteTimeRemaining.js +1 -1
  30. package/mcp-server/tools/vendorsGetVendorInvoiceDetails.js +1 -1
  31. package/mcp-server/tools/vendorsListVendorCredentials.js +1 -1
  32. package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts +8 -0
  33. package/mcp-server/tools/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  34. package/mcp-server/tools/vendorsListVendorFacilityStatuses.js +64 -0
  35. package/mcp-server/tools/vendorsListVendorFacilityStatuses.js.map +1 -0
  36. package/mcp-server/tools/vendorsListVendorInvoices.js +1 -1
  37. package/mcp-server/tools/vendorsListVendorJobTitles.js +1 -1
  38. package/mcp-server/tools.d.ts.map +1 -1
  39. package/mcp-server/tools.js +3 -0
  40. package/mcp-server/tools.js.map +1 -1
  41. package/models/components/index.d.ts +1 -0
  42. package/models/components/index.d.ts.map +1 -1
  43. package/models/components/index.js +1 -0
  44. package/models/components/index.js.map +1 -1
  45. package/models/components/vendorfacilitystatusview.d.ts +42 -0
  46. package/models/components/vendorfacilitystatusview.d.ts.map +1 -0
  47. package/models/components/vendorfacilitystatusview.js +98 -0
  48. package/models/components/vendorfacilitystatusview.js.map +1 -0
  49. package/models/operations/index.d.ts +1 -0
  50. package/models/operations/index.d.ts.map +1 -1
  51. package/models/operations/index.js +1 -0
  52. package/models/operations/index.js.map +1 -1
  53. package/models/operations/listvendorfacilitystatuses.d.ts +106 -0
  54. package/models/operations/listvendorfacilitystatuses.d.ts.map +1 -0
  55. package/models/operations/listvendorfacilitystatuses.js +149 -0
  56. package/models/operations/listvendorfacilitystatuses.js.map +1 -0
  57. package/package.json +1 -1
  58. package/react-query/index.d.ts +1 -0
  59. package/react-query/index.d.ts.map +1 -1
  60. package/react-query/index.js +1 -0
  61. package/react-query/index.js.map +1 -1
  62. package/react-query/vendorsListVendorFacilityStatuses.d.ts +75 -0
  63. package/react-query/vendorsListVendorFacilityStatuses.d.ts.map +1 -0
  64. package/react-query/vendorsListVendorFacilityStatuses.js +159 -0
  65. package/react-query/vendorsListVendorFacilityStatuses.js.map +1 -0
  66. package/sdk/vendors.d.ts +9 -0
  67. package/sdk/vendors.d.ts.map +1 -1
  68. package/sdk/vendors.js +10 -0
  69. package/sdk/vendors.js.map +1 -1
  70. package/src/__tests__/vendors.test.ts +35 -0
  71. package/src/funcs/vendorsListVendorFacilityStatuses.ts +240 -0
  72. package/src/lib/config.ts +3 -3
  73. package/src/lib/sdks.ts +2 -7
  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/organizationsGetFacility.ts +1 -1
  77. package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
  78. package/src/mcp-server/tools/supportArticlesGetSupportArticle.ts +1 -1
  79. package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
  80. package/src/mcp-server/tools/usersGetCurrentUser.ts +1 -1
  81. package/src/mcp-server/tools/usersGetUserById.ts +1 -1
  82. package/src/mcp-server/tools/usersLogsUserIntoTheSystem.ts +1 -1
  83. package/src/mcp-server/tools/usersMagiclink.ts +1 -1
  84. package/src/mcp-server/tools/usersPassword.ts +1 -1
  85. package/src/mcp-server/tools/usersPasswordResetRequest.ts +1 -1
  86. package/src/mcp-server/tools/vendorsCreateVendorRegistration.ts +1 -1
  87. package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +1 -1
  88. package/src/mcp-server/tools/vendorsGetVendorInvoiceDetails.ts +1 -1
  89. package/src/mcp-server/tools/vendorsListVendorCredentials.ts +1 -1
  90. package/src/mcp-server/tools/vendorsListVendorFacilityStatuses.ts +39 -0
  91. package/src/mcp-server/tools/vendorsListVendorInvoices.ts +1 -1
  92. package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +1 -1
  93. package/src/mcp-server/tools.ts +4 -0
  94. package/src/models/components/index.ts +1 -0
  95. package/src/models/components/vendorfacilitystatusview.ts +108 -0
  96. package/src/models/operations/index.ts +1 -0
  97. package/src/models/operations/listvendorfacilitystatuses.ts +247 -0
  98. package/src/react-query/index.ts +1 -0
  99. package/src/react-query/vendorsListVendorFacilityStatuses.ts +342 -0
  100. package/src/sdk/vendors.ts +23 -0
package/README.md CHANGED
@@ -256,6 +256,7 @@ run();
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
258
  * [getVendorInvoiceDetails](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
259
+ * [listVendorFacilityStatuses](docs/sdks/vendors/README.md#listvendorfacilitystatuses) - List vendor facility statuses
259
260
 
260
261
  </details>
261
262
  <!-- End Available Resources and Operations [operations] -->
@@ -289,6 +290,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
289
290
  - [`vendorsExpediteTimeRemaining`](docs/sdks/vendors/README.md#expeditetimeremaining) - Expedite time remaining
290
291
  - [`vendorsGetVendorInvoiceDetails`](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
291
292
  - [`vendorsListVendorCredentials`](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
293
+ - [`vendorsListVendorFacilityStatuses`](docs/sdks/vendors/README.md#listvendorfacilitystatuses) - List vendor facility statuses
292
294
  - [`vendorsListVendorInvoices`](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
293
295
  - [`vendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
294
296
 
@@ -331,6 +333,7 @@ To learn about this feature and how to get started, check
331
333
  - [`useVendorsExpediteTimeRemaining`](docs/sdks/vendors/README.md#expeditetimeremaining) - Expedite time remaining
332
334
  - [`useVendorsGetVendorInvoiceDetails`](docs/sdks/vendors/README.md#getvendorinvoicedetails) - Get vendor invoice details
333
335
  - [`useVendorsListVendorCredentials`](docs/sdks/vendors/README.md#listvendorcredentials) - List Vendor Credentials
336
+ - [`useVendorsListVendorFacilityStatuses`](docs/sdks/vendors/README.md#listvendorfacilitystatuses) - List vendor facility statuses
334
337
  - [`useVendorsListVendorInvoices`](docs/sdks/vendors/README.md#listvendorinvoices) - List vendor invoices
335
338
  - [`useVendorsListVendorJobTitles`](docs/sdks/vendors/README.md#listvendorjobtitles) - List vendor job titles
336
339
 
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.2",
34176
- genVersion: "2.546.0",
34177
- userAgent: "speakeasy-sdk/typescript 0.18.2 2.546.0 0.0.3 @greensecurity/javascript-sdk"
34175
+ sdkVersion: "0.19.0",
34176
+ genVersion: "2.548.5",
34177
+ userAgent: "speakeasy-sdk/typescript 0.19.0 2.548.5 0.0.3 @greensecurity/javascript-sdk"
34178
34178
  };
34179
34179
  });
34180
34180
 
@@ -34818,12 +34818,9 @@ class ClientSDK {
34818
34818
  }
34819
34819
  if (conf.body instanceof ReadableStream) {
34820
34820
  if (!fetchOptions) {
34821
- fetchOptions = {
34822
- duplex: "half"
34823
- };
34824
- } else {
34825
- fetchOptions.duplex = "half";
34821
+ fetchOptions = {};
34826
34822
  }
34823
+ Object.assign(fetchOptions, { duplex: "half" });
34827
34824
  }
34828
34825
  let input;
34829
34826
  try {
@@ -35103,6 +35100,9 @@ function createRegisterTool(logger, server, sdk, allowedScopes, allowedTools) {
35103
35100
  return;
35104
35101
  }
35105
35102
  const toolScopes = tool.scopes ?? [];
35103
+ if (allowedScopes.size > 0 && toolScopes.length === 0) {
35104
+ return;
35105
+ }
35106
35106
  if (!toolScopes.every((s) => allowedScopes.has(s))) {
35107
35107
  return;
35108
35108
  }
@@ -37099,6 +37099,51 @@ var init_vendorcredentialslim = __esm(() => {
37099
37099
  })(VendorCredentialSlim$ ||= {});
37100
37100
  });
37101
37101
 
37102
+ // src/models/components/vendorfacilitystatusview.ts
37103
+ var VendorFacilityStatusView$inboundSchema, VendorFacilityStatusView$outboundSchema, VendorFacilityStatusView$;
37104
+ var init_vendorfacilitystatusview = __esm(() => {
37105
+ init_lib();
37106
+ init_primitives();
37107
+ VendorFacilityStatusView$inboundSchema = objectType({
37108
+ vendor_id: numberType().int().optional(),
37109
+ facility_id: numberType().int().optional(),
37110
+ facility_name: stringType().optional(),
37111
+ facility_status: nullableType(stringType()).optional(),
37112
+ vendor_scan_id: nullableType(numberType().int()).optional(),
37113
+ vendor_scan_type: nullableType(numberType().int()).optional()
37114
+ }).transform((v2) => {
37115
+ return remap(v2, {
37116
+ vendor_id: "vendorId",
37117
+ facility_id: "facilityId",
37118
+ facility_name: "facilityName",
37119
+ facility_status: "facilityStatus",
37120
+ vendor_scan_id: "vendorScanId",
37121
+ vendor_scan_type: "vendorScanType"
37122
+ });
37123
+ });
37124
+ VendorFacilityStatusView$outboundSchema = objectType({
37125
+ vendorId: numberType().int().optional(),
37126
+ facilityId: numberType().int().optional(),
37127
+ facilityName: stringType().optional(),
37128
+ facilityStatus: nullableType(stringType()).optional(),
37129
+ vendorScanId: nullableType(numberType().int()).optional(),
37130
+ vendorScanType: nullableType(numberType().int()).optional()
37131
+ }).transform((v2) => {
37132
+ return remap(v2, {
37133
+ vendorId: "vendor_id",
37134
+ facilityId: "facility_id",
37135
+ facilityName: "facility_name",
37136
+ facilityStatus: "facility_status",
37137
+ vendorScanId: "vendor_scan_id",
37138
+ vendorScanType: "vendor_scan_type"
37139
+ });
37140
+ });
37141
+ ((VendorFacilityStatusView$) => {
37142
+ VendorFacilityStatusView$.inboundSchema = VendorFacilityStatusView$inboundSchema;
37143
+ VendorFacilityStatusView$.outboundSchema = VendorFacilityStatusView$outboundSchema;
37144
+ })(VendorFacilityStatusView$ ||= {});
37145
+ });
37146
+
37102
37147
  // src/models/components/vendorjobtitle.ts
37103
37148
  var VendorJobTitle$inboundSchema, VendorJobTitle$outboundSchema, VendorJobTitle$;
37104
37149
  var init_vendorjobtitle = __esm(() => {
@@ -37186,6 +37231,7 @@ var init_components = __esm(() => {
37186
37231
  init_systemsummary();
37187
37232
  init_user();
37188
37233
  init_vendorcredentialslim();
37234
+ init_vendorfacilitystatusview();
37189
37235
  init_vendorjobtitle();
37190
37236
  init_vendorrequiredcredential();
37191
37237
  init_vendortype();
@@ -37633,6 +37679,68 @@ var init_listvendorcredentials = __esm(() => {
37633
37679
  })(ListVendorCredentialsResponseBody$ ||= {});
37634
37680
  });
37635
37681
 
37682
+ // src/models/operations/listvendorfacilitystatuses.ts
37683
+ var ListVendorFacilityStatusesRequest$inboundSchema, ListVendorFacilityStatusesRequest$outboundSchema, ListVendorFacilityStatusesRequest$, ListVendorFacilityStatusesResponseBody$inboundSchema, ListVendorFacilityStatusesResponseBody$outboundSchema, ListVendorFacilityStatusesResponseBody$, ListVendorFacilityStatusesResponse$inboundSchema, ListVendorFacilityStatusesResponse$outboundSchema, ListVendorFacilityStatusesResponse$;
37684
+ var init_listvendorfacilitystatuses = __esm(() => {
37685
+ init_lib();
37686
+ init_primitives();
37687
+ init_components();
37688
+ ListVendorFacilityStatusesRequest$inboundSchema = objectType({
37689
+ sort: nullableType(stringType()).optional(),
37690
+ desc: Desc$inboundSchema.optional(),
37691
+ page: numberType().int().optional(),
37692
+ items_per_page: numberType().int().optional()
37693
+ }).transform((v2) => {
37694
+ return remap(v2, {
37695
+ items_per_page: "itemsPerPage"
37696
+ });
37697
+ });
37698
+ ListVendorFacilityStatusesRequest$outboundSchema = objectType({
37699
+ sort: nullableType(stringType()).optional(),
37700
+ desc: Desc$outboundSchema.optional(),
37701
+ page: numberType().int().optional(),
37702
+ itemsPerPage: numberType().int().optional()
37703
+ }).transform((v2) => {
37704
+ return remap(v2, {
37705
+ itemsPerPage: "items_per_page"
37706
+ });
37707
+ });
37708
+ ((ListVendorFacilityStatusesRequest$) => {
37709
+ ListVendorFacilityStatusesRequest$.inboundSchema = ListVendorFacilityStatusesRequest$inboundSchema;
37710
+ ListVendorFacilityStatusesRequest$.outboundSchema = ListVendorFacilityStatusesRequest$outboundSchema;
37711
+ })(ListVendorFacilityStatusesRequest$ ||= {});
37712
+ ListVendorFacilityStatusesResponseBody$inboundSchema = objectType({
37713
+ items: arrayType(VendorFacilityStatusView$inboundSchema),
37714
+ pager: Pager$inboundSchema
37715
+ });
37716
+ ListVendorFacilityStatusesResponseBody$outboundSchema = objectType({
37717
+ items: arrayType(VendorFacilityStatusView$outboundSchema),
37718
+ pager: Pager$outboundSchema
37719
+ });
37720
+ ((ListVendorFacilityStatusesResponseBody$) => {
37721
+ ListVendorFacilityStatusesResponseBody$.inboundSchema = ListVendorFacilityStatusesResponseBody$inboundSchema;
37722
+ ListVendorFacilityStatusesResponseBody$.outboundSchema = ListVendorFacilityStatusesResponseBody$outboundSchema;
37723
+ })(ListVendorFacilityStatusesResponseBody$ ||= {});
37724
+ ListVendorFacilityStatusesResponse$inboundSchema = objectType({
37725
+ Result: lazyType(() => ListVendorFacilityStatusesResponseBody$inboundSchema)
37726
+ }).transform((v2) => {
37727
+ return remap(v2, {
37728
+ Result: "result"
37729
+ });
37730
+ });
37731
+ ListVendorFacilityStatusesResponse$outboundSchema = objectType({
37732
+ result: lazyType(() => ListVendorFacilityStatusesResponseBody$outboundSchema)
37733
+ }).transform((v2) => {
37734
+ return remap(v2, {
37735
+ result: "Result"
37736
+ });
37737
+ });
37738
+ ((ListVendorFacilityStatusesResponse$) => {
37739
+ ListVendorFacilityStatusesResponse$.inboundSchema = ListVendorFacilityStatusesResponse$inboundSchema;
37740
+ ListVendorFacilityStatusesResponse$.outboundSchema = ListVendorFacilityStatusesResponse$outboundSchema;
37741
+ })(ListVendorFacilityStatusesResponse$ ||= {});
37742
+ });
37743
+
37636
37744
  // src/models/operations/listvendorinvoices.ts
37637
37745
  var ListVendorInvoicesRequest$inboundSchema, ListVendorInvoicesRequest$outboundSchema, ListVendorInvoicesRequest$, ListVendorInvoicesResponseBody$inboundSchema, ListVendorInvoicesResponseBody$outboundSchema, ListVendorInvoicesResponseBody$, ListVendorInvoicesResponse$inboundSchema, ListVendorInvoicesResponse$outboundSchema, ListVendorInvoicesResponse$;
37638
37746
  var init_listvendorinvoices = __esm(() => {
@@ -37944,6 +38052,7 @@ var init_operations = __esm(() => {
37944
38052
  init_listorsearchfacilities();
37945
38053
  init_listorsearchsupportarticles();
37946
38054
  init_listvendorcredentials();
38055
+ init_listvendorfacilitystatuses();
37947
38056
  init_listvendorinvoices();
37948
38057
  init_listvendorjobtitles();
37949
38058
  init_logsuserintothesystem();
@@ -38065,7 +38174,7 @@ var init_organizationsGetFacility2 = __esm(() => {
38065
38174
  request: GetFacilityRequest$inboundSchema
38066
38175
  };
38067
38176
  tool$organizationsGetFacility = {
38068
- name: "organizations_get-facility",
38177
+ name: "organizations-get-facility",
38069
38178
  description: `Get facility
38070
38179
 
38071
38180
  Retrieve an individual facility.`,
@@ -38240,7 +38349,7 @@ var init_organizationsListOrSearchFacilities2 = __esm(() => {
38240
38349
  request: ListOrSearchFacilitiesRequest$inboundSchema
38241
38350
  };
38242
38351
  tool$organizationsListOrSearchFacilities = {
38243
- name: "organizations_list-or-search-facilities",
38352
+ name: "organizations-list-or-search-facilities",
38244
38353
  description: `List or search facilities
38245
38354
 
38246
38355
  List or search facilities.
@@ -38363,7 +38472,7 @@ var init_supportArticlesGetSupportArticle2 = __esm(() => {
38363
38472
  request: GetSupportArticleRequest$inboundSchema
38364
38473
  };
38365
38474
  tool$supportArticlesGetSupportArticle = {
38366
- name: "support-articles_get-support-article",
38475
+ name: "support-articles-get-support-article",
38367
38476
  description: `Get support article
38368
38477
 
38369
38478
  Retrieve an individual support article.
@@ -38509,7 +38618,7 @@ var init_supportArticlesListOrSearchSupportArticles2 = __esm(() => {
38509
38618
  request: ListOrSearchSupportArticlesRequest$inboundSchema
38510
38619
  };
38511
38620
  tool$supportArticlesListOrSearchSupportArticles = {
38512
- name: "support-articles_list-or-search-support-articles",
38621
+ name: "support-articles-list-or-search-support-articles",
38513
38622
  description: `List or search support articles
38514
38623
 
38515
38624
  List or search support articles for FAQ.`,
@@ -38595,7 +38704,7 @@ var init_usersGetCurrentUser2 = __esm(() => {
38595
38704
  init_usersGetCurrentUser();
38596
38705
  init_tools();
38597
38706
  tool$usersGetCurrentUser = {
38598
- name: "users_get-current-user",
38707
+ name: "users-get-current-user",
38599
38708
  description: `Get current user
38600
38709
 
38601
38710
  Returns a user object for the user represented by the authorization token`,
@@ -38700,7 +38809,7 @@ var init_usersGetUserById2 = __esm(() => {
38700
38809
  request: GetUserByIdRequest$inboundSchema
38701
38810
  };
38702
38811
  tool$usersGetUserById = {
38703
- name: "users_get-user-by-id",
38812
+ name: "users-get-user-by-id",
38704
38813
  description: `Get user by id
38705
38814
 
38706
38815
  Returns a user object for the user represented by the identifier in the path.`,
@@ -38796,7 +38905,7 @@ var init_usersLogsUserIntoTheSystem2 = __esm(() => {
38796
38905
  request: LogsUserIntoTheSystemRequestBody$inboundSchema
38797
38906
  };
38798
38907
  tool$usersLogsUserIntoTheSystem = {
38799
- name: "users_logs-user-into-the-system",
38908
+ name: "users-logs-user-into-the-system",
38800
38909
  description: `Logs user into the system
38801
38910
 
38802
38911
  This endpoint allows a user to authenticate themselves and retrieve a permanent token for access.
@@ -38926,7 +39035,7 @@ var init_usersMagiclink2 = __esm(() => {
38926
39035
  request: MagiclinkRequestBody$inboundSchema
38927
39036
  };
38928
39037
  tool$usersMagiclink = {
38929
- name: "users_magiclink",
39038
+ name: "users-magiclink",
38930
39039
  description: `Magic link
38931
39040
 
38932
39041
  It sends an email with a magic link to allow the user to log in.`,
@@ -39026,7 +39135,7 @@ var init_usersPassword2 = __esm(() => {
39026
39135
  request: PasswordRequestBody$inboundSchema
39027
39136
  };
39028
39137
  tool$usersPassword = {
39029
- name: "users_password",
39138
+ name: "users-password",
39030
39139
  description: `Password reset
39031
39140
 
39032
39141
  Resets the a user's password using a password_reset_id that was sent to them via email.
@@ -39127,7 +39236,7 @@ var init_usersPasswordResetRequest2 = __esm(() => {
39127
39236
  request: PasswordResetRequestRequestBody$inboundSchema
39128
39237
  };
39129
39238
  tool$usersPasswordResetRequest = {
39130
- name: "users_password-reset-request",
39239
+ name: "users-password-reset-request",
39131
39240
  description: `Password reset request
39132
39241
 
39133
39242
  It sends an email with a link for resetting a user's password.`,
@@ -39223,7 +39332,7 @@ var init_vendorsCreateVendorRegistration2 = __esm(() => {
39223
39332
  request: CreateVendorRegistrationRequestBody$inboundSchema
39224
39333
  };
39225
39334
  tool$vendorsCreateVendorRegistration = {
39226
- name: "vendors_create-vendor-registration",
39335
+ name: "vendors-create-vendor-registration",
39227
39336
  description: `Create vendor registration
39228
39337
 
39229
39338
  Create an initial vendor registration. Once successful, the vendor will be able to continue to filling out the rest of their onboarding profile.`,
@@ -39328,7 +39437,7 @@ var init_vendorsExpediteTimeRemaining2 = __esm(() => {
39328
39437
  request: ExpediteTimeRemainingRequest$inboundSchema
39329
39438
  };
39330
39439
  tool$vendorsExpediteTimeRemaining = {
39331
- name: "vendors_expedite-time-remaining",
39440
+ name: "vendors-expedite-time-remaining",
39332
39441
  description: `Expedite time remaining
39333
39442
 
39334
39443
  For vendors who have a paid 24-hour expedite credentials invoice, get the remaining time (in seconds) for which submitted credentials will be expedited.`,
@@ -39438,7 +39547,7 @@ var init_vendorsGetVendorInvoiceDetails2 = __esm(() => {
39438
39547
  request: GetVendorInvoiceDetailsRequest$inboundSchema
39439
39548
  };
39440
39549
  tool$vendorsGetVendorInvoiceDetails = {
39441
- name: "vendors_get-vendor-invoice-details",
39550
+ name: "vendors-get-vendor-invoice-details",
39442
39551
  description: `Get vendor invoice details
39443
39552
 
39444
39553
  Retrieve an individual vendor invoice detais.
@@ -39552,7 +39661,7 @@ var init_vendorsListVendorCredentials2 = __esm(() => {
39552
39661
  request: ListVendorCredentialsRequest$inboundSchema
39553
39662
  };
39554
39663
  tool$vendorsListVendorCredentials = {
39555
- name: "vendors_list-vendor-credentials",
39664
+ name: "vendors-list-vendor-credentials",
39556
39665
  description: `List Vendor Credentials
39557
39666
 
39558
39667
  Lists vendor credentials, required credentials, and company credentials. Utilized in Vendor Dashboard.`,
@@ -39571,11 +39680,149 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
39571
39680
  };
39572
39681
  });
39573
39682
 
39574
- // src/funcs/vendorsListVendorInvoices.ts
39575
- function vendorsListVendorInvoices(client, request, options) {
39683
+ // src/funcs/vendorsListVendorFacilityStatuses.ts
39684
+ function vendorsListVendorFacilityStatuses(client, request, options) {
39576
39685
  return new APIPromise($do15(client, request, options));
39577
39686
  }
39578
39687
  async function $do15(client, request, options) {
39688
+ const parsed = safeParse(request, (value) => ListVendorFacilityStatusesRequest$outboundSchema.parse(value), "Input validation failed");
39689
+ if (!parsed.ok) {
39690
+ return [haltIterator(parsed), { status: "invalid" }];
39691
+ }
39692
+ const payload = parsed.value;
39693
+ const body = null;
39694
+ const path = pathToFunc("/vendors/facility_statuses")();
39695
+ const query = encodeFormQuery({
39696
+ desc: payload.desc,
39697
+ items_per_page: payload.items_per_page,
39698
+ page: payload.page,
39699
+ sort: payload.sort
39700
+ });
39701
+ const headers = new Headers(compactMap({
39702
+ Accept: "application/json"
39703
+ }));
39704
+ const securityInput = await extractSecurity(client._options.security);
39705
+ const requestSecurity = resolveGlobalSecurity(securityInput);
39706
+ const context = {
39707
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
39708
+ operationID: "listVendorFacilityStatuses",
39709
+ oAuth2Scopes: [],
39710
+ resolvedSecurity: requestSecurity,
39711
+ securitySource: client._options.security,
39712
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
39713
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
39714
+ };
39715
+ const requestRes = client._createRequest(context, {
39716
+ security: requestSecurity,
39717
+ method: "GET",
39718
+ baseURL: options?.serverURL,
39719
+ path,
39720
+ headers,
39721
+ query,
39722
+ body,
39723
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
39724
+ }, options);
39725
+ if (!requestRes.ok) {
39726
+ return [haltIterator(requestRes), { status: "invalid" }];
39727
+ }
39728
+ const req = requestRes.value;
39729
+ const doResult = await client._do(req, {
39730
+ context,
39731
+ errorCodes: ["401", "4XX", "5XX"],
39732
+ retryConfig: context.retryConfig,
39733
+ retryCodes: context.retryCodes
39734
+ });
39735
+ if (!doResult.ok) {
39736
+ return [haltIterator(doResult), { status: "request-error", request: req }];
39737
+ }
39738
+ const response = doResult.value;
39739
+ const responseFields = {
39740
+ HttpMeta: { Response: response, Request: req }
39741
+ };
39742
+ const [result, raw] = await match(json(200, ListVendorFacilityStatusesResponse$inboundSchema, {
39743
+ key: "Result"
39744
+ }), jsonErr(401, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
39745
+ if (!result.ok) {
39746
+ return [haltIterator(result), {
39747
+ status: "complete",
39748
+ request: req,
39749
+ response
39750
+ }];
39751
+ }
39752
+ const nextFunc = (responseData) => {
39753
+ const page2 = request?.page ?? 1;
39754
+ const nextPage = page2 + 1;
39755
+ if (!responseData) {
39756
+ return { next: () => null };
39757
+ }
39758
+ const results = dlv(responseData, "items");
39759
+ if (!Array.isArray(results) || !results.length) {
39760
+ return { next: () => null };
39761
+ }
39762
+ const limit = request?.itemsPerPage ?? 0;
39763
+ if (results.length < limit) {
39764
+ return { next: () => null };
39765
+ }
39766
+ const nextVal = () => vendorsListVendorFacilityStatuses(client, {
39767
+ ...request,
39768
+ page: nextPage
39769
+ }, options);
39770
+ return { next: nextVal, "~next": { page: nextPage } };
39771
+ };
39772
+ const page = { ...result, ...nextFunc(raw) };
39773
+ return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
39774
+ status: "complete",
39775
+ request: req,
39776
+ response
39777
+ }];
39778
+ }
39779
+ var init_vendorsListVendorFacilityStatuses = __esm(() => {
39780
+ init_encodings();
39781
+ init_matchers();
39782
+ init_primitives();
39783
+ init_schemas();
39784
+ init_security();
39785
+ init_url();
39786
+ init_errors();
39787
+ init_operations();
39788
+ init_async();
39789
+ init_operations2();
39790
+ });
39791
+
39792
+ // src/mcp-server/tools/vendorsListVendorFacilityStatuses.ts
39793
+ var args14, tool$vendorsListVendorFacilityStatuses;
39794
+ var init_vendorsListVendorFacilityStatuses2 = __esm(() => {
39795
+ init_vendorsListVendorFacilityStatuses();
39796
+ init_operations();
39797
+ init_tools();
39798
+ args14 = {
39799
+ request: ListVendorFacilityStatusesRequest$inboundSchema
39800
+ };
39801
+ tool$vendorsListVendorFacilityStatuses = {
39802
+ name: "vendors-list-vendor-facility-statuses",
39803
+ description: `List vendor facility statuses
39804
+
39805
+ List the facilities for the vendor`,
39806
+ args: args14,
39807
+ tool: async (client, args15, ctx) => {
39808
+ const [result, apiCall] = await vendorsListVendorFacilityStatuses(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39809
+ if (!result.ok) {
39810
+ return {
39811
+ content: [{ type: "text", text: result.error.message }],
39812
+ isError: true
39813
+ };
39814
+ }
39815
+ const value = result.value.result;
39816
+ return formatResult(value, apiCall);
39817
+ }
39818
+ };
39819
+ });
39820
+
39821
+ // src/funcs/vendorsListVendorInvoices.ts
39822
+ function vendorsListVendorInvoices(client, request, options) {
39823
+ return new APIPromise($do16(client, request, options));
39824
+ }
39825
+ async function $do16(client, request, options) {
39579
39826
  const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
39580
39827
  if (!parsed.ok) {
39581
39828
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39689,16 +39936,16 @@ var init_vendorsListVendorInvoices = __esm(() => {
39689
39936
  });
39690
39937
 
39691
39938
  // src/mcp-server/tools/vendorsListVendorInvoices.ts
39692
- var args14, tool$vendorsListVendorInvoices;
39939
+ var args15, tool$vendorsListVendorInvoices;
39693
39940
  var init_vendorsListVendorInvoices2 = __esm(() => {
39694
39941
  init_vendorsListVendorInvoices();
39695
39942
  init_operations();
39696
39943
  init_tools();
39697
- args14 = {
39944
+ args15 = {
39698
39945
  request: ListVendorInvoicesRequest$inboundSchema
39699
39946
  };
39700
39947
  tool$vendorsListVendorInvoices = {
39701
- name: "vendors_list-vendor-invoices",
39948
+ name: "vendors-list-vendor-invoices",
39702
39949
  description: `List vendor invoices
39703
39950
 
39704
39951
  List invoices for Vendors
@@ -39706,9 +39953,9 @@ List invoices for Vendors
39706
39953
  Available \`expand\` scopes are:
39707
39954
 
39708
39955
  invoice.line_items`,
39709
- args: args14,
39710
- tool: async (client, args15, ctx) => {
39711
- const [result, apiCall] = await vendorsListVendorInvoices(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39956
+ args: args15,
39957
+ tool: async (client, args16, ctx) => {
39958
+ const [result, apiCall] = await vendorsListVendorInvoices(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39712
39959
  if (!result.ok) {
39713
39960
  return {
39714
39961
  content: [{ type: "text", text: result.error.message }],
@@ -39723,9 +39970,9 @@ invoice.line_items`,
39723
39970
 
39724
39971
  // src/funcs/vendorsListVendorJobTitles.ts
39725
39972
  function vendorsListVendorJobTitles(client, request, options) {
39726
- return new APIPromise($do16(client, request, options));
39973
+ return new APIPromise($do17(client, request, options));
39727
39974
  }
39728
- async function $do16(client, request, options) {
39975
+ async function $do17(client, request, options) {
39729
39976
  const parsed = safeParse(request, (value) => ListVendorJobTitlesRequest$outboundSchema.parse(value), "Input validation failed");
39730
39977
  if (!parsed.ok) {
39731
39978
  return [haltIterator(parsed), { status: "invalid" }];
@@ -39828,22 +40075,22 @@ var init_vendorsListVendorJobTitles = __esm(() => {
39828
40075
  });
39829
40076
 
39830
40077
  // src/mcp-server/tools/vendorsListVendorJobTitles.ts
39831
- var args15, tool$vendorsListVendorJobTitles;
40078
+ var args16, tool$vendorsListVendorJobTitles;
39832
40079
  var init_vendorsListVendorJobTitles2 = __esm(() => {
39833
40080
  init_vendorsListVendorJobTitles();
39834
40081
  init_operations();
39835
40082
  init_tools();
39836
- args15 = {
40083
+ args16 = {
39837
40084
  request: ListVendorJobTitlesRequest$inboundSchema
39838
40085
  };
39839
40086
  tool$vendorsListVendorJobTitles = {
39840
- name: "vendors_list-vendor-job-titles",
40087
+ name: "vendors-list-vendor-job-titles",
39841
40088
  description: `List vendor job titles
39842
40089
 
39843
40090
  List valid job titles for Vendors. This can be used during sign up or in a filter.`,
39844
- args: args15,
39845
- tool: async (client, args16, ctx) => {
39846
- const [result, apiCall] = await vendorsListVendorJobTitles(client, args16.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
40091
+ args: args16,
40092
+ tool: async (client, args17, ctx) => {
40093
+ const [result, apiCall] = await vendorsListVendorJobTitles(client, args17.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
39847
40094
  if (!result.ok) {
39848
40095
  return {
39849
40096
  content: [{ type: "text", text: result.error.message }],
@@ -39860,7 +40107,7 @@ List valid job titles for Vendors. This can be used during sign up or in a filte
39860
40107
  function createMCPServer(deps) {
39861
40108
  const server = new McpServer({
39862
40109
  name: "GreenSecurity",
39863
- version: "0.18.2"
40110
+ version: "0.19.0"
39864
40111
  });
39865
40112
  const client = new GreenSecurityCore({
39866
40113
  security: deps.security,
@@ -39879,6 +40126,7 @@ function createMCPServer(deps) {
39879
40126
  tool(tool$vendorsExpediteTimeRemaining);
39880
40127
  tool(tool$vendorsListVendorInvoices);
39881
40128
  tool(tool$vendorsGetVendorInvoiceDetails);
40129
+ tool(tool$vendorsListVendorFacilityStatuses);
39882
40130
  tool(tool$usersGetCurrentUser);
39883
40131
  tool(tool$usersGetUserById);
39884
40132
  tool(tool$usersLogsUserIntoTheSystem);
@@ -39911,6 +40159,7 @@ var init_server2 = __esm(() => {
39911
40159
  init_vendorsExpediteTimeRemaining2();
39912
40160
  init_vendorsGetVendorInvoiceDetails2();
39913
40161
  init_vendorsListVendorCredentials2();
40162
+ init_vendorsListVendorFacilityStatuses2();
39914
40163
  init_vendorsListVendorInvoices2();
39915
40164
  init_vendorsListVendorJobTitles2();
39916
40165
  });
@@ -41110,7 +41359,7 @@ var routes = rn({
41110
41359
  var app = Ve(routes, {
41111
41360
  name: "mcp",
41112
41361
  versionInfo: {
41113
- currentVersion: "0.18.2"
41362
+ currentVersion: "0.19.0"
41114
41363
  }
41115
41364
  });
41116
41365
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -41118,5 +41367,5 @@ export {
41118
41367
  app
41119
41368
  };
41120
41369
 
41121
- //# debugId=5513584B61D4C26A64756E2164756E21
41370
+ //# debugId=D2B894A3BF02623164756E2164756E21
41122
41371
  //# sourceMappingURL=mcp-server.js.map