@distilled.cloud/cloudflare 0.16.7 → 0.16.9

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.16.7",
3
+ "version": "0.16.9",
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.16.7",
66
+ "@distilled.cloud/core": "0.16.9",
67
67
  "effect": ">=4.0.0-beta.60 || >=4.0.0"
68
68
  },
69
69
  "devDependencies": {
@@ -6611,6 +6611,12 @@ export interface PutScriptRequest {
6611
6611
  | { name: string; part: string; type: "wasm_module" }
6612
6612
  | { name: string; type: "worker_loader" }
6613
6613
  | { name: string; type: "artifacts"; namespace: string }
6614
+ | {
6615
+ name: string;
6616
+ type: "ratelimit";
6617
+ namespaceId: string;
6618
+ simple: { limit: number; period: number };
6619
+ }
6614
6620
  )[];
6615
6621
  bodyPart?: string;
6616
6622
  compatibilityDate?: string;
@@ -6659,6 +6665,12 @@ export interface PutScriptRequest {
6659
6665
  headSamplingRate?: number | null;
6660
6666
  persist?: boolean;
6661
6667
  } | null;
6668
+ traces?: {
6669
+ enabled: boolean;
6670
+ headSamplingRate?: number;
6671
+ destinations?: string[];
6672
+ persist?: boolean;
6673
+ };
6662
6674
  };
6663
6675
  placement?:
6664
6676
  | { mode: "smart" }
@@ -6761,6 +6773,22 @@ export const PutScriptRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
6761
6773
  type: "type",
6762
6774
  }),
6763
6775
  ),
6776
+ Schema.Struct({
6777
+ name: Schema.String,
6778
+ type: Schema.Literal("ratelimit"),
6779
+ namespaceId: Schema.String,
6780
+ simple: Schema.Struct({
6781
+ limit: Schema.Number,
6782
+ period: Schema.Number,
6783
+ }),
6784
+ }).pipe(
6785
+ Schema.encodeKeys({
6786
+ name: "name",
6787
+ type: "type",
6788
+ namespaceId: "namespace_id",
6789
+ simple: "simple",
6790
+ }),
6791
+ ),
6764
6792
  Schema.Struct({
6765
6793
  dataset: Schema.String,
6766
6794
  name: Schema.String,
@@ -7120,11 +7148,27 @@ export const PutScriptRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7120
7148
  Schema.Null,
7121
7149
  ]),
7122
7150
  ),
7151
+ traces: Schema.optional(
7152
+ Schema.Struct({
7153
+ enabled: Schema.Boolean,
7154
+ headSamplingRate: Schema.optional(Schema.Number),
7155
+ destinations: Schema.optional(Schema.Array(Schema.String)),
7156
+ persist: Schema.optional(Schema.Boolean),
7157
+ }).pipe(
7158
+ Schema.encodeKeys({
7159
+ enabled: "enabled",
7160
+ headSamplingRate: "head_sampling_rate",
7161
+ destinations: "destinations",
7162
+ persist: "persist",
7163
+ }),
7164
+ ),
7165
+ ),
7123
7166
  }).pipe(
7124
7167
  Schema.encodeKeys({
7125
7168
  enabled: "enabled",
7126
7169
  headSamplingRate: "head_sampling_rate",
7127
7170
  logs: "logs",
7171
+ traces: "traces",
7128
7172
  }),
7129
7173
  ),
7130
7174
  ),
@@ -7240,6 +7284,12 @@ export interface PutScriptResponse {
7240
7284
  headSamplingRate?: number | null;
7241
7285
  persist?: boolean | null;
7242
7286
  } | null;
7287
+ traces?: {
7288
+ enabled: boolean;
7289
+ headSamplingRate?: number | null;
7290
+ destinations?: string[] | null;
7291
+ persist?: boolean | null;
7292
+ } | null;
7243
7293
  } | null;
7244
7294
  /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify either mode for Smart Placement, or one of region/hostname/host for targeted place */
7245
7295
  placement?:
@@ -7371,11 +7421,36 @@ export const PutScriptResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7371
7421
  Schema.Null,
7372
7422
  ]),
7373
7423
  ),
