@distilled.cloud/cloudflare 0.28.1 → 0.29.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.
@@ -17,11 +17,18 @@ export class ContentTypeRequired extends T.applyErrorMatchers(Schema.TaggedError
17
17
  message: Schema.String,
18
18
  }), [{ code: 10001 }]) {
19
19
  }
20
+ export class D1DatabaseNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("D1DatabaseNotFound", {
21
+ code: Schema.Number,
22
+ message: Schema.String,
23
+ }), [{ code: 10181 }]) {
24
+ }
20
25
  export class DeploymentNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("DeploymentNotFound", {
21
26
  code: Schema.Number,
22
27
  message: Schema.String,
23
28
  }), [{ code: 10336 }]) {
24
29
  }
30
+ export class DispatchNamespaceNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("DispatchNamespaceNotFound", { code: Schema.Number, message: Schema.String }), [{ code: 100119 }]) {
31
+ }
25
32
  export class DomainNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("DomainNotFound", {
26
33
  code: Schema.Number,
27
34
  message: Schema.String,
@@ -34,6 +41,8 @@ export class DuplicateMigrationTarget extends T.applyErrorMatchers(Schema.Tagged
34
41
  },
35
42
  ]) {
36
43
  }
44
+ export class DurableObjectClassNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("DurableObjectClassNotFound", { code: Schema.Number, message: Schema.String }), [{ code: 10061 }]) {
45
+ }
37
46
  export class DurableObjectMustBeSqlite extends T.applyErrorMatchers(Schema.TaggedErrorClass()("DurableObjectMustBeSqlite", { code: Schema.Number, message: Schema.String }), [{ code: 10074, message: { includes: "not a SQLite Durable Object" } }]) {
38
47
  }
39
48
  export class Forbidden extends T.applyErrorMatchers(Schema.TaggedErrorClass()("Forbidden", {
@@ -46,6 +55,8 @@ export class HostnameAlreadyInUse extends T.applyErrorMatchers(Schema.TaggedErro
46
55
  message: Schema.String,
47
56
  }), [{ code: 100116 }]) {
48
57
  }
58
+ export class HyperdriveConfigNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("HyperdriveConfigNotFound", { code: Schema.Number, message: Schema.String }), [{ code: 10157 }]) {
59
+ }
49
60
  T.applyErrorMatchers(InternalServerError, [
50
61
  { code: 10002, message: { includes: "An unknown error has occurred" } },
51
62
  ]);
@@ -64,6 +75,13 @@ export class InvalidWorkerScript extends T.applyErrorMatchers(Schema.TaggedError
64
75
  message: Schema.String,
65
76
  }), [{ code: 10068 }]) {
66
77
  }
78
+ export class KVNamespaceNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("KVNamespaceNotFound", {
79
+ code: Schema.Number,
80
+ message: Schema.String,
81
+ }), [{ code: 10041 }]) {
82
+ }
83
+ export class MtlsCertificateNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("MtlsCertificateNotFound", { code: Schema.Number, message: Schema.String }), [{ code: 100143 }]) {
84
+ }
67
85
  export class ObservabilityDestinationCreateFailed extends T.applyErrorMatchers(Schema.TaggedErrorClass()("ObservabilityDestinationCreateFailed", { code: Schema.Number, message: Schema.String }), [{ status: 400, message: "Bad Request" }]) {
68
86
  }
69
87
  export class ObservabilityDestinationNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("ObservabilityDestinationNotFound", { code: Schema.Number, message: Schema.String }), [{ status: 404 }]) {
@@ -75,11 +93,26 @@ export class QueueConsumerConflict extends T.applyErrorMatchers(Schema.TaggedErr
75
93
  message: Schema.String,
76
94
  }), [{ code: 10064 }]) {
77
95
  }
96
+ export class QueueNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("QueueNotFound", {
97
+ code: Schema.Number,
98
+ message: Schema.String,
99
+ }), [{ code: 11000 }]) {
100
+ }
101
+ export class R2BucketNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("R2BucketNotFound", {
102
+ code: Schema.Number,
103
+ message: Schema.String,
104
+ }), [{ code: 10085 }]) {
105
+ }
78
106
  export class RouteNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("RouteNotFound", {
79
107
  code: Schema.Number,
80
108
  message: Schema.String,
81
109
  }), [{ code: 10009 }, { status: 404 }]) {
82
110
  }
111
+ export class RouteScriptNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("RouteScriptNotFound", {
112
+ code: Schema.Number,
113
+ message: Schema.String,
114
+ }), [{ code: 10019 }]) {
115
+ }
83
116
  export class ScriptModuleNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("ScriptModuleNotFound", {
84
117
  code: Schema.Number,
85
118
  message: Schema.String,
@@ -95,11 +128,18 @@ export class SecretNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass
95
128
  message: Schema.String,
96
129
  }), [{ code: 10056 }]) {
97
130
  }
131
+ export class SecretsStoreBindingNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("SecretsStoreBindingNotFound", { code: Schema.Number, message: Schema.String }), [{ code: 10182 }]) {
132
+ }
98
133
  export class ServiceBindingConflict extends T.applyErrorMatchers(Schema.TaggedErrorClass()("ServiceBindingConflict", {
99
134
  code: Schema.Number,
100
135
  message: Schema.String,
101
136
  }), [{ code: 10142 }]) {
102
137
  }
