@greensecurity/javascript-sdk 0.16.0 → 0.18.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.
- package/REACT_QUERY.md +68 -30
- package/README.md +43 -0
- package/bin/mcp-server.js +731 -52
- package/bin/mcp-server.js.map +29 -19
- package/funcs/organizationsListOrSearchFacilities.d.ts +4 -1
- package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/funcs/organizationsListOrSearchFacilities.js +46 -9
- package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/funcs/supportArticlesGetSupportArticle.js +1 -1
- package/funcs/supportArticlesGetSupportArticle.js.map +1 -1
- package/funcs/supportArticlesListOrSearchSupportArticles.d.ts +4 -1
- package/funcs/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
- package/funcs/supportArticlesListOrSearchSupportArticles.js +42 -7
- package/funcs/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/funcs/vendorsExpediteTimeRemaining.d.ts +17 -0
- package/funcs/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/funcs/vendorsExpediteTimeRemaining.js +120 -0
- package/funcs/vendorsExpediteTimeRemaining.js.map +1 -0
- package/funcs/vendorsListVendorInvoices.d.ts +24 -0
- package/funcs/vendorsListVendorInvoices.d.ts.map +1 -0
- package/funcs/vendorsListVendorInvoices.js +166 -0
- package/funcs/vendorsListVendorInvoices.js.map +1 -0
- package/funcs/vendorsListVendorJobTitles.d.ts +4 -1
- package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/funcs/vendorsListVendorJobTitles.js +39 -6
- package/funcs/vendorsListVendorJobTitles.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/extensions.d.ts +9 -0
- package/mcp-server/extensions.d.ts.map +1 -0
- package/mcp-server/extensions.js +6 -0
- package/mcp-server/extensions.js.map +1 -0
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/resources.d.ts +9 -4
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js +36 -9
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +10 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -1
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +1 -1
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts +8 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js +64 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorInvoices.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js +68 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js +1 -1
- package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -1
- package/models/components/expand.d.ts +3 -0
- package/models/components/expand.d.ts.map +1 -1
- package/models/components/expand.js +1 -0
- package/models/components/expand.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +43 -0
- package/models/components/invoice.d.ts.map +1 -0
- package/models/components/invoice.js +91 -0
- package/models/components/invoice.js.map +1 -0
- package/models/components/invoiceitem.d.ts +40 -0
- package/models/components/invoiceitem.d.ts.map +1 -0
- package/models/components/invoiceitem.js +94 -0
- package/models/components/invoiceitem.js.map +1 -0
- package/models/operations/expeditetimeremaining.d.ts +60 -0
- package/models/operations/expeditetimeremaining.d.ts.map +1 -0
- package/models/operations/expeditetimeremaining.js +113 -0
- package/models/operations/expeditetimeremaining.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listorsearchfacilities.d.ts +25 -0
- package/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/models/operations/listorsearchfacilities.js +36 -1
- package/models/operations/listorsearchfacilities.js.map +1 -1
- package/models/operations/listorsearchsupportarticles.d.ts +25 -0
- package/models/operations/listorsearchsupportarticles.d.ts.map +1 -1
- package/models/operations/listorsearchsupportarticles.js +36 -1
- package/models/operations/listorsearchsupportarticles.js.map +1 -1
- package/models/operations/listvendorinvoices.d.ts +116 -0
- package/models/operations/listvendorinvoices.d.ts.map +1 -0
- package/models/operations/listvendorinvoices.js +155 -0
- package/models/operations/listvendorinvoices.js.map +1 -0
- package/models/operations/listvendorjobtitles.d.ts +25 -0
- package/models/operations/listvendorjobtitles.d.ts.map +1 -1
- package/models/operations/listvendorjobtitles.js +36 -1
- package/models/operations/listvendorjobtitles.js.map +1 -1
- package/package.json +1 -1
- package/react-query/index.d.ts +2 -0
- package/react-query/index.d.ts.map +1 -1
- package/react-query/index.js +2 -0
- package/react-query/index.js.map +1 -1
- package/react-query/organizationsListOrSearchFacilities.d.ts +54 -3
- package/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/react-query/organizationsListOrSearchFacilities.js +89 -0
- package/react-query/organizationsListOrSearchFacilities.js.map +1 -1
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +28 -3
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -1
- package/react-query/supportArticlesListOrSearchSupportArticles.js +58 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -1
- package/react-query/vendorsExpediteTimeRemaining.d.ts +30 -0
- package/react-query/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/react-query/vendorsExpediteTimeRemaining.js +96 -0
- package/react-query/vendorsExpediteTimeRemaining.js.map +1 -0
- package/react-query/vendorsListVendorInvoices.d.ts +96 -0
- package/react-query/vendorsListVendorInvoices.d.ts.map +1 -0
- package/react-query/vendorsListVendorInvoices.js +178 -0
- package/react-query/vendorsListVendorInvoices.js.map +1 -0
- package/react-query/vendorsListVendorJobTitles.d.ts +28 -3
- package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/react-query/vendorsListVendorJobTitles.js +59 -0
- package/react-query/vendorsListVendorJobTitles.js.map +1 -1
- package/sdk/organizations.d.ts +4 -1
- package/sdk/organizations.d.ts.map +1 -1
- package/sdk/organizations.js +2 -1
- package/sdk/organizations.js.map +1 -1
- package/sdk/supportarticles.d.ts +4 -1
- package/sdk/supportarticles.d.ts.map +1 -1
- package/sdk/supportarticles.js +2 -1
- package/sdk/supportarticles.js.map +1 -1
- package/sdk/vendors.d.ts +24 -1
- package/sdk/vendors.d.ts.map +1 -1
- package/sdk/vendors.js +26 -1
- package/sdk/vendors.js.map +1 -1
- package/src/__tests__/supportarticles.test.ts +2 -1
- package/src/__tests__/vendors.test.ts +58 -1
- package/src/funcs/organizationsListOrSearchFacilities.ts +116 -42
- package/src/funcs/supportArticlesGetSupportArticle.ts +1 -1
- package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +100 -31
- package/src/funcs/vendorsExpediteTimeRemaining.ts +171 -0
- package/src/funcs/vendorsListVendorInvoices.ts +255 -0
- package/src/funcs/vendorsListVendorJobTitles.ts +101 -33
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/extensions.ts +13 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/resources.ts +75 -14
- package/src/mcp-server/server.ts +20 -1
- package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
- package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +1 -1
- package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +37 -0
- package/src/mcp-server/tools/vendorsListVendorInvoices.ts +41 -0
- package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +1 -1
- package/src/models/components/expand.ts +1 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/invoice.ts +99 -0
- package/src/models/components/invoiceitem.ts +98 -0
- package/src/models/operations/expeditetimeremaining.ts +152 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listorsearchfacilities.ts +72 -0
- package/src/models/operations/listorsearchsupportarticles.ts +75 -0
- package/src/models/operations/listvendorinvoices.ts +252 -0
- package/src/models/operations/listvendorjobtitles.ts +68 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/organizationsListOrSearchFacilities.ts +179 -1
- package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +149 -1
- package/src/react-query/vendorsExpediteTimeRemaining.ts +165 -0
- package/src/react-query/vendorsListVendorInvoices.ts +364 -0
- package/src/react-query/vendorsListVendorJobTitles.ts +149 -1
- package/src/sdk/organizations.ts +5 -2
- package/src/sdk/supportarticles.ts +8 -2
- package/src/sdk/vendors.ts +47 -2
package/bin/mcp-server.js
CHANGED
|
@@ -34172,9 +34172,9 @@ var init_config = __esm(() => {
|
|
|
34172
34172
|
SDK_METADATA = {
|
|
34173
34173
|
language: "typescript",
|
|
34174
34174
|
openapiDocVersion: "0.0.3",
|
|
34175
|
-
sdkVersion: "0.
|
|
34176
|
-
genVersion: "2.
|
|
34177
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
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"
|
|
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") {
|
|
@@ -35853,7 +35885,8 @@ var init_expand = __esm(() => {
|
|
|
35853
35885
|
SupportArticleDescription: "support_article.description",
|
|
35854
35886
|
SupportArticlePublished: "support_article.published",
|
|
35855
35887
|
SupportArticleNotes: "support_article.notes",
|
|
35856
|
-
SupportArticleSupportCategory: "support_article.support_category"
|
|
35888
|
+
SupportArticleSupportCategory: "support_article.support_category",
|
|
35889
|
+
InvoiceLineItems: "invoice.line_items"
|
|
35857
35890
|
};
|
|
35858
35891
|
Expand$inboundSchema = nativeEnumType(Expand);
|
|
35859
35892
|
Expand$outboundSchema = Expand$inboundSchema;
|
|
@@ -36440,6 +36473,85 @@ var init_facility = __esm(() => {
|
|
|
36440
36473
|
})(Facility$ ||= {});
|
|
36441
36474
|
});
|
|
36442
36475
|
|
|
36476
|
+
// src/models/components/invoiceitem.ts
|
|
36477
|
+
var InvoiceItem$inboundSchema, InvoiceItem$outboundSchema, InvoiceItem$;
|
|
36478
|
+
var init_invoiceitem = __esm(() => {
|
|
36479
|
+
init_lib();
|
|
36480
|
+
init_primitives();
|
|
36481
|
+
InvoiceItem$inboundSchema = objectType({
|
|
36482
|
+
item_id: numberType().int().optional(),
|
|
36483
|
+
date_starts: nullableType(stringType()).optional(),
|
|
36484
|
+
date_ends: nullableType(stringType()).optional(),
|
|
36485
|
+
is_subscription: nullableType(booleanType()).optional(),
|
|
36486
|
+
product_title: nullableType(stringType()).optional()
|
|
36487
|
+
}).transform((v2) => {
|
|
36488
|
+
return remap(v2, {
|
|
36489
|
+
item_id: "itemId",
|
|
36490
|
+
date_starts: "dateStarts",
|
|
36491
|
+
date_ends: "dateEnds",
|
|
36492
|
+
is_subscription: "isSubscription",
|
|
36493
|
+
product_title: "productTitle"
|
|
36494
|
+
});
|
|
36495
|
+
});
|
|
36496
|
+
InvoiceItem$outboundSchema = objectType({
|
|
36497
|
+
itemId: numberType().int().optional(),
|
|
36498
|
+
dateStarts: nullableType(stringType()).optional(),
|
|
36499
|
+
dateEnds: nullableType(stringType()).optional(),
|
|
36500
|
+
isSubscription: nullableType(booleanType()).optional(),
|
|
36501
|
+
productTitle: nullableType(stringType()).optional()
|
|
36502
|
+
}).transform((v2) => {
|
|
36503
|
+
return remap(v2, {
|
|
36504
|
+
itemId: "item_id",
|
|
36505
|
+
dateStarts: "date_starts",
|
|
36506
|
+
dateEnds: "date_ends",
|
|
36507
|
+
isSubscription: "is_subscription",
|
|
36508
|
+
productTitle: "product_title"
|
|
36509
|
+
});
|
|
36510
|
+
});
|
|
36511
|
+
((InvoiceItem$) => {
|
|
36512
|
+
InvoiceItem$.inboundSchema = InvoiceItem$inboundSchema;
|
|
36513
|
+
InvoiceItem$.outboundSchema = InvoiceItem$outboundSchema;
|
|
36514
|
+
})(InvoiceItem$ ||= {});
|
|
36515
|
+
});
|
|
36516
|
+
|
|
36517
|
+
// src/models/components/invoice.ts
|
|
36518
|
+
var Invoice$inboundSchema, Invoice$outboundSchema, Invoice$;
|
|
36519
|
+
var init_invoice = __esm(() => {
|
|
36520
|
+
init_lib();
|
|
36521
|
+
init_primitives();
|
|
36522
|
+
init_invoiceitem();
|
|
36523
|
+
Invoice$inboundSchema = objectType({
|
|
36524
|
+
id: numberType().int(),
|
|
36525
|
+
invoice_number: nullableType(stringType()).optional(),
|
|
36526
|
+
amount: nullableType(numberType().int()).optional(),
|
|
36527
|
+
status: nullableType(stringType()).optional(),
|
|
36528
|
+
financial_status: nullableType(stringType()).optional(),
|
|
36529
|
+
items: arrayType(InvoiceItem$inboundSchema).optional()
|
|
36530
|
+
}).transform((v2) => {
|
|
36531
|
+
return remap(v2, {
|
|
36532
|
+
invoice_number: "invoiceNumber",
|
|
36533
|
+
financial_status: "financialStatus"
|
|
36534
|
+
});
|
|
36535
|
+
});
|
|
36536
|
+
Invoice$outboundSchema = objectType({
|
|
36537
|
+
id: numberType().int(),
|
|
36538
|
+
invoiceNumber: nullableType(stringType()).optional(),
|
|
36539
|
+
amount: nullableType(numberType().int()).optional(),
|
|
36540
|
+
status: nullableType(stringType()).optional(),
|
|
36541
|
+
financialStatus: nullableType(stringType()).optional(),
|
|
36542
|
+
items: arrayType(InvoiceItem$outboundSchema).optional()
|
|
36543
|
+
}).transform((v2) => {
|
|
36544
|
+
return remap(v2, {
|
|
36545
|
+
invoiceNumber: "invoice_number",
|
|
36546
|
+
financialStatus: "financial_status"
|
|
36547
|
+
});
|
|
36548
|
+
});
|
|
36549
|
+
((Invoice$) => {
|
|
36550
|
+
Invoice$.inboundSchema = Invoice$inboundSchema;
|
|
36551
|
+
Invoice$.outboundSchema = Invoice$outboundSchema;
|
|
36552
|
+
})(Invoice$ ||= {});
|
|
36553
|
+
});
|
|
36554
|
+
|
|
36443
36555
|
// src/models/components/loginemailandpassword.ts
|
|
36444
36556
|
var LoginEmailAndPassword$inboundSchema, LoginEmailAndPassword$outboundSchema, LoginEmailAndPassword$;
|
|
36445
36557
|
var init_loginemailandpassword = __esm(() => {
|
|
@@ -36989,6 +37101,8 @@ var init_components = __esm(() => {
|
|
|
36989
37101
|
init_facility();
|
|
36990
37102
|
init_facilitysummary();
|
|
36991
37103
|
init_imageset();
|
|
37104
|
+
init_invoice();
|
|
37105
|
+
init_invoiceitem();
|
|
36992
37106
|
init_loginemailandpassword();
|
|
36993
37107
|
init_loginrequirementsfromemail();
|
|
36994
37108
|
init_mfarequiredresponse();
|
|
@@ -37106,6 +37220,49 @@ var init_createvendorregistration = __esm(() => {
|
|
|
37106
37220
|
})(CreateVendorRegistrationCreateVendorRegistrationCreated$ ||= {});
|
|
37107
37221
|
});
|
|
37108
37222
|
|
|
37223
|
+
// src/models/operations/expeditetimeremaining.ts
|
|
37224
|
+
var ExpediteTimeRemainingRequest$inboundSchema, ExpediteTimeRemainingRequest$outboundSchema, ExpediteTimeRemainingRequest$, ExpediteTimeRemainingResponseBody$inboundSchema, ExpediteTimeRemainingResponseBody$outboundSchema, ExpediteTimeRemainingResponseBody$;
|
|
37225
|
+
var init_expeditetimeremaining = __esm(() => {
|
|
37226
|
+
init_lib();
|
|
37227
|
+
init_primitives();
|
|
37228
|
+
ExpediteTimeRemainingRequest$inboundSchema = objectType({
|
|
37229
|
+
vendor_id_or_me: stringType()
|
|
37230
|
+
}).transform((v2) => {
|
|
37231
|
+
return remap(v2, {
|
|
37232
|
+
vendor_id_or_me: "vendorIdOrMe"
|
|
37233
|
+
});
|
|
37234
|
+
});
|
|
37235
|
+
ExpediteTimeRemainingRequest$outboundSchema = objectType({
|
|
37236
|
+
vendorIdOrMe: stringType()
|
|
37237
|
+
}).transform((v2) => {
|
|
37238
|
+
return remap(v2, {
|
|
37239
|
+
vendorIdOrMe: "vendor_id_or_me"
|
|
37240
|
+
});
|
|
37241
|
+
});
|
|
37242
|
+
((ExpediteTimeRemainingRequest$) => {
|
|
37243
|
+
ExpediteTimeRemainingRequest$.inboundSchema = ExpediteTimeRemainingRequest$inboundSchema;
|
|
37244
|
+
ExpediteTimeRemainingRequest$.outboundSchema = ExpediteTimeRemainingRequest$outboundSchema;
|
|
37245
|
+
})(ExpediteTimeRemainingRequest$ ||= {});
|
|
37246
|
+
ExpediteTimeRemainingResponseBody$inboundSchema = objectType({
|
|
37247
|
+
seconds_remaining: numberType().int()
|
|
37248
|
+
}).transform((v2) => {
|
|
37249
|
+
return remap(v2, {
|
|
37250
|
+
seconds_remaining: "secondsRemaining"
|
|
37251
|
+
});
|
|
37252
|
+
});
|
|
37253
|
+
ExpediteTimeRemainingResponseBody$outboundSchema = objectType({
|
|
37254
|
+
secondsRemaining: numberType().int()
|
|
37255
|
+
}).transform((v2) => {
|
|
37256
|
+
return remap(v2, {
|
|
37257
|
+
secondsRemaining: "seconds_remaining"
|
|
37258
|
+
});
|
|
37259
|
+
});
|
|
37260
|
+
((ExpediteTimeRemainingResponseBody$) => {
|
|
37261
|
+
ExpediteTimeRemainingResponseBody$.inboundSchema = ExpediteTimeRemainingResponseBody$inboundSchema;
|
|
37262
|
+
ExpediteTimeRemainingResponseBody$.outboundSchema = ExpediteTimeRemainingResponseBody$outboundSchema;
|
|
37263
|
+
})(ExpediteTimeRemainingResponseBody$ ||= {});
|
|
37264
|
+
});
|
|
37265
|
+
|
|
37109
37266
|
// src/models/operations/getfacility.ts
|
|
37110
37267
|
var GetFacilityRequest$inboundSchema, GetFacilityRequest$outboundSchema, GetFacilityRequest$;
|
|
37111
37268
|
var init_getfacility = __esm(() => {
|
|
@@ -37158,7 +37315,7 @@ var init_getuserbyid = __esm(() => {
|
|
|
37158
37315
|
});
|
|
37159
37316
|
|
|
37160
37317
|
// src/models/operations/listorsearchfacilities.ts
|
|
37161
|
-
var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$;
|
|
37318
|
+
var ListOrSearchFacilitiesRequest$inboundSchema, ListOrSearchFacilitiesRequest$outboundSchema, ListOrSearchFacilitiesRequest$, ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema, ListOrSearchFacilitiesListOrSearchFacilitiesOk$, ListOrSearchFacilitiesResponse$inboundSchema, ListOrSearchFacilitiesResponse$outboundSchema, ListOrSearchFacilitiesResponse$;
|
|
37162
37319
|
var init_listorsearchfacilities = __esm(() => {
|
|
37163
37320
|
init_lib();
|
|
37164
37321
|
init_primitives();
|
|
@@ -37217,10 +37374,28 @@ var init_listorsearchfacilities = __esm(() => {
|
|
|
37217
37374
|
ListOrSearchFacilitiesListOrSearchFacilitiesOk$.inboundSchema = ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema;
|
|
37218
37375
|
ListOrSearchFacilitiesListOrSearchFacilitiesOk$.outboundSchema = ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema;
|
|
37219
37376
|
})(ListOrSearchFacilitiesListOrSearchFacilitiesOk$ ||= {});
|
|
37377
|
+
ListOrSearchFacilitiesResponse$inboundSchema = objectType({
|
|
37378
|
+
Result: lazyType(() => ListOrSearchFacilitiesListOrSearchFacilitiesOk$inboundSchema)
|
|
37379
|
+
}).transform((v2) => {
|
|
37380
|
+
return remap(v2, {
|
|
37381
|
+
Result: "result"
|
|
37382
|
+
});
|
|
37383
|
+
});
|
|
37384
|
+
ListOrSearchFacilitiesResponse$outboundSchema = objectType({
|
|
37385
|
+
result: lazyType(() => ListOrSearchFacilitiesListOrSearchFacilitiesOk$outboundSchema)
|
|
37386
|
+
}).transform((v2) => {
|
|
37387
|
+
return remap(v2, {
|
|
37388
|
+
result: "Result"
|
|
37389
|
+
});
|
|
37390
|
+
});
|
|
37391
|
+
((ListOrSearchFacilitiesResponse$) => {
|
|
37392
|
+
ListOrSearchFacilitiesResponse$.inboundSchema = ListOrSearchFacilitiesResponse$inboundSchema;
|
|
37393
|
+
ListOrSearchFacilitiesResponse$.outboundSchema = ListOrSearchFacilitiesResponse$outboundSchema;
|
|
37394
|
+
})(ListOrSearchFacilitiesResponse$ ||= {});
|
|
37220
37395
|
});
|
|
37221
37396
|
|
|
37222
37397
|
// src/models/operations/listorsearchsupportarticles.ts
|
|
37223
|
-
var ListOrSearchSupportArticlesRequest$inboundSchema, ListOrSearchSupportArticlesRequest$outboundSchema, ListOrSearchSupportArticlesRequest$, ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$;
|
|
37398
|
+
var ListOrSearchSupportArticlesRequest$inboundSchema, ListOrSearchSupportArticlesRequest$outboundSchema, ListOrSearchSupportArticlesRequest$, ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema, ListOrSearchSupportArticlesListOrSearchArticlesOk$, ListOrSearchSupportArticlesResponse$inboundSchema, ListOrSearchSupportArticlesResponse$outboundSchema, ListOrSearchSupportArticlesResponse$;
|
|
37224
37399
|
var init_listorsearchsupportarticles = __esm(() => {
|
|
37225
37400
|
init_lib();
|
|
37226
37401
|
init_primitives();
|
|
@@ -37261,6 +37436,24 @@ var init_listorsearchsupportarticles = __esm(() => {
|
|
|
37261
37436
|
ListOrSearchSupportArticlesListOrSearchArticlesOk$.inboundSchema = ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema;
|
|
37262
37437
|
ListOrSearchSupportArticlesListOrSearchArticlesOk$.outboundSchema = ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema;
|
|
37263
37438
|
})(ListOrSearchSupportArticlesListOrSearchArticlesOk$ ||= {});
|
|
37439
|
+
ListOrSearchSupportArticlesResponse$inboundSchema = objectType({
|
|
37440
|
+
Result: lazyType(() => ListOrSearchSupportArticlesListOrSearchArticlesOk$inboundSchema)
|
|
37441
|
+
}).transform((v2) => {
|
|
37442
|
+
return remap(v2, {
|
|
37443
|
+
Result: "result"
|
|
37444
|
+
});
|
|
37445
|
+
});
|
|
37446
|
+
ListOrSearchSupportArticlesResponse$outboundSchema = objectType({
|
|
37447
|
+
result: lazyType(() => ListOrSearchSupportArticlesListOrSearchArticlesOk$outboundSchema)
|
|
37448
|
+
}).transform((v2) => {
|
|
37449
|
+
return remap(v2, {
|
|
37450
|
+
result: "Result"
|
|
37451
|
+
});
|
|
37452
|
+
});
|
|
37453
|
+
((ListOrSearchSupportArticlesResponse$) => {
|
|
37454
|
+
ListOrSearchSupportArticlesResponse$.inboundSchema = ListOrSearchSupportArticlesResponse$inboundSchema;
|
|
37455
|
+
ListOrSearchSupportArticlesResponse$.outboundSchema = ListOrSearchSupportArticlesResponse$outboundSchema;
|
|
37456
|
+
})(ListOrSearchSupportArticlesResponse$ ||= {});
|
|
37264
37457
|
});
|
|
37265
37458
|
|
|
37266
37459
|
// src/models/operations/listvendorcredentials.ts
|
|
@@ -37345,8 +37538,76 @@ var init_listvendorcredentials = __esm(() => {
|
|
|
37345
37538
|
})(ListVendorCredentialsResponseBody$ ||= {});
|
|
37346
37539
|
});
|
|
37347
37540
|
|
|
37541
|
+
// src/models/operations/listvendorinvoices.ts
|
|
37542
|
+
var ListVendorInvoicesRequest$inboundSchema, ListVendorInvoicesRequest$outboundSchema, ListVendorInvoicesRequest$, ListVendorInvoicesResponseBody$inboundSchema, ListVendorInvoicesResponseBody$outboundSchema, ListVendorInvoicesResponseBody$, ListVendorInvoicesResponse$inboundSchema, ListVendorInvoicesResponse$outboundSchema, ListVendorInvoicesResponse$;
|
|
37543
|
+
var init_listvendorinvoices = __esm(() => {
|
|
37544
|
+
init_lib();
|
|
37545
|
+
init_primitives();
|
|
37546
|
+
init_components();
|
|
37547
|
+
ListVendorInvoicesRequest$inboundSchema = objectType({
|
|
37548
|
+
sort: nullableType(stringType()).optional(),
|
|
37549
|
+
desc: Desc$inboundSchema.optional(),
|
|
37550
|
+
page: numberType().int().optional(),
|
|
37551
|
+
items_per_page: numberType().int().optional(),
|
|
37552
|
+
expand: arrayType(Expand$inboundSchema).optional(),
|
|
37553
|
+
vendor_id_or_me: stringType()
|
|
37554
|
+
}).transform((v2) => {
|
|
37555
|
+
return remap(v2, {
|
|
37556
|
+
items_per_page: "itemsPerPage",
|
|
37557
|
+
vendor_id_or_me: "vendorIdOrMe"
|
|
37558
|
+
});
|
|
37559
|
+
});
|
|
37560
|
+
ListVendorInvoicesRequest$outboundSchema = objectType({
|
|
37561
|
+
sort: nullableType(stringType()).optional(),
|
|
37562
|
+
desc: Desc$outboundSchema.optional(),
|
|
37563
|
+
page: numberType().int().optional(),
|
|
37564
|
+
itemsPerPage: numberType().int().optional(),
|
|
37565
|
+
expand: arrayType(Expand$outboundSchema).optional(),
|
|
37566
|
+
vendorIdOrMe: stringType()
|
|
37567
|
+
}).transform((v2) => {
|
|
37568
|
+
return remap(v2, {
|
|
37569
|
+
itemsPerPage: "items_per_page",
|
|
37570
|
+
vendorIdOrMe: "vendor_id_or_me"
|
|
37571
|
+
});
|
|
37572
|
+
});
|
|
37573
|
+
((ListVendorInvoicesRequest$) => {
|
|
37574
|
+
ListVendorInvoicesRequest$.inboundSchema = ListVendorInvoicesRequest$inboundSchema;
|
|
37575
|
+
ListVendorInvoicesRequest$.outboundSchema = ListVendorInvoicesRequest$outboundSchema;
|
|
37576
|
+
})(ListVendorInvoicesRequest$ ||= {});
|
|
37577
|
+
ListVendorInvoicesResponseBody$inboundSchema = objectType({
|
|
37578
|
+
items: arrayType(Invoice$inboundSchema),
|
|
37579
|
+
pager: Pager$inboundSchema
|
|
37580
|
+
});
|
|
37581
|
+
ListVendorInvoicesResponseBody$outboundSchema = objectType({
|
|
37582
|
+
items: arrayType(Invoice$outboundSchema),
|
|
37583
|
+
pager: Pager$outboundSchema
|
|
37584
|
+
});
|
|
37585
|
+
((ListVendorInvoicesResponseBody$) => {
|
|
37586
|
+
ListVendorInvoicesResponseBody$.inboundSchema = ListVendorInvoicesResponseBody$inboundSchema;
|
|
37587
|
+
ListVendorInvoicesResponseBody$.outboundSchema = ListVendorInvoicesResponseBody$outboundSchema;
|
|
37588
|
+
})(ListVendorInvoicesResponseBody$ ||= {});
|
|
37589
|
+
ListVendorInvoicesResponse$inboundSchema = objectType({
|
|
37590
|
+
Result: lazyType(() => ListVendorInvoicesResponseBody$inboundSchema)
|
|
37591
|
+
}).transform((v2) => {
|
|
37592
|
+
return remap(v2, {
|
|
37593
|
+
Result: "result"
|
|
37594
|
+
});
|
|
37595
|
+
});
|
|
37596
|
+
ListVendorInvoicesResponse$outboundSchema = objectType({
|
|
37597
|
+
result: lazyType(() => ListVendorInvoicesResponseBody$outboundSchema)
|
|
37598
|
+
}).transform((v2) => {
|
|
37599
|
+
return remap(v2, {
|
|
37600
|
+
result: "Result"
|
|
37601
|
+
});
|
|
37602
|
+
});
|
|
37603
|
+
((ListVendorInvoicesResponse$) => {
|
|
37604
|
+
ListVendorInvoicesResponse$.inboundSchema = ListVendorInvoicesResponse$inboundSchema;
|
|
37605
|
+
ListVendorInvoicesResponse$.outboundSchema = ListVendorInvoicesResponse$outboundSchema;
|
|
37606
|
+
})(ListVendorInvoicesResponse$ ||= {});
|
|
37607
|
+
});
|
|
37608
|
+
|
|
37348
37609
|
// src/models/operations/listvendorjobtitles.ts
|
|
37349
|
-
var ListVendorJobTitlesRequest$inboundSchema, ListVendorJobTitlesRequest$outboundSchema, ListVendorJobTitlesRequest$, ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$;
|
|
37610
|
+
var ListVendorJobTitlesRequest$inboundSchema, ListVendorJobTitlesRequest$outboundSchema, ListVendorJobTitlesRequest$, ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema, ListVendorJobTitlesListVendorJobTitlesOk$, ListVendorJobTitlesResponse$inboundSchema, ListVendorJobTitlesResponse$outboundSchema, ListVendorJobTitlesResponse$;
|
|
37350
37611
|
var init_listvendorjobtitles = __esm(() => {
|
|
37351
37612
|
init_lib();
|
|
37352
37613
|
init_primitives();
|
|
@@ -37391,6 +37652,24 @@ var init_listvendorjobtitles = __esm(() => {
|
|
|
37391
37652
|
ListVendorJobTitlesListVendorJobTitlesOk$.inboundSchema = ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema;
|
|
37392
37653
|
ListVendorJobTitlesListVendorJobTitlesOk$.outboundSchema = ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema;
|
|
37393
37654
|
})(ListVendorJobTitlesListVendorJobTitlesOk$ ||= {});
|
|
37655
|
+
ListVendorJobTitlesResponse$inboundSchema = objectType({
|
|
37656
|
+
Result: lazyType(() => ListVendorJobTitlesListVendorJobTitlesOk$inboundSchema)
|
|
37657
|
+
}).transform((v2) => {
|
|
37658
|
+
return remap(v2, {
|
|
37659
|
+
Result: "result"
|
|
37660
|
+
});
|
|
37661
|
+
});
|
|
37662
|
+
ListVendorJobTitlesResponse$outboundSchema = objectType({
|
|
37663
|
+
result: lazyType(() => ListVendorJobTitlesListVendorJobTitlesOk$outboundSchema)
|
|
37664
|
+
}).transform((v2) => {
|
|
37665
|
+
return remap(v2, {
|
|
37666
|
+
result: "Result"
|
|
37667
|
+
});
|
|
37668
|
+
});
|
|
37669
|
+
((ListVendorJobTitlesResponse$) => {
|
|
37670
|
+
ListVendorJobTitlesResponse$.inboundSchema = ListVendorJobTitlesResponse$inboundSchema;
|
|
37671
|
+
ListVendorJobTitlesResponse$.outboundSchema = ListVendorJobTitlesResponse$outboundSchema;
|
|
37672
|
+
})(ListVendorJobTitlesResponse$ ||= {});
|
|
37394
37673
|
});
|
|
37395
37674
|
|
|
37396
37675
|
// src/models/operations/logsuserintothesystem.ts
|
|
@@ -37562,12 +37841,14 @@ var init_passwordresetrequest = __esm(() => {
|
|
|
37562
37841
|
// src/models/operations/index.ts
|
|
37563
37842
|
var init_operations = __esm(() => {
|
|
37564
37843
|
init_createvendorregistration();
|
|
37844
|
+
init_expeditetimeremaining();
|
|
37565
37845
|
init_getfacility();
|
|
37566
37846
|
init_getsupportarticle();
|
|
37567
37847
|
init_getuserbyid();
|
|
37568
37848
|
init_listorsearchfacilities();
|
|
37569
37849
|
init_listorsearchsupportarticles();
|
|
37570
37850
|
init_listvendorcredentials();
|
|
37851
|
+
init_listvendorinvoices();
|
|
37571
37852
|
init_listvendorjobtitles();
|
|
37572
37853
|
init_logsuserintothesystem();
|
|
37573
37854
|
init_magiclink();
|
|
@@ -37707,6 +37988,38 @@ Retrieve an individual facility.`,
|
|
|
37707
37988
|
};
|
|
37708
37989
|
});
|
|
37709
37990
|
|
|
37991
|
+
// src/types/operations.ts
|
|
37992
|
+
function createPageIterator(page, halt) {
|
|
37993
|
+
return {
|
|
37994
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
37995
|
+
yield page;
|
|
37996
|
+
if (halt(page)) {
|
|
37997
|
+
return;
|
|
37998
|
+
}
|
|
37999
|
+
let p = page;
|
|
38000
|
+
for (p = await p.next();p != null; p = await p.next()) {
|
|
38001
|
+
yield p;
|
|
38002
|
+
if (halt(p)) {
|
|
38003
|
+
return;
|
|
38004
|
+
}
|
|
38005
|
+
}
|
|
38006
|
+
}
|
|
38007
|
+
};
|
|
38008
|
+
}
|
|
38009
|
+
function haltIterator(v2) {
|
|
38010
|
+
return {
|
|
38011
|
+
...v2,
|
|
38012
|
+
next: () => null,
|
|
38013
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
38014
|
+
yield v2;
|
|
38015
|
+
}
|
|
38016
|
+
};
|
|
38017
|
+
}
|
|
38018
|
+
var URL_OVERRIDE;
|
|
38019
|
+
var init_operations2 = __esm(() => {
|
|
38020
|
+
URL_OVERRIDE = Symbol("URL_OVERRIDE");
|
|
38021
|
+
});
|
|
38022
|
+
|
|
37710
38023
|
// src/funcs/organizationsListOrSearchFacilities.ts
|
|
37711
38024
|
function organizationsListOrSearchFacilities(client, request, options) {
|
|
37712
38025
|
return new APIPromise($do2(client, request, options));
|
|
@@ -37714,22 +38027,23 @@ function organizationsListOrSearchFacilities(client, request, options) {
|
|
|
37714
38027
|
async function $do2(client, request, options) {
|
|
37715
38028
|
const parsed = safeParse(request, (value) => ListOrSearchFacilitiesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37716
38029
|
if (!parsed.ok) {
|
|
37717
|
-
return [parsed, { status: "invalid" }];
|
|
38030
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
37718
38031
|
}
|
|
37719
38032
|
const payload = parsed.value;
|
|
37720
38033
|
const body = null;
|
|
37721
38034
|
const path = pathToFunc("/facilities")();
|
|
37722
|
-
const query = encodeFormQuery({
|
|
38035
|
+
const query = queryJoin(encodeFormQuery({
|
|
38036
|
+
expand: payload.expand
|
|
38037
|
+
}, { explode: false }), encodeFormQuery({
|
|
37723
38038
|
active_status: payload.active_status,
|
|
37724
38039
|
desc: payload.desc,
|
|
37725
|
-
expand: payload.expand,
|
|
37726
38040
|
items_per_page: payload.items_per_page,
|
|
37727
38041
|
name_like: payload.name_like,
|
|
37728
38042
|
page: payload.page,
|
|
37729
38043
|
sort: payload.sort,
|
|
37730
38044
|
state_like: payload.state_like,
|
|
37731
38045
|
system_id: payload.system_id
|
|
37732
|
-
});
|
|
38046
|
+
}));
|
|
37733
38047
|
const headers = new Headers(compactMap({
|
|
37734
38048
|
Accept: "application/json"
|
|
37735
38049
|
}));
|
|
@@ -37755,7 +38069,7 @@ async function $do2(client, request, options) {
|
|
|
37755
38069
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
37756
38070
|
}, options);
|
|
37757
38071
|
if (!requestRes.ok) {
|
|
37758
|
-
return [requestRes, { status: "invalid" }];
|
|
38072
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
37759
38073
|
}
|
|
37760
38074
|
const req = requestRes.value;
|
|
37761
38075
|
const doResult = await client._do(req, {
|
|
@@ -37765,14 +38079,48 @@ async function $do2(client, request, options) {
|
|
|
37765
38079
|
retryCodes: context.retryCodes
|
|
37766
38080
|
});
|
|
37767
38081
|
if (!doResult.ok) {
|
|
37768
|
-
return [doResult, { status: "request-error", request: req }];
|
|
38082
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
37769
38083
|
}
|
|
37770
38084
|
const response = doResult.value;
|
|
37771
|
-
const
|
|
38085
|
+
const responseFields = {
|
|
38086
|
+
HttpMeta: { Response: response, Request: req }
|
|
38087
|
+
};
|
|
38088
|
+
const [result, raw] = await match(json(200, ListOrSearchFacilitiesResponse$inboundSchema, {
|
|
38089
|
+
key: "Result"
|
|
38090
|
+
}), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
37772
38091
|
if (!result.ok) {
|
|
37773
|
-
return [result, {
|
|
37774
|
-
|
|
37775
|
-
|
|
38092
|
+
return [haltIterator(result), {
|
|
38093
|
+
status: "complete",
|
|
38094
|
+
request: req,
|
|
38095
|
+
response
|
|
38096
|
+
}];
|
|
38097
|
+
}
|
|
38098
|
+
const nextFunc = (responseData) => {
|
|
38099
|
+
const page2 = request?.page ?? 1;
|
|
38100
|
+
const nextPage = page2 + 1;
|
|
38101
|
+
if (!responseData) {
|
|
38102
|
+
return { next: () => null };
|
|
38103
|
+
}
|
|
38104
|
+
const results = dlv(responseData, "items");
|
|
38105
|
+
if (!Array.isArray(results) || !results.length) {
|
|
38106
|
+
return { next: () => null };
|
|
38107
|
+
}
|
|
38108
|
+
const limit = request?.itemsPerPage ?? 0;
|
|
38109
|
+
if (results.length < limit) {
|
|
38110
|
+
return { next: () => null };
|
|
38111
|
+
}
|
|
38112
|
+
const nextVal = () => organizationsListOrSearchFacilities(client, {
|
|
38113
|
+
...request,
|
|
38114
|
+
page: nextPage
|
|
38115
|
+
}, options);
|
|
38116
|
+
return { next: nextVal, "~next": { page: nextPage } };
|
|
38117
|
+
};
|
|
38118
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
38119
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
38120
|
+
status: "complete",
|
|
38121
|
+
request: req,
|
|
38122
|
+
response
|
|
38123
|
+
}];
|
|
37776
38124
|
}
|
|
37777
38125
|
var init_organizationsListOrSearchFacilities = __esm(() => {
|
|
37778
38126
|
init_encodings();
|
|
@@ -37783,6 +38131,7 @@ var init_organizationsListOrSearchFacilities = __esm(() => {
|
|
|
37783
38131
|
init_url();
|
|
37784
38132
|
init_operations();
|
|
37785
38133
|
init_async();
|
|
38134
|
+
init_operations2();
|
|
37786
38135
|
});
|
|
37787
38136
|
|
|
37788
38137
|
// src/mcp-server/tools/organizationsListOrSearchFacilities.ts
|
|
@@ -37821,7 +38170,7 @@ Available \`expand\` scopes are:
|
|
|
37821
38170
|
isError: true
|
|
37822
38171
|
};
|
|
37823
38172
|
}
|
|
37824
|
-
const value = result.value;
|
|
38173
|
+
const value = result.value.result;
|
|
37825
38174
|
return formatResult(value, apiCall);
|
|
37826
38175
|
}
|
|
37827
38176
|
};
|
|
@@ -37847,7 +38196,7 @@ async function $do3(client, request, options) {
|
|
|
37847
38196
|
const path = pathToFunc("/support_articles/{id}")(pathParams);
|
|
37848
38197
|
const query = encodeFormQuery({
|
|
37849
38198
|
expand: payload.expand
|
|
37850
|
-
});
|
|
38199
|
+
}, { explode: false });
|
|
37851
38200
|
const headers = new Headers(compactMap({
|
|
37852
38201
|
Accept: "application/json"
|
|
37853
38202
|
}));
|
|
@@ -37951,7 +38300,7 @@ function supportArticlesListOrSearchSupportArticles(client, request, options) {
|
|
|
37951
38300
|
async function $do4(client, request, options) {
|
|
37952
38301
|
const parsed = safeParse(request, (value) => ListOrSearchSupportArticlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
37953
38302
|
if (!parsed.ok) {
|
|
37954
|
-
return [parsed, { status: "invalid" }];
|
|
38303
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
37955
38304
|
}
|
|
37956
38305
|
const payload = parsed.value;
|
|
37957
38306
|
const body = null;
|
|
@@ -37987,7 +38336,7 @@ async function $do4(client, request, options) {
|
|
|
37987
38336
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
37988
38337
|
}, options);
|
|
37989
38338
|
if (!requestRes.ok) {
|
|
37990
|
-
return [requestRes, { status: "invalid" }];
|
|
38339
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
37991
38340
|
}
|
|
37992
38341
|
const req = requestRes.value;
|
|
37993
38342
|
const doResult = await client._do(req, {
|
|
@@ -37997,14 +38346,48 @@ async function $do4(client, request, options) {
|
|
|
37997
38346
|
retryCodes: context.retryCodes
|
|
37998
38347
|
});
|
|
37999
38348
|
if (!doResult.ok) {
|
|
38000
|
-
return [doResult, { status: "request-error", request: req }];
|
|
38349
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
38001
38350
|
}
|
|
38002
38351
|
const response = doResult.value;
|
|
38003
|
-
const
|
|
38352
|
+
const responseFields = {
|
|
38353
|
+
HttpMeta: { Response: response, Request: req }
|
|
38354
|
+
};
|
|
38355
|
+
const [result, raw] = await match(json(200, ListOrSearchSupportArticlesResponse$inboundSchema, {
|
|
38356
|
+
key: "Result"
|
|
38357
|
+
}), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
38004
38358
|
if (!result.ok) {
|
|
38005
|
-
return [result, {
|
|
38006
|
-
|
|
38007
|
-
|
|
38359
|
+
return [haltIterator(result), {
|
|
38360
|
+
status: "complete",
|
|
38361
|
+
request: req,
|
|
38362
|
+
response
|
|
38363
|
+
}];
|
|
38364
|
+
}
|
|
38365
|
+
const nextFunc = (responseData) => {
|
|
38366
|
+
const page2 = request?.page ?? 1;
|
|
38367
|
+
const nextPage = page2 + 1;
|
|
38368
|
+
if (!responseData) {
|
|
38369
|
+
return { next: () => null };
|
|
38370
|
+
}
|
|
38371
|
+
const results = dlv(responseData, "items");
|
|
38372
|
+
if (!Array.isArray(results) || !results.length) {
|
|
38373
|
+
return { next: () => null };
|
|
38374
|
+
}
|
|
38375
|
+
const limit = request?.itemsPerPage ?? 0;
|
|
38376
|
+
if (results.length < limit) {
|
|
38377
|
+
return { next: () => null };
|
|
38378
|
+
}
|
|
38379
|
+
const nextVal = () => supportArticlesListOrSearchSupportArticles(client, {
|
|
38380
|
+
...request,
|
|
38381
|
+
page: nextPage
|
|
38382
|
+
}, options);
|
|
38383
|
+
return { next: nextVal, "~next": { page: nextPage } };
|
|
38384
|
+
};
|
|
38385
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
38386
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
38387
|
+
status: "complete",
|
|
38388
|
+
request: req,
|
|
38389
|
+
response
|
|
38390
|
+
}];
|
|
38008
38391
|
}
|
|
38009
38392
|
var init_supportArticlesListOrSearchSupportArticles = __esm(() => {
|
|
38010
38393
|
init_encodings();
|
|
@@ -38015,6 +38398,7 @@ var init_supportArticlesListOrSearchSupportArticles = __esm(() => {
|
|
|
38015
38398
|
init_url();
|
|
38016
38399
|
init_operations();
|
|
38017
38400
|
init_async();
|
|
38401
|
+
init_operations2();
|
|
38018
38402
|
});
|
|
38019
38403
|
|
|
38020
38404
|
// src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts
|
|
@@ -38040,7 +38424,7 @@ List or search support articles for FAQ.`,
|
|
|
38040
38424
|
isError: true
|
|
38041
38425
|
};
|
|
38042
38426
|
}
|
|
38043
|
-
const value = result.value;
|
|
38427
|
+
const value = result.value.result;
|
|
38044
38428
|
return formatResult(value, apiCall);
|
|
38045
38429
|
}
|
|
38046
38430
|
};
|
|
@@ -38760,11 +39144,116 @@ Create an initial vendor registration. Once successful, the vendor will be able
|
|
|
38760
39144
|
};
|
|
38761
39145
|
});
|
|
38762
39146
|
|
|
38763
|
-
// src/funcs/
|
|
38764
|
-
function
|
|
39147
|
+
// src/funcs/vendorsExpediteTimeRemaining.ts
|
|
39148
|
+
function vendorsExpediteTimeRemaining(client, request, options) {
|
|
38765
39149
|
return new APIPromise($do12(client, request, options));
|
|
38766
39150
|
}
|
|
38767
39151
|
async function $do12(client, request, options) {
|
|
39152
|
+
const parsed = safeParse(request, (value) => ExpediteTimeRemainingRequest$outboundSchema.parse(value), "Input validation failed");
|
|
39153
|
+
if (!parsed.ok) {
|
|
39154
|
+
return [parsed, { status: "invalid" }];
|
|
39155
|
+
}
|
|
39156
|
+
const payload = parsed.value;
|
|
39157
|
+
const body = null;
|
|
39158
|
+
const pathParams = {
|
|
39159
|
+
vendor_id_or_me: encodeSimple("vendor_id_or_me", payload.vendor_id_or_me, {
|
|
39160
|
+
explode: false,
|
|
39161
|
+
charEncoding: "percent"
|
|
39162
|
+
})
|
|
39163
|
+
};
|
|
39164
|
+
const path = pathToFunc("/vendors/{vendor_id_or_me}/expedite-time-remaining")(pathParams);
|
|
39165
|
+
const headers = new Headers(compactMap({
|
|
39166
|
+
Accept: "application/json"
|
|
39167
|
+
}));
|
|
39168
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
39169
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
39170
|
+
const context = {
|
|
39171
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
39172
|
+
operationID: "expediteTimeRemaining",
|
|
39173
|
+
oAuth2Scopes: [],
|
|
39174
|
+
resolvedSecurity: requestSecurity,
|
|
39175
|
+
securitySource: client._options.security,
|
|
39176
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
39177
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
39178
|
+
};
|
|
39179
|
+
const requestRes = client._createRequest(context, {
|
|
39180
|
+
security: requestSecurity,
|
|
39181
|
+
method: "GET",
|
|
39182
|
+
baseURL: options?.serverURL,
|
|
39183
|
+
path,
|
|
39184
|
+
headers,
|
|
39185
|
+
body,
|
|
39186
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
39187
|
+
}, options);
|
|
39188
|
+
if (!requestRes.ok) {
|
|
39189
|
+
return [requestRes, { status: "invalid" }];
|
|
39190
|
+
}
|
|
39191
|
+
const req = requestRes.value;
|
|
39192
|
+
const doResult = await client._do(req, {
|
|
39193
|
+
context,
|
|
39194
|
+
errorCodes: ["400", "401", "4XX", "5XX"],
|
|
39195
|
+
retryConfig: context.retryConfig,
|
|
39196
|
+
retryCodes: context.retryCodes
|
|
39197
|
+
});
|
|
39198
|
+
if (!doResult.ok) {
|
|
39199
|
+
return [doResult, { status: "request-error", request: req }];
|
|
39200
|
+
}
|
|
39201
|
+
const response = doResult.value;
|
|
39202
|
+
const responseFields = {
|
|
39203
|
+
HttpMeta: { Response: response, Request: req }
|
|
39204
|
+
};
|
|
39205
|
+
const [result] = await match(json(200, ExpediteTimeRemainingResponseBody$inboundSchema), jsonErr([400, 401], ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
39206
|
+
if (!result.ok) {
|
|
39207
|
+
return [result, { status: "complete", request: req, response }];
|
|
39208
|
+
}
|
|
39209
|
+
return [result, { status: "complete", request: req, response }];
|
|
39210
|
+
}
|
|
39211
|
+
var init_vendorsExpediteTimeRemaining = __esm(() => {
|
|
39212
|
+
init_encodings();
|
|
39213
|
+
init_matchers();
|
|
39214
|
+
init_primitives();
|
|
39215
|
+
init_schemas();
|
|
39216
|
+
init_security();
|
|
39217
|
+
init_url();
|
|
39218
|
+
init_errors();
|
|
39219
|
+
init_operations();
|
|
39220
|
+
init_async();
|
|
39221
|
+
});
|
|
39222
|
+
|
|
39223
|
+
// src/mcp-server/tools/vendorsExpediteTimeRemaining.ts
|
|
39224
|
+
var args11, tool$vendorsExpediteTimeRemaining;
|
|
39225
|
+
var init_vendorsExpediteTimeRemaining2 = __esm(() => {
|
|
39226
|
+
init_vendorsExpediteTimeRemaining();
|
|
39227
|
+
init_operations();
|
|
39228
|
+
init_tools();
|
|
39229
|
+
args11 = {
|
|
39230
|
+
request: ExpediteTimeRemainingRequest$inboundSchema
|
|
39231
|
+
};
|
|
39232
|
+
tool$vendorsExpediteTimeRemaining = {
|
|
39233
|
+
name: "vendors_expedite-time-remaining",
|
|
39234
|
+
description: `Expedite time remaining
|
|
39235
|
+
|
|
39236
|
+
For vendors who have a paid 24-hour expedite credentials invoice, get the remaining time (in seconds) for which submitted credentials will be expedited.`,
|
|
39237
|
+
args: args11,
|
|
39238
|
+
tool: async (client, args12, ctx) => {
|
|
39239
|
+
const [result, apiCall] = await vendorsExpediteTimeRemaining(client, args12.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
39240
|
+
if (!result.ok) {
|
|
39241
|
+
return {
|
|
39242
|
+
content: [{ type: "text", text: result.error.message }],
|
|
39243
|
+
isError: true
|
|
39244
|
+
};
|
|
39245
|
+
}
|
|
39246
|
+
const value = result.value;
|
|
39247
|
+
return formatResult(value, apiCall);
|
|
39248
|
+
}
|
|
39249
|
+
};
|
|
39250
|
+
});
|
|
39251
|
+
|
|
39252
|
+
// src/funcs/vendorsListVendorCredentials.ts
|
|
39253
|
+
function vendorsListVendorCredentials(client, request, options) {
|
|
39254
|
+
return new APIPromise($do13(client, request, options));
|
|
39255
|
+
}
|
|
39256
|
+
async function $do13(client, request, options) {
|
|
38768
39257
|
const parsed = safeParse(request, (value) => ListVendorCredentialsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
38769
39258
|
if (!parsed.ok) {
|
|
38770
39259
|
return [parsed, { status: "invalid" }];
|
|
@@ -38841,12 +39330,12 @@ var init_vendorsListVendorCredentials = __esm(() => {
|
|
|
38841
39330
|
});
|
|
38842
39331
|
|
|
38843
39332
|
// src/mcp-server/tools/vendorsListVendorCredentials.ts
|
|
38844
|
-
var
|
|
39333
|
+
var args12, tool$vendorsListVendorCredentials;
|
|
38845
39334
|
var init_vendorsListVendorCredentials2 = __esm(() => {
|
|
38846
39335
|
init_vendorsListVendorCredentials();
|
|
38847
39336
|
init_operations();
|
|
38848
39337
|
init_tools();
|
|
38849
|
-
|
|
39338
|
+
args12 = {
|
|
38850
39339
|
request: ListVendorCredentialsRequest$inboundSchema
|
|
38851
39340
|
};
|
|
38852
39341
|
tool$vendorsListVendorCredentials = {
|
|
@@ -38854,9 +39343,9 @@ var init_vendorsListVendorCredentials2 = __esm(() => {
|
|
|
38854
39343
|
description: `List Vendor Credentials
|
|
38855
39344
|
|
|
38856
39345
|
Lists vendor credentials, required credentials, and company credentials. Utilized in Vendor Dashboard.`,
|
|
38857
|
-
args:
|
|
38858
|
-
tool: async (client,
|
|
38859
|
-
const [result, apiCall] = await vendorsListVendorCredentials(client,
|
|
39346
|
+
args: args12,
|
|
39347
|
+
tool: async (client, args13, ctx) => {
|
|
39348
|
+
const [result, apiCall] = await vendorsListVendorCredentials(client, args13.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
38860
39349
|
if (!result.ok) {
|
|
38861
39350
|
return {
|
|
38862
39351
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -38869,14 +39358,164 @@ Lists vendor credentials, required credentials, and company credentials. Utilize
|
|
|
38869
39358
|
};
|
|
38870
39359
|
});
|
|
38871
39360
|
|
|
39361
|
+
// src/funcs/vendorsListVendorInvoices.ts
|
|
39362
|
+
function vendorsListVendorInvoices(client, request, options) {
|
|
39363
|
+
return new APIPromise($do14(client, request, options));
|
|
39364
|
+
}
|
|
39365
|
+
async function $do14(client, request, options) {
|
|
39366
|
+
const parsed = safeParse(request, (value) => ListVendorInvoicesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
39367
|
+
if (!parsed.ok) {
|
|
39368
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
39369
|
+
}
|
|
39370
|
+
const payload = parsed.value;
|
|
39371
|
+
const body = null;
|
|
39372
|
+
const pathParams = {
|
|
39373
|
+
vendor_id_or_me: encodeSimple("vendor_id_or_me", payload.vendor_id_or_me, {
|
|
39374
|
+
explode: false,
|
|
39375
|
+
charEncoding: "percent"
|
|
39376
|
+
})
|
|
39377
|
+
};
|
|
39378
|
+
const path = pathToFunc("/vendors/{vendor_id_or_me}/invoices")(pathParams);
|
|
39379
|
+
const query = queryJoin(encodeFormQuery({
|
|
39380
|
+
expand: payload.expand
|
|
39381
|
+
}, { explode: false }), encodeFormQuery({
|
|
39382
|
+
desc: payload.desc,
|
|
39383
|
+
items_per_page: payload.items_per_page,
|
|
39384
|
+
page: payload.page,
|
|
39385
|
+
sort: payload.sort
|
|
39386
|
+
}));
|
|
39387
|
+
const headers = new Headers(compactMap({
|
|
39388
|
+
Accept: "application/json"
|
|
39389
|
+
}));
|
|
39390
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
39391
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
39392
|
+
const context = {
|
|
39393
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
39394
|
+
operationID: "listVendorInvoices",
|
|
39395
|
+
oAuth2Scopes: [],
|
|
39396
|
+
resolvedSecurity: requestSecurity,
|
|
39397
|
+
securitySource: client._options.security,
|
|
39398
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
39399
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
39400
|
+
};
|
|
39401
|
+
const requestRes = client._createRequest(context, {
|
|
39402
|
+
security: requestSecurity,
|
|
39403
|
+
method: "GET",
|
|
39404
|
+
baseURL: options?.serverURL,
|
|
39405
|
+
path,
|
|
39406
|
+
headers,
|
|
39407
|
+
query,
|
|
39408
|
+
body,
|
|
39409
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
39410
|
+
}, options);
|
|
39411
|
+
if (!requestRes.ok) {
|
|
39412
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
39413
|
+
}
|
|
39414
|
+
const req = requestRes.value;
|
|
39415
|
+
const doResult = await client._do(req, {
|
|
39416
|
+
context,
|
|
39417
|
+
errorCodes: ["400", "401", "4XX", "5XX"],
|
|
39418
|
+
retryConfig: context.retryConfig,
|
|
39419
|
+
retryCodes: context.retryCodes
|
|
39420
|
+
});
|
|
39421
|
+
if (!doResult.ok) {
|
|
39422
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
39423
|
+
}
|
|
39424
|
+
const response = doResult.value;
|
|
39425
|
+
const responseFields = {
|
|
39426
|
+
HttpMeta: { Response: response, Request: req }
|
|
39427
|
+
};
|
|
39428
|
+
const [result, raw] = await match(json(200, ListVendorInvoicesResponse$inboundSchema, {
|
|
39429
|
+
key: "Result"
|
|
39430
|
+
}), jsonErr([400, 401], ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
39431
|
+
if (!result.ok) {
|
|
39432
|
+
return [haltIterator(result), {
|
|
39433
|
+
status: "complete",
|
|
39434
|
+
request: req,
|
|
39435
|
+
response
|
|
39436
|
+
}];
|
|
39437
|
+
}
|
|
39438
|
+
const nextFunc = (responseData) => {
|
|
39439
|
+
const page2 = request?.page ?? 1;
|
|
39440
|
+
const nextPage = page2 + 1;
|
|
39441
|
+
if (!responseData) {
|
|
39442
|
+
return { next: () => null };
|
|
39443
|
+
}
|
|
39444
|
+
const results = dlv(responseData, "items");
|
|
39445
|
+
if (!Array.isArray(results) || !results.length) {
|
|
39446
|
+
return { next: () => null };
|
|
39447
|
+
}
|
|
39448
|
+
const limit = request?.itemsPerPage ?? 0;
|
|
39449
|
+
if (results.length < limit) {
|
|
39450
|
+
return { next: () => null };
|
|
39451
|
+
}
|
|
39452
|
+
const nextVal = () => vendorsListVendorInvoices(client, {
|
|
39453
|
+
...request,
|
|
39454
|
+
page: nextPage
|
|
39455
|
+
}, options);
|
|
39456
|
+
return { next: nextVal, "~next": { page: nextPage } };
|
|
39457
|
+
};
|
|
39458
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
39459
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
39460
|
+
status: "complete",
|
|
39461
|
+
request: req,
|
|
39462
|
+
response
|
|
39463
|
+
}];
|
|
39464
|
+
}
|
|
39465
|
+
var init_vendorsListVendorInvoices = __esm(() => {
|
|
39466
|
+
init_encodings();
|
|
39467
|
+
init_matchers();
|
|
39468
|
+
init_primitives();
|
|
39469
|
+
init_schemas();
|
|
39470
|
+
init_security();
|
|
39471
|
+
init_url();
|
|
39472
|
+
init_errors();
|
|
39473
|
+
init_operations();
|
|
39474
|
+
init_async();
|
|
39475
|
+
init_operations2();
|
|
39476
|
+
});
|
|
39477
|
+
|
|
39478
|
+
// src/mcp-server/tools/vendorsListVendorInvoices.ts
|
|
39479
|
+
var args13, tool$vendorsListVendorInvoices;
|
|
39480
|
+
var init_vendorsListVendorInvoices2 = __esm(() => {
|
|
39481
|
+
init_vendorsListVendorInvoices();
|
|
39482
|
+
init_operations();
|
|
39483
|
+
init_tools();
|
|
39484
|
+
args13 = {
|
|
39485
|
+
request: ListVendorInvoicesRequest$inboundSchema
|
|
39486
|
+
};
|
|
39487
|
+
tool$vendorsListVendorInvoices = {
|
|
39488
|
+
name: "vendors_list-vendor-invoices",
|
|
39489
|
+
description: `List vendor invoices
|
|
39490
|
+
|
|
39491
|
+
List invoices for Vendors
|
|
39492
|
+
|
|
39493
|
+
Available \`expand\` scopes are:
|
|
39494
|
+
|
|
39495
|
+
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();
|
|
39499
|
+
if (!result.ok) {
|
|
39500
|
+
return {
|
|
39501
|
+
content: [{ type: "text", text: result.error.message }],
|
|
39502
|
+
isError: true
|
|
39503
|
+
};
|
|
39504
|
+
}
|
|
39505
|
+
const value = result.value.result;
|
|
39506
|
+
return formatResult(value, apiCall);
|
|
39507
|
+
}
|
|
39508
|
+
};
|
|
39509
|
+
});
|
|
39510
|
+
|
|
38872
39511
|
// src/funcs/vendorsListVendorJobTitles.ts
|
|
38873
39512
|
function vendorsListVendorJobTitles(client, request, options) {
|
|
38874
|
-
return new APIPromise($
|
|
39513
|
+
return new APIPromise($do15(client, request, options));
|
|
38875
39514
|
}
|
|
38876
|
-
async function $
|
|
39515
|
+
async function $do15(client, request, options) {
|
|
38877
39516
|
const parsed = safeParse(request, (value) => ListVendorJobTitlesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
38878
39517
|
if (!parsed.ok) {
|
|
38879
|
-
return [parsed, { status: "invalid" }];
|
|
39518
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
38880
39519
|
}
|
|
38881
39520
|
const payload = parsed.value;
|
|
38882
39521
|
const body = null;
|
|
@@ -38910,7 +39549,7 @@ async function $do13(client, request, options) {
|
|
|
38910
39549
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
38911
39550
|
}, options);
|
|
38912
39551
|
if (!requestRes.ok) {
|
|
38913
|
-
return [requestRes, { status: "invalid" }];
|
|
39552
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
38914
39553
|
}
|
|
38915
39554
|
const req = requestRes.value;
|
|
38916
39555
|
const doResult = await client._do(req, {
|
|
@@ -38920,17 +39559,48 @@ async function $do13(client, request, options) {
|
|
|
38920
39559
|
retryCodes: context.retryCodes
|
|
38921
39560
|
});
|
|
38922
39561
|
if (!doResult.ok) {
|
|
38923
|
-
return [doResult, { status: "request-error", request: req }];
|
|
39562
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
38924
39563
|
}
|
|
38925
39564
|
const response = doResult.value;
|
|
38926
39565
|
const responseFields = {
|
|
38927
39566
|
HttpMeta: { Response: response, Request: req }
|
|
38928
39567
|
};
|
|
38929
|
-
const [result] = await match(json(200,
|
|
39568
|
+
const [result, raw] = await match(json(200, ListVendorJobTitlesResponse$inboundSchema, {
|
|
39569
|
+
key: "Result"
|
|
39570
|
+
}), jsonErr(403, ApiErrorResponse$inboundSchema), jsonErr(500, ApiErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
|
|
38930
39571
|
if (!result.ok) {
|
|
38931
|
-
return [result, {
|
|
38932
|
-
|
|
38933
|
-
|
|
39572
|
+
return [haltIterator(result), {
|
|
39573
|
+
status: "complete",
|
|
39574
|
+
request: req,
|
|
39575
|
+
response
|
|
39576
|
+
}];
|
|
39577
|
+
}
|
|
39578
|
+
const nextFunc = (responseData) => {
|
|
39579
|
+
const page2 = request?.page ?? 1;
|
|
39580
|
+
const nextPage = page2 + 1;
|
|
39581
|
+
if (!responseData) {
|
|
39582
|
+
return { next: () => null };
|
|
39583
|
+
}
|
|
39584
|
+
const results = dlv(responseData, "items");
|
|
39585
|
+
if (!Array.isArray(results) || !results.length) {
|
|
39586
|
+
return { next: () => null };
|
|
39587
|
+
}
|
|
39588
|
+
const limit = request?.itemsPerPage ?? 0;
|
|
39589
|
+
if (results.length < limit) {
|
|
39590
|
+
return { next: () => null };
|
|
39591
|
+
}
|
|
39592
|
+
const nextVal = () => vendorsListVendorJobTitles(client, {
|
|
39593
|
+
...request,
|
|
39594
|
+
page: nextPage
|
|
39595
|
+
}, options);
|
|
39596
|
+
return { next: nextVal, "~next": { page: nextPage } };
|
|
39597
|
+
};
|
|
39598
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
39599
|
+
return [{ ...page, ...createPageIterator(page, (v2) => !v2.ok) }, {
|
|
39600
|
+
status: "complete",
|
|
39601
|
+
request: req,
|
|
39602
|
+
response
|
|
39603
|
+
}];
|
|
38934
39604
|
}
|
|
38935
39605
|
var init_vendorsListVendorJobTitles = __esm(() => {
|
|
38936
39606
|
init_encodings();
|
|
@@ -38941,15 +39611,16 @@ var init_vendorsListVendorJobTitles = __esm(() => {
|
|
|
38941
39611
|
init_errors();
|
|
38942
39612
|
init_operations();
|
|
38943
39613
|
init_async();
|
|
39614
|
+
init_operations2();
|
|
38944
39615
|
});
|
|
38945
39616
|
|
|
38946
39617
|
// src/mcp-server/tools/vendorsListVendorJobTitles.ts
|
|
38947
|
-
var
|
|
39618
|
+
var args14, tool$vendorsListVendorJobTitles;
|
|
38948
39619
|
var init_vendorsListVendorJobTitles2 = __esm(() => {
|
|
38949
39620
|
init_vendorsListVendorJobTitles();
|
|
38950
39621
|
init_operations();
|
|
38951
39622
|
init_tools();
|
|
38952
|
-
|
|
39623
|
+
args14 = {
|
|
38953
39624
|
request: ListVendorJobTitlesRequest$inboundSchema
|
|
38954
39625
|
};
|
|
38955
39626
|
tool$vendorsListVendorJobTitles = {
|
|
@@ -38957,16 +39628,16 @@ var init_vendorsListVendorJobTitles2 = __esm(() => {
|
|
|
38957
39628
|
description: `List vendor job titles
|
|
38958
39629
|
|
|
38959
39630
|
List valid job titles for Vendors. This can be used during sign up or in a filter.`,
|
|
38960
|
-
args:
|
|
38961
|
-
tool: async (client,
|
|
38962
|
-
const [result, apiCall] = await vendorsListVendorJobTitles(client,
|
|
39631
|
+
args: args14,
|
|
39632
|
+
tool: async (client, args15, ctx) => {
|
|
39633
|
+
const [result, apiCall] = await vendorsListVendorJobTitles(client, args15.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
38963
39634
|
if (!result.ok) {
|
|
38964
39635
|
return {
|
|
38965
39636
|
content: [{ type: "text", text: result.error.message }],
|
|
38966
39637
|
isError: true
|
|
38967
39638
|
};
|
|
38968
39639
|
}
|
|
38969
|
-
const value = result.value;
|
|
39640
|
+
const value = result.value.result;
|
|
38970
39641
|
return formatResult(value, apiCall);
|
|
38971
39642
|
}
|
|
38972
39643
|
};
|
|
@@ -38976,7 +39647,7 @@ List valid job titles for Vendors. This can be used during sign up or in a filte
|
|
|
38976
39647
|
function createMCPServer(deps) {
|
|
38977
39648
|
const server = new McpServer({
|
|
38978
39649
|
name: "GreenSecurity",
|
|
38979
|
-
version: "0.
|
|
39650
|
+
version: "0.18.0"
|
|
38980
39651
|
});
|
|
38981
39652
|
const client = new GreenSecurityCore({
|
|
38982
39653
|
security: deps.security,
|
|
@@ -38986,9 +39657,14 @@ function createMCPServer(deps) {
|
|
|
38986
39657
|
const scopes = new Set(deps.scopes ?? mcpScopes);
|
|
38987
39658
|
const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
|
|
38988
39659
|
const tool = createRegisterTool(deps.logger, server, client, scopes, allowedTools);
|
|
39660
|
+
const resource = createRegisterResource(deps.logger, server, client, scopes);
|
|
39661
|
+
const resourceTemplate = createRegisterResourceTemplate(deps.logger, server, client, scopes);
|
|
39662
|
+
const register = { tool, resource, resourceTemplate };
|
|
38989
39663
|
tool(tool$vendorsCreateVendorRegistration);
|
|
38990
39664
|
tool(tool$vendorsListVendorJobTitles);
|
|
38991
39665
|
tool(tool$vendorsListVendorCredentials);
|
|
39666
|
+
tool(tool$vendorsExpediteTimeRemaining);
|
|
39667
|
+
tool(tool$vendorsListVendorInvoices);
|
|
38992
39668
|
tool(tool$usersGetCurrentUser);
|
|
38993
39669
|
tool(tool$usersGetUserById);
|
|
38994
39670
|
tool(tool$usersLogsUserIntoTheSystem);
|
|
@@ -39004,6 +39680,7 @@ function createMCPServer(deps) {
|
|
|
39004
39680
|
var init_server2 = __esm(() => {
|
|
39005
39681
|
init_mcp();
|
|
39006
39682
|
init_core();
|
|
39683
|
+
init_resources();
|
|
39007
39684
|
init_scopes();
|
|
39008
39685
|
init_tools();
|
|
39009
39686
|
init_organizationsGetFacility2();
|
|
@@ -39017,7 +39694,9 @@ var init_server2 = __esm(() => {
|
|
|
39017
39694
|
init_usersPassword2();
|
|
39018
39695
|
init_usersPasswordResetRequest2();
|
|
39019
39696
|
init_vendorsCreateVendorRegistration2();
|
|
39697
|
+
init_vendorsExpediteTimeRemaining2();
|
|
39020
39698
|
init_vendorsListVendorCredentials2();
|
|
39699
|
+
init_vendorsListVendorInvoices2();
|
|
39021
39700
|
init_vendorsListVendorJobTitles2();
|
|
39022
39701
|
});
|
|
39023
39702
|
|
|
@@ -40216,7 +40895,7 @@ var routes = rn({
|
|
|
40216
40895
|
var app = Ve(routes, {
|
|
40217
40896
|
name: "mcp",
|
|
40218
40897
|
versionInfo: {
|
|
40219
|
-
currentVersion: "0.
|
|
40898
|
+
currentVersion: "0.18.0"
|
|
40220
40899
|
}
|
|
40221
40900
|
});
|
|
40222
40901
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -40224,5 +40903,5 @@ export {
|
|
|
40224
40903
|
app
|
|
40225
40904
|
};
|
|
40226
40905
|
|
|
40227
|
-
//# debugId=
|
|
40906
|
+
//# debugId=1B380E6F955E33BE64756E2164756E21
|
|
40228
40907
|
//# sourceMappingURL=mcp-server.js.map
|