@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/index.d.mts CHANGED
@@ -199,7 +199,7 @@ declare function createStdioTransport(): StdioServerTransport;
199
199
  * warn the user on accept.
200
200
  * ssk_* — server-side scoped key. Long-lived, narrowable scope.
201
201
  * The RECOMMENDED credential for MCP. Accept silently.
202
- * st_* — short-lived KMS-signed JWT (1h default / 24h max).
202
+ * st_* — short-lived KMS-signed JWT (1h default, and 1h max).
203
203
  * Will expire mid-session; warn the user on accept.
204
204
  *
205
205
  * See the Vectros developer documentation on the auth model and
package/dist/index.d.ts CHANGED
@@ -199,7 +199,7 @@ declare function createStdioTransport(): StdioServerTransport;
199
199
  * warn the user on accept.
200
200
  * ssk_* — server-side scoped key. Long-lived, narrowable scope.
201
201
  * The RECOMMENDED credential for MCP. Accept silently.
202
- * st_* — short-lived KMS-signed JWT (1h default / 24h max).
202
+ * st_* — short-lived KMS-signed JWT (1h default, and 1h max).
203
203
  * Will expire mid-session; warn the user on accept.
204
204
  *
205
205
  * See the Vectros developer documentation on the auth model and
package/dist/index.js CHANGED
@@ -103,6 +103,7 @@ __export2(api_exports, {
103
103
  TooManyRequestsError: () => TooManyRequestsError,
104
104
  TruncationWarningEvent: () => TruncationWarningEvent,
105
105
  UnauthorizedError: () => UnauthorizedError,
106
+ UserExistsResponse: () => UserExistsResponse,
106
107
  UserRequest: () => UserRequest,
107
108
  UserResponse: () => UserResponse,
108
109
  auth: () => auth_exports,
@@ -779,6 +780,14 @@ var TruncationWarningEvent;
779
780
  ContextWindowBudget: "context_window_budget"
780
781
  };
781
782
  })(TruncationWarningEvent || (TruncationWarningEvent = {}));
783
+ var UserExistsResponse;
784
+ ((UserExistsResponse2) => {
785
+ UserExistsResponse2.Status = {
786
+ Active: "ACTIVE",
787
+ Suspended: "SUSPENDED",
788
+ Pending: "PENDING"
789
+ };
790
+ })(UserExistsResponse || (UserExistsResponse = {}));
782
791
  var UserRequest;
