@cloudflare/workers-types 4.20240903.0 → 4.20240909.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/2021-11-03/index.d.ts +44 -0
- package/2021-11-03/index.ts +44 -0
- package/2022-01-31/index.d.ts +44 -0
- package/2022-01-31/index.ts +44 -0
- package/2022-03-21/index.d.ts +44 -0
- package/2022-03-21/index.ts +44 -0
- package/2022-08-04/index.d.ts +44 -0
- package/2022-08-04/index.ts +44 -0
- package/2022-10-31/index.d.ts +44 -0
- package/2022-10-31/index.ts +44 -0
- package/2022-11-30/index.d.ts +44 -0
- package/2022-11-30/index.ts +44 -0
- package/2023-03-01/index.d.ts +44 -0
- package/2023-03-01/index.ts +44 -0
- package/2023-07-01/index.d.ts +44 -0
- package/2023-07-01/index.ts +44 -0
- package/experimental/index.d.ts +22 -0
- package/experimental/index.ts +22 -0
- package/index.d.ts +44 -0
- package/index.ts +44 -0
- package/oldest/index.d.ts +44 -0
- package/oldest/index.ts +44 -0
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -539,6 +539,7 @@ interface DurableObjectState {
|
|
|
539
539
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
540
540
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
541
541
|
getTags(ws: WebSocket): string[];
|
|
542
|
+
abort(reason?: string): void;
|
|
542
543
|
}
|
|
543
544
|
interface DurableObjectTransaction {
|
|
544
545
|
get<T = unknown>(
|
|
@@ -605,7 +606,11 @@ interface DurableObjectStorage {
|
|
|
605
606
|
): Promise<void>;
|
|
606
607
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
607
608
|
sync(): Promise<void>;
|
|
609
|
+
sql: SqlStorage;
|
|
608
610
|
transactionSync<T>(closure: () => T): T;
|
|
611
|
+
getCurrentBookmark(): Promise<string>;
|
|
612
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
613
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
609
614
|
}
|
|
610
615
|
interface DurableObjectListOptions {
|
|
611
616
|
start?: string;
|
|
@@ -2713,6 +2718,23 @@ declare const WebSocketPair: {
|
|
|
2713
2718
|
1: WebSocket;
|
|
2714
2719
|
};
|
|
2715
2720
|
};
|
|
2721
|
+
interface SqlStorage {
|
|
2722
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2723
|
+
prepare(query: string): SqlStorageStatement;
|
|
2724
|
+
get databaseSize(): number;
|
|
2725
|
+
Cursor: typeof SqlStorageCursor;
|
|
2726
|
+
Statement: typeof SqlStorageStatement;
|
|
2727
|
+
}
|
|
2728
|
+
declare abstract class SqlStorageStatement {}
|
|
2729
|
+
declare abstract class SqlStorageCursor {
|
|
2730
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2731
|
+
get columnNames(): string[];
|
|
2732
|
+
get rowsRead(): number;
|
|
2733
|
+
get rowsWritten(): number;
|
|
2734
|
+
[Symbol.iterator](): IterableIterator<
|
|
2735
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2736
|
+
>;
|
|
2737
|
+
}
|
|
2716
2738
|
interface Socket {
|
|
2717
2739
|
get readable(): ReadableStream;
|
|
2718
2740
|
get writable(): WritableStream;
|
|
@@ -4902,6 +4924,18 @@ declare abstract class PipelineTransform {
|
|
|
4902
4924
|
*/
|
|
4903
4925
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4904
4926
|
}
|
|
4927
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4928
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4929
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4930
|
+
interface Pipeline {
|
|
4931
|
+
/**
|
|
4932
|
+
* send takes an array of javascript objects which are
|
|
4933
|
+
* then received by the pipeline for processing
|
|
4934
|
+
*
|
|
4935
|
+
* @param data The data to be sent
|
|
4936
|
+
*/
|
|
4937
|
+
send(data: object[]): Promise<void>;
|
|
4938
|
+
}
|
|
4905
4939
|
// PubSubMessage represents an incoming PubSub message.
|
|
4906
4940
|
// The message includes metadata about the broker, the client, and the payload
|
|
4907
4941
|
// itself.
|
|
@@ -5495,3 +5529,13 @@ interface DispatchNamespace {
|
|
|
5495
5529
|
options?: DynamicDispatchOptions,
|
|
5496
5530
|
): Fetcher;
|
|
5497
5531
|
}
|
|
5532
|
+
/**
|
|
5533
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5534
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5535
|
+
*/
|
|
5536
|
+
declare class NonRetryableError extends Error {
|
|
5537
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5538
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5539
|
+
// (at least, in a direct way)
|
|
5540
|
+
public constructor(message: string, name?: string);
|
|
5541
|
+
}
|
package/2021-11-03/index.ts
CHANGED
|
@@ -544,6 +544,7 @@ export interface DurableObjectState {
|
|
|
544
544
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
545
545
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
546
546
|
getTags(ws: WebSocket): string[];
|
|
547
|
+
abort(reason?: string): void;
|
|
547
548
|
}
|
|
548
549
|
export interface DurableObjectTransaction {
|
|
549
550
|
get<T = unknown>(
|
|
@@ -610,7 +611,11 @@ export interface DurableObjectStorage {
|
|
|
610
611
|
): Promise<void>;
|
|
611
612
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
612
613
|
sync(): Promise<void>;
|
|
614
|
+
sql: SqlStorage;
|
|
613
615
|
transactionSync<T>(closure: () => T): T;
|
|
616
|
+
getCurrentBookmark(): Promise<string>;
|
|
617
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
618
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
614
619
|
}
|
|
615
620
|
export interface DurableObjectListOptions {
|
|
616
621
|
start?: string;
|
|
@@ -2722,6 +2727,23 @@ export declare const WebSocketPair: {
|
|
|
2722
2727
|
1: WebSocket;
|
|
2723
2728
|
};
|
|
2724
2729
|
};
|
|
2730
|
+
export interface SqlStorage {
|
|
2731
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2732
|
+
prepare(query: string): SqlStorageStatement;
|
|
2733
|
+
get databaseSize(): number;
|
|
2734
|
+
Cursor: typeof SqlStorageCursor;
|
|
2735
|
+
Statement: typeof SqlStorageStatement;
|
|
2736
|
+
}
|
|
2737
|
+
export declare abstract class SqlStorageStatement {}
|
|
2738
|
+
export declare abstract class SqlStorageCursor {
|
|
2739
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2740
|
+
get columnNames(): string[];
|
|
2741
|
+
get rowsRead(): number;
|
|
2742
|
+
get rowsWritten(): number;
|
|
2743
|
+
[Symbol.iterator](): IterableIterator<
|
|
2744
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2745
|
+
>;
|
|
2746
|
+
}
|
|
2725
2747
|
export interface Socket {
|
|
2726
2748
|
get readable(): ReadableStream;
|
|
2727
2749
|
get writable(): WritableStream;
|
|
@@ -4914,6 +4936,18 @@ export declare abstract class PipelineTransform {
|
|
|
4914
4936
|
*/
|
|
4915
4937
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4916
4938
|
}
|
|
4939
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4940
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4941
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4942
|
+
export interface Pipeline {
|
|
4943
|
+
/**
|
|
4944
|
+
* send takes an array of javascript objects which are
|
|
4945
|
+
* then received by the pipeline for processing
|
|
4946
|
+
*
|
|
4947
|
+
* @param data The data to be sent
|
|
4948
|
+
*/
|
|
4949
|
+
send(data: object[]): Promise<void>;
|
|
4950
|
+
}
|
|
4917
4951
|
// PubSubMessage represents an incoming PubSub message.
|
|
4918
4952
|
// The message includes metadata about the broker, the client, and the payload
|
|
4919
4953
|
// itself.
|
|
@@ -5410,3 +5444,13 @@ export interface DispatchNamespace {
|
|
|
5410
5444
|
options?: DynamicDispatchOptions,
|
|
5411
5445
|
): Fetcher;
|
|
5412
5446
|
}
|
|
5447
|
+
/**
|
|
5448
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5449
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5450
|
+
*/
|
|
5451
|
+
export declare class NonRetryableError extends Error {
|
|
5452
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5453
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5454
|
+
// (at least, in a direct way)
|
|
5455
|
+
public constructor(message: string, name?: string);
|
|
5456
|
+
}
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -539,6 +539,7 @@ interface DurableObjectState {
|
|
|
539
539
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
540
540
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
541
541
|
getTags(ws: WebSocket): string[];
|
|
542
|
+
abort(reason?: string): void;
|
|
542
543
|
}
|
|
543
544
|
interface DurableObjectTransaction {
|
|
544
545
|
get<T = unknown>(
|
|
@@ -605,7 +606,11 @@ interface DurableObjectStorage {
|
|
|
605
606
|
): Promise<void>;
|
|
606
607
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
607
608
|
sync(): Promise<void>;
|
|
609
|
+
sql: SqlStorage;
|
|
608
610
|
transactionSync<T>(closure: () => T): T;
|
|
611
|
+
getCurrentBookmark(): Promise<string>;
|
|
612
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
613
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
609
614
|
}
|
|
610
615
|
interface DurableObjectListOptions {
|
|
611
616
|
start?: string;
|
|
@@ -2739,6 +2744,23 @@ declare const WebSocketPair: {
|
|
|
2739
2744
|
1: WebSocket;
|
|
2740
2745
|
};
|
|
2741
2746
|
};
|
|
2747
|
+
interface SqlStorage {
|
|
2748
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2749
|
+
prepare(query: string): SqlStorageStatement;
|
|
2750
|
+
get databaseSize(): number;
|
|
2751
|
+
Cursor: typeof SqlStorageCursor;
|
|
2752
|
+
Statement: typeof SqlStorageStatement;
|
|
2753
|
+
}
|
|
2754
|
+
declare abstract class SqlStorageStatement {}
|
|
2755
|
+
declare abstract class SqlStorageCursor {
|
|
2756
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2757
|
+
get columnNames(): string[];
|
|
2758
|
+
get rowsRead(): number;
|
|
2759
|
+
get rowsWritten(): number;
|
|
2760
|
+
[Symbol.iterator](): IterableIterator<
|
|
2761
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2762
|
+
>;
|
|
2763
|
+
}
|
|
2742
2764
|
interface Socket {
|
|
2743
2765
|
get readable(): ReadableStream;
|
|
2744
2766
|
get writable(): WritableStream;
|
|
@@ -4928,6 +4950,18 @@ declare abstract class PipelineTransform {
|
|
|
4928
4950
|
*/
|
|
4929
4951
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4930
4952
|
}
|
|
4953
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4954
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4955
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4956
|
+
interface Pipeline {
|
|
4957
|
+
/**
|
|
4958
|
+
* send takes an array of javascript objects which are
|
|
4959
|
+
* then received by the pipeline for processing
|
|
4960
|
+
*
|
|
4961
|
+
* @param data The data to be sent
|
|
4962
|
+
*/
|
|
4963
|
+
send(data: object[]): Promise<void>;
|
|
4964
|
+
}
|
|
4931
4965
|
// PubSubMessage represents an incoming PubSub message.
|
|
4932
4966
|
// The message includes metadata about the broker, the client, and the payload
|
|
4933
4967
|
// itself.
|
|
@@ -5521,3 +5555,13 @@ interface DispatchNamespace {
|
|
|
5521
5555
|
options?: DynamicDispatchOptions,
|
|
5522
5556
|
): Fetcher;
|
|
5523
5557
|
}
|
|
5558
|
+
/**
|
|
5559
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5560
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5561
|
+
*/
|
|
5562
|
+
declare class NonRetryableError extends Error {
|
|
5563
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5564
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5565
|
+
// (at least, in a direct way)
|
|
5566
|
+
public constructor(message: string, name?: string);
|
|
5567
|
+
}
|
package/2022-01-31/index.ts
CHANGED
|
@@ -544,6 +544,7 @@ export interface DurableObjectState {
|
|
|
544
544
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
545
545
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
546
546
|
getTags(ws: WebSocket): string[];
|
|
547
|
+
abort(reason?: string): void;
|
|
547
548
|
}
|
|
548
549
|
export interface DurableObjectTransaction {
|
|
549
550
|
get<T = unknown>(
|
|
@@ -610,7 +611,11 @@ export interface DurableObjectStorage {
|
|
|
610
611
|
): Promise<void>;
|
|
611
612
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
612
613
|
sync(): Promise<void>;
|
|
614
|
+
sql: SqlStorage;
|
|
613
615
|
transactionSync<T>(closure: () => T): T;
|
|
616
|
+
getCurrentBookmark(): Promise<string>;
|
|
617
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
618
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
614
619
|
}
|
|
615
620
|
export interface DurableObjectListOptions {
|
|
616
621
|
start?: string;
|
|
@@ -2748,6 +2753,23 @@ export declare const WebSocketPair: {
|
|
|
2748
2753
|
1: WebSocket;
|
|
2749
2754
|
};
|
|
2750
2755
|
};
|
|
2756
|
+
export interface SqlStorage {
|
|
2757
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2758
|
+
prepare(query: string): SqlStorageStatement;
|
|
2759
|
+
get databaseSize(): number;
|
|
2760
|
+
Cursor: typeof SqlStorageCursor;
|
|
2761
|
+
Statement: typeof SqlStorageStatement;
|
|
2762
|
+
}
|
|
2763
|
+
export declare abstract class SqlStorageStatement {}
|
|
2764
|
+
export declare abstract class SqlStorageCursor {
|
|
2765
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2766
|
+
get columnNames(): string[];
|
|
2767
|
+
get rowsRead(): number;
|
|
2768
|
+
get rowsWritten(): number;
|
|
2769
|
+
[Symbol.iterator](): IterableIterator<
|
|
2770
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2771
|
+
>;
|
|
2772
|
+
}
|
|
2751
2773
|
export interface Socket {
|
|
2752
2774
|
get readable(): ReadableStream;
|
|
2753
2775
|
get writable(): WritableStream;
|
|
@@ -4940,6 +4962,18 @@ export declare abstract class PipelineTransform {
|
|
|
4940
4962
|
*/
|
|
4941
4963
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4942
4964
|
}
|
|
4965
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4966
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4967
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4968
|
+
export interface Pipeline {
|
|
4969
|
+
/**
|
|
4970
|
+
* send takes an array of javascript objects which are
|
|
4971
|
+
* then received by the pipeline for processing
|
|
4972
|
+
*
|
|
4973
|
+
* @param data The data to be sent
|
|
4974
|
+
*/
|
|
4975
|
+
send(data: object[]): Promise<void>;
|
|
4976
|
+
}
|
|
4943
4977
|
// PubSubMessage represents an incoming PubSub message.
|
|
4944
4978
|
// The message includes metadata about the broker, the client, and the payload
|
|
4945
4979
|
// itself.
|
|
@@ -5436,3 +5470,13 @@ export interface DispatchNamespace {
|
|
|
5436
5470
|
options?: DynamicDispatchOptions,
|
|
5437
5471
|
): Fetcher;
|
|
5438
5472
|
}
|
|
5473
|
+
/**
|
|
5474
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5475
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5476
|
+
*/
|
|
5477
|
+
export declare class NonRetryableError extends Error {
|
|
5478
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5479
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5480
|
+
// (at least, in a direct way)
|
|
5481
|
+
public constructor(message: string, name?: string);
|
|
5482
|
+
}
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -556,6 +556,7 @@ interface DurableObjectState {
|
|
|
556
556
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
557
557
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
558
558
|
getTags(ws: WebSocket): string[];
|
|
559
|
+
abort(reason?: string): void;
|
|
559
560
|
}
|
|
560
561
|
interface DurableObjectTransaction {
|
|
561
562
|
get<T = unknown>(
|
|
@@ -622,7 +623,11 @@ interface DurableObjectStorage {
|
|
|
622
623
|
): Promise<void>;
|
|
623
624
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
624
625
|
sync(): Promise<void>;
|
|
626
|
+
sql: SqlStorage;
|
|
625
627
|
transactionSync<T>(closure: () => T): T;
|
|
628
|
+
getCurrentBookmark(): Promise<string>;
|
|
629
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
630
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
626
631
|
}
|
|
627
632
|
interface DurableObjectListOptions {
|
|
628
633
|
start?: string;
|
|
@@ -2756,6 +2761,23 @@ declare const WebSocketPair: {
|
|
|
2756
2761
|
1: WebSocket;
|
|
2757
2762
|
};
|
|
2758
2763
|
};
|
|
2764
|
+
interface SqlStorage {
|
|
2765
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2766
|
+
prepare(query: string): SqlStorageStatement;
|
|
2767
|
+
get databaseSize(): number;
|
|
2768
|
+
Cursor: typeof SqlStorageCursor;
|
|
2769
|
+
Statement: typeof SqlStorageStatement;
|
|
2770
|
+
}
|
|
2771
|
+
declare abstract class SqlStorageStatement {}
|
|
2772
|
+
declare abstract class SqlStorageCursor {
|
|
2773
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2774
|
+
get columnNames(): string[];
|
|
2775
|
+
get rowsRead(): number;
|
|
2776
|
+
get rowsWritten(): number;
|
|
2777
|
+
[Symbol.iterator](): IterableIterator<
|
|
2778
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2779
|
+
>;
|
|
2780
|
+
}
|
|
2759
2781
|
interface Socket {
|
|
2760
2782
|
get readable(): ReadableStream;
|
|
2761
2783
|
get writable(): WritableStream;
|
|
@@ -4952,6 +4974,18 @@ declare abstract class PipelineTransform {
|
|
|
4952
4974
|
*/
|
|
4953
4975
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4954
4976
|
}
|
|
4977
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4978
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4979
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4980
|
+
interface Pipeline {
|
|
4981
|
+
/**
|
|
4982
|
+
* send takes an array of javascript objects which are
|
|
4983
|
+
* then received by the pipeline for processing
|
|
4984
|
+
*
|
|
4985
|
+
* @param data The data to be sent
|
|
4986
|
+
*/
|
|
4987
|
+
send(data: object[]): Promise<void>;
|
|
4988
|
+
}
|
|
4955
4989
|
// PubSubMessage represents an incoming PubSub message.
|
|
4956
4990
|
// The message includes metadata about the broker, the client, and the payload
|
|
4957
4991
|
// itself.
|
|
@@ -5545,3 +5579,13 @@ interface DispatchNamespace {
|
|
|
5545
5579
|
options?: DynamicDispatchOptions,
|
|
5546
5580
|
): Fetcher;
|
|
5547
5581
|
}
|
|
5582
|
+
/**
|
|
5583
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5584
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5585
|
+
*/
|
|
5586
|
+
declare class NonRetryableError extends Error {
|
|
5587
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5588
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5589
|
+
// (at least, in a direct way)
|
|
5590
|
+
public constructor(message: string, name?: string);
|
|
5591
|
+
}
|
package/2022-03-21/index.ts
CHANGED
|
@@ -561,6 +561,7 @@ export interface DurableObjectState {
|
|
|
561
561
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
562
562
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
563
563
|
getTags(ws: WebSocket): string[];
|
|
564
|
+
abort(reason?: string): void;
|
|
564
565
|
}
|
|
565
566
|
export interface DurableObjectTransaction {
|
|
566
567
|
get<T = unknown>(
|
|
@@ -627,7 +628,11 @@ export interface DurableObjectStorage {
|
|
|
627
628
|
): Promise<void>;
|
|
628
629
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
629
630
|
sync(): Promise<void>;
|
|
631
|
+
sql: SqlStorage;
|
|
630
632
|
transactionSync<T>(closure: () => T): T;
|
|
633
|
+
getCurrentBookmark(): Promise<string>;
|
|
634
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
635
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
631
636
|
}
|
|
632
637
|
export interface DurableObjectListOptions {
|
|
633
638
|
start?: string;
|
|
@@ -2765,6 +2770,23 @@ export declare const WebSocketPair: {
|
|
|
2765
2770
|
1: WebSocket;
|
|
2766
2771
|
};
|
|
2767
2772
|
};
|
|
2773
|
+
export interface SqlStorage {
|
|
2774
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2775
|
+
prepare(query: string): SqlStorageStatement;
|
|
2776
|
+
get databaseSize(): number;
|
|
2777
|
+
Cursor: typeof SqlStorageCursor;
|
|
2778
|
+
Statement: typeof SqlStorageStatement;
|
|
2779
|
+
}
|
|
2780
|
+
export declare abstract class SqlStorageStatement {}
|
|
2781
|
+
export declare abstract class SqlStorageCursor {
|
|
2782
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2783
|
+
get columnNames(): string[];
|
|
2784
|
+
get rowsRead(): number;
|
|
2785
|
+
get rowsWritten(): number;
|
|
2786
|
+
[Symbol.iterator](): IterableIterator<
|
|
2787
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2788
|
+
>;
|
|
2789
|
+
}
|
|
2768
2790
|
export interface Socket {
|
|
2769
2791
|
get readable(): ReadableStream;
|
|
2770
2792
|
get writable(): WritableStream;
|
|
@@ -4964,6 +4986,18 @@ export declare abstract class PipelineTransform {
|
|
|
4964
4986
|
*/
|
|
4965
4987
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4966
4988
|
}
|
|
4989
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4990
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4991
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4992
|
+
export interface Pipeline {
|
|
4993
|
+
/**
|
|
4994
|
+
* send takes an array of javascript objects which are
|
|
4995
|
+
* then received by the pipeline for processing
|
|
4996
|
+
*
|
|
4997
|
+
* @param data The data to be sent
|
|
4998
|
+
*/
|
|
4999
|
+
send(data: object[]): Promise<void>;
|
|
5000
|
+
}
|
|
4967
5001
|
// PubSubMessage represents an incoming PubSub message.
|
|
4968
5002
|
// The message includes metadata about the broker, the client, and the payload
|
|
4969
5003
|
// itself.
|
|
@@ -5460,3 +5494,13 @@ export interface DispatchNamespace {
|
|
|
5460
5494
|
options?: DynamicDispatchOptions,
|
|
5461
5495
|
): Fetcher;
|
|
5462
5496
|
}
|
|
5497
|
+
/**
|
|
5498
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5499
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5500
|
+
*/
|
|
5501
|
+
export declare class NonRetryableError extends Error {
|
|
5502
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5503
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5504
|
+
// (at least, in a direct way)
|
|
5505
|
+
public constructor(message: string, name?: string);
|
|
5506
|
+
}
|
package/2022-08-04/index.d.ts
CHANGED
|
@@ -556,6 +556,7 @@ interface DurableObjectState {
|
|
|
556
556
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
557
557
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
558
558
|
getTags(ws: WebSocket): string[];
|
|
559
|
+
abort(reason?: string): void;
|
|
559
560
|
}
|
|
560
561
|
interface DurableObjectTransaction {
|
|
561
562
|
get<T = unknown>(
|
|
@@ -622,7 +623,11 @@ interface DurableObjectStorage {
|
|
|
622
623
|
): Promise<void>;
|
|
623
624
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
624
625
|
sync(): Promise<void>;
|
|
626
|
+
sql: SqlStorage;
|
|
625
627
|
transactionSync<T>(closure: () => T): T;
|
|
628
|
+
getCurrentBookmark(): Promise<string>;
|
|
629
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
630
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
626
631
|
}
|
|
627
632
|
interface DurableObjectListOptions {
|
|
628
633
|
start?: string;
|
|
@@ -2757,6 +2762,23 @@ declare const WebSocketPair: {
|
|
|
2757
2762
|
1: WebSocket;
|
|
2758
2763
|
};
|
|
2759
2764
|
};
|
|
2765
|
+
interface SqlStorage {
|
|
2766
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2767
|
+
prepare(query: string): SqlStorageStatement;
|
|
2768
|
+
get databaseSize(): number;
|
|
2769
|
+
Cursor: typeof SqlStorageCursor;
|
|
2770
|
+
Statement: typeof SqlStorageStatement;
|
|
2771
|
+
}
|
|
2772
|
+
declare abstract class SqlStorageStatement {}
|
|
2773
|
+
declare abstract class SqlStorageCursor {
|
|
2774
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2775
|
+
get columnNames(): string[];
|
|
2776
|
+
get rowsRead(): number;
|
|
2777
|
+
get rowsWritten(): number;
|
|
2778
|
+
[Symbol.iterator](): IterableIterator<
|
|
2779
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2780
|
+
>;
|
|
2781
|
+
}
|
|
2760
2782
|
interface Socket {
|
|
2761
2783
|
get readable(): ReadableStream;
|
|
2762
2784
|
get writable(): WritableStream;
|
|
@@ -4953,6 +4975,18 @@ declare abstract class PipelineTransform {
|
|
|
4953
4975
|
*/
|
|
4954
4976
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4955
4977
|
}
|
|
4978
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4979
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4980
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4981
|
+
interface Pipeline {
|
|
4982
|
+
/**
|
|
4983
|
+
* send takes an array of javascript objects which are
|
|
4984
|
+
* then received by the pipeline for processing
|
|
4985
|
+
*
|
|
4986
|
+
* @param data The data to be sent
|
|
4987
|
+
*/
|
|
4988
|
+
send(data: object[]): Promise<void>;
|
|
4989
|
+
}
|
|
4956
4990
|
// PubSubMessage represents an incoming PubSub message.
|
|
4957
4991
|
// The message includes metadata about the broker, the client, and the payload
|
|
4958
4992
|
// itself.
|
|
@@ -5546,3 +5580,13 @@ interface DispatchNamespace {
|
|
|
5546
5580
|
options?: DynamicDispatchOptions,
|
|
5547
5581
|
): Fetcher;
|
|
5548
5582
|
}
|
|
5583
|
+
/**
|
|
5584
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5585
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5586
|
+
*/
|
|
5587
|
+
declare class NonRetryableError extends Error {
|
|
5588
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5589
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5590
|
+
// (at least, in a direct way)
|
|
5591
|
+
public constructor(message: string, name?: string);
|
|
5592
|
+
}
|
package/2022-08-04/index.ts
CHANGED
|
@@ -561,6 +561,7 @@ export interface DurableObjectState {
|
|
|
561
561
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
562
562
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
563
563
|
getTags(ws: WebSocket): string[];
|
|
564
|
+
abort(reason?: string): void;
|
|
564
565
|
}
|
|
565
566
|
export interface DurableObjectTransaction {
|
|
566
567
|
get<T = unknown>(
|
|
@@ -627,7 +628,11 @@ export interface DurableObjectStorage {
|
|
|
627
628
|
): Promise<void>;
|
|
628
629
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
629
630
|
sync(): Promise<void>;
|
|
631
|
+
sql: SqlStorage;
|
|
630
632
|
transactionSync<T>(closure: () => T): T;
|
|
633
|
+
getCurrentBookmark(): Promise<string>;
|
|
634
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
635
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
631
636
|
}
|
|
632
637
|
export interface DurableObjectListOptions {
|
|
633
638
|
start?: string;
|
|
@@ -2766,6 +2771,23 @@ export declare const WebSocketPair: {
|
|
|
2766
2771
|
1: WebSocket;
|
|
2767
2772
|
};
|
|
2768
2773
|
};
|
|
2774
|
+
export interface SqlStorage {
|
|
2775
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2776
|
+
prepare(query: string): SqlStorageStatement;
|
|
2777
|
+
get databaseSize(): number;
|
|
2778
|
+
Cursor: typeof SqlStorageCursor;
|
|
2779
|
+
Statement: typeof SqlStorageStatement;
|
|
2780
|
+
}
|
|
2781
|
+
export declare abstract class SqlStorageStatement {}
|
|
2782
|
+
export declare abstract class SqlStorageCursor {
|
|
2783
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2784
|
+
get columnNames(): string[];
|
|
2785
|
+
get rowsRead(): number;
|
|
2786
|
+
get rowsWritten(): number;
|
|
2787
|
+
[Symbol.iterator](): IterableIterator<
|
|
2788
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2789
|
+
>;
|
|
2790
|
+
}
|
|
2769
2791
|
export interface Socket {
|
|
2770
2792
|
get readable(): ReadableStream;
|
|
2771
2793
|
get writable(): WritableStream;
|
|
@@ -4965,6 +4987,18 @@ export declare abstract class PipelineTransform {
|
|
|
4965
4987
|
*/
|
|
4966
4988
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4967
4989
|
}
|
|
4990
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4991
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4992
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4993
|
+
export interface Pipeline {
|
|
4994
|
+
/**
|
|
4995
|
+
* send takes an array of javascript objects which are
|
|
4996
|
+
* then received by the pipeline for processing
|
|
4997
|
+
*
|
|
4998
|
+
* @param data The data to be sent
|
|
4999
|
+
*/
|
|
5000
|
+
send(data: object[]): Promise<void>;
|
|
5001
|
+
}
|
|
4968
5002
|
// PubSubMessage represents an incoming PubSub message.
|
|
4969
5003
|
// The message includes metadata about the broker, the client, and the payload
|
|
4970
5004
|
// itself.
|
|
@@ -5461,3 +5495,13 @@ export interface DispatchNamespace {
|
|
|
5461
5495
|
options?: DynamicDispatchOptions,
|
|
5462
5496
|
): Fetcher;
|
|
5463
5497
|
}
|
|
5498
|
+
/**
|
|
5499
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5500
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5501
|
+
*/
|
|
5502
|
+
export declare class NonRetryableError extends Error {
|
|
5503
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5504
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5505
|
+
// (at least, in a direct way)
|
|
5506
|
+
public constructor(message: string, name?: string);
|
|
5507
|
+
}
|
package/2022-10-31/index.d.ts
CHANGED
|
@@ -556,6 +556,7 @@ interface DurableObjectState {
|
|
|
556
556
|
setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
|
|
557
557
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
558
558
|
getTags(ws: WebSocket): string[];
|
|
559
|
+
abort(reason?: string): void;
|
|
559
560
|
}
|
|
560
561
|
interface DurableObjectTransaction {
|
|
561
562
|
get<T = unknown>(
|
|
@@ -622,7 +623,11 @@ interface DurableObjectStorage {
|
|
|
622
623
|
): Promise<void>;
|
|
623
624
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
624
625
|
sync(): Promise<void>;
|
|
626
|
+
sql: SqlStorage;
|
|
625
627
|
transactionSync<T>(closure: () => T): T;
|
|
628
|
+
getCurrentBookmark(): Promise<string>;
|
|
629
|
+
getBookmarkForTime(timestamp: number | Date): Promise<string>;
|
|
630
|
+
onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
|
|
626
631
|
}
|
|
627
632
|
interface DurableObjectListOptions {
|
|
628
633
|
start?: string;
|
|
@@ -2756,6 +2761,23 @@ declare const WebSocketPair: {
|
|
|
2756
2761
|
1: WebSocket;
|
|
2757
2762
|
};
|
|
2758
2763
|
};
|
|
2764
|
+
interface SqlStorage {
|
|
2765
|
+
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2766
|
+
prepare(query: string): SqlStorageStatement;
|
|
2767
|
+
get databaseSize(): number;
|
|
2768
|
+
Cursor: typeof SqlStorageCursor;
|
|
2769
|
+
Statement: typeof SqlStorageStatement;
|
|
2770
|
+
}
|
|
2771
|
+
declare abstract class SqlStorageStatement {}
|
|
2772
|
+
declare abstract class SqlStorageCursor {
|
|
2773
|
+
raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
|
|
2774
|
+
get columnNames(): string[];
|
|
2775
|
+
get rowsRead(): number;
|
|
2776
|
+
get rowsWritten(): number;
|
|
2777
|
+
[Symbol.iterator](): IterableIterator<
|
|
2778
|
+
Record<string, (ArrayBuffer | string | number) | null>
|
|
2779
|
+
>;
|
|
2780
|
+
}
|
|
2759
2781
|
interface Socket {
|
|
2760
2782
|
get readable(): ReadableStream;
|
|
2761
2783
|
get writable(): WritableStream;
|
|
@@ -4952,6 +4974,18 @@ declare abstract class PipelineTransform {
|
|
|
4952
4974
|
*/
|
|
4953
4975
|
public transformJson(data: object[]): Promise<object[]>;
|
|
4954
4976
|
}
|
|
4977
|
+
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
4978
|
+
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
4979
|
+
// https://opensource.org/licenses/Apache-2.0
|
|
4980
|
+
interface Pipeline {
|
|
4981
|
+
/**
|
|
4982
|
+
* send takes an array of javascript objects which are
|
|
4983
|
+
* then received by the pipeline for processing
|
|
4984
|
+
*
|
|
4985
|
+
* @param data The data to be sent
|
|
4986
|
+
*/
|
|
4987
|
+
send(data: object[]): Promise<void>;
|
|
4988
|
+
}
|
|
4955
4989
|
// PubSubMessage represents an incoming PubSub message.
|
|
4956
4990
|
// The message includes metadata about the broker, the client, and the payload
|
|
4957
4991
|
// itself.
|
|
@@ -5545,3 +5579,13 @@ interface DispatchNamespace {
|
|
|
5545
5579
|
options?: DynamicDispatchOptions,
|
|
5546
5580
|
): Fetcher;
|
|
5547
5581
|
}
|
|
5582
|
+
/**
|
|
5583
|
+
* NonRetryableError allows for a Workflow to throw a "fatal" error as in,
|
|
5584
|
+
* an error that makes the instance fail immediately without triggering a retry.
|
|
5585
|
+
*/
|
|
5586
|
+
declare class NonRetryableError extends Error {
|
|
5587
|
+
// __brand has been explicity omitted because it's a internal brand used for
|
|
5588
|
+
// the Workflows' engine and user's shouldn't be able to override it
|
|
5589
|
+
// (at least, in a direct way)
|
|
5590
|
+
public constructor(message: string, name?: string);
|
|
5591
|
+
}
|