@distilled.cloud/cloudflare 1.0.0-rc.12 → 1.0.0-rc.13
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/README.md +37 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/protocol.d.ts +2 -2
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +13 -6
- package/lib/protocol.js.map +1 -1
- package/lib/response-validation.test.d.ts +6 -0
- package/lib/response-validation.test.d.ts.map +1 -0
- package/lib/response-validation.test.js +45 -0
- package/lib/response-validation.test.js.map +1 -0
- package/lib/services/dns.d.ts +8 -2
- package/lib/services/dns.d.ts.map +1 -1
- package/lib/services/dns.js +8 -2
- package/lib/services/dns.js.map +1 -1
- package/lib/services/queues.d.ts +7 -1
- package/lib/services/queues.d.ts.map +1 -1
- package/lib/services/queues.js +12 -0
- package/lib/services/queues.js.map +1 -1
- package/lib/services/r2.d.ts +17 -5
- package/lib/services/r2.d.ts.map +1 -1
- package/lib/services/r2.js +42 -5
- package/lib/services/r2.js.map +1 -1
- package/lib/services/workers.d.ts +7 -1
- package/lib/services/workers.d.ts.map +1 -1
- package/lib/services/workers.js +12 -1
- package/lib/services/workers.js.map +1 -1
- package/lib/services/workers_for_platforms.d.ts +533 -12
- package/lib/services/workers_for_platforms.d.ts.map +1 -1
- package/lib/services/workers_for_platforms.js +708 -1029
- package/lib/services/workers_for_platforms.js.map +1 -1
- package/lib/services/zero_trust.d.ts +26 -6
- package/lib/services/zero_trust.d.ts.map +1 -1
- package/lib/services/zero_trust.js +53 -6
- package/lib/services/zero_trust.js.map +1 -1
- package/lib/traits.d.ts +1 -1
- package/lib/traits.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1 -1
- package/src/protocol.ts +28 -9
- package/src/response-validation.test.ts +67 -0
- package/src/services/dns.ts +13 -4
- package/src/services/queues.ts +19 -0
- package/src/services/r2.ts +69 -10
- package/src/services/workers.ts +22 -2
- package/src/services/workers_for_platforms.ts +1625 -1072
- package/src/services/zero_trust.ts +85 -12
- package/src/traits.ts +1 -1
|
@@ -972,6 +972,43 @@ export class McpPortalNotFound
|
|
|
972
972
|
[{ status: 404 }],
|
|
973
973
|
) {}
|
|
974
974
|
|
|
975
|
+
export class McpServerInvalidId
|
|
976
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
977
|
+
/*@__PURE__*/ S.TaggedError<McpServerInvalidId>()("McpServerInvalidId", {
|
|
978
|
+
code: S.Number,
|
|
979
|
+
message: S.String,
|
|
980
|
+
}),
|
|
981
|
+
[
|
|
982
|
+
{
|
|
983
|
+
status: 400,
|
|
984
|
+
message: { includes: "String must contain at most 32 character(s)" },
|
|
985
|
+
},
|
|
986
|
+
],
|
|
987
|
+
) {}
|
|
988
|
+
|
|
989
|
+
export class McpServerNotFound
|
|
990
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
991
|
+
/*@__PURE__*/ S.TaggedError<McpServerNotFound>()("McpServerNotFound", {
|
|
992
|
+
code: S.Number,
|
|
993
|
+
message: S.String,
|
|
994
|
+
}),
|
|
995
|
+
[{ status: 404 }],
|
|
996
|
+
) {}
|
|
997
|
+
|
|
998
|
+
/** Upstream MCP discovery failed. The response body preserves the upstream error and error_details. */
|
|
999
|
+
export class McpServerSyncFailure
|
|
1000
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
1001
|
+
/*@__PURE__*/ S.TaggedError<McpServerSyncFailure>()(
|
|
1002
|
+
"McpServerSyncFailure",
|
|
1003
|
+
{
|
|
1004
|
+
code: S.Number,
|
|
1005
|
+
message: S.String,
|
|
1006
|
+
body: S.Unknown,
|
|
1007
|
+
},
|
|
1008
|
+
),
|
|
1009
|
+
[{ status: 200, body: { "/success": false, "/result/status": "error" } }],
|
|
1010
|
+
) {}
|
|
1011
|
+
|
|
975
1012
|
export class OrganizationAlreadyExists
|
|
976
1013
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
977
1014
|
/*@__PURE__*/ S.TaggedError<OrganizationAlreadyExists>()(
|
|
@@ -231724,7 +231761,7 @@ export const createAccessAiControlMcpPortal: API.OperationMethod<
|
|
|
231724
231761
|
retry: Retry.Retry,
|
|
231725
231762
|
}));
|
|
231726
231763
|
|
|
231727
|
-
export type CreateAccessAiControlMcpServerError = CloudflareOpError;
|
|
231764
|
+
export type CreateAccessAiControlMcpServerError = Forbidden | CloudflareOpError;
|
|
231728
231765
|
/** Creates a new MCP server for connecting to an upstream MCP endpoint. */
|
|
231729
231766
|
export const createAccessAiControlMcpServer: API.OperationMethod<
|
|
231730
231767
|
CreateAccessAiControlMcpServerRequest,
|
|
@@ -231734,7 +231771,7 @@ export const createAccessAiControlMcpServer: API.OperationMethod<
|
|
|
231734
231771
|
> = /*@__PURE__*/ API.make(() => ({
|
|
231735
231772
|
input: CreateAccessAiControlMcpServerRequest,
|
|
231736
231773
|
output: CreateAccessAiControlMcpServerResponse,
|
|
231737
|
-
errors: [CloudflareRateLimited, CloudflareError],
|
|
231774
|
+
errors: [Forbidden, CloudflareRateLimited, CloudflareError],
|
|
231738
231775
|
protocol: CloudflareProtocol,
|
|
231739
231776
|
retry: Retry.Retry,
|
|
231740
231777
|
}));
|
|
@@ -233023,7 +233060,10 @@ export const deleteAccessAiControlMcpPortal: API.OperationMethod<
|
|
|
233023
233060
|
retry: Retry.Retry,
|
|
233024
233061
|
}));
|
|
233025
233062
|
|
|
233026
|
-
export type DeleteAccessAiControlMcpServerError =
|
|
233063
|
+
export type DeleteAccessAiControlMcpServerError =
|
|
233064
|
+
| McpServerNotFound
|
|
233065
|
+
| Forbidden
|
|
233066
|
+
| CloudflareOpError;
|
|
233027
233067
|
/** Deletes an MCP server from the account. */
|
|
233028
233068
|
export const deleteAccessAiControlMcpServer: API.OperationMethod<
|
|
233029
233069
|
DeleteAccessAiControlMcpServerRequest,
|
|
@@ -233033,7 +233073,12 @@ export const deleteAccessAiControlMcpServer: API.OperationMethod<
|
|
|
233033
233073
|
> = /*@__PURE__*/ API.make(() => ({
|
|
233034
233074
|
input: DeleteAccessAiControlMcpServerRequest,
|
|
233035
233075
|
output: DeleteAccessAiControlMcpServerResponse,
|
|
233036
|
-
errors: [
|
|
233076
|
+
errors: [
|
|
233077
|
+
McpServerNotFound,
|
|
233078
|
+
Forbidden,
|
|
233079
|
+
CloudflareRateLimited,
|
|
233080
|
+
CloudflareError,
|
|
233081
|
+
],
|
|
233037
233082
|
protocol: CloudflareProtocol,
|
|
233038
233083
|
retry: Retry.Retry,
|
|
233039
233084
|
}));
|
|
@@ -236316,7 +236361,7 @@ export const listAccessAiControlMcpPortals: API.PaginatedOperationMethod<
|
|
|
236316
236361
|
cloudflarePaginate,
|
|
236317
236362
|
) as any;
|
|
236318
236363
|
|
|
236319
|
-
export type ListAccessAiControlMcpServersError = CloudflareOpError;
|
|
236364
|
+
export type ListAccessAiControlMcpServersError = Forbidden | CloudflareOpError;
|
|
236320
236365
|
/** Lists all MCP servers configured for the account. */
|
|
236321
236366
|
export const listAccessAiControlMcpServers: API.PaginatedOperationMethod<
|
|
236322
236367
|
ListAccessAiControlMcpServersRequest,
|
|
@@ -236328,7 +236373,7 @@ export const listAccessAiControlMcpServers: API.PaginatedOperationMethod<
|
|
|
236328
236373
|
() => ({
|
|
236329
236374
|
input: ListAccessAiControlMcpServersRequest,
|
|
236330
236375
|
output: ListAccessAiControlMcpServersResponse,
|
|
236331
|
-
errors: [CloudflareRateLimited, CloudflareError],
|
|
236376
|
+
errors: [Forbidden, CloudflareRateLimited, CloudflareError],
|
|
236332
236377
|
protocol: CloudflarePaginatedProtocol,
|
|
236333
236378
|
retry: Retry.Retry,
|
|
236334
236379
|
pagination: {
|
|
@@ -239362,7 +239407,11 @@ export const readAccessAiControlMcpPortal: API.OperationMethod<
|
|
|
239362
239407
|
retry: Retry.Retry,
|
|
239363
239408
|
}));
|
|
239364
239409
|
|
|
239365
|
-
export type ReadAccessAiControlMcpServerError =
|
|
239410
|
+
export type ReadAccessAiControlMcpServerError =
|
|
239411
|
+
| McpServerNotFound
|
|
239412
|
+
| Forbidden
|
|
239413
|
+
| McpServerInvalidId
|
|
239414
|
+
| CloudflareOpError;
|
|
239366
239415
|
/** Retrieves an MCP server's configuration and capability sync state. */
|
|
239367
239416
|
export const readAccessAiControlMcpServer: API.OperationMethod<
|
|
239368
239417
|
ReadAccessAiControlMcpServerRequest,
|
|
@@ -239372,7 +239421,13 @@ export const readAccessAiControlMcpServer: API.OperationMethod<
|
|
|
239372
239421
|
> = /*@__PURE__*/ API.make(() => ({
|
|
239373
239422
|
input: ReadAccessAiControlMcpServerRequest,
|
|
239374
239423
|
output: ReadAccessAiControlMcpServerResponse,
|
|
239375
|
-
errors: [
|
|
239424
|
+
errors: [
|
|
239425
|
+
McpServerNotFound,
|
|
239426
|
+
Forbidden,
|
|
239427
|
+
McpServerInvalidId,
|
|
239428
|
+
CloudflareRateLimited,
|
|
239429
|
+
CloudflareError,
|
|
239430
|
+
],
|
|
239376
239431
|
protocol: CloudflareProtocol,
|
|
239377
239432
|
retry: Retry.Retry,
|
|
239378
239433
|
}));
|
|
@@ -239587,7 +239642,11 @@ export const rotateSeedGatewayAuditSshSetting: API.OperationMethod<
|
|
|
239587
239642
|
retry: Retry.Retry,
|
|
239588
239643
|
}));
|
|
239589
239644
|
|
|
239590
|
-
export type SyncAccessAiControlMcpServerError =
|
|
239645
|
+
export type SyncAccessAiControlMcpServerError =
|
|
239646
|
+
| McpServerNotFound
|
|
239647
|
+
| Forbidden
|
|
239648
|
+
| McpServerSyncFailure
|
|
239649
|
+
| CloudflareOpError;
|
|
239591
239650
|
/** Syncs an MCP server's capabilities and returns the updated server state, including any connection errors. */
|
|
239592
239651
|
export const syncAccessAiControlMcpServer: API.OperationMethod<
|
|
239593
239652
|
SyncAccessAiControlMcpServerRequest,
|
|
@@ -239597,7 +239656,13 @@ export const syncAccessAiControlMcpServer: API.OperationMethod<
|
|
|
239597
239656
|
> = /*@__PURE__*/ API.make(() => ({
|
|
239598
239657
|
input: SyncAccessAiControlMcpServerRequest,
|
|
239599
239658
|
output: SyncAccessAiControlMcpServerResponse,
|
|
239600
|
-
errors: [
|
|
239659
|
+
errors: [
|
|
239660
|
+
McpServerNotFound,
|
|
239661
|
+
Forbidden,
|
|
239662
|
+
McpServerSyncFailure,
|
|
239663
|
+
CloudflareRateLimited,
|
|
239664
|
+
CloudflareError,
|
|
239665
|
+
],
|
|
239601
239666
|
protocol: CloudflareProtocol,
|
|
239602
239667
|
retry: Retry.Retry,
|
|
239603
239668
|
}));
|
|
@@ -239687,7 +239752,10 @@ export const updateAccessAiControlMcpPortal: API.OperationMethod<
|
|
|
239687
239752
|
retry: Retry.Retry,
|
|
239688
239753
|
}));
|
|
239689
239754
|
|
|
239690
|
-
export type UpdateAccessAiControlMcpServerError =
|
|
239755
|
+
export type UpdateAccessAiControlMcpServerError =
|
|
239756
|
+
| McpServerNotFound
|
|
239757
|
+
| Forbidden
|
|
239758
|
+
| CloudflareOpError;
|
|
239691
239759
|
/** Updates an MCP server's configuration and credentials. */
|
|
239692
239760
|
export const updateAccessAiControlMcpServer: API.OperationMethod<
|
|
239693
239761
|
UpdateAccessAiControlMcpServerRequest,
|
|
@@ -239697,7 +239765,12 @@ export const updateAccessAiControlMcpServer: API.OperationMethod<
|
|
|
239697
239765
|
> = /*@__PURE__*/ API.make(() => ({
|
|
239698
239766
|
input: UpdateAccessAiControlMcpServerRequest,
|
|
239699
239767
|
output: UpdateAccessAiControlMcpServerResponse,
|
|
239700
|
-
errors: [
|
|
239768
|
+
errors: [
|
|
239769
|
+
McpServerNotFound,
|
|
239770
|
+
Forbidden,
|
|
239771
|
+
CloudflareRateLimited,
|
|
239772
|
+
CloudflareError,
|
|
239773
|
+
],
|
|
239701
239774
|
protocol: CloudflareProtocol,
|
|
239702
239775
|
retry: Retry.Retry,
|
|
239703
239776
|
}));
|
package/src/traits.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* them. Anything tied to Cloudflare's response envelope lives here.
|
|
13
13
|
*/
|
|
14
14
|
import { makeAnnotation } from "@distilled.cloud/core/trait";
|
|
15
|
-
import type * as HttpClientError from "effect/
|
|
15
|
+
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
16
16
|
import type * as Stream from "effect/Stream";
|
|
17
17
|
|
|
18
18
|
export {
|