@noresponse/mcp 0.4.1 → 0.4.3
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/CHANGELOG.md +30 -0
- package/README.md +2 -0
- package/bin/mcp-server.js +517 -78
- package/bin/mcp-server.js.map +21 -8
- package/manifest.json +9 -1
- package/package.json +1 -1
package/bin/mcp-server.js
CHANGED
|
@@ -48104,9 +48104,9 @@ var init_config = __esm(() => {
|
|
|
48104
48104
|
SDK_METADATA = {
|
|
48105
48105
|
language: "typescript",
|
|
48106
48106
|
openapiDocVersion: "1",
|
|
48107
|
-
sdkVersion: "0.4.
|
|
48107
|
+
sdkVersion: "0.4.3",
|
|
48108
48108
|
genVersion: "internal",
|
|
48109
|
-
userAgent: "noresponse-sdk/mcp-typescript 0.4.
|
|
48109
|
+
userAgent: "noresponse-sdk/mcp-typescript 0.4.3 internal 1 @noresponse/mcp"
|
|
48110
48110
|
};
|
|
48111
48111
|
});
|
|
48112
48112
|
|
|
@@ -51194,7 +51194,8 @@ var init_conflicterrorcode = __esm(() => {
|
|
|
51194
51194
|
"key_rotation_in_progress",
|
|
51195
51195
|
"webhook_endpoint_limit_reached",
|
|
51196
51196
|
"webhook_endpoint_unverified",
|
|
51197
|
-
"too_many_integrations"
|
|
51197
|
+
"too_many_integrations",
|
|
51198
|
+
"risk_version_ahead"
|
|
51198
51199
|
]).describe("Machine codes an HTTP 409 answer can carry.");
|
|
51199
51200
|
});
|
|
51200
51201
|
|
|
@@ -52393,6 +52394,428 @@ The account's history: the same page as POST /v1/assessments/query for this acco
|
|
|
52393
52394
|
};
|
|
52394
52395
|
});
|
|
52395
52396
|
|
|
52397
|
+
// src/models/accountlist.ts
|
|
52398
|
+
var AccountList$zodSchema;
|
|
52399
|
+
var init_accountlist = __esm(() => {
|
|
52400
|
+
init_zod();
|
|
52401
|
+
init_account();
|
|
52402
|
+
AccountList$zodSchema = object({
|
|
52403
|
+
items: array(Account$zodSchema),
|
|
52404
|
+
next_cursor: string2().describe("Opaque cursor after the last change this page read, bound to the workspace and the environment of the calling key. Pass it back unchanged as changed_since. It is present on every page, the last one included: when nothing changed after changed_since it is the cursor that was sent, so a poller keeps calling with the latest next_cursor. A tampered or foreign cursor answers 400 invalid_cursor. Consumers do not parse it.")
|
|
52405
|
+
}).describe("Body of the 200 answer to GET /v1/accounts: the calling workspace's accounts whose risk changed after changed_since, in the environment of the calling key, oldest change first. An account is listed when its risk_version advanced and it has a current risk, and each item is the account exactly as GET /v1/accounts/{account_id} answers it. An account appears once per page, at its latest change; when its risk changes again later, it appears again on a later page with the newer risk_version. next_cursor is always present: pass it back as changed_since to read the changes made after this page.");
|
|
52406
|
+
});
|
|
52407
|
+
|
|
52408
|
+
// src/models/listaccountsop.ts
|
|
52409
|
+
var ListAccountsRequest$zodSchema, ListAccountsResponseResult$zodSchema, ListAccountsResponse$zodSchema;
|
|
52410
|
+
var init_listaccountsop = __esm(() => {
|
|
52411
|
+
init_zod();
|
|
52412
|
+
init_accountlist();
|
|
52413
|
+
init_authenticationerror();
|
|
52414
|
+
init_badrequesterror();
|
|
52415
|
+
init_conflicterror();
|
|
52416
|
+
init_notfounderror();
|
|
52417
|
+
init_permissiondeniederror();
|
|
52418
|
+
init_ratelimiterror();
|
|
52419
|
+
ListAccountsRequest$zodSchema = object({
|
|
52420
|
+
changed_since: string2().describe("next_cursor from an earlier page, unchanged. Absent, the list starts from the oldest change.").optional(),
|
|
52421
|
+
limit: int().default(50).describe("Most accounts per page."),
|
|
52422
|
+
unenforced: boolean2().default(false).describe("true lists only accounts with a decision other than allow for some flow and no applied enforcement at their current risk_version.")
|
|
52423
|
+
});
|
|
52424
|
+
ListAccountsResponseResult$zodSchema = union([
|
|
52425
|
+
BadRequestError$zodSchema,
|
|
52426
|
+
AuthenticationError$zodSchema,
|
|
52427
|
+
PermissionDeniedError$zodSchema,
|
|
52428
|
+
NotFoundError$zodSchema,
|
|
52429
|
+
ConflictError$zodSchema,
|
|
52430
|
+
RateLimitError$zodSchema,
|
|
52431
|
+
AccountList$zodSchema
|
|
52432
|
+
]);
|
|
52433
|
+
ListAccountsResponse$zodSchema = object({
|
|
52434
|
+
Headers: record(string2(), array(string2())).default({}),
|
|
52435
|
+
Result: union([
|
|
52436
|
+
BadRequestError$zodSchema,
|
|
52437
|
+
AuthenticationError$zodSchema,
|
|
52438
|
+
PermissionDeniedError$zodSchema,
|
|
52439
|
+
NotFoundError$zodSchema,
|
|
52440
|
+
ConflictError$zodSchema,
|
|
52441
|
+
RateLimitError$zodSchema,
|
|
52442
|
+
AccountList$zodSchema
|
|
52443
|
+
])
|
|
52444
|
+
});
|
|
52445
|
+
});
|
|
52446
|
+
|
|
52447
|
+
// src/funcs/accountsListChanged.ts
|
|
52448
|
+
function accountsListChanged(client$, request, options) {
|
|
52449
|
+
return new APIPromise($do5(client$, request, options));
|
|
52450
|
+
}
|
|
52451
|
+
async function $do5(client$, request, options) {
|
|
52452
|
+
const parsed$ = safeParse2(request, (value$) => ListAccountsRequest$zodSchema.optional().parse(value$), "Input validation failed");
|
|
52453
|
+
if (!parsed$.ok) {
|
|
52454
|
+
return [parsed$, { status: "invalid" }];
|
|
52455
|
+
}
|
|
52456
|
+
const payload$ = parsed$.value;
|
|
52457
|
+
const body$ = null;
|
|
52458
|
+
const path$ = pathToFunc("/v1/accounts")();
|
|
52459
|
+
const query$ = encodeFormQuery({
|
|
52460
|
+
changed_since: payload$?.changed_since,
|
|
52461
|
+
limit: payload$?.limit,
|
|
52462
|
+
unenforced: payload$?.unenforced
|
|
52463
|
+
});
|
|
52464
|
+
const headers$ = new Headers(compactMap({
|
|
52465
|
+
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
52466
|
+
}));
|
|
52467
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
52468
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52469
|
+
const context = {
|
|
52470
|
+
options: client$._options,
|
|
52471
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
52472
|
+
operationID: "listAccounts",
|
|
52473
|
+
oAuth2Scopes: null,
|
|
52474
|
+
resolvedSecurity: requestSecurity,
|
|
52475
|
+
securitySource: client$._options.security,
|
|
52476
|
+
retryConfig: options?.retries || client$._options.retryConfig || {
|
|
52477
|
+
strategy: "backoff",
|
|
52478
|
+
backoff: {
|
|
52479
|
+
initialInterval: 500,
|
|
52480
|
+
maxInterval: 8000,
|
|
52481
|
+
exponent: 2,
|
|
52482
|
+
maxElapsedTime: 30000
|
|
52483
|
+
},
|
|
52484
|
+
retryConnectionErrors: true
|
|
52485
|
+
},
|
|
52486
|
+
retryCodes: options?.retryCodes || [
|
|
52487
|
+
"408",
|
|
52488
|
+
"429",
|
|
52489
|
+
"5XX"
|
|
52490
|
+
]
|
|
52491
|
+
};
|
|
52492
|
+
const requestRes = client$._createRequest(context, {
|
|
52493
|
+
security: requestSecurity,
|
|
52494
|
+
method: "GET",
|
|
52495
|
+
baseURL: options?.serverURL,
|
|
52496
|
+
path: path$,
|
|
52497
|
+
headers: headers$,
|
|
52498
|
+
query: query$,
|
|
52499
|
+
body: body$,
|
|
52500
|
+
userAgent: client$._options.userAgent,
|
|
52501
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
52502
|
+
}, options);
|
|
52503
|
+
if (!requestRes.ok) {
|
|
52504
|
+
return [requestRes, { status: "invalid" }];
|
|
52505
|
+
}
|
|
52506
|
+
const req$ = requestRes.value;
|
|
52507
|
+
const doResult = await client$._do(req$, {
|
|
52508
|
+
context,
|
|
52509
|
+
errorCodes: [],
|
|
52510
|
+
retryConfig: context.retryConfig,
|
|
52511
|
+
retryCodes: context.retryCodes
|
|
52512
|
+
});
|
|
52513
|
+
if (!doResult.ok) {
|
|
52514
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
52515
|
+
}
|
|
52516
|
+
return [doResult, {
|
|
52517
|
+
status: "complete",
|
|
52518
|
+
request: req$,
|
|
52519
|
+
response: doResult.value
|
|
52520
|
+
}];
|
|
52521
|
+
}
|
|
52522
|
+
var init_accountsListChanged = __esm(() => {
|
|
52523
|
+
init_encodings();
|
|
52524
|
+
init_primitives();
|
|
52525
|
+
init_schemas3();
|
|
52526
|
+
init_security();
|
|
52527
|
+
init_url();
|
|
52528
|
+
init_listaccountsop();
|
|
52529
|
+
init_async();
|
|
52530
|
+
});
|
|
52531
|
+
|
|
52532
|
+
// src/mcp-server/tools/accountsListChanged.ts
|
|
52533
|
+
var args5, tool$accountsListChanged;
|
|
52534
|
+
var init_accountsListChanged2 = __esm(() => {
|
|
52535
|
+
init_accountsListChanged();
|
|
52536
|
+
init_listaccountsop();
|
|
52537
|
+
init_tools();
|
|
52538
|
+
args5 = {
|
|
52539
|
+
request: ListAccountsRequest$zodSchema.optional()
|
|
52540
|
+
};
|
|
52541
|
+
tool$accountsListChanged = {
|
|
52542
|
+
name: "list_changed_accounts",
|
|
52543
|
+
description: `Poll the accounts whose risk changed.
|
|
52544
|
+
|
|
52545
|
+
Your accounts whose risk changed, oldest change first, each as accounts.get answers it. Every page carries next_cursor: pass it back as changed_since to read the changes made after that page; without changed_since the list starts from the oldest change. When nothing changed, items is empty and next_cursor is the cursor you sent, so poll by calling again with the latest next_cursor. An account appears again each time its risk changes, with a higher risk_version; keep the copy with the highest. unenforced=true lists only accounts with a decision other than allow for some flow and no applied enforcement at their current risk_version; such a page can hold fewer than limit items, or none, while later changes exist, so keep polling with next_cursor. Requires the history scope. Read-only and safe to retry. A tampered or foreign cursor answers 400 invalid_cursor.`,
|
|
52546
|
+
annotations: {
|
|
52547
|
+
title: "List the accounts whose risk changed",
|
|
52548
|
+
destructiveHint: false,
|
|
52549
|
+
idempotentHint: true,
|
|
52550
|
+
openWorldHint: false,
|
|
52551
|
+
readOnlyHint: true
|
|
52552
|
+
},
|
|
52553
|
+
args: args5,
|
|
52554
|
+
tool: async (client, args, ctx) => {
|
|
52555
|
+
const [result] = await accountsListChanged(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
52556
|
+
if (!result.ok) {
|
|
52557
|
+
return {
|
|
52558
|
+
content: [{ type: "text", text: result.error.message }],
|
|
52559
|
+
isError: true
|
|
52560
|
+
};
|
|
52561
|
+
}
|
|
52562
|
+
return formatResult(result.value);
|
|
52563
|
+
}
|
|
52564
|
+
};
|
|
52565
|
+
});
|
|
52566
|
+
|
|
52567
|
+
// src/models/enforcementaction.ts
|
|
52568
|
+
var EnforcementAction$zodSchema;
|
|
52569
|
+
var init_enforcementaction = __esm(() => {
|
|
52570
|
+
init_zod();
|
|
52571
|
+
EnforcementAction$zodSchema = _enum([
|
|
52572
|
+
"revoke_sessions",
|
|
52573
|
+
"restrict",
|
|
52574
|
+
"unrestrict",
|
|
52575
|
+
"fail_onboarding",
|
|
52576
|
+
"reject_activation",
|
|
52577
|
+
"none"
|
|
52578
|
+
]).describe("What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action).");
|
|
52579
|
+
});
|
|
52580
|
+
|
|
52581
|
+
// src/models/enforcementprovider.ts
|
|
52582
|
+
var EnforcementProvider$zodSchema;
|
|
52583
|
+
var init_enforcementprovider = __esm(() => {
|
|
52584
|
+
init_zod();
|
|
52585
|
+
EnforcementProvider$zodSchema = _enum([
|
|
52586
|
+
"clerk",
|
|
52587
|
+
"workos",
|
|
52588
|
+
"auth0",
|
|
52589
|
+
"custom"
|
|
52590
|
+
]).describe("The identity provider the action ran in; custom for the workspace's own user store.");
|
|
52591
|
+
});
|
|
52592
|
+
|
|
52593
|
+
// src/models/enforcementstate.ts
|
|
52594
|
+
var EnforcementState$zodSchema;
|
|
52595
|
+
var init_enforcementstate = __esm(() => {
|
|
52596
|
+
init_zod();
|
|
52597
|
+
EnforcementState$zodSchema = _enum([
|
|
52598
|
+
"onboarding",
|
|
52599
|
+
"provisional",
|
|
52600
|
+
"active",
|
|
52601
|
+
"restricted",
|
|
52602
|
+
"rejected"
|
|
52603
|
+
]).describe("The account's state in the workspace's identity provider just before the action: onboarding, provisional (created, not yet activated), active, restricted or rejected.");
|
|
52604
|
+
});
|
|
52605
|
+
|
|
52606
|
+
// src/models/enforcementstatus.ts
|
|
52607
|
+
var EnforcementStatus$zodSchema;
|
|
52608
|
+
var init_enforcementstatus = __esm(() => {
|
|
52609
|
+
init_zod();
|
|
52610
|
+
EnforcementStatus$zodSchema = _enum([
|
|
52611
|
+
"applied",
|
|
52612
|
+
"failed"
|
|
52613
|
+
]).describe("applied when the identity provider accepted the action, failed when it refused it or could not be reached. Only applied counts as enforced.");
|
|
52614
|
+
});
|
|
52615
|
+
|
|
52616
|
+
// src/models/enforcement.ts
|
|
52617
|
+
var Enforcement$zodSchema;
|
|
52618
|
+
var init_enforcement = __esm(() => {
|
|
52619
|
+
init_zod();
|
|
52620
|
+
init_enforcementaction();
|
|
52621
|
+
init_enforcementprovider();
|
|
52622
|
+
init_enforcementstate();
|
|
52623
|
+
init_enforcementstatus();
|
|
52624
|
+
init_flow();
|
|
52625
|
+
Enforcement$zodSchema = object({
|
|
52626
|
+
account_id: string2().describe("The account_id of the request path."),
|
|
52627
|
+
action: EnforcementAction$zodSchema.describe("What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action)."),
|
|
52628
|
+
created_at: string2().describe("When NoResponse first recorded this enforcement, in UTC. A failed record that becomes applied keeps it."),
|
|
52629
|
+
error_code: string2().optional().describe("Why a failed action failed, as a short code of the workspace's choosing (lower-case letters, digits, '_', '.' and '-'), such as the identity provider's error code. Allowed only with status failed: with status applied it answers 400 invalid_request. Keep personal data out of it."),
|
|
52630
|
+
flow: Flow$zodSchema.describe("The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow."),
|
|
52631
|
+
id: string2().describe("Opaque, server-assigned id of one recorded enforcement: 'enf_' and 26 Crockford base32 characters. Unique within the workspace."),
|
|
52632
|
+
provider: EnforcementProvider$zodSchema.describe("The identity provider the action ran in; custom for the workspace's own user store."),
|
|
52633
|
+
risk_version: int().describe("The account's risk_version the workspace acted on. It can be older than the account's current risk_version: such a record is kept and does not count for unenforced."),
|
|
52634
|
+
state_before: EnforcementState$zodSchema.describe("The account's state in the workspace's identity provider just before the action: onboarding, provisional (created, not yet activated), active, restricted or rejected."),
|
|
52635
|
+
status: EnforcementStatus$zodSchema.describe("applied when the identity provider accepted the action, failed when it refused it or could not be reached. Only applied counts as enforced.")
|
|
52636
|
+
}).describe("The answer of POST /v1/accounts/{account_id}/enforcements: one enforcement of one of the calling workspace's accounts, kept once per (account, risk_version, flow, action). The first report answers 201 with the new record. A repeat answers 200 with the record as first stored, whatever the repeat's state_before, status, provider or error_code. The one exception is a stored failed record followed by an applied report: the record becomes applied, keeps its id and created_at, takes the applied report's state_before and provider, drops error_code and answers 201, so a successful retry after a failure is recorded. Only an applied record at the account's current risk_version takes the account out of GET /v1/accounts?unenforced=true.");
|
|
52637
|
+
});
|
|
52638
|
+
|
|
52639
|
+
// src/models/enforcementrequest.ts
|
|
52640
|
+
var EnforcementRequest$zodSchema;
|
|
52641
|
+
var init_enforcementrequest = __esm(() => {
|
|
52642
|
+
init_zod();
|
|
52643
|
+
init_enforcementaction();
|
|
52644
|
+
init_enforcementprovider();
|
|
52645
|
+
init_enforcementstate();
|
|
52646
|
+
init_enforcementstatus();
|
|
52647
|
+
init_flow();
|
|
52648
|
+
EnforcementRequest$zodSchema = object({
|
|
52649
|
+
action: EnforcementAction$zodSchema.describe("What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action)."),
|
|
52650
|
+
error_code: string2().optional().describe("Why a failed action failed, as a short code of the workspace's choosing (lower-case letters, digits, '_', '.' and '-'), such as the identity provider's error code. Allowed only with status failed: with status applied it answers 400 invalid_request. Keep personal data out of it."),
|
|
52651
|
+
flow: Flow$zodSchema.describe("The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow."),
|
|
52652
|
+
provider: EnforcementProvider$zodSchema.describe("The identity provider the action ran in; custom for the workspace's own user store."),
|
|
52653
|
+
risk_version: int().describe("The account's risk_version the workspace acted on, as read from GET /v1/accounts/{account_id}, GET /v1/accounts, an assessment answer or account.risk_changed. A version older than the account's current one is accepted and stored; a version newer than the current one answers 409 risk_version_ahead."),
|
|
52654
|
+
state_before: EnforcementState$zodSchema.describe("The account's state in the workspace's identity provider just before the action: onboarding, provisional (created, not yet activated), active, restricted or rejected."),
|
|
52655
|
+
status: EnforcementStatus$zodSchema.describe("applied when the identity provider accepted the action, failed when it refused it or could not be reached. Only applied counts as enforced.")
|
|
52656
|
+
}).describe("POST /v1/accounts/{account_id}/enforcements body: what the workspace did to the account in its identity provider after reading the account's risk at risk_version. The account is named by the path and the workspace by the API key, so neither is a body member. An enforcement is the workspace's own action, not an outcome: what the workspace later learned about an assessment goes to POST /v1/assessments/{assessment_id}/outcomes. The record's key is (account, risk_version, flow, action), so a retry of the same report is safe and needs no Idempotency-Key.");
|
|
52657
|
+
});
|
|
52658
|
+
|
|
52659
|
+
// src/models/recordenforcementop.ts
|
|
52660
|
+
var RecordEnforcementRequest$zodSchema, RecordEnforcementResponseResult$zodSchema, RecordEnforcementResponse$zodSchema;
|
|
52661
|
+
var init_recordenforcementop = __esm(() => {
|
|
52662
|
+
init_zod();
|
|
52663
|
+
init_authenticationerror();
|
|
52664
|
+
init_badrequesterror();
|
|
52665
|
+
init_conflicterror();
|
|
52666
|
+
init_enforcement();
|
|
52667
|
+
init_enforcementrequest();
|
|
52668
|
+
init_notfounderror();
|
|
52669
|
+
init_permissiondeniederror();
|
|
52670
|
+
init_ratelimiterror();
|
|
52671
|
+
RecordEnforcementRequest$zodSchema = object({
|
|
52672
|
+
account_id: string2().describe("The account_id the workspace sends with its assessments, as one path segment (percent-encode '|' and ':' if the client requires it). A value that does not match the account_id shape answers 400 invalid_request."),
|
|
52673
|
+
body: EnforcementRequest$zodSchema
|
|
52674
|
+
});
|
|
52675
|
+
RecordEnforcementResponseResult$zodSchema = union([
|
|
52676
|
+
Enforcement$zodSchema,
|
|
52677
|
+
BadRequestError$zodSchema,
|
|
52678
|
+
AuthenticationError$zodSchema,
|
|
52679
|
+
PermissionDeniedError$zodSchema,
|
|
52680
|
+
NotFoundError$zodSchema,
|
|
52681
|
+
ConflictError$zodSchema,
|
|
52682
|
+
RateLimitError$zodSchema
|
|
52683
|
+
]);
|
|
52684
|
+
RecordEnforcementResponse$zodSchema = object({
|
|
52685
|
+
Headers: record(string2(), array(string2())).default({}),
|
|
52686
|
+
Result: union([
|
|
52687
|
+
Enforcement$zodSchema,
|
|
52688
|
+
BadRequestError$zodSchema,
|
|
52689
|
+
AuthenticationError$zodSchema,
|
|
52690
|
+
PermissionDeniedError$zodSchema,
|
|
52691
|
+
NotFoundError$zodSchema,
|
|
52692
|
+
ConflictError$zodSchema,
|
|
52693
|
+
RateLimitError$zodSchema
|
|
52694
|
+
])
|
|
52695
|
+
});
|
|
52696
|
+
});
|
|
52697
|
+
|
|
52698
|
+
// src/funcs/accountsRecordEnforcement.ts
|
|
52699
|
+
function accountsRecordEnforcement(client$, request, options) {
|
|
52700
|
+
return new APIPromise($do6(client$, request, options));
|
|
52701
|
+
}
|
|
52702
|
+
async function $do6(client$, request, options) {
|
|
52703
|
+
const parsed$ = safeParse2(request, (value$) => RecordEnforcementRequest$zodSchema.parse(value$), "Input validation failed");
|
|
52704
|
+
if (!parsed$.ok) {
|
|
52705
|
+
return [parsed$, { status: "invalid" }];
|
|
52706
|
+
}
|
|
52707
|
+
const payload$ = parsed$.value;
|
|
52708
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
52709
|
+
const pathParams$ = {
|
|
52710
|
+
account_id: encodeSimple("account_id", payload$.account_id, {
|
|
52711
|
+
explode: false,
|
|
52712
|
+
charEncoding: "percent"
|
|
52713
|
+
})
|
|
52714
|
+
};
|
|
52715
|
+
const path$ = pathToFunc("/v1/accounts/{account_id}/enforcements")(pathParams$);
|
|
52716
|
+
const headers$ = new Headers(compactMap({
|
|
52717
|
+
"Content-Type": "application/json",
|
|
52718
|
+
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
52719
|
+
}));
|
|
52720
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
52721
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52722
|
+
const context = {
|
|
52723
|
+
options: client$._options,
|
|
52724
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
52725
|
+
operationID: "recordEnforcement",
|
|
52726
|
+
oAuth2Scopes: null,
|
|
52727
|
+
resolvedSecurity: requestSecurity,
|
|
52728
|
+
securitySource: client$._options.security,
|
|
52729
|
+
retryConfig: options?.retries || client$._options.retryConfig || {
|
|
52730
|
+
strategy: "backoff",
|
|
52731
|
+
backoff: {
|
|
52732
|
+
initialInterval: 500,
|
|
52733
|
+
maxInterval: 8000,
|
|
52734
|
+
exponent: 2,
|
|
52735
|
+
maxElapsedTime: 30000
|
|
52736
|
+
},
|
|
52737
|
+
retryConnectionErrors: true
|
|
52738
|
+
},
|
|
52739
|
+
retryCodes: options?.retryCodes || [
|
|
52740
|
+
"408",
|
|
52741
|
+
"429",
|
|
52742
|
+
"5XX"
|
|
52743
|
+
]
|
|
52744
|
+
};
|
|
52745
|
+
const requestRes = client$._createRequest(context, {
|
|
52746
|
+
security: requestSecurity,
|
|
52747
|
+
method: "POST",
|
|
52748
|
+
baseURL: options?.serverURL,
|
|
52749
|
+
path: path$,
|
|
52750
|
+
headers: headers$,
|
|
52751
|
+
body: body$,
|
|
52752
|
+
userAgent: client$._options.userAgent,
|
|
52753
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
52754
|
+
}, options);
|
|
52755
|
+
if (!requestRes.ok) {
|
|
52756
|
+
return [requestRes, { status: "invalid" }];
|
|
52757
|
+
}
|
|
52758
|
+
const req$ = requestRes.value;
|
|
52759
|
+
const doResult = await client$._do(req$, {
|
|
52760
|
+
context,
|
|
52761
|
+
errorCodes: [],
|
|
52762
|
+
retryConfig: context.retryConfig,
|
|
52763
|
+
retryCodes: context.retryCodes
|
|
52764
|
+
});
|
|
52765
|
+
if (!doResult.ok) {
|
|
52766
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
52767
|
+
}
|
|
52768
|
+
return [doResult, {
|
|
52769
|
+
status: "complete",
|
|
52770
|
+
request: req$,
|
|
52771
|
+
response: doResult.value
|
|
52772
|
+
}];
|
|
52773
|
+
}
|
|
52774
|
+
var init_accountsRecordEnforcement = __esm(() => {
|
|
52775
|
+
init_encodings();
|
|
52776
|
+
init_primitives();
|
|
52777
|
+
init_schemas3();
|
|
52778
|
+
init_security();
|
|
52779
|
+
init_url();
|
|
52780
|
+
init_recordenforcementop();
|
|
52781
|
+
init_async();
|
|
52782
|
+
});
|
|
52783
|
+
|
|
52784
|
+
// src/mcp-server/tools/accountsRecordEnforcement.ts
|
|
52785
|
+
var args6, tool$accountsRecordEnforcement;
|
|
52786
|
+
var init_accountsRecordEnforcement2 = __esm(() => {
|
|
52787
|
+
init_accountsRecordEnforcement();
|
|
52788
|
+
init_recordenforcementop();
|
|
52789
|
+
init_tools();
|
|
52790
|
+
args6 = {
|
|
52791
|
+
request: RecordEnforcementRequest$zodSchema
|
|
52792
|
+
};
|
|
52793
|
+
tool$accountsRecordEnforcement = {
|
|
52794
|
+
name: "record_enforcement",
|
|
52795
|
+
description: `Record what you did to an account in your identity provider.
|
|
52796
|
+
|
|
52797
|
+
Records what you did to the account in your identity provider for one flow's decision at one risk_version: the action (or none), the account's state before it, the provider and whether it was applied or failed. It is your action, not an outcome, and it leaves the account's risk unchanged. A record is kept once per account, risk_version, flow and action: the first report answers 201, and a repeat answers 200 with the stored record unchanged, so retries are safe without an Idempotency-Key. An applied report after a failed one replaces the failed record, keeping its id and created_at, and answers 201. A risk_version older than the account's current one is accepted and stored, but only an applied record at the current risk_version takes the account out of listChanged with unenforced=true; a newer one answers 409 risk_version_ahead. An account with no current risk answers 404 not_found. error_code is allowed only with status failed. Requires the history scope.`,
|
|
52798
|
+
annotations: {
|
|
52799
|
+
title: "Record an enforcement of an account",
|
|
52800
|
+
destructiveHint: false,
|
|
52801
|
+
idempotentHint: true,
|
|
52802
|
+
openWorldHint: false,
|
|
52803
|
+
readOnlyHint: false
|
|
52804
|
+
},
|
|
52805
|
+
args: args6,
|
|
52806
|
+
tool: async (client, args, ctx) => {
|
|
52807
|
+
const [result] = await accountsRecordEnforcement(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
52808
|
+
if (!result.ok) {
|
|
52809
|
+
return {
|
|
52810
|
+
content: [{ type: "text", text: result.error.message }],
|
|
52811
|
+
isError: true
|
|
52812
|
+
};
|
|
52813
|
+
}
|
|
52814
|
+
return formatResult(result.value);
|
|
52815
|
+
}
|
|
52816
|
+
};
|
|
52817
|
+
});
|
|
52818
|
+
|
|
52396
52819
|
// src/models/platform.ts
|
|
52397
52820
|
var Platform$zodSchema;
|
|
52398
52821
|
var init_platform = __esm(() => {
|
|
@@ -52581,9 +53004,9 @@ var init_createassessmentop = __esm(() => {
|
|
|
52581
53004
|
|
|
52582
53005
|
// src/funcs/assessmentsCreate.ts
|
|
52583
53006
|
function assessmentsCreate(client$, request, options) {
|
|
52584
|
-
return new APIPromise($
|
|
53007
|
+
return new APIPromise($do7(client$, request, options));
|
|
52585
53008
|
}
|
|
52586
|
-
async function $
|
|
53009
|
+
async function $do7(client$, request, options) {
|
|
52587
53010
|
const parsed$ = safeParse2(request, (value$) => CreateAssessmentRequest$zodSchema.parse(value$), "Input validation failed");
|
|
52588
53011
|
if (!parsed$.ok) {
|
|
52589
53012
|
return [parsed$, { status: "invalid" }];
|
|
@@ -52661,12 +53084,12 @@ var init_assessmentsCreate = __esm(() => {
|
|
|
52661
53084
|
});
|
|
52662
53085
|
|
|
52663
53086
|
// src/mcp-server/tools/assessmentsCreate.ts
|
|
52664
|
-
var
|
|
53087
|
+
var args7, tool$assessmentsCreate;
|
|
52665
53088
|
var init_assessmentsCreate2 = __esm(() => {
|
|
52666
53089
|
init_assessmentsCreate();
|
|
52667
53090
|
init_createassessmentop();
|
|
52668
53091
|
init_tools();
|
|
52669
|
-
|
|
53092
|
+
args7 = {
|
|
52670
53093
|
request: CreateAssessmentRequest$zodSchema
|
|
52671
53094
|
};
|
|
52672
53095
|
tool$assessmentsCreate = {
|
|
@@ -52681,7 +53104,7 @@ Assesses one account creation, login or purchase (flow) and answers with the acc
|
|
|
52681
53104
|
openWorldHint: false,
|
|
52682
53105
|
readOnlyHint: false
|
|
52683
53106
|
},
|
|
52684
|
-
args:
|
|
53107
|
+
args: args7,
|
|
52685
53108
|
tool: async (client, args, ctx) => {
|
|
52686
53109
|
const [result] = await assessmentsCreate(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
52687
53110
|
if (!result.ok) {
|
|
@@ -52758,9 +53181,9 @@ var init_deleteassessmentop = __esm(() => {
|
|
|
52758
53181
|
|
|
52759
53182
|
// src/funcs/assessmentsDelete.ts
|
|
52760
53183
|
function assessmentsDelete(client$, request, options) {
|
|
52761
|
-
return new APIPromise($
|
|
53184
|
+
return new APIPromise($do8(client$, request, options));
|
|
52762
53185
|
}
|
|
52763
|
-
async function $
|
|
53186
|
+
async function $do8(client$, request, options) {
|
|
52764
53187
|
const parsed$ = safeParse2(request, (value$) => DeleteAssessmentRequest$zodSchema.parse(value$), "Input validation failed");
|
|
52765
53188
|
if (!parsed$.ok) {
|
|
52766
53189
|
return [parsed$, { status: "invalid" }];
|
|
@@ -52842,12 +53265,12 @@ var init_assessmentsDelete = __esm(() => {
|
|
|
52842
53265
|
});
|
|
52843
53266
|
|
|
52844
53267
|
// src/mcp-server/tools/assessmentsDelete.ts
|
|
52845
|
-
var
|
|
53268
|
+
var args8, tool$assessmentsDelete;
|
|
52846
53269
|
var init_assessmentsDelete2 = __esm(() => {
|
|
52847
53270
|
init_assessmentsDelete();
|
|
52848
53271
|
init_deleteassessmentop();
|
|
52849
53272
|
init_tools();
|
|
52850
|
-
|
|
53273
|
+
args8 = {
|
|
52851
53274
|
request: DeleteAssessmentRequest$zodSchema
|
|
52852
53275
|
};
|
|
52853
53276
|
tool$assessmentsDelete = {
|
|
@@ -52862,7 +53285,7 @@ Deletes one assessment in the environment of your key, with its versions, eviden
|
|
|
52862
53285
|
openWorldHint: false,
|
|
52863
53286
|
readOnlyHint: false
|
|
52864
53287
|
},
|
|
52865
|
-
args:
|
|
53288
|
+
args: args8,
|
|
52866
53289
|
tool: async (client, args, ctx) => {
|
|
52867
53290
|
const [result] = await assessmentsDelete(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
52868
53291
|
if (!result.ok) {
|
|
@@ -52877,12 +53300,12 @@ Deletes one assessment in the environment of your key, with its versions, eviden
|
|
|
52877
53300
|
});
|
|
52878
53301
|
|
|
52879
53302
|
// src/mcp-server/tools/assessmentsGet.ts
|
|
52880
|
-
var
|
|
53303
|
+
var args9, tool$assessmentsGet;
|
|
52881
53304
|
var init_assessmentsGet2 = __esm(() => {
|
|
52882
53305
|
init_assessmentsGet();
|
|
52883
53306
|
init_getassessmentop();
|
|
52884
53307
|
init_tools();
|
|
52885
|
-
|
|
53308
|
+
args9 = {
|
|
52886
53309
|
request: GetAssessmentRequest$zodSchema
|
|
52887
53310
|
};
|
|
52888
53311
|
tool$assessmentsGet = {
|
|
@@ -52897,7 +53320,7 @@ Returns the highest assessment_version, with the account's current risk. Require
|
|
|
52897
53320
|
openWorldHint: false,
|
|
52898
53321
|
readOnlyHint: true
|
|
52899
53322
|
},
|
|
52900
|
-
args:
|
|
53323
|
+
args: args9,
|
|
52901
53324
|
tool: async (client, args, ctx) => {
|
|
52902
53325
|
const [result] = await assessmentsGet(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
52903
53326
|
if (!result.ok) {
|
|
@@ -52926,9 +53349,9 @@ var init_assessmentquery = __esm(() => {
|
|
|
52926
53349
|
|
|
52927
53350
|
// src/funcs/assessmentsQuery.ts
|
|
52928
53351
|
function assessmentsQuery(client$, request, options) {
|
|
52929
|
-
return new APIPromise($
|
|
53352
|
+
return new APIPromise($do9(client$, request, options));
|
|
52930
53353
|
}
|
|
52931
|
-
async function $
|
|
53354
|
+
async function $do9(client$, request, options) {
|
|
52932
53355
|
const parsed$ = safeParse2(request, (value$) => AssessmentQuery$zodSchema.parse(value$), "Input validation failed");
|
|
52933
53356
|
if (!parsed$.ok) {
|
|
52934
53357
|
return [parsed$, { status: "invalid" }];
|
|
@@ -53005,12 +53428,12 @@ var init_assessmentsQuery = __esm(() => {
|
|
|
53005
53428
|
});
|
|
53006
53429
|
|
|
53007
53430
|
// src/mcp-server/tools/assessmentsQuery.ts
|
|
53008
|
-
var
|
|
53431
|
+
var args10, tool$assessmentsQuery;
|
|
53009
53432
|
var init_assessmentsQuery2 = __esm(() => {
|
|
53010
53433
|
init_assessmentsQuery();
|
|
53011
53434
|
init_assessmentquery();
|
|
53012
53435
|
init_tools();
|
|
53013
|
-
|
|
53436
|
+
args10 = {
|
|
53014
53437
|
request: AssessmentQuery$zodSchema
|
|
53015
53438
|
};
|
|
53016
53439
|
tool$assessmentsQuery = {
|
|
@@ -53025,7 +53448,7 @@ History is a POST with account_id in the body so an account identifier stays out
|
|
|
53025
53448
|
openWorldHint: false,
|
|
53026
53449
|
readOnlyHint: true
|
|
53027
53450
|
},
|
|
53028
|
-
args:
|
|
53451
|
+
args: args10,
|
|
53029
53452
|
tool: async (client, args, ctx) => {
|
|
53030
53453
|
const [result] = await assessmentsQuery(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
53031
53454
|
if (!result.ok) {
|
|
@@ -53121,9 +53544,9 @@ var init_recordassessmentoutcomeop = __esm(() => {
|
|
|
53121
53544
|
|
|
53122
53545
|
// src/funcs/assessmentsRecordOutcome.ts
|
|
53123
53546
|
function assessmentsRecordOutcome(client$, request, options) {
|
|
53124
|
-
return new APIPromise($
|
|
53547
|
+
return new APIPromise($do10(client$, request, options));
|
|
53125
53548
|
}
|
|
53126
|
-
async function $
|
|
53549
|
+
async function $do10(client$, request, options) {
|
|
53127
53550
|
const parsed$ = safeParse2(request, (value$) => RecordAssessmentOutcomeRequest$zodSchema.parse(value$), "Input validation failed");
|
|
53128
53551
|
if (!parsed$.ok) {
|
|
53129
53552
|
return [parsed$, { status: "invalid" }];
|
|
@@ -53207,12 +53630,12 @@ var init_assessmentsRecordOutcome = __esm(() => {
|
|
|
53207
53630
|
});
|
|
53208
53631
|
|
|
53209
53632
|
// src/mcp-server/tools/assessmentsRecordOutcome.ts
|
|
53210
|
-
var
|
|
53633
|
+
var args11, tool$assessmentsRecordOutcome;
|
|
53211
53634
|
var init_assessmentsRecordOutcome2 = __esm(() => {
|
|
53212
53635
|
init_assessmentsRecordOutcome();
|
|
53213
53636
|
init_recordassessmentoutcomeop();
|
|
53214
53637
|
init_tools();
|
|
53215
|
-
|
|
53638
|
+
args11 = {
|
|
53216
53639
|
request: RecordAssessmentOutcomeRequest$zodSchema
|
|
53217
53640
|
};
|
|
53218
53641
|
tool$assessmentsRecordOutcome = {
|
|
@@ -53227,7 +53650,7 @@ Records what you later learned about an assessed account: confirmed_abuse, accou
|
|
|
53227
53650
|
openWorldHint: false,
|
|
53228
53651
|
readOnlyHint: false
|
|
53229
53652
|
},
|
|
53230
|
-
args:
|
|
53653
|
+
args: args11,
|
|
53231
53654
|
tool: async (client, args, ctx) => {
|
|
53232
53655
|
const [result] = await assessmentsRecordOutcome(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
53233
53656
|
if (!result.ok) {
|
|
@@ -53276,9 +53699,9 @@ var init_integrationrequest = __esm(() => {
|
|
|
53276
53699
|
|
|
53277
53700
|
// src/funcs/integrationsCreate.ts
|
|
53278
53701
|
function integrationsCreate(client$, request, options) {
|
|
53279
|
-
return new APIPromise($
|
|
53702
|
+
return new APIPromise($do11(client$, request, options));
|
|
53280
53703
|
}
|
|
53281
|
-
async function $
|
|
53704
|
+
async function $do11(client$, request, options) {
|
|
53282
53705
|
const parsed$ = safeParse2(request, (value$) => IntegrationRequest$zodSchema.parse(value$), "Input validation failed");
|
|
53283
53706
|
if (!parsed$.ok) {
|
|
53284
53707
|
return [parsed$, { status: "invalid" }];
|
|
@@ -53342,12 +53765,12 @@ var init_integrationsCreate = __esm(() => {
|
|
|
53342
53765
|
});
|
|
53343
53766
|
|
|
53344
53767
|
// src/mcp-server/tools/integrationsCreate.ts
|
|
53345
|
-
var
|
|
53768
|
+
var args12, tool$integrationsCreate;
|
|
53346
53769
|
var init_integrationsCreate2 = __esm(() => {
|
|
53347
53770
|
init_integrationsCreate();
|
|
53348
53771
|
init_integrationrequest();
|
|
53349
53772
|
init_tools();
|
|
53350
|
-
|
|
53773
|
+
args12 = {
|
|
53351
53774
|
request: IntegrationRequest$zodSchema
|
|
53352
53775
|
};
|
|
53353
53776
|
tool$integrationsCreate = {
|
|
@@ -53362,7 +53785,7 @@ Registers a WorkOS or Auth0 integration and returns its hosted endpoint, url, so
|
|
|
53362
53785
|
openWorldHint: false,
|
|
53363
53786
|
readOnlyHint: false
|
|
53364
53787
|
},
|
|
53365
|
-
args:
|
|
53788
|
+
args: args12,
|
|
53366
53789
|
tool: async (client, args, ctx) => {
|
|
53367
53790
|
const [result] = await integrationsCreate(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
53368
53791
|
if (!result.ok) {
|
|
@@ -53412,9 +53835,9 @@ var init_deleteintegrationop = __esm(() => {
|
|
|
53412
53835
|
|
|
53413
53836
|
// src/funcs/integrationsDelete.ts
|
|
53414
53837
|
function integrationsDelete(client$, request, options) {
|
|
53415
|
-
return new APIPromise($
|
|
53838
|
+
return new APIPromise($do12(client$, request, options));
|
|
53416
53839
|
}
|
|
53417
|
-
async function $
|
|
53840
|
+
async function $do12(client$, request, options) {
|
|
53418
53841
|
const parsed$ = safeParse2(request, (value$) => DeleteIntegrationRequest$zodSchema.parse(value$), "Input validation failed");
|
|
53419
53842
|
if (!parsed$.ok) {
|
|
53420
53843
|
return [parsed$, { status: "invalid" }];
|
|
@@ -53496,12 +53919,12 @@ var init_integrationsDelete = __esm(() => {
|
|
|
53496
53919
|
});
|
|
53497
53920
|
|
|
53498
53921
|
// src/mcp-server/tools/integrationsDelete.ts
|
|
53499
|
-
var
|
|
53922
|
+
var args13, tool$integrationsDelete;
|
|
53500
53923
|
var init_integrationsDelete2 = __esm(() => {
|
|
53501
53924
|
init_integrationsDelete();
|
|
53502
53925
|
init_deleteintegrationop();
|
|
53503
53926
|
init_tools();
|
|
53504
|
-
|
|
53927
|
+
args13 = {
|
|
53505
53928
|
request: DeleteIntegrationRequest$zodSchema
|
|
53506
53929
|
};
|
|
53507
53930
|
tool$integrationsDelete = {
|
|
@@ -53516,7 +53939,7 @@ Removes the integration and its secrets; its endpoint answers 404 from then on,
|
|
|
53516
53939
|
openWorldHint: false,
|
|
53517
53940
|
readOnlyHint: false
|
|
53518
53941
|
},
|
|
53519
|
-
args:
|
|
53942
|
+
args: args13,
|
|
53520
53943
|
tool: async (client, args, ctx) => {
|
|
53521
53944
|
const [result] = await integrationsDelete(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
53522
53945
|
if (!result.ok) {
|
|
@@ -53532,9 +53955,9 @@ Removes the integration and its secrets; its endpoint answers 404 from then on,
|
|
|
53532
53955
|
|
|
53533
53956
|
// src/funcs/integrationsList.ts
|
|
53534
53957
|
function integrationsList(client$, options) {
|
|
53535
|
-
return new APIPromise($
|
|
53958
|
+
return new APIPromise($do13(client$, options));
|
|
53536
53959
|
}
|
|
53537
|
-
async function $
|
|
53960
|
+
async function $do13(client$, options) {
|
|
53538
53961
|
const path$ = pathToFunc("/v1/integrations")();
|
|
53539
53962
|
const headers$ = new Headers(compactMap({
|
|
53540
53963
|
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
@@ -53697,9 +54120,9 @@ var init_rotateintegrationsecretop = __esm(() => {
|
|
|
53697
54120
|
|
|
53698
54121
|
// src/funcs/integrationsRotate.ts
|
|
53699
54122
|
function integrationsRotate(client$, request, options) {
|
|
53700
|
-
return new APIPromise($
|
|
54123
|
+
return new APIPromise($do14(client$, request, options));
|
|
53701
54124
|
}
|
|
53702
|
-
async function $
|
|
54125
|
+
async function $do14(client$, request, options) {
|
|
53703
54126
|
const parsed$ = safeParse2(request, (value$) => RotateIntegrationSecretRequest$zodSchema.parse(value$), "Input validation failed");
|
|
53704
54127
|
if (!parsed$.ok) {
|
|
53705
54128
|
return [parsed$, { status: "invalid" }];
|
|
@@ -53769,12 +54192,12 @@ var init_integrationsRotate = __esm(() => {
|
|
|
53769
54192
|
});
|
|
53770
54193
|
|
|
53771
54194
|
// src/mcp-server/tools/integrationsRotate.ts
|
|
53772
|
-
var
|
|
54195
|
+
var args14, tool$integrationsRotate;
|
|
53773
54196
|
var init_integrationsRotate2 = __esm(() => {
|
|
53774
54197
|
init_integrationsRotate();
|
|
53775
54198
|
init_rotateintegrationsecretop();
|
|
53776
54199
|
init_tools();
|
|
53777
|
-
|
|
54200
|
+
args14 = {
|
|
53778
54201
|
request: RotateIntegrationSecretRequest$zodSchema
|
|
53779
54202
|
};
|
|
53780
54203
|
tool$integrationsRotate = {
|
|
@@ -53789,7 +54212,7 @@ For Auth0, send {} and the answer's secret is the new shared secret, shown once.
|
|
|
53789
54212
|
openWorldHint: false,
|
|
53790
54213
|
readOnlyHint: false
|
|
53791
54214
|
},
|
|
53792
|
-
args:
|
|
54215
|
+
args: args14,
|
|
53793
54216
|
tool: async (client, args, ctx) => {
|
|
53794
54217
|
const [result] = await integrationsRotate(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
53795
54218
|
if (!result.ok) {
|
|
@@ -53816,9 +54239,9 @@ var init_webhookendpointrequest = __esm(() => {
|
|
|
53816
54239
|
|
|
53817
54240
|
// src/funcs/webhookEndpointsCreate.ts
|
|
53818
54241
|
function webhookEndpointsCreate(client$, request, options) {
|
|
53819
|
-
return new APIPromise($
|
|
54242
|
+
return new APIPromise($do15(client$, request, options));
|
|
53820
54243
|
}
|
|
53821
|
-
async function $
|
|
54244
|
+
async function $do15(client$, request, options) {
|
|
53822
54245
|
const parsed$ = safeParse2(request, (value$) => WebhookEndpointRequest$zodSchema.parse(value$), "Input validation failed");
|
|
53823
54246
|
if (!parsed$.ok) {
|
|
53824
54247
|
return [parsed$, { status: "invalid" }];
|
|
@@ -53882,12 +54305,12 @@ var init_webhookEndpointsCreate = __esm(() => {
|
|
|
53882
54305
|
});
|
|
53883
54306
|
|
|
53884
54307
|
// src/mcp-server/tools/webhookEndpointsCreate.ts
|
|
53885
|
-
var
|
|
54308
|
+
var args15, tool$webhookEndpointsCreate;
|
|
53886
54309
|
var init_webhookEndpointsCreate2 = __esm(() => {
|
|
53887
54310
|
init_webhookEndpointsCreate();
|
|
53888
54311
|
init_webhookendpointrequest();
|
|
53889
54312
|
init_tools();
|
|
53890
|
-
|
|
54313
|
+
args15 = {
|
|
53891
54314
|
request: WebhookEndpointRequest$zodSchema
|
|
53892
54315
|
};
|
|
53893
54316
|
tool$webhookEndpointsCreate = {
|
|
@@ -53902,7 +54325,7 @@ Registers a webhook endpoint and returns it with its first signing secret, shown
|
|
|
53902
54325
|
openWorldHint: false,
|
|
53903
54326
|
readOnlyHint: false
|
|
53904
54327
|
},
|
|
53905
|
-
args:
|
|
54328
|
+
args: args15,
|
|
53906
54329
|
tool: async (client, args, ctx) => {
|
|
53907
54330
|
const [result] = await webhookEndpointsCreate(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
53908
54331
|
if (!result.ok) {
|
|
@@ -53952,9 +54375,9 @@ var init_deletewebhookendpointop = __esm(() => {
|
|
|
53952
54375
|
|
|
53953
54376
|
// src/funcs/webhookEndpointsDelete.ts
|
|
53954
54377
|
function webhookEndpointsDelete(client$, request, options) {
|
|
53955
|
-
return new APIPromise($
|
|
54378
|
+
return new APIPromise($do16(client$, request, options));
|
|
53956
54379
|
}
|
|
53957
|
-
async function $
|
|
54380
|
+
async function $do16(client$, request, options) {
|
|
53958
54381
|
const parsed$ = safeParse2(request, (value$) => DeleteWebhookEndpointRequest$zodSchema.parse(value$), "Input validation failed");
|
|
53959
54382
|
if (!parsed$.ok) {
|
|
53960
54383
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54036,12 +54459,12 @@ var init_webhookEndpointsDelete = __esm(() => {
|
|
|
54036
54459
|
});
|
|
54037
54460
|
|
|
54038
54461
|
// src/mcp-server/tools/webhookEndpointsDelete.ts
|
|
54039
|
-
var
|
|
54462
|
+
var args16, tool$webhookEndpointsDelete;
|
|
54040
54463
|
var init_webhookEndpointsDelete2 = __esm(() => {
|
|
54041
54464
|
init_webhookEndpointsDelete();
|
|
54042
54465
|
init_deletewebhookendpointop();
|
|
54043
54466
|
init_tools();
|
|
54044
|
-
|
|
54467
|
+
args16 = {
|
|
54045
54468
|
request: DeleteWebhookEndpointRequest$zodSchema
|
|
54046
54469
|
};
|
|
54047
54470
|
tool$webhookEndpointsDelete = {
|
|
@@ -54056,7 +54479,7 @@ Deletes the endpoint and its signing keys. Deliveries still queued for it are dr
|
|
|
54056
54479
|
openWorldHint: false,
|
|
54057
54480
|
readOnlyHint: false
|
|
54058
54481
|
},
|
|
54059
|
-
args:
|
|
54482
|
+
args: args16,
|
|
54060
54483
|
tool: async (client, args, ctx) => {
|
|
54061
54484
|
const [result] = await webhookEndpointsDelete(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54062
54485
|
if (!result.ok) {
|
|
@@ -54072,9 +54495,9 @@ Deletes the endpoint and its signing keys. Deliveries still queued for it are dr
|
|
|
54072
54495
|
|
|
54073
54496
|
// src/funcs/webhookEndpointsList.ts
|
|
54074
54497
|
function webhookEndpointsList(client$, options) {
|
|
54075
|
-
return new APIPromise($
|
|
54498
|
+
return new APIPromise($do17(client$, options));
|
|
54076
54499
|
}
|
|
54077
|
-
async function $
|
|
54500
|
+
async function $do17(client$, options) {
|
|
54078
54501
|
const path$ = pathToFunc("/v1/webhooks")();
|
|
54079
54502
|
const headers$ = new Headers(compactMap({
|
|
54080
54503
|
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
@@ -54266,9 +54689,9 @@ var init_listwebhookdeliveriesop = __esm(() => {
|
|
|
54266
54689
|
|
|
54267
54690
|
// src/funcs/webhookEndpointsListDeliveries.ts
|
|
54268
54691
|
function webhookEndpointsListDeliveries(client$, request, options) {
|
|
54269
|
-
return new APIPromise($
|
|
54692
|
+
return new APIPromise($do18(client$, request, options));
|
|
54270
54693
|
}
|
|
54271
|
-
async function $
|
|
54694
|
+
async function $do18(client$, request, options) {
|
|
54272
54695
|
const parsed$ = safeParse2(request, (value$) => ListWebhookDeliveriesRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54273
54696
|
if (!parsed$.ok) {
|
|
54274
54697
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54355,12 +54778,12 @@ var init_webhookEndpointsListDeliveries = __esm(() => {
|
|
|
54355
54778
|
});
|
|
54356
54779
|
|
|
54357
54780
|
// src/mcp-server/tools/webhookEndpointsListDeliveries.ts
|
|
54358
|
-
var
|
|
54781
|
+
var args17, tool$webhookEndpointsListDeliveries;
|
|
54359
54782
|
var init_webhookEndpointsListDeliveries2 = __esm(() => {
|
|
54360
54783
|
init_webhookEndpointsListDeliveries();
|
|
54361
54784
|
init_listwebhookdeliveriesop();
|
|
54362
54785
|
init_tools();
|
|
54363
|
-
|
|
54786
|
+
args17 = {
|
|
54364
54787
|
request: ListWebhookDeliveriesRequest$zodSchema
|
|
54365
54788
|
};
|
|
54366
54789
|
tool$webhookEndpointsListDeliveries = {
|
|
@@ -54375,7 +54798,7 @@ Every POST the endpoint received, newest first: the event id and type, which att
|
|
|
54375
54798
|
openWorldHint: false,
|
|
54376
54799
|
readOnlyHint: true
|
|
54377
54800
|
},
|
|
54378
|
-
args:
|
|
54801
|
+
args: args17,
|
|
54379
54802
|
tool: async (client, args, ctx) => {
|
|
54380
54803
|
const [result] = await webhookEndpointsListDeliveries(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54381
54804
|
if (!result.ok) {
|
|
@@ -54449,9 +54872,9 @@ var init_replaywebhookdeliveryop = __esm(() => {
|
|
|
54449
54872
|
|
|
54450
54873
|
// src/funcs/webhookEndpointsReplayDelivery.ts
|
|
54451
54874
|
function webhookEndpointsReplayDelivery(client$, request, options) {
|
|
54452
|
-
return new APIPromise($
|
|
54875
|
+
return new APIPromise($do19(client$, request, options));
|
|
54453
54876
|
}
|
|
54454
|
-
async function $
|
|
54877
|
+
async function $do19(client$, request, options) {
|
|
54455
54878
|
const parsed$ = safeParse2(request, (value$) => ReplayWebhookDeliveryRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54456
54879
|
if (!parsed$.ok) {
|
|
54457
54880
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54525,12 +54948,12 @@ var init_webhookEndpointsReplayDelivery = __esm(() => {
|
|
|
54525
54948
|
});
|
|
54526
54949
|
|
|
54527
54950
|
// src/mcp-server/tools/webhookEndpointsReplayDelivery.ts
|
|
54528
|
-
var
|
|
54951
|
+
var args18, tool$webhookEndpointsReplayDelivery;
|
|
54529
54952
|
var init_webhookEndpointsReplayDelivery2 = __esm(() => {
|
|
54530
54953
|
init_webhookEndpointsReplayDelivery();
|
|
54531
54954
|
init_replaywebhookdeliveryop();
|
|
54532
54955
|
init_tools();
|
|
54533
|
-
|
|
54956
|
+
args18 = {
|
|
54534
54957
|
request: ReplayWebhookDeliveryRequest$zodSchema
|
|
54535
54958
|
};
|
|
54536
54959
|
tool$webhookEndpointsReplayDelivery = {
|
|
@@ -54545,7 +54968,7 @@ Queues the event for the endpoint again: the same event id and body it received,
|
|
|
54545
54968
|
openWorldHint: false,
|
|
54546
54969
|
readOnlyHint: false
|
|
54547
54970
|
},
|
|
54548
|
-
args:
|
|
54971
|
+
args: args18,
|
|
54549
54972
|
tool: async (client, args, ctx) => {
|
|
54550
54973
|
const [result] = await webhookEndpointsReplayDelivery(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54551
54974
|
if (!result.ok) {
|
|
@@ -54631,9 +55054,9 @@ var init_rotatewebhooksigningkeyop = __esm(() => {
|
|
|
54631
55054
|
|
|
54632
55055
|
// src/funcs/webhookEndpointsRotateSigningKey.ts
|
|
54633
55056
|
function webhookEndpointsRotateSigningKey(client$, request, options) {
|
|
54634
|
-
return new APIPromise($
|
|
55057
|
+
return new APIPromise($do20(client$, request, options));
|
|
54635
55058
|
}
|
|
54636
|
-
async function $
|
|
55059
|
+
async function $do20(client$, request, options) {
|
|
54637
55060
|
const parsed$ = safeParse2(request, (value$) => RotateWebhookSigningKeyRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54638
55061
|
if (!parsed$.ok) {
|
|
54639
55062
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54703,12 +55126,12 @@ var init_webhookEndpointsRotateSigningKey = __esm(() => {
|
|
|
54703
55126
|
});
|
|
54704
55127
|
|
|
54705
55128
|
// src/mcp-server/tools/webhookEndpointsRotateSigningKey.ts
|
|
54706
|
-
var
|
|
55129
|
+
var args19, tool$webhookEndpointsRotateSigningKey;
|
|
54707
55130
|
var init_webhookEndpointsRotateSigningKey2 = __esm(() => {
|
|
54708
55131
|
init_webhookEndpointsRotateSigningKey();
|
|
54709
55132
|
init_rotatewebhooksigningkeyop();
|
|
54710
55133
|
init_tools();
|
|
54711
|
-
|
|
55134
|
+
args19 = {
|
|
54712
55135
|
request: RotateWebhookSigningKeyRequest$zodSchema
|
|
54713
55136
|
};
|
|
54714
55137
|
tool$webhookEndpointsRotateSigningKey = {
|
|
@@ -54723,7 +55146,7 @@ Issues a new signing key for the endpoint and returns its secret once. Every del
|
|
|
54723
55146
|
openWorldHint: false,
|
|
54724
55147
|
readOnlyHint: false
|
|
54725
55148
|
},
|
|
54726
|
-
args:
|
|
55149
|
+
args: args19,
|
|
54727
55150
|
tool: async (client, args, ctx) => {
|
|
54728
55151
|
const [result] = await webhookEndpointsRotateSigningKey(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54729
55152
|
if (!result.ok) {
|
|
@@ -54824,9 +55247,9 @@ var init_sendwebhooktesteventop = __esm(() => {
|
|
|
54824
55247
|
|
|
54825
55248
|
// src/funcs/webhookEndpointsSendTestEvent.ts
|
|
54826
55249
|
function webhookEndpointsSendTestEvent(client$, request, options) {
|
|
54827
|
-
return new APIPromise($
|
|
55250
|
+
return new APIPromise($do21(client$, request, options));
|
|
54828
55251
|
}
|
|
54829
|
-
async function $
|
|
55252
|
+
async function $do21(client$, request, options) {
|
|
54830
55253
|
const parsed$ = safeParse2(request, (value$) => SendWebhookTestEventRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54831
55254
|
if (!parsed$.ok) {
|
|
54832
55255
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54896,12 +55319,12 @@ var init_webhookEndpointsSendTestEvent = __esm(() => {
|
|
|
54896
55319
|
});
|
|
54897
55320
|
|
|
54898
55321
|
// src/mcp-server/tools/webhookEndpointsSendTestEvent.ts
|
|
54899
|
-
var
|
|
55322
|
+
var args20, tool$webhookEndpointsSendTestEvent;
|
|
54900
55323
|
var init_webhookEndpointsSendTestEvent2 = __esm(() => {
|
|
54901
55324
|
init_webhookEndpointsSendTestEvent();
|
|
54902
55325
|
init_sendwebhooktesteventop();
|
|
54903
55326
|
init_tools();
|
|
54904
|
-
|
|
55327
|
+
args20 = {
|
|
54905
55328
|
request: SendWebhookTestEventRequest$zodSchema
|
|
54906
55329
|
};
|
|
54907
55330
|
tool$webhookEndpointsSendTestEvent = {
|
|
@@ -54916,7 +55339,7 @@ endpoint.verification sends a signed challenge now and answers whether the endpo
|
|
|
54916
55339
|
openWorldHint: false,
|
|
54917
55340
|
readOnlyHint: false
|
|
54918
55341
|
},
|
|
54919
|
-
args:
|
|
55342
|
+
args: args20,
|
|
54920
55343
|
tool: async (client, args, ctx) => {
|
|
54921
55344
|
const [result] = await webhookEndpointsSendTestEvent(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54922
55345
|
if (!result.ok) {
|
|
@@ -54934,7 +55357,7 @@ endpoint.verification sends a signed challenge now and answers whether the endpo
|
|
|
54934
55357
|
function createMCPServer(deps) {
|
|
54935
55358
|
const server = new McpServer({
|
|
54936
55359
|
name: "NoResponse",
|
|
54937
|
-
version: "0.4.
|
|
55360
|
+
version: "0.4.3"
|
|
54938
55361
|
});
|
|
54939
55362
|
const getClient = deps.getSDK || (() => new NoResponseCore({
|
|
54940
55363
|
security: deps.security,
|
|
@@ -54958,9 +55381,11 @@ function createMCPServer(deps) {
|
|
|
54958
55381
|
tool(tool$assessmentsDelete);
|
|
54959
55382
|
tool(tool$assessmentsRecordOutcome);
|
|
54960
55383
|
tool(tool$assessmentsQuery);
|
|
55384
|
+
tool(tool$accountsListChanged);
|
|
54961
55385
|
tool(tool$accountsGet);
|
|
54962
55386
|
tool(tool$accountsDelete);
|
|
54963
55387
|
tool(tool$accountsListAssessments);
|
|
55388
|
+
tool(tool$accountsRecordEnforcement);
|
|
54964
55389
|
tool(tool$integrationsCreate);
|
|
54965
55390
|
tool(tool$integrationsList);
|
|
54966
55391
|
tool(tool$integrationsDelete);
|
|
@@ -54988,6 +55413,8 @@ var init_server = __esm(() => {
|
|
|
54988
55413
|
init_accountsDelete2();
|
|
54989
55414
|
init_accountsGet2();
|
|
54990
55415
|
init_accountsListAssessments2();
|
|
55416
|
+
init_accountsListChanged2();
|
|
55417
|
+
init_accountsRecordEnforcement2();
|
|
54991
55418
|
init_assessmentsCreate2();
|
|
54992
55419
|
init_assessmentsDelete2();
|
|
54993
55420
|
init_assessmentsGet2();
|
|
@@ -55039,6 +55466,12 @@ Records what you later learned about an assessed account: confirmed_abuse, accou
|
|
|
55039
55466
|
description: `Page through one account's unexpired assessments.
|
|
55040
55467
|
|
|
55041
55468
|
History is a POST with account_id in the body so an account identifier stays out of URLs and access logs. Requires the history scope. Read-only and safe to retry. Newest first, each at its latest assessment_version. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope.`
|
|
55469
|
+
},
|
|
55470
|
+
{
|
|
55471
|
+
name: "list_changed_accounts",
|
|
55472
|
+
description: `Poll the accounts whose risk changed.
|
|
55473
|
+
|
|
55474
|
+
Your accounts whose risk changed, oldest change first, each as accounts.get answers it. Every page carries next_cursor: pass it back as changed_since to read the changes made after that page; without changed_since the list starts from the oldest change. When nothing changed, items is empty and next_cursor is the cursor you sent, so poll by calling again with the latest next_cursor. An account appears again each time its risk changes, with a higher risk_version; keep the copy with the highest. unenforced=true lists only accounts with a decision other than allow for some flow and no applied enforcement at their current risk_version; such a page can hold fewer than limit items, or none, while later changes exist, so keep polling with next_cursor. Requires the history scope. Read-only and safe to retry. A tampered or foreign cursor answers 400 invalid_cursor.`
|
|
55042
55475
|
},
|
|
55043
55476
|
{
|
|
55044
55477
|
name: "get_account",
|
|
@@ -55057,6 +55490,12 @@ Erases the account in the environment of your key, for an erasure request from y
|
|
|
55057
55490
|
description: `Page through one account's unexpired assessments.
|
|
55058
55491
|
|
|
55059
55492
|
The account's history: the same page as POST /v1/assessments/query for this account_id, newest first, each at its latest assessment_version. Requires the history scope. Read-only and safe to retry. An account with no assessments answers 200 with empty items. The cursor is opaque and bound to your workspace and the account; a tampered or expired cursor answers 400 invalid_cursor. response_mode=detailed needs the detailed scope. The account_id travels in the URL; use POST /v1/assessments/query to keep it out of access logs.`
|
|
55493
|
+
},
|
|
55494
|
+
{
|
|
55495
|
+
name: "record_enforcement",
|
|
55496
|
+
description: `Record what you did to an account in your identity provider.
|
|
55497
|
+
|
|
55498
|
+
Records what you did to the account in your identity provider for one flow's decision at one risk_version: the action (or none), the account's state before it, the provider and whether it was applied or failed. It is your action, not an outcome, and it leaves the account's risk unchanged. A record is kept once per account, risk_version, flow and action: the first report answers 201, and a repeat answers 200 with the stored record unchanged, so retries are safe without an Idempotency-Key. An applied report after a failed one replaces the failed record, keeping its id and created_at, and answers 201. A risk_version older than the account's current one is accepted and stored, but only an applied record at the current risk_version takes the account out of listChanged with unenforced=true; a newer one answers 409 risk_version_ahead. An account with no current risk answers 404 not_found. error_code is allowed only with status failed. Requires the history scope.`
|
|
55060
55499
|
},
|
|
55061
55500
|
{
|
|
55062
55501
|
name: "create_integration",
|
|
@@ -63623,7 +64062,7 @@ var routes = buildRouteMap({
|
|
|
63623
64062
|
var app = buildApplication(routes, {
|
|
63624
64063
|
name: "mcp",
|
|
63625
64064
|
versionInfo: {
|
|
63626
|
-
currentVersion: "0.4.
|
|
64065
|
+
currentVersion: "0.4.3"
|
|
63627
64066
|
}
|
|
63628
64067
|
});
|
|
63629
64068
|
run(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -63631,5 +64070,5 @@ export {
|
|
|
63631
64070
|
app
|
|
63632
64071
|
};
|
|
63633
64072
|
|
|
63634
|
-
//# debugId=
|
|
64073
|
+
//# debugId=04ECF577D7FFCD0864756E2164756E21
|
|
63635
64074
|
//# sourceMappingURL=mcp-server.js.map
|