@distilled.cloud/cloudflare 0.7.6 → 0.7.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/cloudflare",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -63,7 +63,7 @@
63
63
  "specs:update": "git -C specs/cloudflare-typescript fetch && git -C specs/cloudflare-typescript checkout main && git -C specs/cloudflare-typescript pull"
64
64
  },
65
65
  "dependencies": {
66
- "@distilled.cloud/core": "0.7.6",
66
+ "@distilled.cloud/core": "0.7.8",
67
67
  "effect": "4.0.0-beta.38"
68
68
  },
69
69
  "devDependencies": {
@@ -994,6 +994,7 @@ export interface GetBetaWorkerVersionResponse {
994
994
  scriptName?: string | null;
995
995
  }
996
996
  | { name: string; part: string; type: "wasm_module" }
997
+ | { name: string; type: "worker_loader" }
997
998
  )[]
998
999
  | null;
999
1000
  /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
@@ -1399,6 +1400,10 @@ export const GetBetaWorkerVersionResponse =
1399
1400
  part: Schema.String,
1400
1401
  type: Schema.Literal("wasm_module"),
1401
1402
  }),
1403
+ Schema.Struct({
1404
+ name: Schema.String,
1405
+ type: Schema.Literal("worker_loader"),
1406
+ }),
1402
1407
  ]),
1403
1408
  ),
1404
1409
  Schema.Null,
@@ -1718,6 +1723,7 @@ export interface ListBetaWorkerVersionsResponse {
1718
1723
  scriptName?: string | null;
1719
1724
  }
1720
1725
  | { name: string; part: string; type: "wasm_module" }
1726
+ | { name: string; type: "worker_loader" }
1721
1727
  )[]
1722
1728
  | null;
1723
1729
  compatibilityDate?: string | null;
@@ -2132,6 +2138,10 @@ export const ListBetaWorkerVersionsResponse =
2132
2138
  part: Schema.String,
2133
2139
  type: Schema.Literal("wasm_module"),
2134
2140
  }),
2141
+ Schema.Struct({
2142
+ name: Schema.String,
2143
+ type: Schema.Literal("worker_loader"),
2144
+ }),
2135
2145
  ]),
2136
2146
  ),
2137
2147
  Schema.Null,
@@ -2620,6 +2630,7 @@ export interface CreateBetaWorkerVersionRequest {
2620
2630
  scriptName?: string;
2621
2631
  }
2622
2632
  | { name: string; part: string; type: "wasm_module" }
2633
+ | { name: string; type: "worker_loader" }
2623
2634
  )[];
