@unkey/api 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +2 -1
  2. package/bin/mcp-server.js +119 -22
  3. package/bin/mcp-server.js.map +17 -14
  4. package/dist/commonjs/funcs/identitiesListIdentities.js +3 -0
  5. package/dist/commonjs/funcs/identitiesListIdentities.js.map +1 -1
  6. package/dist/commonjs/funcs/ratelimitLimit.d.ts +2 -2
  7. package/dist/commonjs/funcs/ratelimitLimit.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/ratelimitLimit.js +3 -3
  9. package/dist/commonjs/funcs/ratelimitLimit.js.map +1 -1
  10. package/dist/commonjs/lib/config.d.ts +3 -3
  11. package/dist/commonjs/lib/config.js +3 -3
  12. package/dist/commonjs/lib/security.d.ts.map +1 -1
  13. package/dist/commonjs/lib/security.js.map +1 -1
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.js +1 -1
  16. package/dist/commonjs/mcp-server/tools/ratelimitLimit.js +1 -1
  17. package/dist/commonjs/models/components/index.d.ts +2 -0
  18. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/index.js +2 -0
  20. package/dist/commonjs/models/components/index.js.map +1 -1
  21. package/dist/commonjs/models/components/keycreditsrefill.d.ts +8 -8
  22. package/dist/commonjs/models/components/keycreditsrefill.d.ts.map +1 -1
  23. package/dist/commonjs/models/components/keycreditsrefill.js +13 -14
  24. package/dist/commonjs/models/components/keycreditsrefill.js.map +1 -1
  25. package/dist/commonjs/models/components/updatekeycreditsdata.d.ts +41 -0
  26. package/dist/commonjs/models/components/updatekeycreditsdata.d.ts.map +1 -0
  27. package/dist/commonjs/models/components/updatekeycreditsdata.js +72 -0
  28. package/dist/commonjs/models/components/updatekeycreditsdata.js.map +1 -0
  29. package/dist/commonjs/models/components/updatekeycreditsrefill.d.ts +81 -0
  30. package/dist/commonjs/models/components/updatekeycreditsrefill.d.ts.map +1 -0
  31. package/dist/commonjs/models/components/updatekeycreditsrefill.js +95 -0
  32. package/dist/commonjs/models/components/updatekeycreditsrefill.js.map +1 -0
  33. package/dist/commonjs/models/components/v2keysupdatekeyrequestbody.d.ts +3 -3
  34. package/dist/commonjs/models/components/v2keysupdatekeyrequestbody.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/v2keysupdatekeyrequestbody.js +3 -3
  36. package/dist/commonjs/models/components/v2keysupdatekeyrequestbody.js.map +1 -1
  37. package/dist/commonjs/models/errors/goneerrorresponse.d.ts +72 -0
  38. package/dist/commonjs/models/errors/goneerrorresponse.d.ts.map +1 -0
  39. package/dist/commonjs/models/errors/goneerrorresponse.js +99 -0
  40. package/dist/commonjs/models/errors/goneerrorresponse.js.map +1 -0
  41. package/dist/commonjs/models/errors/index.d.ts +1 -0
  42. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  43. package/dist/commonjs/models/errors/index.js +1 -0
  44. package/dist/commonjs/models/errors/index.js.map +1 -1
  45. package/dist/commonjs/sdk/ratelimit.d.ts +1 -1
  46. package/dist/commonjs/sdk/ratelimit.js +1 -1
  47. package/dist/esm/funcs/identitiesListIdentities.js +3 -0
  48. package/dist/esm/funcs/identitiesListIdentities.js.map +1 -1
  49. package/dist/esm/funcs/ratelimitLimit.d.ts +2 -2
  50. package/dist/esm/funcs/ratelimitLimit.d.ts.map +1 -1
  51. package/dist/esm/funcs/ratelimitLimit.js +3 -3
  52. package/dist/esm/funcs/ratelimitLimit.js.map +1 -1
  53. package/dist/esm/lib/config.d.ts +3 -3
  54. package/dist/esm/lib/config.js +3 -3
  55. package/dist/esm/lib/security.d.ts.map +1 -1
  56. package/dist/esm/lib/security.js.map +1 -1
  57. package/dist/esm/mcp-server/mcp-server.js +1 -1
  58. package/dist/esm/mcp-server/server.js +1 -1
  59. package/dist/esm/mcp-server/tools/ratelimitLimit.js +1 -1
  60. package/dist/esm/models/components/index.d.ts +2 -0
  61. package/dist/esm/models/components/index.d.ts.map +1 -1
  62. package/dist/esm/models/components/index.js +2 -0
  63. package/dist/esm/models/components/index.js.map +1 -1
  64. package/dist/esm/models/components/keycreditsrefill.d.ts +8 -8
  65. package/dist/esm/models/components/keycreditsrefill.d.ts.map +1 -1
  66. package/dist/esm/models/components/keycreditsrefill.js +12 -13
  67. package/dist/esm/models/components/keycreditsrefill.js.map +1 -1
  68. package/dist/esm/models/components/updatekeycreditsdata.d.ts +41 -0
  69. package/dist/esm/models/components/updatekeycreditsdata.d.ts.map +1 -0
  70. package/dist/esm/models/components/updatekeycreditsdata.js +34 -0
  71. package/dist/esm/models/components/updatekeycreditsdata.js.map +1 -0
  72. package/dist/esm/models/components/updatekeycreditsrefill.d.ts +81 -0
  73. package/dist/esm/models/components/updatekeycreditsrefill.d.ts.map +1 -0
  74. package/dist/esm/models/components/updatekeycreditsrefill.js +57 -0
  75. package/dist/esm/models/components/updatekeycreditsrefill.js.map +1 -0
  76. package/dist/esm/models/components/v2keysupdatekeyrequestbody.d.ts +3 -3
  77. package/dist/esm/models/components/v2keysupdatekeyrequestbody.d.ts.map +1 -1
  78. package/dist/esm/models/components/v2keysupdatekeyrequestbody.js +3 -3
  79. package/dist/esm/models/components/v2keysupdatekeyrequestbody.js.map +1 -1
  80. package/dist/esm/models/errors/goneerrorresponse.d.ts +72 -0
  81. package/dist/esm/models/errors/goneerrorresponse.d.ts.map +1 -0
  82. package/dist/esm/models/errors/goneerrorresponse.js +62 -0
  83. package/dist/esm/models/errors/goneerrorresponse.js.map +1 -0
  84. package/dist/esm/models/errors/index.d.ts +1 -0
  85. package/dist/esm/models/errors/index.d.ts.map +1 -1
  86. package/dist/esm/models/errors/index.js +1 -0
  87. package/dist/esm/models/errors/index.js.map +1 -1
  88. package/dist/esm/sdk/ratelimit.d.ts +1 -1
  89. package/dist/esm/sdk/ratelimit.js +1 -1
  90. package/docs/sdks/ratelimit/README.md +2 -1
  91. package/examples/apisCreateApi.example.ts +1 -1
  92. package/examples/package-lock.json +1 -1
  93. package/jsr.json +1 -1
  94. package/package.json +1 -1
  95. package/src/funcs/identitiesListIdentities.ts +3 -0
  96. package/src/funcs/ratelimitLimit.ts +6 -2
  97. package/src/lib/config.ts +3 -3
  98. package/src/lib/security.ts +4 -1
  99. package/src/mcp-server/mcp-server.ts +1 -1
  100. package/src/mcp-server/server.ts +1 -1
  101. package/src/mcp-server/tools/ratelimitLimit.ts +1 -1
  102. package/src/models/components/index.ts +2 -0
  103. package/src/models/components/keycreditsrefill.ts +18 -14
  104. package/src/models/components/updatekeycreditsdata.ts +85 -0
  105. package/src/models/components/updatekeycreditsrefill.ts +126 -0
  106. package/src/models/components/v2keysupdatekeyrequestbody.ts +10 -10
  107. package/src/models/errors/goneerrorresponse.ts +118 -0
  108. package/src/models/errors/index.ts +1 -0
  109. package/src/sdk/ratelimit.ts +1 -1
