@cloudflare/workers-types 4.20250905.0 → 4.20250909.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.
package/latest/index.ts CHANGED
@@ -7303,6 +7303,11 @@ export interface D1Meta {
7303
7303
  */
7304
7304
  sql_duration_ms: number;
7305
7305
  };
7306
+ /**
7307
+ * Number of total attempts to execute the query, due to automatic retries.
7308
+ * Note: All other fields in the response like `timings` only apply to the last attempt.
7309
+ */
7310
+ total_attempts?: number;
7306
7311
  }
7307
7312
  export interface D1Response {
7308
7313
  success: true;
@@ -7590,6 +7595,7 @@ export type ImageOutputOptions = {
7590
7595
  | "rgba";
7591
7596
  quality?: number;
7592
7597
  background?: string;
7598
+ anim?: boolean;
7593
7599
  };
7594
7600
  export interface ImagesBinding {
7595
7601
  /**
@@ -8111,21 +8117,17 @@ export declare namespace TailStream {
8111
8117
  readonly tag?: string;
8112
8118
  readonly message?: string;
8113
8119
  }
8114
- interface Trigger {
8115
- readonly traceId: string;
8116
- readonly invocationId: string;
8117
- readonly spanId: string;
8118
- }
8119
8120
  interface Onset {
8120
8121
  readonly type: "onset";
8121
8122
  readonly attributes: Attribute[];
8123
+ // id for the span being opened by this Onset event.
8124
+ readonly spanId: string;
8122
8125
  readonly dispatchNamespace?: string;
8123
8126
  readonly entrypoint?: string;
8124
8127
  readonly executionModel: string;
8125
8128
  readonly scriptName?: string;
8126
8129
  readonly scriptTags?: string[];
8127
8130
  readonly scriptVersion?: ScriptVersion;
8128
- readonly trigger?: Trigger;
8129
8131
  readonly info:
8130
8132
  | FetchEventInfo
8131
8133
  | JsRpcEventInfo
@@ -8146,6 +8148,8 @@ export declare namespace TailStream {
8146
8148
  interface SpanOpen {
8147
8149
  readonly type: "spanOpen";
8148
8150
  readonly name: string;
8151
+ // id for the span being opened by this SpanOpen event.
8152
+ readonly spanId: string;
8149
8153
  readonly info?: FetchEventInfo | JsRpcEventInfo | Attributes;
8150
8154
  }
8151
8155
  interface SpanClose {
@@ -8168,6 +8172,10 @@ export declare namespace TailStream {
8168
8172
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8169
8173
  readonly message: object;
8170
8174
  }
8175
+ // This marks the worker handler return information.
8176
+ // This is separate from Outcome because the worker invocation can live for a long time after
8177
+ // returning. For example - Websockets that return an http upgrade response but then continue
8178
+ // streaming information or SSE http connections.
8171
8179
  interface Return {
8172
8180
  readonly type: "return";
8173
8181
  readonly info?: FetchResponseInfo;
@@ -8198,9 +8206,28 @@ export declare namespace TailStream {
8198
8206
  | Log
8199
8207
  | Return
8200
8208
  | Attributes;
8209
+ // Context in which this trace event lives.
8210
+ interface SpanContext {
8211
+ // Single id for the entire top-level invocation
8212
+ // This should be a new traceId for the first worker stage invoked in the eyeball request and then
8213
+ // same-account service-bindings should reuse the same traceId but cross-account service-bindings
8214
+ // should use a new traceId.
8215
+ readonly traceId: string;
8216
+ // spanId in which this event is handled
8217
+ // for Onset and SpanOpen events this would be the parent span id
8218
+ // for Outcome and SpanClose these this would be the span id of the opening Onset and SpanOpen events
8219
+ // For Hibernate and Mark this would be the span under which they were emitted.
8220
+ // spanId is not set ONLY if:
8221
+ // 1. This is an Onset event
8222
+ // 2. We are not inherting any SpanContext. (e.g. this is a cross-account service binding or a new top-level invocation)
8223
+ readonly spanId?: string;
8224
+ }
8201
8225
  interface TailEvent<Event extends EventType> {
8226
+ // invocation id of the currently invoked worker stage.
8227
+ // invocation id will always be unique to every Onset event and will be the same until the Outcome event.
8202
8228
  readonly invocationId: string;
8203
- readonly spanId: string;
8229
+ // Inherited spanContext for this event.
8230
+ readonly spanContext: SpanContext;
8204
8231
  readonly timestamp: Date;
8205
8232
  readonly sequence: number;
8206
8233
  readonly event: Event;
package/oldest/index.d.ts CHANGED
@@ -7191,6 +7191,11 @@ interface D1Meta {
7191
7191
  */
7192
7192
  sql_duration_ms: number;
7193
7193
  };
7194
+ /**
7195
+ * Number of total attempts to execute the query, due to automatic retries.
7196
+ * Note: All other fields in the response like `timings` only apply to the last attempt.
7197
+ */
7198
+ total_attempts?: number;
7194
7199
  }