2624
2635
  /** Body param: Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
2625
2636
  compatibilityDate?: string;
@@ -2971,6 +2982,10 @@ export const CreateBetaWorkerVersionRequest =
2971
2982
  part: Schema.String,
2972
2983
  type: Schema.Literal("wasm_module"),
2973
2984
  }),
2985
+ Schema.Struct({
2986
+ name: Schema.String,
2987
+ type: Schema.Literal("worker_loader"),
2988
+ }),
2974
2989
  ]),
2975
2990
  ),
2976
2991
  ),
@@ -3242,6 +3257,7 @@ export interface CreateBetaWorkerVersionResponse {
3242
3257
  scriptName?: string | null;
3243
3258
  }
3244
3259
  | { name: string; part: string; type: "wasm_module" }
3260
+ | { name: string; type: "worker_loader" }
3245
3261
  )[]
3246
3262
  | null;
3247
3263
  /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
@@ -3647,6 +3663,10 @@ export const CreateBetaWorkerVersionResponse =
3647
3663
  part: Schema.String,
3648
3664
  type: Schema.Literal("wasm_module"),
3649
3665
  }),
3666
+ Schema.Struct({
3667
+ name: Schema.String,
3668
+ type: Schema.Literal("worker_loader"),
3669
+ }),
3650
3670
  ]),
3651
3671
  ),
3652
3672
  Schema.Null,
@@ -4708,7 +4728,7 @@ export interface QueryObservabilityTelemetryResponse {
4708
4728
  id: string;
4709
4729
  accountId: string;
4710
4730
  dry: boolean;
4711
- environmentId: string;
4731
+ environmentId?: string | null;
4712
4732
  granularity: number;
4713
4733
  query: {
4714
4734
  id: string;
@@ -4827,7 +4847,7 @@ export interface QueryObservabilityTelemetryResponse {
4827
4847
  status: "STARTED" | "COMPLETED";
4828
4848
  timeframe: { from: number; to: number };
4829
4849
  userId: string;
4830
- workspaceId: string;
4850
+ workspaceId?: string | null;
4831
4851
  created?: string | null;
4832
4852
  statistics?: {
4833
4853
  bytesRead: number;
@@ -5007,6 +5027,7 @@ export interface QueryObservabilityTelemetryResponse {
5007
5027
  interval: number;
5008
5028
  lastSeen?: string | null;
5009
5029
  bin?: unknown | null;
5030
+ countErrors?: number | null;
5010
5031
  };
5011
5032
  count: number;
5012
5033
  interval: number;
@@ -5017,8 +5038,9 @@ export interface QueryObservabilityTelemetryResponse {
5017
5038
  time: string;
5018
5039
  }[]
5019
5040
  | null;
5041
+ statistics?: unknown | null;
5020
5042
  } | null;
5021
- invocations?: Record<string, unknown> | null;
5043
+ invocations?: unknown | null;
5022
5044
  patterns?:
5023
5045
  | {
5024
5046
  count: number;
@@ -5057,7 +5079,9 @@ export const QueryObservabilityTelemetryResponse =
5057
5079
  id: Schema.String,
5058
5080
  accountId: Schema.String,
5059
5081
  dry: Schema.Boolean,
5060
- environmentId: Schema.String,
5082
+ environmentId: Schema.optional(
5083
+ Schema.Union([Schema.String, Schema.Null]),
5084
+ ),
5061
5085
  granularity: Schema.Number,
5062
5086
  query: Schema.Struct({
5063
5087
  id: Schema.String,
@@ -5259,7 +5283,7 @@ export const QueryObservabilityTelemetryResponse =
5259
5283
  to: Schema.Number,
5260
5284
  }),
5261
5285
  userId: Schema.String,
5262
- workspaceId: Schema.String,
5286
+ workspaceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5263
5287
  created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
5264
5288
  statistics: Schema.optional(
5265
5289
  Schema.Union([
@@ -5699,6 +5723,9 @@ export const QueryObservabilityTelemetryResponse =
5699
5723
  bin: Schema.optional(
5700
5724
  Schema.Union([Schema.Unknown, Schema.Null]),
5701
5725
  ),
5726
+ countErrors: Schema.optional(
5727
+ Schema.Union([Schema.Number, Schema.Null]),
5728
+ ),
5702
5729
  }).pipe(
5703
5730
  Schema.encodeKeys({
5704
5731
  count: "_count",
@@ -5706,6 +5733,7 @@ export const QueryObservabilityTelemetryResponse =
5706
5733
  interval: "_interval",
5707
5734
  lastSeen: "_lastSeen",
5708
5735
  bin: "bin",
5736
+ countErrors: "_countErrors",
5709
5737
  }),
5710
5738
  ),
5711
5739
  count: Schema.Number,
@@ -5728,13 +5756,14 @@ export const QueryObservabilityTelemetryResponse =
5728
5756
  Schema.Null,
5729
5757
  ]),
5730
5758
  ),
5759
+ statistics: Schema.optional(
5760
+ Schema.Union([Schema.Unknown, Schema.Null]),
5761
+ ),
5731
5762
  }),
5732
5763
  Schema.Null,
5733
5764
  ]),
5734
5765
  ),
5735
- invocations: Schema.optional(
5736
- Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null]),
5737
- ),
5766
+ invocations: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
5738
5767
  patterns: Schema.optional(
5739
5768
  Schema.Union([
5740
5769
  Schema.Array(
@@ -6842,6 +6871,7 @@ export interface PutScriptRequest {
6842
6871
  scriptName?: string;
6843
6872
  }
6844
6873
  | { name: string; part: string; type: "wasm_module" }
6874
+ | { name: string; type: "worker_loader" }
6845
6875
  )[];
6846
6876
  bodyPart?: string;
6847
6877
  compatibilityDate?: string;
@@ -7205,6 +7235,10 @@ export const PutScriptRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7205
7235
  part: Schema.String,
7206
7236
  type: Schema.Literal("wasm_module"),
7207
7237
  }),
7238
+ Schema.Struct({
7239
+ name: Schema.String,
7240
+ type: Schema.Literal("worker_loader"),
7241
+ }),
7208
7242
  ]),
7209
7243
  ),
7210
7244
  ),
@@ -7772,6 +7806,7 @@ export const PutScriptResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7772
7806
  export type PutScriptError =
7773
7807
  | DefaultErrors
7774
7808
  | InvalidRoute
7809
+ | InvalidWorkerScript
7775
7810
  | DurableObjectMustBeSqlite;
7776
7811
 
7777
7812
  export const putScript: API.OperationMethod<
@@ -7782,7 +7817,7 @@ export const putScript: API.OperationMethod<
7782
7817
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
7783
7818
  input: PutScriptRequest,
7784
7819
  output: PutScriptResponse,
7785
- errors: [InvalidRoute, DurableObjectMustBeSqlite],
7820
+ errors: [InvalidRoute, InvalidWorkerScript, DurableObjectMustBeSqlite],
7786
7821
  }));
7787
7822
 
7788
7823
  export interface DeleteScriptRequest {
@@ -9085,6 +9120,7 @@ export interface GetScriptScriptAndVersionSettingResponse {
9085
9120
  scriptName?: string | null;
9086
9121
  }
9087
9122
  | { name: string; part: string; type: "wasm_module" }
9123
+ | { name: string; type: "worker_loader" }
9088
9124
  )[]
9089
9125
  | null;
9090
9126
  /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
@@ -9406,6 +9442,10 @@ export const GetScriptScriptAndVersionSettingResponse =
9406
9442
  part: Schema.String,
9407
9443
  type: Schema.Literal("wasm_module"),
9408
9444
  }),
9445
+ Schema.Struct({
9446
+ name: Schema.String,
9447
+ type: Schema.Literal("worker_loader"),
9448
+ }),
9409
9449
  ]),
9410
9450
  ),
9411
9451
  Schema.Null,
@@ -9618,6 +9658,7 @@ export interface PatchScriptScriptAndVersionSettingRequest {
9618
9658
  scriptName?: string;
9619
9659
  }
9620
9660
  | { name: string; part: string; type: "wasm_module" }
9661
+ | { name: string; type: "worker_loader" }
9621
9662
  )[];
9622
9663
  compatibilityDate?: string;
9623
9664
  compatibilityFlags?: string[];
@@ -9943,6 +9984,10 @@ export const PatchScriptScriptAndVersionSettingRequest =
9943
9984
  part: Schema.String,
9944
9985
  type: Schema.Literal("wasm_module"),
9945
9986
  }),
9987
+ Schema.Struct({
9988
+ name: Schema.String,
9989
+ type: Schema.Literal("worker_loader"),
9990
+ }),
9946
9991
  ]),
9947
9992
  ),
9948
9993
  ),
@@ -10243,6 +10288,7 @@ export interface PatchScriptScriptAndVersionSettingResponse {
10243
10288
  scriptName?: string | null;
10244
10289
  }
10245
10290
  | { name: string; part: string; type: "wasm_module" }
10291
+ | { name: string; type: "worker_loader" }
10246
10292
  )[]
10247
10293
  | null;
10248
10294
  /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
@@ -10564,6 +10610,10 @@ export const PatchScriptScriptAndVersionSettingResponse =
10564
10610
  part: Schema.String,
10565
10611
  type: Schema.Literal("wasm_module"),
10566
10612
  }),
10613
+ Schema.Struct({
10614
+ name: Schema.String,
10615
+ type: Schema.Literal("worker_loader"),
10616
+ }),
10567
10617
  ]),
10568
10618
  ),
10569
10619
  Schema.Null,
@@ -11883,6 +11933,7 @@ export interface GetScriptVersionResponse {
11883
11933
  scriptName?: string | null;
11884
11934
  }
11885
11935
  | { name: string; part: string; type: "wasm_module" }
11936
+ | { name: string; type: "worker_loader" }
11886
11937
  )[]
11887
11938
  | null;
11888
11939
  script?: {
@@ -12216,6 +12267,10 @@ export const GetScriptVersionResponse =
12216
12267
  part: Schema.String,
12217
12268
  type: Schema.Literal("wasm_module"),
12218
12269
  }),
12270
+ Schema.Struct({
12271
+ name: Schema.String,
12272
+ type: Schema.Literal("worker_loader"),
12273
+ }),
12219
12274
  ]),
12220
12275
  ),
12221
12276
  Schema.Null,
@@ -12660,6 +12715,7 @@ export interface CreateScriptVersionRequest {
12660
12715
  scriptName?: string;
12661
12716
  }
12662
12717
  | { name: string; part: string; type: "wasm_module" }
12718
+ | { name: string; type: "worker_loader" }
12663
12719
  )[];
12664
12720
  compatibilityDate?: string;
12665
12721
  compatibilityFlags?: string[];
@@ -12948,6 +13004,10 @@ export const CreateScriptVersionRequest =
12948
13004
  part: Schema.String,
12949
13005
  type: Schema.Literal("wasm_module"),
12950
13006
  }),
13007
+ Schema.Struct({
13008
+ name: Schema.String,
13009
+ type: Schema.Literal("worker_loader"),
13010
+ }),
12951
13011
  ]),
12952
13012
  ),
12953
13013
  ),
@@ -13076,6 +13136,7 @@ export interface CreateScriptVersionResponse {
13076
13136
  scriptName?: string | null;
13077
13137
  }
13078
13138
  | { name: string; part: string; type: "wasm_module" }
13139
+ | { name: string; type: "worker_loader" }
13079
13140
  )[]
13080
13141
  | null;
13081
13142
  script?: {
@@ -13411,6 +13472,10 @@ export const CreateScriptVersionResponse =
13411
13472
  part: Schema.String,
13412
13473
  type: Schema.Literal("wasm_module"),
13413
13474
  }),
13475
+ Schema.Struct({
13476
+ name: Schema.String,
13477
+ type: Schema.Literal("worker_loader"),
13478
+ }),
13414
13479
  ]),
13415
13480
  ),
13416
13481
  Schema.Null,