package/README.md CHANGED
@@ -574,7 +574,7 @@ run();
574
574
  * [`InternalServerErrorResponse`](./src/models/errors/internalservererrorresponse.ts): Error response when an unexpected error occurs on the server. This indicates a problem with Unkey's systems rather than your request. When you encounter this error: - The request ID in the response can help Unkey support investigate the issue - The error is likely temporary and retrying may succeed - If the error persists, contact Unkey support with the request ID. Status code `500`.
575
575
  * [`NotFoundErrorResponse`](./src/models/errors/notfounderrorresponse.ts): Error response when the requested resource cannot be found. This occurs when: - The specified resource ID doesn't exist in your workspace - The resource has been deleted or moved - The resource exists but is not accessible with current permissions To resolve this error, verify the resource ID is correct and that you have access to it. Status code `404`. *
576
576
 
577
- <details><summary>Less common errors (8)</summary>
577
+ <details><summary>Less common errors (9)</summary>
578
578
 
579
579
  <br />
580
580
 
@@ -588,6 +588,7 @@ run();
588
588
 
589
589
  **Inherit from [`UnkeyError`](./src/models/errors/unkeyerror.ts)**:
590
590
  * [`ConflictErrorResponse`](./src/models/errors/conflicterrorresponse.ts): Error response when the request conflicts with the current state of the resource. This occurs when: - Attempting to create a resource that already exists - Modifying a resource that has been changed by another operation - Violating unique constraints or business rules To resolve this error, check the current state of the resource and adjust your request accordingly. Status code `409`. Applicable to 3 of 36 methods.*
