@vectros-ai/mcp-server 0.13.0 → 0.14.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/dist/cli-http.mjs CHANGED
@@ -64,6 +64,7 @@ __export(api_exports, {
64
64
  TooManyRequestsError: () => TooManyRequestsError,
65
65
  TruncationWarningEvent: () => TruncationWarningEvent,
66
66
  UnauthorizedError: () => UnauthorizedError,
67
+ UserExistsResponse: () => UserExistsResponse,
67
68
  UserRequest: () => UserRequest,
68
69
  UserResponse: () => UserResponse,
69
70
  auth: () => auth_exports,
@@ -740,6 +741,14 @@ var TruncationWarningEvent;
740
741
  ContextWindowBudget: "context_window_budget"
741
742
  };
742
743
  })(TruncationWarningEvent || (TruncationWarningEvent = {}));
744
+ var UserExistsResponse;
745
+ ((UserExistsResponse2) => {
746
+ UserExistsResponse2.Status = {
747
+ Active: "ACTIVE",
748
+ Suspended: "SUSPENDED",
749
+ Pending: "PENDING"
750
+ };
751
+ })(UserExistsResponse || (UserExistsResponse = {}));
743
752
  var UserRequest;
744
753
  ((UserRequest2) => {
745
754
  UserRequest2.Status = {
@@ -2483,7 +2492,7 @@ var AuthClient = class {
2483
2492
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/admin/keys/scoped");
2484
2493
  }
2485
2494
  /**
2486
- * Creates a scoped API key (an `ssk_*` secret) that inherits its permissions from an existing access profile in your account. The call is idempotent on the combination of tenant, context, user, and key name: re-issuing the same request returns the existing key WITHOUT re-disclosing its raw secret. The raw key is returned ONLY in this response — store it securely, as it cannot be retrieved again. Requires the `keys:c` scope.
2495
+ * Creates a scoped API key (an `ssk_*` secret) that inherits its permissions from an existing access profile in your account. The call is idempotent on the combination of tenant, context, user, and key name: re-issuing the same request returns the existing key WITHOUT re-disclosing its raw secret. The raw key is returned ONLY in this response — store it securely, as it cannot be retrieved again. Requires the `keys:c` scope. If you use a scoped credential, `keys:c` alone is not sufficient: because the minted key is durably bound to the profile you name, the profile's effective scopes may not exceed your own, and you may only mint against a profile whose `identityOverrides` values your own identity holds. A root API key (`sk_`) is exempt from both bounds.
2487
2496
  *
2488
2497
  * @param {Vectros.CreateScopedKeyRequest} request
2489
2498
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -3233,11 +3242,12 @@ var AuthClient = class {
3233
3242
  );
3234
3243
  }
3235
3244
  /**
3236
- * Updates an access profile. This is a partial update: any field you omit (or send as null) keeps its existing value. A profile must reference either inline `scopes` or a `roleId`, never both — so setting `scopes` clears any `roleId`, and setting `roleId` clears any inline `scopes`. The `contextId` and `principalId` are immutable. Status changes (for example active to suspended) take effect within about five minutes. If you use a scoped credential, the profile's effective scopes may not exceed your own, and its `identityOverrides` are bounded twice: you may only set a value your own identity holds, and you may only change or clear a value the profile already holds if that value is yours as well. Repointing or clearing another principal's established identity therefore returns 403. A root API key (`sk_`) is exempt. Requires the `profiles:u` scope.
3245
+ * Updates an access profile. This is a partial update: any field you omit (or send as null) keeps its existing value. A profile must reference either inline `scopes` or a `roleId`, never both — so setting `scopes` clears any `roleId`, and setting `roleId` clears any inline `scopes`. The `contextId` and `principalId` are immutable. Status changes (for example active to suspended) take effect within about five minutes. If you use a scoped credential, the profile's effective scopes may not exceed your own, and its `identityOverrides` are bounded twice: you may only set a value your own identity holds, and you may only change or clear a value the profile already holds if that value is yours as well. Repointing or clearing another principal's established identity therefore returns 403. A root API key (`sk_`) is exempt. If you set `roleId`, it must reference a role that already exists in this context. Requires the `profiles:u` scope.
3237
3246
  *
3238
3247
  * @param {Vectros.UpdateAccessProfileRequest} request
3239
3248
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
3240
3249
  *
3250
+ * @throws {@link Vectros.BadRequestError}
3241
3251
  * @throws {@link Vectros.ForbiddenError}
3242
3252
  * @throws {@link Vectros.NotFoundError}
3243
3253
  * @throws {@link Vectros.TooManyRequestsError}
@@ -3284,6 +3294,8 @@ var AuthClient = class {
3284
3294
  }
3285
3295
  if (_response.error.reason === "status-code") {
3286
3296
  switch (_response.error.statusCode) {
3297
+ case 400:
3298
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
3287
3299
  case 403:
3288
3300
  throw new ForbiddenError(_response.error.body, _response.rawResponse);
3289
3301
  case 404:
@@ -3975,6 +3987,254 @@ var AuthClient = class {
3975
3987
  }
3976
3988
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/usage");
3977
3989
  }
3990
+ /**
3991
+ * Retrieves a single registered issuer by issuerId. Requires a root API key or the bootstrap's provisioning capability.
3992
+ *
3993
+ * @param {Vectros.GetIssuerRequest} request
3994
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
3995
+ *
3996
+ * @throws {@link Vectros.ForbiddenError}
3997
+ * @throws {@link Vectros.NotFoundError}
3998
+ *
3999
+ * @example
4000
+ * await client.auth.getIssuer({
4001
+ * issuerId: "auth0-prod"
4002
+ * })
4003
+ */
4004
+ getIssuer(request, requestOptions) {
4005
+ return HttpResponsePromise.fromPromise(this.__getIssuer(request, requestOptions));
4006
+ }
4007
+ async __getIssuer(request, requestOptions) {
4008
+ const { issuerId } = request;
4009
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4010
+ const _headers = mergeHeaders(
4011
+ _authRequest.headers,
4012
+ this._options?.headers,
4013
+ requestOptions?.headers
4014
+ );
4015
+ const _response = await fetcher({
4016
+ url: url_exports.join(
4017
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4018
+ `v1/auth/issuers/${url_exports.encodePathParam(issuerId)}`
4019
+ ),
4020
+ method: "GET",
4021
+ headers: _headers,
4022
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4023
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4024
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4025
+ abortSignal: requestOptions?.abortSignal,
4026
+ fetchFn: this._options?.fetch,
4027
+ logging: this._options.logging
4028
+ });
4029
+ if (_response.ok) {
4030
+ return { data: _response.body, rawResponse: _response.rawResponse };
4031
+ }
4032
+ if (_response.error.reason === "status-code") {
4033
+ switch (_response.error.statusCode) {
4034
+ case 403:
4035
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4036
+ case 404:
4037
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4038
+ default:
4039
+ throw new VectrosError({
4040
+ statusCode: _response.error.statusCode,
4041
+ body: _response.error.body,
4042
+ rawResponse: _response.rawResponse
4043
+ });
4044
+ }
4045
+ }
4046
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers/{issuerId}");
4047
+ }
4048
+ /**
4049
+ * Deregisters a trusted third-party IdP issuer. Requires a root API key or the bootstrap's provisioning capability. Unconditional — unlike some other registry deletes on this API, this does not check for or block on any downstream reference. Any user account already created via this issuer (by a prior self-signup or accepted invite) is NOT deleted or modified, but that user can no longer obtain a NEW token this way once you deregister the issuer — every `POST /v1/auth/token/exchange` call against it will 404, with no distinction between an unknown issuer and one you just deregistered. Register a replacement issuer, or restore this one, before your users' current tokens expire if you want their access to continue uninterrupted.
4050
+ *
4051
+ * @param {Vectros.DeleteIssuerRequest} request
4052
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4053
+ *
4054
+ * @throws {@link Vectros.ForbiddenError}
4055
+ * @throws {@link Vectros.NotFoundError}
4056
+ * @throws {@link Vectros.TooManyRequestsError}
4057
+ *
4058
+ * @example
4059
+ * await client.auth.deleteIssuer({
4060
+ * issuerId: "auth0-prod"
4061
+ * })
4062
+ */
4063
+ deleteIssuer(request, requestOptions) {
4064
+ return HttpResponsePromise.fromPromise(this.__deleteIssuer(request, requestOptions));
4065
+ }
4066
+ async __deleteIssuer(request, requestOptions) {
4067
+ const { issuerId } = request;
4068
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4069
+ const _headers = mergeHeaders(
4070
+ _authRequest.headers,
4071
+ this._options?.headers,
4072
+ requestOptions?.headers
4073
+ );
4074
+ const _response = await fetcher({
4075
+ url: url_exports.join(
4076
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4077
+ `v1/auth/issuers/${url_exports.encodePathParam(issuerId)}`
4078
+ ),
4079
+ method: "DELETE",
4080
+ headers: _headers,
4081
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4082
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4083
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4084
+ abortSignal: requestOptions?.abortSignal,
4085
+ fetchFn: this._options?.fetch,
4086
+ logging: this._options.logging
4087
+ });
4088
+ if (_response.ok) {
4089
+ return { data: void 0, rawResponse: _response.rawResponse };
4090
+ }
4091
+ if (_response.error.reason === "status-code") {
4092
+ switch (_response.error.statusCode) {
4093
+ case 403:
4094
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4095
+ case 404:
4096
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4097
+ case 429:
4098
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4099
+ default:
4100
+ throw new VectrosError({
4101
+ statusCode: _response.error.statusCode,
4102
+ body: _response.error.body,
4103
+ rawResponse: _response.rawResponse
4104
+ });
4105
+ }
4106
+ }
4107
+ return handleNonStatusCodeError(
4108
+ _response.error,
4109
+ _response.rawResponse,
4110
+ "DELETE",
4111
+ "/v1/auth/issuers/{issuerId}"
4112
+ );
4113
+ }
4114
+ /**
4115
+ * Returns the issuers registered in your tenant. Requires a root API key or the bootstrap's provisioning capability. Returns a `{data, nextCursor}` envelope.
4116
+ *
4117
+ * @param {Vectros.ListIssuersRequest} request
4118
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4119
+ *
4120
+ * @throws {@link Vectros.ForbiddenError}
4121
+ *
4122
+ * @example
4123
+ * await client.auth.listIssuers()
4124
+ */
4125
+ listIssuers(request = {}, requestOptions) {
4126
+ return HttpResponsePromise.fromPromise(this.__listIssuers(request, requestOptions));
4127
+ }
4128
+ async __listIssuers(request = {}, requestOptions) {
4129
+ const { startFrom, limit } = request;
4130
+ const _queryParams = {
4131
+ startFrom,
4132
+ limit
4133
+ };
4134
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4135
+ const _headers = mergeHeaders(
4136
+ _authRequest.headers,
4137
+ this._options?.headers,
4138
+ requestOptions?.headers
4139
+ );
4140
+ const _response = await fetcher({
4141
+ url: url_exports.join(
4142
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4143
+ "v1/auth/issuers"
4144
+ ),
4145
+ method: "GET",
4146
+ headers: _headers,
4147
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4148
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4149
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4150
+ abortSignal: requestOptions?.abortSignal,
4151
+ fetchFn: this._options?.fetch,
4152
+ logging: this._options.logging
4153
+ });
4154
+ if (_response.ok) {
4155
+ return { data: _response.body, rawResponse: _response.rawResponse };
4156
+ }
4157
+ if (_response.error.reason === "status-code") {
4158
+ switch (_response.error.statusCode) {
4159
+ case 403:
4160
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4161
+ default:
4162
+ throw new VectrosError({
4163
+ statusCode: _response.error.statusCode,
4164
+ body: _response.error.body,
4165
+ rawResponse: _response.rawResponse
4166
+ });
4167
+ }
4168
+ }
4169
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
4170
+ }
4171
+ /**
4172
+ * Registers a trusted third-party IdP issuer that BYO-IdP token exchange (`POST /v1/auth/token/exchange`) may accept a `subject_token` from. Requires a root API key or the CLI bootstrap's provisioning capability — never an ordinary partner-grantable scope. Idempotent by `issuerId` within your tenant; the `(issuer, audience)` pair must not already be registered by a different issuerId/tenant.
4173
+ *
4174
+ * @param {Vectros.IssuerRequest} request
4175
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4176
+ *
4177
+ * @throws {@link Vectros.BadRequestError}
4178
+ * @throws {@link Vectros.ForbiddenError}
4179
+ * @throws {@link Vectros.TooManyRequestsError}
4180
+ *
4181
+ * @example
4182
+ * await client.auth.registerIssuer({
4183
+ * issuerId: "auth0-prod",
4184
+ * issuer: "https://your-tenant.us.auth0.com/",
4185
+ * jwksUri: "https://your-tenant.us.auth0.com/.well-known/jwks.json",
4186
+ * audience: "https://api.your-app.example.com",
4187
+ * contextId: "casework"
4188
+ * })
4189
+ */
4190
+ registerIssuer(request, requestOptions) {
4191
+ return HttpResponsePromise.fromPromise(this.__registerIssuer(request, requestOptions));
4192
+ }
4193
+ async __registerIssuer(request, requestOptions) {
4194
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4195
+ const _headers = mergeHeaders(
4196
+ _authRequest.headers,
4197
+ this._options?.headers,
4198
+ requestOptions?.headers
4199
+ );
4200
+ const _response = await fetcher({
4201
+ url: url_exports.join(
4202
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4203
+ "v1/auth/issuers"
4204
+ ),
4205
+ method: "POST",
4206
+ headers: _headers,
4207
+ contentType: "application/json",
4208
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4209
+ requestType: "json",
4210
+ body: request,
4211
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4212
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4213
+ abortSignal: requestOptions?.abortSignal,
4214
+ fetchFn: this._options?.fetch,
4215
+ logging: this._options.logging
4216
+ });
4217
+ if (_response.ok) {
4218
+ return { data: _response.body, rawResponse: _response.rawResponse };
4219
+ }
4220
+ if (_response.error.reason === "status-code") {
4221
+ switch (_response.error.statusCode) {
4222
+ case 400:
4223
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4224
+ case 403:
4225
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4226
+ case 429:
4227
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4228
+ default:
4229
+ throw new VectrosError({
4230
+ statusCode: _response.error.statusCode,
4231
+ body: _response.error.body,
4232
+ rawResponse: _response.rawResponse
4233
+ });
4234
+ }
4235
+ }
4236
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/issuers");
4237
+ }
3978
4238
  /**
3979
4239
  * Returns the identity bound to your credential — your account, principal type, key id, and scope details — so you can confirm who you are authenticated as and that the credential is valid. MCP clients use this to render "signed in as ..." in a chat UI without a separate identity endpoint.
3980
4240
  *
@@ -4298,6 +4558,72 @@ var AuthClient = class {
4298
4558
  }
4299
4559
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/users/invite/resend");
4300
4560
  }
4561
+ /**
4562
+ * RFC 8693 OAuth 2.0 Token Exchange. Trades a JWT issued by a third-party identity provider you've registered (`POST /v1/auth/issuers`) for a Vectros `st_*` scoped bearer token — no Vectros credential required to call this endpoint. The exchanged token's scope is resolved entirely server-side from the matched user's access profile; this endpoint accepts no caller-supplied scope, resource, or audience parameter (RFC 8693 §2.1's `resource`/`audience`/`scope` are not used in v1 — the registered `(issuer, audience)` pair alone pins the target tenant and app context). On a first-time login (no existing Vectros identity for this subject), two opt-in binding paths exist: `invite_token` (a `PENDING` sub-user invitation), and — if the registration declares one or more self-signup policies — `signup_type` (a brand-new user is created and bound to the policy's configured role). If `invite_token` is present at all, it is the ONLY path tried — a failed invite never falls through to self-signup. Neither field is required for a subject with an existing identity. Uses the OAuth-standard error envelope (`{"error":..., "error_description":...}`, RFC 6749 §5.2), NOT this API's usual `{"message":...}` shape — its client is generic OAuth tooling, not the Vectros SDK.
4563
+ *
4564
+ * @param {Vectros.TokenExchangeRequest} request
4565
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4566
+ *
4567
+ * @throws {@link Vectros.BadRequestError}
4568
+ * @throws {@link Vectros.UnauthorizedError}
4569
+ * @throws {@link Vectros.ForbiddenError}
4570
+ * @throws {@link Vectros.NotFoundError}
4571
+ * @throws {@link Vectros.TooManyRequestsError}
4572
+ *
4573
+ * @example
4574
+ * await client.auth.exchangeToken({
4575
+ * grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
4576
+ * subject_token: "subject_token",
4577
+ * subject_token_type: "urn:ietf:params:oauth:token-type:jwt"
4578
+ * })
4579
+ */
4580
+ exchangeToken(request, requestOptions) {
4581
+ return HttpResponsePromise.fromPromise(this.__exchangeToken(request, requestOptions));
4582
+ }
4583
+ async __exchangeToken(request, requestOptions) {
4584
+ const _headers = mergeHeaders(this._options?.headers, requestOptions?.headers);
4585
+ const _response = await fetcher({
4586
+ url: url_exports.join(
4587
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4588
+ "v1/auth/token/exchange"
4589
+ ),
4590
+ method: "POST",
4591
+ headers: _headers,
4592
+ contentType: "application/json",
4593
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4594
+ requestType: "json",
4595
+ body: request,
4596
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4597
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4598
+ abortSignal: requestOptions?.abortSignal,
4599
+ fetchFn: this._options?.fetch,
4600
+ logging: this._options.logging
4601
+ });
4602
+ if (_response.ok) {
4603
+ return { data: _response.body, rawResponse: _response.rawResponse };
4604
+ }
4605
+ if (_response.error.reason === "status-code") {
4606
+ switch (_response.error.statusCode) {
4607
+ case 400:
4608
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4609
+ case 401:
4610
+ throw new UnauthorizedError(_response.error.body, _response.rawResponse);
4611
+ case 403:
4612
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4613
+ case 404:
4614
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4615
+ case 429:
4616
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4617
+ default:
4618
+ throw new VectrosError({
4619
+ statusCode: _response.error.statusCode,
4620
+ body: _response.error.body,
4621
+ rawResponse: _response.rawResponse
4622
+ });
4623
+ }
4624
+ }
4625
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/token/exchange");
4626
+ }
4301
4627
  };
4302
4628
  var ComplianceClient = class {
4303
4629
  constructor(options) {
@@ -6905,6 +7231,69 @@ var IdentityClient = class {
6905
7231
  }
6906
7232
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/users/lookup");
6907
7233
  }
7234
+ /**
7235
+ * Answers "does a user with this email hold an ACTIVE access profile in this app context" — a narrow existence check, not a general lookup. `exists` is false for a member whose access to this context has been suspended, not only for a member who was never granted it. The answer is scoped to the `contextId` you supply: it does not reveal whether the email exists elsewhere in your tenant or account, only whether it belongs to an active member of the named context. Returns `{exists, userId, status}` — never the full user record — so a caller asking "does X exist" cannot receive that user's payload/schema binding/etc. as a side effect. Useful for resolving an email you were handed (for example, by an org-admin adding an existing member to another org) to a `userId`, without paging through the full context membership. Requires the `users:r` scope.
7236
+ *
7237
+ * @param {Vectros.UserExistsByEmailRequest} request
7238
+ * @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
7239
+ *
7240
+ * @throws {@link Vectros.BadRequestError}
7241
+ * @throws {@link Vectros.ForbiddenError}
7242
+ *
7243
+ * @example
7244
+ * await client.identity.userExistsByEmail({
7245
+ * email: "user@example.com",
7246
+ * contextId: "myapp"
7247
+ * })
7248
+ */
7249
+ userExistsByEmail(request = {}, requestOptions) {
7250
+ return HttpResponsePromise.fromPromise(this.__userExistsByEmail(request, requestOptions));
7251
+ }
7252
+ async __userExistsByEmail(request = {}, requestOptions) {
7253
+ const { email, contextId } = request;
7254
+ const _queryParams = {
7255
+ email,
7256
+ contextId
7257
+ };
7258
+ const _authRequest = await this._options.authProvider.getAuthRequest();
7259
+ const _headers = mergeHeaders(
7260
+ _authRequest.headers,
7261
+ this._options?.headers,
7262
+ requestOptions?.headers
7263
+ );
7264
+ const _response = await fetcher({
7265
+ url: url_exports.join(
7266
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
7267
+ "v1/users/exists-by-email"
7268
+ ),
7269
+ method: "GET",
7270
+ headers: _headers,
7271
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
7272
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
7273
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
7274
+ abortSignal: requestOptions?.abortSignal,
7275
+ fetchFn: this._options?.fetch,
7276
+ logging: this._options.logging
7277
+ });
7278
+ if (_response.ok) {
7279
+ return { data: _response.body, rawResponse: _response.rawResponse };
7280
+ }
7281
+ if (_response.error.reason === "status-code") {
7282
+ switch (_response.error.statusCode) {
7283
+ case 400:
7284
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
7285
+ case 403:
7286
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
7287
+ default:
7288
+ throw new VectrosError({
7289
+ statusCode: _response.error.statusCode,
7290
+ body: _response.error.body,
7291
+ rawResponse: _response.rawResponse
7292
+ });
7293
+ }
7294
+ }
7295
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/users/exists-by-email");
7296
+ }
6908
7297
  /**
6909
7298
  * Returns the audit trail of changes to a user, most recent first. Identity history is always recorded and always available. Sensitive field values are redacted in every historical version. Returns a page in the `{data, nextCursor}` envelope. Requires the `users:r` scope.
6910
7299
  *
@@ -8666,15 +9055,15 @@ function warnOnSuboptimalKey(key, log) {
8666
9055
  } else if (key.prefix === "st") {
8667
9056
  log.warn(
8668
9057
  { prefix: key.prefix, env: key.env },
8669
- "short-lived token (st_*) will expire mid-session (1h default, 24h max). For long-running MCP installs, prefer a long-lived ssk_* key."
9058
+ "short-lived token (st_*) will expire mid-session (1h max). For long-running MCP installs, prefer a long-lived ssk_* key."
8670
9059
  );
8671
9060
  }
8672
9061
  }
8673
9062
 
8674
9063
  // src/build-info.ts
8675
9064
  var BUILD_INFO = {
8676
- mcpServer: true ? "0.13.0" : "dev",
8677
- sdk: true ? "0.38.0" : "dev"
9065
+ mcpServer: true ? "0.14.0" : "dev",
9066
+ sdk: true ? "0.39.0" : "dev"
8678
9067
  };
8679
9068
 
8680
9069
  // src/log.ts