7195
7200
  interface D1Response {
7196
7201
  success: true;
@@ -7485,6 +7490,7 @@ type ImageOutputOptions = {
7485
7490
  | "rgba";
7486
7491
  quality?: number;
7487
7492
  background?: string;
7493
+ anim?: boolean;
7488
7494
  };
7489
7495
  interface ImagesBinding {
7490
7496
  /**
@@ -8181,21 +8187,17 @@ declare namespace TailStream {
8181
8187
  readonly tag?: string;
8182
8188
  readonly message?: string;
8183
8189
  }
8184
- interface Trigger {
8185
- readonly traceId: string;
8186
- readonly invocationId: string;
8187
- readonly spanId: string;
8188
- }
8189
8190
  interface Onset {
8190
8191
  readonly type: "onset";
8191
8192
  readonly attributes: Attribute[];
8193
+ // id for the span being opened by this Onset event.
8194
+ readonly spanId: string;
8192
8195
  readonly dispatchNamespace?: string;
8193
8196
  readonly entrypoint?: string;
8194
8197
  readonly executionModel: string;
8195
8198
  readonly scriptName?: string;
8196
8199
  readonly scriptTags?: string[];
8197
8200
  readonly scriptVersion?: ScriptVersion;
8198
- readonly trigger?: Trigger;
8199
8201
  readonly info:
8200
8202
  | FetchEventInfo
8201
8203
  | JsRpcEventInfo
@@ -8216,6 +8218,8 @@ declare namespace TailStream {
8216
8218
  interface SpanOpen {
8217
8219
  readonly type: "spanOpen";
8218
8220
  readonly name: string;
8221
+ // id for the span being opened by this SpanOpen event.
8222
+ readonly spanId: string;
8219
8223
  readonly info?: FetchEventInfo | JsRpcEventInfo | Attributes;
8220
8224
  }
8221
8225
  interface SpanClose {
@@ -8238,6 +8242,10 @@ declare namespace TailStream {
8238
8242
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8239
8243
  readonly message: object;
8240
8244
  }
8245
+ // This marks the worker handler return information.
8246
+ // This is separate from Outcome because the worker invocation can live for a long time after
8247
+ // returning. For example - Websockets that return an http upgrade response but then continue
8248
+ // streaming information or SSE http connections.
8241
8249
  interface Return {
8242
8250
  readonly type: "return";
8243
8251
  readonly info?: FetchResponseInfo;
@@ -8268,9 +8276,28 @@ declare namespace TailStream {
8268
8276
  | Log
8269
8277
  | Return
8270
8278
  | Attributes;
8279
+ // Context in which this trace event lives.
8280
+ interface SpanContext {
8281
+ // Single id for the entire top-level invocation
8282
+ // This should be a new traceId for the first worker stage invoked in the eyeball request and then
8283
+ // same-account service-bindings should reuse the same traceId but cross-account service-bindings
8284
+ // should use a new traceId.
8285
+ readonly traceId: string;
8286
+ // spanId in which this event is handled
8287
+ // for Onset and SpanOpen events this would be the parent span id
8288
+ // for Outcome and SpanClose these this would be the span id of the opening Onset and SpanOpen events
8289
+ // For Hibernate and Mark this would be the span under which they were emitted.
8290
+ // spanId is not set ONLY if:
8291
+ // 1. This is an Onset event
8292
+ // 2. We are not inherting any SpanContext. (e.g. this is a cross-account service binding or a new top-level invocation)
8293
+ readonly spanId?: string;
8294
+ }
8271
8295
  interface TailEvent<Event extends EventType> {
8296
+ // invocation id of the currently invoked worker stage.
8297
+ // invocation id will always be unique to every Onset event and will be the same until the Outcome event.
8272
8298
  readonly invocationId: string;
8273
- readonly spanId: string;
8299
+ // Inherited spanContext for this event.
8300
+ readonly spanContext: SpanContext;
8274
8301
  readonly timestamp: Date;
8275
8302
  readonly sequence: number;
8276
8303
  readonly event: Event;
package/oldest/index.ts CHANGED
@@ -7218,6 +7218,11 @@ export interface D1Meta {
7218
7218
  */
7219
7219
  sql_duration_ms: number;
7220
7220
  };
7221
+ /**
7222
+ * Number of total attempts to execute the query, due to automatic retries.
7223
+ * Note: All other fields in the response like `timings` only apply to the last attempt.
7224
+ */
7225
+ total_attempts?: number;
7221
7226
  }