591
+ * [`GoneErrorResponse`](./src/models/errors/goneerrorresponse.ts): Error response when the requested resource has been soft-deleted and is no longer available. This occurs when: - The resource has been marked as deleted but still exists in the database - The resource is intentionally unavailable but could potentially be restored - The resource cannot be restored through the API or dashboard To resolve this error, contact support if you need the resource restored. Status code `410`. Applicable to 1 of 36 methods.*
591
592
  * [`PreconditionFailedErrorResponse`](./src/models/errors/preconditionfailederrorresponse.ts): Error response when one or more conditions specified in the request headers are not met. This typically occurs when: - Using conditional requests with If-Match or If-None-Match headers - The resource version doesn't match the expected value - Optimistic concurrency control detects a conflict To resolve this error, fetch the latest version of the resource and retry with updated conditions. Status code `412`. Applicable to 1 of 36 methods.*
592
593
  * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
593
594
 
package/bin/mcp-server.js CHANGED
@@ -34269,9 +34269,9 @@ var init_config = __esm(() => {
34269
34269
  SDK_METADATA = {
34270
34270
  language: "typescript",
34271
34271
  openapiDocVersion: "2.0.0",
34272
- sdkVersion: "2.0.4",
34273
- genVersion: "2.683.1",
34274
- userAgent: "speakeasy-sdk/typescript 2.0.4 2.683.1 2.0.0 @unkey/api"
34272
+ sdkVersion: "2.0.5",
34273
+ genVersion: "2.698.4",
34274
+ userAgent: "speakeasy-sdk/typescript 2.0.5 2.698.4 2.0.0 @unkey/api"
34275
34275
  };
34276
34276
  });
34277
34277
 
@@ -35837,26 +35837,26 @@ var init_identity = __esm(() => {
35837
35837
  });
35838
35838
 
35839
35839
  // src/models/components/keycreditsrefill.ts
