@cloudflare/workers-types 5.20261104.1 → 5.20261106.1

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.
@@ -3418,6 +3418,7 @@ interface TraceItem {
3418
3418
  | TraceItemConnectEventInfo
3419
3419
  | TraceItemScheduledEventInfo
3420
3420
  | TraceItemAlarmEventInfo
3421
+ | TraceItemOnHibernateEventInfo
3421
3422
  | TraceItemQueueEventInfo
3422
3423
  | TraceItemEmailEventInfo
3423
3424
  | TraceItemTailEventInfo
@@ -3484,6 +3485,9 @@ interface TraceItemFetchEventInfoResponse {
3484
3485
  interface TraceItemJsRpcEventInfo {
3485
3486
  readonly rpcMethod: string;
3486
3487
  }
3488
+ interface TraceItemOnHibernateEventInfo {
3489
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
3490
+ }
3487
3491
  interface TraceItemHibernatableWebSocketEventInfo {
3488
3492
  readonly getWebSocketEvent:
3489
3493
  | TraceItemHibernatableWebSocketEventInfoMessage
@@ -4944,6 +4948,11 @@ interface Tracing {
4944
4948
  ): T;
4945
4949
  startSpan(name: string): Span;
4946
4950
  getActiveSpan(): Span | undefined;
4951
+ withActiveSpan<T, A extends unknown[]>(
4952
+ span: Span,
4953
+ callback: (...args: A) => T,
4954
+ ...args: A
4955
+ ): T;
4947
4956
  Span: typeof Span;
4948
4957
  }
4949
4958
  declare abstract class Span {
@@ -16552,6 +16561,12 @@ interface JsonWebKeyWithKid extends JsonWebKey {
16552
16561
  }
16553
16562
  interface RateLimitOptions {
16554
16563
  key: string;
16564
+ /**
16565
+ * Amount to add to the counter for this call. Must be a positive integer;
16566
+ * defaults to `1`. The call is allowed while the counter is below the limit,
16567
+ * even if `delta` takes it past the limit.
16568
+ */
16569
+ delta?: number;
16555
16570
  }
16556
16571
  interface RateLimitOutcome {
16557
16572
  success: boolean;
@@ -17901,6 +17916,10 @@ declare namespace TailStream {
17901
17916
  readonly type: "alarm";
17902
17917
  readonly scheduledTime: Date;
17903
17918
  }
17919
+ interface OnHibernateEventInfo {
17920
+ readonly type: "onHibernate";
17921
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
17922
+ }
17904
17923
  interface QueueEventInfo {
17905
17924
  readonly type: "queue";
17906
17925
  readonly queueName: string;
@@ -17988,6 +18007,7 @@ declare namespace TailStream {
17988
18007
  | JsRpcEventInfo
17989
18008
  | ScheduledEventInfo
17990
18009
  | AlarmEventInfo
18010
+ | OnHibernateEventInfo
17991
18011
  | QueueEventInfo
17992
18012
  | EmailEventInfo
17993
18013
  | TraceEventInfo
@@ -3424,6 +3424,7 @@ export interface TraceItem {
3424
3424
  | TraceItemConnectEventInfo
3425
3425
  | TraceItemScheduledEventInfo
3426
3426
  | TraceItemAlarmEventInfo
3427
+ | TraceItemOnHibernateEventInfo
3427
3428
  | TraceItemQueueEventInfo
3428
3429
  | TraceItemEmailEventInfo
3429
3430
  | TraceItemTailEventInfo
@@ -3490,6 +3491,9 @@ export interface TraceItemFetchEventInfoResponse {
3490
3491
  export interface TraceItemJsRpcEventInfo {
3491
3492
  readonly rpcMethod: string;
3492
3493
  }
3494
+ export interface TraceItemOnHibernateEventInfo {
3495
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
3496
+ }
3493
3497
  export interface TraceItemHibernatableWebSocketEventInfo {
3494
3498
  readonly getWebSocketEvent:
3495
3499
  | TraceItemHibernatableWebSocketEventInfoMessage
@@ -4950,6 +4954,11 @@ export interface Tracing {
4950
4954
  ): T;
4951
4955
  startSpan(name: string): Span;
4952
4956
  getActiveSpan(): Span | undefined;
4957
+ withActiveSpan<T, A extends unknown[]>(
4958
+ span: Span,
4959
+ callback: (...args: A) => T,
4960
+ ...args: A
4961
+ ): T;
4953
4962
  Span: typeof Span;
4954
4963
  }
4955
4964
  export declare abstract class Span {
@@ -16462,6 +16471,12 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
16462
16471
  }
16463
16472
  export interface RateLimitOptions {
16464
16473
  key: string;
16474
+ /**
16475
+ * Amount to add to the counter for this call. Must be a positive integer;
16476
+ * defaults to `1`. The call is allowed while the counter is below the limit,
16477
+ * even if `delta` takes it past the limit.
16478
+ */
16479
+ delta?: number;
16465
16480
  }
16466
16481
  export interface RateLimitOutcome {
16467
16482
  success: boolean;
@@ -17801,6 +17816,10 @@ export declare namespace TailStream {
17801
17816
  readonly type: "alarm";
17802
17817
  readonly scheduledTime: Date;
17803
17818
  }
17819
+ interface OnHibernateEventInfo {
17820
+ readonly type: "onHibernate";
17821
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
17822
+ }
17804
17823
  interface QueueEventInfo {
17805
17824
  readonly type: "queue";
17806
17825
  readonly queueName: string;
@@ -17888,6 +17907,7 @@ export declare namespace TailStream {
17888
17907
  | JsRpcEventInfo
17889
17908
  | ScheduledEventInfo
17890
17909
  | AlarmEventInfo
17910
+ | OnHibernateEventInfo
17891
17911
  | QueueEventInfo
17892
17912
  | EmailEventInfo
17893
17913
  | TraceEventInfo
package/index.d.ts CHANGED
@@ -3263,6 +3263,7 @@ interface TraceItem {
3263
3263
  | TraceItemConnectEventInfo
3264
3264
  | TraceItemScheduledEventInfo
3265
3265
  | TraceItemAlarmEventInfo
3266
+ | TraceItemOnHibernateEventInfo
3266
3267
  | TraceItemQueueEventInfo
3267
3268
  | TraceItemEmailEventInfo
3268
3269
  | TraceItemTailEventInfo
@@ -3329,6 +3330,9 @@ interface TraceItemFetchEventInfoResponse {
3329
3330
  interface TraceItemJsRpcEventInfo {
3330
3331
  readonly rpcMethod: string;
3331
3332
  }
3333
+ interface TraceItemOnHibernateEventInfo {
3334
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
3335
+ }
3332
3336
  interface TraceItemHibernatableWebSocketEventInfo {
3333
3337
  readonly getWebSocketEvent:
3334
3338
  | TraceItemHibernatableWebSocketEventInfoMessage
@@ -4583,6 +4587,11 @@ interface Tracing {
4583
4587
  ): T;
4584
4588
  startSpan(name: string): Span;
4585
4589
  getActiveSpan(): Span | undefined;
4590
+ withActiveSpan<T, A extends unknown[]>(
4591
+ span: Span,
4592
+ callback: (...args: A) => T,
4593
+ ...args: A
4594
+ ): T;
4586
4595
  Span: typeof Span;
4587
4596
  }
4588
4597
  declare abstract class Span {
@@ -16191,6 +16200,12 @@ interface JsonWebKeyWithKid extends JsonWebKey {
16191
16200
  }
16192
16201
  interface RateLimitOptions {
16193
16202
  key: string;
16203
+ /**
16204
+ * Amount to add to the counter for this call. Must be a positive integer;
16205
+ * defaults to `1`. The call is allowed while the counter is below the limit,
16206
+ * even if `delta` takes it past the limit.
16207
+ */
16208
+ delta?: number;
16194
16209
  }
16195
16210
  interface RateLimitOutcome {
16196
16211
  success: boolean;
@@ -17540,6 +17555,10 @@ declare namespace TailStream {
17540
17555
  readonly type: "alarm";
17541
17556
  readonly scheduledTime: Date;
17542
17557
  }
17558
+ interface OnHibernateEventInfo {
17559
+ readonly type: "onHibernate";
17560
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
17561
+ }
17543
17562
  interface QueueEventInfo {
17544
17563
  readonly type: "queue";
17545
17564
  readonly queueName: string;
@@ -17627,6 +17646,7 @@ declare namespace TailStream {
17627
17646
  | JsRpcEventInfo
17628
17647
  | ScheduledEventInfo
17629
17648
  | AlarmEventInfo
17649
+ | OnHibernateEventInfo
17630
17650
  | QueueEventInfo
17631
17651
  | EmailEventInfo
17632
17652
  | TraceEventInfo
package/index.ts CHANGED
@@ -3272,6 +3272,7 @@ export interface TraceItem {
3272
3272
  | TraceItemConnectEventInfo
3273
3273
  | TraceItemScheduledEventInfo
3274
3274
  | TraceItemAlarmEventInfo
3275
+ | TraceItemOnHibernateEventInfo
3275
3276
  | TraceItemQueueEventInfo
3276
3277
  | TraceItemEmailEventInfo
3277
3278
  | TraceItemTailEventInfo
@@ -3338,6 +3339,9 @@ export interface TraceItemFetchEventInfoResponse {
3338
3339
  export interface TraceItemJsRpcEventInfo {
3339
3340
  readonly rpcMethod: string;
3340
3341
  }
3342
+ export interface TraceItemOnHibernateEventInfo {
3343
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
3344
+ }
3341
3345
  export interface TraceItemHibernatableWebSocketEventInfo {
3342
3346
  readonly getWebSocketEvent:
3343
3347
  | TraceItemHibernatableWebSocketEventInfoMessage
@@ -4592,6 +4596,11 @@ export interface Tracing {
4592
4596
  ): T;
4593
4597
  startSpan(name: string): Span;
4594
4598
  getActiveSpan(): Span | undefined;
4599
+ withActiveSpan<T, A extends unknown[]>(
4600
+ span: Span,
4601
+ callback: (...args: A) => T,
4602
+ ...args: A
4603
+ ): T;
4595
4604
  Span: typeof Span;
4596
4605
  }
4597
4606
  export declare abstract class Span {
@@ -16104,6 +16113,12 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
16104
16113
  }
16105
16114
  export interface RateLimitOptions {
16106
16115
  key: string;
16116
+ /**
16117
+ * Amount to add to the counter for this call. Must be a positive integer;
16118
+ * defaults to `1`. The call is allowed while the counter is below the limit,
16119
+ * even if `delta` takes it past the limit.
16120
+ */
16121
+ delta?: number;
16107
16122
  }
16108
16123
  export interface RateLimitOutcome {
16109
16124
  success: boolean;
@@ -17443,6 +17458,10 @@ export declare namespace TailStream {
17443
17458
  readonly type: "alarm";
17444
17459
  readonly scheduledTime: Date;
17445
17460
  }
17461
+ interface OnHibernateEventInfo {
17462
+ readonly type: "onHibernate";
17463
+ readonly reason: "inactive" | "codeUpdated" | "system" | (string & {});
17464
+ }
17446
17465
  interface QueueEventInfo {
17447
17466
  readonly type: "queue";
17448
17467
  readonly queueName: string;
@@ -17530,6 +17549,7 @@ export declare namespace TailStream {
17530
17549
  | JsRpcEventInfo
17531
17550
  | ScheduledEventInfo
17532
17551
  | AlarmEventInfo
17552
+ | OnHibernateEventInfo
17533
17553
  | QueueEventInfo
17534
17554
  | EmailEventInfo
17535
17555
  | TraceEventInfo
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": "5.20261104.1"
10
+ "version": "5.20261106.1"
11
11
  }