7222
7227
  export interface D1Response {
7223
7228
  success: true;
@@ -7505,6 +7510,7 @@ export type ImageOutputOptions = {
7505
7510
  | "rgba";
7506
7511
  quality?: number;
7507
7512
  background?: string;
7513
+ anim?: boolean;
7508
7514
  };
7509
7515
  export interface ImagesBinding {
7510
7516
  /**
@@ -8026,21 +8032,17 @@ export declare namespace TailStream {
8026
8032
  readonly tag?: string;
8027
8033
  readonly message?: string;
8028
8034
  }
8029
- interface Trigger {
8030
- readonly traceId: string;
8031
- readonly invocationId: string;
8032
- readonly spanId: string;
8033
- }
8034
8035
  interface Onset {
8035
8036
  readonly type: "onset";
8036
8037
  readonly attributes: Attribute[];
8038
+ // id for the span being opened by this Onset event.
8039
+ readonly spanId: string;
8037
8040
  readonly dispatchNamespace?: string;
8038
8041
  readonly entrypoint?: string;
8039
8042
  readonly executionModel: string;
8040
8043
  readonly scriptName?: string;
8041
8044
  readonly scriptTags?: string[];
8042
8045
  readonly scriptVersion?: ScriptVersion;
8043
- readonly trigger?: Trigger;
8044
8046
  readonly info:
8045
8047
  | FetchEventInfo
8046
8048
  | JsRpcEventInfo
@@ -8061,6 +8063,8 @@ export declare namespace TailStream {
8061
8063
  interface SpanOpen {
8062
8064
  readonly type: "spanOpen";
8063
8065
  readonly name: string;
8066
+ // id for the span being opened by this SpanOpen event.
8067
+ readonly spanId: string;
8064
8068
  readonly info?: FetchEventInfo | JsRpcEventInfo | Attributes;
8065
8069
  }
8066
8070
  interface SpanClose {
@@ -8083,6 +8087,10 @@ export declare namespace TailStream {
8083
8087
  readonly level: "debug" | "error" | "info" | "log" | "warn";
8084
8088
  readonly message: object;
8085
8089
  }
8090
+ // This marks the worker handler return information.
8091
+ // This is separate from Outcome because the worker invocation can live for a long time after
8092
+ // returning. For example - Websockets that return an http upgrade response but then continue
8093
+ // streaming information or SSE http connections.
8086
8094
  interface Return {
8087
8095
  readonly type: "return";
8088
8096
  readonly info?: FetchResponseInfo;
@@ -8113,9 +8121,28 @@ export declare namespace TailStream {
8113
8121
  | Log
8114
8122
  | Return
8115
8123
  | Attributes;
8124
+ // Context in which this trace event lives.
8125
+ interface SpanContext {
8126
+ // Single id for the entire top-level invocation
8127
+ // This should be a new traceId for the first worker stage invoked in the eyeball request and then
8128
+ // same-account service-bindings should reuse the same traceId but cross-account service-bindings
8129
+ // should use a new traceId.
8130
+ readonly traceId: string;
8131
+ // spanId in which this event is handled
8132
+ // for Onset and SpanOpen events this would be the parent span id
8133
+ // for Outcome and SpanClose these this would be the span id of the opening Onset and SpanOpen events
8134
+ // For Hibernate and Mark this would be the span under which they were emitted.
8135
+ // spanId is not set ONLY if:
8136
+ // 1. This is an Onset event
8137
+ // 2. We are not inherting any SpanContext. (e.g. this is a cross-account service binding or a new top-level invocation)
8138
+ readonly spanId?: string;
8139
+ }
8116
8140
  interface TailEvent<Event extends EventType> {
8141
+ // invocation id of the currently invoked worker stage.
8142
+ // invocation id will always be unique to every Onset event and will be the same until the Outcome event.
8117
8143
  readonly invocationId: string;
8118
- readonly spanId: string;
8144
+ // Inherited spanContext for this event.
8145
+ readonly spanContext: SpanContext;
8119
8146
  readonly timestamp: Date;
8120
8147
  readonly sequence: number;
8121
8148
  readonly event: Event;
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20250905.0"
10
+ "version": "4.20250909.0"
11
11
  }