35840
- var Interval, Interval$inboundSchema, Interval$outboundSchema, Interval$, KeyCreditsRefill$inboundSchema, KeyCreditsRefill$outboundSchema, KeyCreditsRefill$;
35840
+ var KeyCreditsRefillInterval, KeyCreditsRefillInterval$inboundSchema, KeyCreditsRefillInterval$outboundSchema, KeyCreditsRefillInterval$, KeyCreditsRefill$inboundSchema, KeyCreditsRefill$outboundSchema, KeyCreditsRefill$;
35841
35841
  var init_keycreditsrefill = __esm(() => {
35842
35842
  init_zod();
35843
- Interval = {
35843
+ KeyCreditsRefillInterval = {
35844
35844
  Daily: "daily",
35845
35845
  Monthly: "monthly"
35846
35846
  };
35847
- Interval$inboundSchema = nativeEnumType(Interval);
35848
- Interval$outboundSchema = Interval$inboundSchema;
35849
- ((Interval$) => {
35850
- Interval$.inboundSchema = Interval$inboundSchema;
35851
- Interval$.outboundSchema = Interval$outboundSchema;
35852
- })(Interval$ ||= {});
35847
+ KeyCreditsRefillInterval$inboundSchema = nativeEnumType(KeyCreditsRefillInterval);
35848
+ KeyCreditsRefillInterval$outboundSchema = KeyCreditsRefillInterval$inboundSchema;
35849
+ ((KeyCreditsRefillInterval$) => {
35850
+ KeyCreditsRefillInterval$.inboundSchema = KeyCreditsRefillInterval$inboundSchema;
35851
+ KeyCreditsRefillInterval$.outboundSchema = KeyCreditsRefillInterval$outboundSchema;
35852
+ })(KeyCreditsRefillInterval$ ||= {});
35853
35853
  KeyCreditsRefill$inboundSchema = objectType({
35854
- interval: Interval$inboundSchema,
35854
+ interval: KeyCreditsRefillInterval$inboundSchema,
35855
35855
  amount: numberType().int(),
35856
35856
  refillDay: numberType().int().optional()
35857
35857
  });
35858
35858
  KeyCreditsRefill$outboundSchema = objectType({
35859
- interval: Interval$outboundSchema,
35859
+ interval: KeyCreditsRefillInterval$outboundSchema,
35860
35860
  amount: numberType().int(),
35861
35861
  refillDay: numberType().int().optional()
35862
35862
  });
@@ -36107,6 +36107,55 @@ var init_security2 = __esm(() => {
36107
36107
  })(Security$ ||= {});
36108
36108
  });
36109
36109
 
36110
+ // src/models/components/updatekeycreditsrefill.ts
36111
+ var UpdateKeyCreditsRefillInterval, UpdateKeyCreditsRefillInterval$inboundSchema, UpdateKeyCreditsRefillInterval$outboundSchema, UpdateKeyCreditsRefillInterval$, UpdateKeyCreditsRefill$inboundSchema, UpdateKeyCreditsRefill$outboundSchema, UpdateKeyCreditsRefill$;
36112
+ var init_updatekeycreditsrefill = __esm(() => {
36113
+ init_zod();
36114
+ UpdateKeyCreditsRefillInterval = {
36115
+ Daily: "daily",
36116
+ Monthly: "monthly"
36117
+ };
36118
+ UpdateKeyCreditsRefillInterval$inboundSchema = nativeEnumType(UpdateKeyCreditsRefillInterval);
36119
+ UpdateKeyCreditsRefillInterval$outboundSchema = UpdateKeyCreditsRefillInterval$inboundSchema;
36120
+ ((UpdateKeyCreditsRefillInterval$) => {
36121
+ UpdateKeyCreditsRefillInterval$.inboundSchema = UpdateKeyCreditsRefillInterval$inboundSchema;
36122
+ UpdateKeyCreditsRefillInterval$.outboundSchema = UpdateKeyCreditsRefillInterval$outboundSchema;
36123
+ })(UpdateKeyCreditsRefillInterval$ ||= {});
36124
+ UpdateKeyCreditsRefill$inboundSchema = objectType({
36125
+ interval: UpdateKeyCreditsRefillInterval$inboundSchema,
36126
+ amount: numberType().int(),
36127
+ refillDay: numberType().int().optional()
36128
+ });
36129
+ UpdateKeyCreditsRefill$outboundSchema = objectType({
36130
+ interval: UpdateKeyCreditsRefillInterval$outboundSchema,
36131
+ amount: numberType().int(),
36132
+ refillDay: numberType().int().optional()
36133
+ });
36134
+ ((UpdateKeyCreditsRefill$) => {
36135
+ UpdateKeyCreditsRefill$.inboundSchema = UpdateKeyCreditsRefill$inboundSchema;
36136
+ UpdateKeyCreditsRefill$.outboundSchema = UpdateKeyCreditsRefill$outboundSchema;
36137
+ })(UpdateKeyCreditsRefill$ ||= {});
36138
+ });
36139
+
36140
+ // src/models/components/updatekeycreditsdata.ts
36141
+ var UpdateKeyCreditsData$inboundSchema, UpdateKeyCreditsData$outboundSchema, UpdateKeyCreditsData$;
36142
+ var init_updatekeycreditsdata = __esm(() => {
36143
+ init_zod();
36144
+ init_updatekeycreditsrefill();
36145
+ UpdateKeyCreditsData$inboundSchema = objectType({
36146
+ remaining: nullableType(numberType().int()).optional(),
36147
+ refill: nullableType(UpdateKeyCreditsRefill$inboundSchema).optional()
36148
+ });
36149
+ UpdateKeyCreditsData$outboundSchema = objectType({
36150
+ remaining: nullableType(numberType().int()).optional(),
36151
+ refill: nullableType(UpdateKeyCreditsRefill$outboundSchema).optional()
36152
+ });
36153
+ ((UpdateKeyCreditsData$) => {
36154
+ UpdateKeyCreditsData$.inboundSchema = UpdateKeyCreditsData$inboundSchema;
36155
+ UpdateKeyCreditsData$.outboundSchema = UpdateKeyCreditsData$outboundSchema;
36156
+ })(UpdateKeyCreditsData$ ||= {});
36157
+ });
36158
+
36110
36159
  // src/models/components/v2apiscreateapirequestbody.ts
36111
36160
  var V2ApisCreateApiRequestBody$inboundSchema, V2ApisCreateApiRequestBody$outboundSchema, V2ApisCreateApiRequestBody$;
36112
36161
  var init_v2apiscreateapirequestbody = __esm(() => {
@@ -37001,15 +37050,15 @@ var init_v2keysupdatecreditsresponsebody = __esm(() => {
37001
37050
  var V2KeysUpdateKeyRequestBody$inboundSchema, V2KeysUpdateKeyRequestBody$outboundSchema, V2KeysUpdateKeyRequestBody$;
37002
37051
  var init_v2keysupdatekeyrequestbody = __esm(() => {
37003
37052
  init_zod();
37004
- init_keycreditsdata();
37005
37053
  init_ratelimitrequest();
37054
+ init_updatekeycreditsdata();
37006
37055
  V2KeysUpdateKeyRequestBody$inboundSchema = objectType({
37007
37056
  keyId: stringType(),
37008
37057
  name: nullableType(stringType()).optional(),
37009
37058
  externalId: nullableType(stringType()).optional(),
37010
37059
  meta: nullableType(recordType(anyType())).optional(),
37011
37060
  expires: nullableType(numberType().int()).optional(),
37012
- credits: KeyCreditsData$inboundSchema.optional(),
37061
+ credits: nullableType(UpdateKeyCreditsData$inboundSchema).optional(),
37013
37062
  ratelimits: arrayType(RatelimitRequest$inboundSchema).optional(),
37014
37063
  enabled: booleanType().optional(),
37015
37064
  roles: arrayType(stringType()).optional(),
@@ -37021,7 +37070,7 @@ var init_v2keysupdatekeyrequestbody = __esm(() => {
37021
37070
  externalId: nullableType(stringType()).optional(),
37022
37071
  meta: nullableType(recordType(anyType())).optional(),
37023
37072
  expires: nullableType(numberType().int()).optional(),
37024
- credits: KeyCreditsData$outboundSchema.optional(),
37073
+ credits: nullableType(UpdateKeyCreditsData$outboundSchema).optional(),
37025
37074
  ratelimits: arrayType(RatelimitRequest$outboundSchema).optional(),
37026
37075
  enabled: booleanType().optional(),
37027
37076
  roles: arrayType(stringType()).optional(),
@@ -37834,6 +37883,8 @@ var init_components = __esm(() => {
37834
37883
  init_ratelimitresponse();
37835
37884
  init_role();
37836
37885
  init_security2();
37886
+ init_updatekeycreditsdata();
37887
+ init_updatekeycreditsrefill();
37837
37888
  init_v2apiscreateapirequestbody();
37838
37889
  init_v2apiscreateapiresponsebody();
37839
37890
  init_v2apiscreateapiresponsedata();
@@ -38047,6 +38098,48 @@ var init_forbiddenerrorresponse = __esm(() => {
38047
38098
  })(ForbiddenErrorResponse$ ||= {});
38048
38099
  });
38049
38100
 
38101
+ // src/models/errors/goneerrorresponse.ts
38102
+ var GoneErrorResponse, GoneErrorResponse$inboundSchema, GoneErrorResponse$outboundSchema, GoneErrorResponse$;
38103
+ var init_goneerrorresponse = __esm(() => {
38104
+ init_zod();
38105
+ init_components();
38106
+ init_unkeyerror();
38107
+ GoneErrorResponse = class GoneErrorResponse extends UnkeyError {
38108
+ meta;
38109
+ error;
38110
+ data$;
38111
+ constructor(err, httpMeta) {
38112
+ const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`;
38113
+ super(message, httpMeta);
38114
+ this.data$ = err;
38115
+ this.meta = err.meta;
38116
+ this.error = err.error;
38117
+ this.name = "GoneErrorResponse";
38118
+ }
38119
+ };
38120
+ GoneErrorResponse$inboundSchema = objectType({
38121
+ meta: Meta$inboundSchema,
38122
+ error: BaseError$inboundSchema,
38123
+ request$: instanceOfType(Request),
38124
+ response$: instanceOfType(Response),
38125
+ body$: stringType()
38126
+ }).transform((v2) => {
38127
+ return new GoneErrorResponse(v2, {
38128
+ request: v2.request$,
38129
+ response: v2.response$,
38130
+ body: v2.body$
38131
+ });
38132
+ });
38133
+ GoneErrorResponse$outboundSchema = instanceOfType(GoneErrorResponse).transform((v2) => v2.data$).pipe(objectType({
38134
+ meta: Meta$outboundSchema,
38135
+ error: BaseError$outboundSchema
38136
+ }));
38137
+ ((GoneErrorResponse$) => {
38138
+ GoneErrorResponse$.inboundSchema = GoneErrorResponse$inboundSchema;
38139
+ GoneErrorResponse$.outboundSchema = GoneErrorResponse$outboundSchema;
38140
+ })(GoneErrorResponse$ ||= {});
38141
+ });
38142
+
38050
38143
  // src/models/errors/internalservererrorresponse.ts
38051
38144
  var InternalServerErrorResponse, InternalServerErrorResponse$inboundSchema, InternalServerErrorResponse$outboundSchema, InternalServerErrorResponse$;
38052
38145
  var init_internalservererrorresponse = __esm(() => {
@@ -38221,6 +38314,7 @@ var init_errors2 = __esm(() => {
38221
38314
  init_badrequesterrorresponse();
38222
38315
  init_conflicterrorresponse();
38223
38316
  init_forbiddenerrorresponse();
38317
+ init_goneerrorresponse();
38224
38318
  init_httpclienterrors();
38225
38319
  init_internalservererrorresponse();
38226
38320
  init_notfounderrorresponse();
@@ -39262,6 +39356,9 @@ async function $do8(client, request, options) {
39262
39356
  if (typeof nextCursor !== "string") {
39263
39357
  return { next: () => null };
39264
39358
  }
39359
+ if (nextCursor.trim() === "") {
39360
+ return { next: () => null };
39361
+ }
39265
39362
  const nextVal = () => identitiesListIdentities(client, {
39266
39363
  ...request,
39267
39364
  cursor: nextCursor
@@ -42479,7 +42576,7 @@ async function $do34(client, request, options) {
42479
42576
  const req = requestRes.value;
42480
42577
  const doResult = await client._do(req, {
42481
42578
  context,
42482
- errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
42579
+ errorCodes: ["400", "401", "403", "404", "410", "4XX", "500", "5XX"],
42483
42580
  retryConfig: context.retryConfig,
42484
42581
  retryCodes: context.retryCodes
42485
42582
  });
@@ -42490,7 +42587,7 @@ async function $do34(client, request, options) {
42490
42587
  const responseFields = {
42491
42588
  HttpMeta: { Response: response, Request: req }
42492
42589
  };
42493
- const [result] = await match(json(200, V2RatelimitLimitResponseBody$inboundSchema), jsonErr(400, BadRequestErrorResponse$inboundSchema), jsonErr(401, UnauthorizedErrorResponse$inboundSchema), jsonErr(403, ForbiddenErrorResponse$inboundSchema), jsonErr(404, NotFoundErrorResponse$inboundSchema), jsonErr(500, InternalServerErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
42590
+ const [result] = await match(json(200, V2RatelimitLimitResponseBody$inboundSchema), jsonErr(400, BadRequestErrorResponse$inboundSchema), jsonErr(401, UnauthorizedErrorResponse$inboundSchema), jsonErr(403, ForbiddenErrorResponse$inboundSchema), jsonErr(404, NotFoundErrorResponse$inboundSchema), jsonErr(410, GoneErrorResponse$inboundSchema), jsonErr(500, InternalServerErrorResponse$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
42494
42591
  if (!result.ok) {
42495
42592
  return [result, { status: "complete", request: req, response }];
42496
42593
  }
@@ -42525,7 +42622,7 @@ Check and enforce rate limits for any identifier (user ID, IP address, API clien
42525
42622
 
42526
42623
  Use this for rate limiting beyond API keys - limit users by ID, IPs by address, or any custom identifier. Supports namespace organization, variable costs, and custom overrides.
42527
42624
 
42528
- **Important**: Always returns HTTP 200. Check the \`success\` field to determine if the request should proceed.
42625
+ **Response Codes**: Rate limit checks return HTTP 200 regardless of whether the limit is exceeded - check the \`success\` field in the response to determine if the request should be allowed. 4xx responses indicate auth, namespace existence/deletion, or validation errors (e.g., 410 Gone for deleted namespaces). 5xx responses indicate server errors.
42529
42626
 
42530
42627
  **Required Permissions**
42531
42628
 
@@ -42794,7 +42891,7 @@ Use this to create premium tiers with higher limits, apply stricter limits to sp
42794
42891
  function createMCPServer(deps) {
42795
42892
  const server = new McpServer({
42796
42893
  name: "Unkey",
42797
- version: "2.0.4"
42894
+ version: "2.0.5"
42798
42895
  });
42799
42896
  const client = new UnkeyCore({
42800
42897
  rootKey: deps.rootKey,
@@ -44082,7 +44179,7 @@ var routes = ln({
44082
44179
  var app = _e(routes, {
44083
44180
  name: "mcp",
44084
44181
  versionInfo: {
44085
- currentVersion: "2.0.4"
44182
+ currentVersion: "2.0.5"
44086
44183
  }
44087
44184
  });
44088
44185
  Yt(app, process3.argv.slice(2), buildContext(process3));
@@ -44090,5 +44187,5 @@ export {
44090
44187
  app
44091
44188
  };
44092
44189
 
44093
- //# debugId=99890DFCB79E3EA364756E2164756E21
44190
+ //# debugId=F5367D37EBBC8D0864756E2164756E21
44094
44191
  //# sourceMappingURL=mcp-server.js.map