7424
+ traces: Schema.optional(
7425
+ Schema.Union([
7426
+ Schema.Struct({
7427
+ enabled: Schema.Boolean,
7428
+ headSamplingRate: Schema.optional(
7429
+ Schema.Union([Schema.Number, Schema.Null]),
7430
+ ),
7431
+ destinations: Schema.optional(
7432
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
7433
+ ),
7434
+ persist: Schema.optional(
7435
+ Schema.Union([Schema.Boolean, Schema.Null]),
7436
+ ),
7437
+ }).pipe(
7438
+ Schema.encodeKeys({
7439
+ enabled: "enabled",
7440
+ headSamplingRate: "head_sampling_rate",
7441
+ destinations: "destinations",
7442
+ persist: "persist",
7443
+ }),
7444
+ ),
7445
+ Schema.Null,
7446
+ ]),
7447
+ ),
7374
7448
  }).pipe(
7375
7449
  Schema.encodeKeys({
7376
7450
  enabled: "enabled",
7377
7451
  headSamplingRate: "head_sampling_rate",
7378
7452
  logs: "logs",
7453
+ traces: "traces",
7379
7454
  }),
7380
7455
  ),
7381
7456
  Schema.Null,
@@ -9662,6 +9737,12 @@ export interface GetScriptScriptAndVersionSettingResponse {
9662
9737
  headSamplingRate?: number | null;
9663
9738
  persist?: boolean | null;
9664
9739
  } | null;
9740
+ traces?: {
9741
+ enabled: boolean;
9742
+ headSamplingRate?: number | null;
9743
+ destinations?: string[] | null;
9744
+ persist?: boolean | null;
9745
+ } | null;
9665
9746
  } | null;
9666
9747
  /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify either mode for Smart Placement, or one of region/hostname/host for targeted place */
9667
9748
  placement?: unknown | null;
@@ -10024,11 +10105,36 @@ export const GetScriptScriptAndVersionSettingResponse =
10024
10105
  Schema.Null,
10025
10106
  ]),
10026
10107
  ),
10108
+ traces: Schema.optional(
10109
+ Schema.Union([
10110
+ Schema.Struct({
10111
+ enabled: Schema.Boolean,
10112
+ headSamplingRate: Schema.optional(
10113
+ Schema.Union([Schema.Number, Schema.Null]),
10114
+ ),
10115
+ destinations: Schema.optional(
10116
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
10117
+ ),
10118
+ persist: Schema.optional(
10119
+ Schema.Union([Schema.Boolean, Schema.Null]),
10120
+ ),
10121
+ }).pipe(
10122
+ Schema.encodeKeys({
10123
+ enabled: "enabled",
10124
+ headSamplingRate: "head_sampling_rate",
10125
+ destinations: "destinations",
10126
+ persist: "persist",
10127
+ }),
10128
+ ),
10129
+ Schema.Null,
10130
+ ]),
10131
+ ),
10027
10132
  }).pipe(
10028
10133
  Schema.encodeKeys({
10029
10134
  enabled: "enabled",
10030
10135
  headSamplingRate: "head_sampling_rate",
10031
10136
  logs: "logs",
10137
+ traces: "traces",
10032
10138
  }),
10033
10139
  ),
10034
10140
  Schema.Null,
@@ -11624,6 +11730,12 @@ export interface GetScriptSettingResponse {
11624
11730
  headSamplingRate?: number | null;
11625
11731
  persist?: boolean | null;
11626
11732
  } | null;
11733
+ traces?: {
11734
+ enabled: boolean;
11735
+ headSamplingRate?: number | null;
11736
+ destinations?: string[] | null;
11737
+ persist?: boolean | null;
11738
+ } | null;
11627
11739
  } | null;
11628
11740
  /** Tags associated with the Worker. */
11629
11741
  tags?: string[] | null;
@@ -11673,11 +11785,36 @@ export const GetScriptSettingResponse =
11673
11785
  Schema.Null,
11674
11786
  ]),
11675
11787
  ),