783
792
  ((UserRequest2) => {
784
793
  UserRequest2.Status = {
@@ -2522,7 +2531,7 @@ var AuthClient = class {
2522
2531
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/admin/keys/scoped");
2523
2532
  }
2524
2533
  /**
2525
- * 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.
2534
+ * 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.
2526
2535
  *
2527
2536
  * @param {Vectros.CreateScopedKeyRequest} request
2528
2537
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -3272,11 +3281,12 @@ var AuthClient = class {
3272
3281
  );
3273
3282
  }
3274
3283
  /**
3275
- * 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.
3284
+ * 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.
3276
3285
  *
3277
3286
  * @param {Vectros.UpdateAccessProfileRequest} request
3278
3287
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
3279
3288
  *
3289
+ * @throws {@link Vectros.BadRequestError}
3280
3290
  * @throws {@link Vectros.ForbiddenError}
3281
3291
  * @throws {@link Vectros.NotFoundError}
3282
3292
  * @throws {@link Vectros.TooManyRequestsError}
@@ -3323,6 +3333,8 @@ var AuthClient = class {
3323
3333
  }
3324
3334
  if (_response.error.reason === "status-code") {
3325
3335
  switch (_response.error.statusCode) {
3336
+ case 400:
3337
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
3326
3338
  case 403:
3327
3339
  throw new ForbiddenError(_response.error.body, _response.rawResponse);
3328
3340
  case 404:
@@ -4014,6 +4026,254 @@ var AuthClient = class {
4014
4026
  }
4015
4027
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/usage");
4016
4028
  }
4029
+ /**
4030
+ * Retrieves a single registered issuer by issuerId. Requires a root API key or the bootstrap's provisioning capability.
4031
+ *
4032
+ * @param {Vectros.GetIssuerRequest} request
4033
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4034
+ *
4035
+ * @throws {@link Vectros.ForbiddenError}
4036
+ * @throws {@link Vectros.NotFoundError}
4037
+ *
4038
+ * @example
4039
+ * await client.auth.getIssuer({
4040
+ * issuerId: "auth0-prod"
4041
+ * })
4042
+ */
4043
+ getIssuer(request, requestOptions) {
4044
+ return HttpResponsePromise.fromPromise(this.__getIssuer(request, requestOptions));
4045
+ }
4046
+ async __getIssuer(request, requestOptions) {
4047
+ const { issuerId } = request;
4048
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4049
+ const _headers = mergeHeaders(
4050
+ _authRequest.headers,
4051
+ this._options?.headers,
4052
+ requestOptions?.headers
4053
+ );
4054
+ const _response = await fetcher({
4055
+ url: url_exports.join(
4056
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4057
+ `v1/auth/issuers/${url_exports.encodePathParam(issuerId)}`
4058
+ ),
4059
+ method: "GET",
4060
+ headers: _headers,
4061
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4062
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4063
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4064
+ abortSignal: requestOptions?.abortSignal,
4065
+ fetchFn: this._options?.fetch,
4066
+ logging: this._options.logging
4067
+ });
4068
+ if (_response.ok) {
4069
+ return { data: _response.body, rawResponse: _response.rawResponse };
4070
+ }
4071
+ if (_response.error.reason === "status-code") {
4072
+ switch (_response.error.statusCode) {
4073
+ case 403:
4074
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4075
+ case 404:
4076
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4077
+ default:
4078
+ throw new VectrosError({
4079
+ statusCode: _response.error.statusCode,
4080
+ body: _response.error.body,
4081
+ rawResponse: _response.rawResponse
4082
+ });
4083
+ }
4084
+ }
4085
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers/{issuerId}");
4086
+ }
4087
+ /**
4088
+ * 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.
4089
+ *
4090
+ * @param {Vectros.DeleteIssuerRequest} request
4091
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4092
+ *
4093
+ * @throws {@link Vectros.ForbiddenError}
4094
+ * @throws {@link Vectros.NotFoundError}
4095
+ * @throws {@link Vectros.TooManyRequestsError}
4096
+ *
4097
+ * @example
4098
+ * await client.auth.deleteIssuer({
4099
+ * issuerId: "auth0-prod"
4100
+ * })
4101
+ */
4102
+ deleteIssuer(request, requestOptions) {
4103
+ return HttpResponsePromise.fromPromise(this.__deleteIssuer(request, requestOptions));
4104
+ }
4105
+ async __deleteIssuer(request, requestOptions) {
4106
+ const { issuerId } = request;
4107
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4108
+ const _headers = mergeHeaders(
4109
+ _authRequest.headers,
4110
+ this._options?.headers,
4111
+ requestOptions?.headers
4112
+ );
4113
+ const _response = await fetcher({
4114
+ url: url_exports.join(
4115
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4116
+ `v1/auth/issuers/${url_exports.encodePathParam(issuerId)}`
4117
+ ),
4118
+ method: "DELETE",
4119
+ headers: _headers,
4120
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4121
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4122
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4123
+ abortSignal: requestOptions?.abortSignal,
4124
+ fetchFn: this._options?.fetch,
4125
+ logging: this._options.logging
4126
+ });
4127
+ if (_response.ok) {
4128
+ return { data: void 0, rawResponse: _response.rawResponse };
4129
+ }
4130
+ if (_response.error.reason === "status-code") {
4131
+ switch (_response.error.statusCode) {
4132
+ case 403:
4133
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4134
+ case 404:
4135
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4136
+ case 429:
4137
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4138
+ default:
4139
+ throw new VectrosError({
4140
+ statusCode: _response.error.statusCode,
4141
+ body: _response.error.body,
4142
+ rawResponse: _response.rawResponse
4143
+ });
4144
+ }
4145
+ }
4146
+ return handleNonStatusCodeError(
4147
+ _response.error,
4148
+ _response.rawResponse,
4149
+ "DELETE",
4150
+ "/v1/auth/issuers/{issuerId}"
4151
+ );
4152
+ }
4153
+ /**
4154
+ * Returns the issuers registered in your tenant. Requires a root API key or the bootstrap's provisioning capability. Returns a `{data, nextCursor}` envelope.
4155
+ *
4156
+ * @param {Vectros.ListIssuersRequest} request
4157
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4158
+ *
4159
+ * @throws {@link Vectros.ForbiddenError}
4160
+ *
4161
+ * @example
4162
+ * await client.auth.listIssuers()
4163
+ */
4164
+ listIssuers(request = {}, requestOptions) {
4165
+ return HttpResponsePromise.fromPromise(this.__listIssuers(request, requestOptions));
4166
+ }
4167
+ async __listIssuers(request = {}, requestOptions) {
4168
+ const { startFrom, limit } = request;
4169
+ const _queryParams = {
4170
+ startFrom,
4171
+ limit
4172
+ };
4173
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4174
+ const _headers = mergeHeaders(
4175
+ _authRequest.headers,
4176
+ this._options?.headers,
4177
+ requestOptions?.headers
4178
+ );
4179
+ const _response = await fetcher({
4180
+ url: url_exports.join(
4181
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4182
+ "v1/auth/issuers"
4183
+ ),
4184
+ method: "GET",
4185
+ headers: _headers,
4186
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
4187
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4188
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4189
+ abortSignal: requestOptions?.abortSignal,
4190
+ fetchFn: this._options?.fetch,
4191
+ logging: this._options.logging
4192
+ });
4193
+ if (_response.ok) {
4194
+ return { data: _response.body, rawResponse: _response.rawResponse };
4195
+ }
4196
+ if (_response.error.reason === "status-code") {
4197
+ switch (_response.error.statusCode) {
4198
+ case 403:
4199
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4200
+ default:
4201
+ throw new VectrosError({
4202
+ statusCode: _response.error.statusCode,
4203
+ body: _response.error.body,
4204
+ rawResponse: _response.rawResponse
4205
+ });
4206
+ }
4207
+ }
4208
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
4209
+ }
4210
+ /**
4211
+ * 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.
4212
+ *
4213
+ * @param {Vectros.IssuerRequest} request
4214
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4215
+ *
4216
+ * @throws {@link Vectros.BadRequestError}
4217
+ * @throws {@link Vectros.ForbiddenError}
4218
+ * @throws {@link Vectros.TooManyRequestsError}
4219
+ *
4220
+ * @example
4221
+ * await client.auth.registerIssuer({
4222
+ * issuerId: "auth0-prod",
4223
+ * issuer: "https://your-tenant.us.auth0.com/",
4224
+ * jwksUri: "https://your-tenant.us.auth0.com/.well-known/jwks.json",
4225
+ * audience: "https://api.your-app.example.com",
4226
+ * contextId: "casework"
4227
+ * })
4228
+ */
4229
+ registerIssuer(request, requestOptions) {
4230
+ return HttpResponsePromise.fromPromise(this.__registerIssuer(request, requestOptions));
4231
+ }
4232
+ async __registerIssuer(request, requestOptions) {
4233
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4234
+ const _headers = mergeHeaders(
4235
+ _authRequest.headers,
4236
+ this._options?.headers,
4237
+ requestOptions?.headers
4238
+ );
4239
+ const _response = await fetcher({
4240
+ url: url_exports.join(
4241
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4242
+ "v1/auth/issuers"
4243
+ ),
4244
+ method: "POST",
4245
+ headers: _headers,
4246
+ contentType: "application/json",
4247
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4248
+ requestType: "json",
4249
+ body: request,
4250
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4251
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4252
+ abortSignal: requestOptions?.abortSignal,
4253
+ fetchFn: this._options?.fetch,
4254
+ logging: this._options.logging
4255
+ });
4256
+ if (_response.ok) {
4257
+ return { data: _response.body, rawResponse: _response.rawResponse };
4258
+ }
4259
+ if (_response.error.reason === "status-code") {
4260
+ switch (_response.error.statusCode) {
4261
+ case 400:
4262
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4263
+ case 403:
4264
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4265
+ case 429:
4266
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4267
+ default:
4268
+ throw new VectrosError({
4269
+ statusCode: _response.error.statusCode,
4270
+ body: _response.error.body,
4271
+ rawResponse: _response.rawResponse
4272
+ });
4273
+ }
4274
+ }
4275
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/issuers");
4276
+ }
4017
4277
  /**
4018
4278
  * 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.
4019
4279
  *
@@ -4337,6 +4597,72 @@ var AuthClient = class {
4337
4597
  }
4338
4598
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/users/invite/resend");
4339
4599
  }
4600
+ /**
4601
+ * 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.
4602
+ *
4603
+ * @param {Vectros.TokenExchangeRequest} request
4604
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4605
+ *
4606
+ * @throws {@link Vectros.BadRequestError}
4607
+ * @throws {@link Vectros.UnauthorizedError}
4608
+ * @throws {@link Vectros.ForbiddenError}
4609
+ * @throws {@link Vectros.NotFoundError}
4610
+ * @throws {@link Vectros.TooManyRequestsError}
4611
+ *
4612
+ * @example
4613
+ * await client.auth.exchangeToken({
4614
+ * grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
4615
+ * subject_token: "subject_token",
4616
+ * subject_token_type: "urn:ietf:params:oauth:token-type:jwt"
4617
+ * })
4618
+ */
4619
+ exchangeToken(request, requestOptions) {
4620
+ return HttpResponsePromise.fromPromise(this.__exchangeToken(request, requestOptions));
4621
+ }
4622
+ async __exchangeToken(request, requestOptions) {
4623
+ const _headers = mergeHeaders(this._options?.headers, requestOptions?.headers);
4624
+ const _response = await fetcher({
4625
+ url: url_exports.join(
4626
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4627
+ "v1/auth/token/exchange"
4628
+ ),
4629
+ method: "POST",
4630
+ headers: _headers,
4631
+ contentType: "application/json",
4632
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4633
+ requestType: "json",
4634
+ body: request,
4635
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4636
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4637
+ abortSignal: requestOptions?.abortSignal,
4638
+ fetchFn: this._options?.fetch,
4639
+ logging: this._options.logging
4640
+ });
4641
+ if (_response.ok) {
4642
+ return { data: _response.body, rawResponse: _response.rawResponse };
4643
+ }
4644
+ if (_response.error.reason === "status-code") {
4645
+ switch (_response.error.statusCode) {
4646
+ case 400:
4647
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4648
+ case 401:
4649
+ throw new UnauthorizedError(_response.error.body, _response.rawResponse);
4650
+ case 403:
4651
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4652
+ case 404:
4653
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4654
+ case 429:
4655
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4656
+ default:
4657
+ throw new VectrosError({
4658
+ statusCode: _response.error.statusCode,
4659
+ body: _response.error.body,
4660
+ rawResponse: _response.rawResponse
4661
+ });
4662
+ }
4663
+ }
4664
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/token/exchange");
4665
+ }
4340
4666
  };
4341
4667
  var ComplianceClient = class {
4342
4668
  constructor(options) {
@@ -6944,6 +7270,69 @@ var IdentityClient = class {
6944
7270
  }
6945
7271
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/users/lookup");
6946
7272
  }
7273
+ /**
7274
+ * 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.
7275
+ *
7276
+ * @param {Vectros.UserExistsByEmailRequest} request
7277
+ * @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
7278
+ *
7279
+ * @throws {@link Vectros.BadRequestError}
7280
+ * @throws {@link Vectros.ForbiddenError}
7281
+ *
7282
+ * @example
7283
+ * await client.identity.userExistsByEmail({
7284
+ * email: "user@example.com",
7285
+ * contextId: "myapp"
7286
+ * })
7287
+ */
7288
+ userExistsByEmail(request = {}, requestOptions) {
7289
+ return HttpResponsePromise.fromPromise(this.__userExistsByEmail(request, requestOptions));
7290
+ }
7291
+ async __userExistsByEmail(request = {}, requestOptions) {
7292
+ const { email, contextId } = request;
7293
+ const _queryParams = {
7294
+ email,
7295
+ contextId
7296
+ };
7297
+ const _authRequest = await this._options.authProvider.getAuthRequest();
7298
+ const _headers = mergeHeaders(
7299
+ _authRequest.headers,
7300
+ this._options?.headers,
7301
+ requestOptions?.headers
7302
+ );
7303
+ const _response = await fetcher({
7304
+ url: url_exports.join(
7305
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
7306
+ "v1/users/exists-by-email"
7307
+ ),
7308
+ method: "GET",
7309
+ headers: _headers,
7310
+ queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
7311
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
7312
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
7313
+ abortSignal: requestOptions?.abortSignal,
7314
+ fetchFn: this._options?.fetch,
7315
+ logging: this._options.logging
7316
+ });
7317
+ if (_response.ok) {
7318
+ return { data: _response.body, rawResponse: _response.rawResponse };
7319
+ }
7320
+ if (_response.error.reason === "status-code") {
7321
+ switch (_response.error.statusCode) {
7322
+ case 400:
7323
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
7324
+ case 403:
7325
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
7326
+ default:
7327
+ throw new VectrosError({
7328
+ statusCode: _response.error.statusCode,
7329
+ body: _response.error.body,
7330
+ rawResponse: _response.rawResponse
7331
+ });
7332
+ }
7333
+ }
7334
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/users/exists-by-email");
7335
+ }
6947
7336
  /**
6948
7337
  * 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.
6949
7338
  *
@@ -8700,15 +9089,15 @@ function warnOnSuboptimalKey(key, log) {
8700
9089
  } else if (key.prefix === "st") {
8701
9090
  log.warn(
8702
9091
  { prefix: key.prefix, env: key.env },
8703
- "short-lived token (st_*) will expire mid-session (1h default, 24h max). For long-running MCP installs, prefer a long-lived ssk_* key."
9092
+ "short-lived token (st_*) will expire mid-session (1h max). For long-running MCP installs, prefer a long-lived ssk_* key."
8704
9093
  );
8705
9094
  }
8706
9095
  }
8707
9096
 
8708
9097
  // src/build-info.ts
8709
9098
  var BUILD_INFO = {
8710
- mcpServer: true ? "0.13.0" : "dev",
8711
- sdk: true ? "0.38.0" : "dev"
9099
+ mcpServer: true ? "0.14.0" : "dev",
9100
+ sdk: true ? "0.39.0" : "dev"
8712
9101
  };
8713
9102
 
8714
9103
  // src/log.ts