138
+ export class ServiceBindingNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("ServiceBindingNotFound", {
139
+ code: Schema.Number,
140
+ message: Schema.String,
141
+ }), [{ code: 10144 }]) {
142
+ }
103
143
  export class SubdomainAlreadyExists extends T.applyErrorMatchers(Schema.TaggedErrorClass()("SubdomainAlreadyExists", {
104
144
  code: Schema.Number,
105
145
  message: Schema.String,
@@ -110,6 +150,11 @@ export class SubdomainNotFound extends T.applyErrorMatchers(Schema.TaggedErrorCl
110
150
  message: Schema.String,
111
151
  }), [{ status: 404 }]) {
112
152
  }
153
+ export class VectorizeIndexNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("VectorizeIndexNotFound", {
154
+ code: Schema.Number,
155
+ message: Schema.String,
156
+ }), [{ code: 10159 }]) {
157
+ }
113
158
  export class VersionNotFound extends T.applyErrorMatchers(Schema.TaggedErrorClass()("VersionNotFound", {
114
159
  code: Schema.Number,
115
160
  message: Schema.String,
@@ -1910,6 +1955,14 @@ const PutScriptRequestMetadataBinding37 =
1910
1955
  namespaceId: "namespace_id",
1911
1956
  simple: "simple",
1912
1957
  })));
1958
+ const PutScriptRequestMetadataCache =
1959
+ /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({
1960
+ enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1961
+ crossVersionCache: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1962
+ }).pipe(Schema.encodeKeys({
1963
+ enabled: "enabled",
1964
+ crossVersionCache: "cross_version_cache",
1965
+ })));
1913
1966
  const Metadata2 = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({
1914
1967
  annotations: Schema.optional(Schema.Union([Annotations2, Schema.Null])),
1915
1968
  assets: Schema.optional(Schema.Union([Assets2, Schema.Null])),
@@ -1992,6 +2045,7 @@ const Metadata2 = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct
1992
2045
  Schema.Null,
1993
2046
  ])),
1994
2047
  containers: Schema.optional(Schema.Union([Schema.Array(Container), Schema.Null])),
2048
+ cache: Schema.optional(Schema.Union([PutScriptRequestMetadataCache, Schema.Null])),
1995
2049
  }).pipe(Schema.encodeKeys({
1996
2050
  annotations: "annotations",
1997
2051
  assets: "assets",
@@ -2011,6 +2065,7 @@ const Metadata2 = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct
2011
2065
  tailConsumers: "tail_consumers",
2012
2066
  usageModel: "usage_model",
2013
2067
  containers: "containers",
2068
+ cache: "cache_options",
2014
2069
  })));
2015
2070
  const ScriptSearchResponseItem = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({
2016
2071
  id: Schema.String,
@@ -2801,6 +2856,7 @@ const Metadata5 = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct
2801
2856
  ]),
2802
2857
  Schema.Null,
2803
2858
  ])),
2859
+ cache: Schema.optional(Schema.Union([PutScriptRequestMetadataCache, Schema.Null])),
2804
2860
  }).pipe(Schema.encodeKeys({
2805
2861
  mainModule: "main_module",
2806
2862
  annotations: "annotations",
@@ -2809,6 +2865,7 @@ const Metadata5 = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct
2809
2865
  compatibilityFlags: "compatibility_flags",
2810
2866
  keepBindings: "keep_bindings",
2811
2867
  usageModel: "usage_model",
2868
+ cache: "cache_options",
2812
2869
  })));
2813
2870
  export const GetAccountSettingRequest =
2814
2871
  /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({
@@ -3874,7 +3931,7 @@ export const CreateRouteResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(()
3874
3931
  export const createRoute = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3875
3932
  input: CreateRouteRequest,
3876
3933
  output: CreateRouteResponse,
3877
- errors: [InvalidRoutePattern, InvalidRoute, Forbidden],
3934
+ errors: [RouteScriptNotFound, InvalidRoutePattern, InvalidRoute, Forbidden],
3878
3935
  }));
3879
3936
  export const UpdateRouteRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({
3880
3937
  routeId: Schema.String.pipe(T.HttpPath("routeId")),
@@ -4043,6 +4100,17 @@ export const putScript = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4043
4100
  DuplicateMigrationTarget,
4044
4101
  ScriptStartupError,
4045
4102
  ScriptModuleNotFound,
4103
+ SecretsStoreBindingNotFound,
4104
+ KVNamespaceNotFound,
4105
+ R2BucketNotFound,
4106
+ D1DatabaseNotFound,
4107
+ QueueNotFound,
4108
+ ServiceBindingNotFound,
4109
+ DurableObjectClassNotFound,
4110
+ HyperdriveConfigNotFound,
4111
+ VectorizeIndexNotFound,
4112
+ DispatchNamespaceNotFound,
4113
+ MtlsCertificateNotFound,
4046
4114
  ],
4047
4115
  }));
4048
4116
  export const DeleteScriptRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({
@@ -4727,7 +4795,7 @@ export const GetScriptSettingResponse =
4727
4795
  export const getScriptSetting = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4728
4796
  input: GetScriptSettingRequest,
4729
4797
  output: GetScriptSettingResponse,
4730
- errors: [WorkerNotFound],
4798
+ errors: [WorkerNotFound, WorkerHasNoVersions],
4731
4799
  }));
4732
4800
  export const PatchScriptSettingRequest =
4733
4801
  /*@__PURE__*/ /*#__PURE__*/ Schema.suspend(() => Schema.Struct({