11788
+ traces: Schema.optional(
11789
+ Schema.Union([
11790
+ Schema.Struct({
11791
+ enabled: Schema.Boolean,
11792
+ headSamplingRate: Schema.optional(
11793
+ Schema.Union([Schema.Number, Schema.Null]),
11794
+ ),
11795
+ destinations: Schema.optional(
11796
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
11797
+ ),
11798
+ persist: Schema.optional(
11799
+ Schema.Union([Schema.Boolean, Schema.Null]),
11800
+ ),
11801
+ }).pipe(
11802
+ Schema.encodeKeys({
11803
+ enabled: "enabled",
11804
+ headSamplingRate: "head_sampling_rate",
11805
+ destinations: "destinations",
11806
+ persist: "persist",
11807
+ }),
11808
+ ),
11809
+ Schema.Null,
11810
+ ]),
11811
+ ),
11676
11812
  }).pipe(
11677
11813
  Schema.encodeKeys({
11678
11814
  enabled: "enabled",
11679
11815
  headSamplingRate: "head_sampling_rate",
11680
11816
  logs: "logs",
11817
+ traces: "traces",
11681
11818
  }),
11682
11819
  ),
11683
11820
  Schema.Null,
@@ -11745,6 +11882,12 @@ export interface PatchScriptSettingRequest {
11745
11882
  headSamplingRate?: number | null;
11746
11883
  persist?: boolean;
11747
11884
  } | null;
11885
+ traces?: {
11886
+ enabled: boolean;
11887
+ headSamplingRate?: number;
11888
+ destinations?: string[];
11889
+ persist?: boolean;
11890
+ };
11748
11891
  } | null;
11749
11892
  /** Body param: Tags associated with the Worker. */
11750
11893
  tags?: string[] | null;
@@ -11788,11 +11931,27 @@ export const PatchScriptSettingRequest =
11788
11931
  Schema.Null,
11789
11932
  ]),
11790
11933
  ),
11934
+ traces: Schema.optional(
11935
+ Schema.Struct({
11936
+ enabled: Schema.Boolean,
11937
+ headSamplingRate: Schema.optional(Schema.Number),
11938
+ destinations: Schema.optional(Schema.Array(Schema.String)),
11939
+ persist: Schema.optional(Schema.Boolean),
11940
+ }).pipe(
11941
+ Schema.encodeKeys({
11942
+ enabled: "enabled",
11943
+ headSamplingRate: "head_sampling_rate",
11944
+ destinations: "destinations",
11945
+ persist: "persist",
11946
+ }),
11947
+ ),
11948
+ ),
11791
11949
  }).pipe(
11792
11950
  Schema.encodeKeys({
11793
11951
  enabled: "enabled",
11794
11952
  headSamplingRate: "head_sampling_rate",
11795
11953
  logs: "logs",
11954
+ traces: "traces",
11796
11955
  }),
11797
11956
  ),
11798
11957
  Schema.Null,
@@ -11840,6 +11999,12 @@ export interface PatchScriptSettingResponse {
11840
11999
  headSamplingRate?: number | null;
11841
12000
  persist?: boolean | null;
11842
12001
  } | null;
12002
+ traces?: {
12003
+ enabled: boolean;
12004
+ headSamplingRate?: number | null;
12005
+ destinations?: string[] | null;
12006
+ persist?: boolean | null;
12007
+ } | null;
11843
12008
  } | null;
11844
12009
  /** Tags associated with the Worker. */
11845
12010
  tags?: string[] | null;
@@ -11889,11 +12054,36 @@ export const PatchScriptSettingResponse =
11889
12054
  Schema.Null,
11890
12055
  ]),
11891
12056
  ),
12057
+ traces: Schema.optional(
12058
+ Schema.Union([
12059
+ Schema.Struct({
12060
+ enabled: Schema.Boolean,
12061
+ headSamplingRate: Schema.optional(
12062
+ Schema.Union([Schema.Number, Schema.Null]),
12063
+ ),
12064
+ destinations: Schema.optional(
12065
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
12066
+ ),
12067
+ persist: Schema.optional(
12068
+ Schema.Union([Schema.Boolean, Schema.Null]),
12069
+ ),
12070
+ }).pipe(
12071
+ Schema.encodeKeys({
12072
+ enabled: "enabled",
12073
+ headSamplingRate: "head_sampling_rate",
12074
+ destinations: "destinations",
12075
+ persist: "persist",
12076
+ }),
12077
+ ),
12078
+ Schema.Null,
12079
+ ]),
12080
+ ),
11892
12081
  }).pipe(
11893
12082
  Schema.encodeKeys({
11894
12083
  enabled: "enabled",
11895
12084
  headSamplingRate: "head_sampling_rate",
11896
12085
  logs: "logs",
12086
+ traces: "traces",
11897
12087
  }),
11898
12088
  ),
11899
12089
  Schema.Null,