@distilled.cloud/cloudflare 0.22.3 → 0.22.4
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/lib/services/abuse-reports.d.ts +39 -11
- package/lib/services/abuse-reports.d.ts.map +1 -1
- package/lib/services/abuse-reports.js +89 -11
- package/lib/services/abuse-reports.js.map +1 -1
- package/lib/services/accounts.d.ts +21 -1
- package/lib/services/accounts.d.ts.map +1 -1
- package/lib/services/accounts.js +33 -1
- package/lib/services/accounts.js.map +1 -1
- package/lib/services/ai.d.ts +97 -1
- package/lib/services/ai.d.ts.map +1 -1
- package/lib/services/ai.js +119 -2
- package/lib/services/ai.js.map +1 -1
- package/lib/services/bot-management.d.ts +16 -0
- package/lib/services/bot-management.d.ts.map +1 -1
- package/lib/services/bot-management.js +22 -0
- package/lib/services/bot-management.js.map +1 -1
- package/lib/services/browser-rendering.d.ts +25 -9
- package/lib/services/browser-rendering.d.ts.map +1 -1
- package/lib/services/browser-rendering.js +18 -9
- package/lib/services/browser-rendering.js.map +1 -1
- package/lib/services/cache.d.ts +11 -0
- package/lib/services/cache.d.ts.map +1 -1
- package/lib/services/cache.js +17 -1
- package/lib/services/cache.js.map +1 -1
- package/lib/services/connectivity.d.ts +18 -32
- package/lib/services/connectivity.d.ts.map +1 -1
- package/lib/services/connectivity.js +56 -66
- package/lib/services/connectivity.js.map +1 -1
- package/lib/services/d1.d.ts +18 -4
- package/lib/services/d1.d.ts.map +1 -1
- package/lib/services/d1.js +23 -5
- package/lib/services/d1.js.map +1 -1
- package/lib/services/dns.d.ts +129 -3
- package/lib/services/dns.d.ts.map +1 -1
- package/lib/services/dns.js +330 -6
- package/lib/services/dns.js.map +1 -1
- package/lib/services/magic-transit.d.ts +7 -1
- package/lib/services/magic-transit.d.ts.map +1 -1
- package/lib/services/magic-transit.js +7 -1
- package/lib/services/magic-transit.js.map +1 -1
- package/lib/services/network-interconnects.d.ts +5 -1
- package/lib/services/network-interconnects.d.ts.map +1 -1
- package/lib/services/network-interconnects.js +21 -1
- package/lib/services/network-interconnects.js.map +1 -1
- package/lib/services/queues.d.ts +6 -4
- package/lib/services/queues.d.ts.map +1 -1
- package/lib/services/queues.js +8 -4
- package/lib/services/queues.js.map +1 -1
- package/lib/services/r2.d.ts +11 -4
- package/lib/services/r2.d.ts.map +1 -1
- package/lib/services/r2.js +13 -4
- package/lib/services/r2.js.map +1 -1
- package/lib/services/resource-tagging.d.ts +4 -2
- package/lib/services/resource-tagging.d.ts.map +1 -1
- package/lib/services/resource-tagging.js +4 -1
- package/lib/services/resource-tagging.js.map +1 -1
- package/lib/services/rulesets.d.ts +510 -6
- package/lib/services/rulesets.d.ts.map +1 -1
- package/lib/services/rulesets.js +1298 -36
- package/lib/services/rulesets.js.map +1 -1
- package/lib/services/spectrum.d.ts +4 -8
- package/lib/services/spectrum.d.ts.map +1 -1
- package/lib/services/spectrum.js +12 -34
- package/lib/services/spectrum.js.map +1 -1
- package/lib/services/workers-for-platforms.d.ts +12 -2
- package/lib/services/workers-for-platforms.d.ts.map +1 -1
- package/lib/services/workers-for-platforms.js +35 -3
- package/lib/services/workers-for-platforms.js.map +1 -1
- package/lib/services/workers.d.ts +12 -2
- package/lib/services/workers.d.ts.map +1 -1
- package/lib/services/workers.js +35 -3
- package/lib/services/workers.js.map +1 -1
- package/lib/services/zero-trust.d.ts +1463 -557
- package/lib/services/zero-trust.d.ts.map +1 -1
- package/lib/services/zero-trust.js +1654 -93
- package/lib/services/zero-trust.js.map +1 -1
- package/lib/services/zones.d.ts +2 -0
- package/lib/services/zones.d.ts.map +1 -1
- package/lib/services/zones.js +1 -0
- package/lib/services/zones.js.map +1 -1
- package/package.json +2 -2
- package/src/services/abuse-reports.ts +173 -22
- package/src/services/accounts.ts +66 -2
- package/src/services/ai.ts +235 -2
- package/src/services/bot-management.ts +48 -0
- package/src/services/browser-rendering.ts +43 -18
- package/src/services/cache.ts +31 -0
- package/src/services/connectivity.ts +78 -70
- package/src/services/d1.ts +43 -8
- package/src/services/dns.ts +549 -12
- package/src/services/magic-transit.ts +14 -2
- package/src/services/network-interconnects.ts +41 -2
- package/src/services/queues.ts +16 -8
- package/src/services/r2.ts +30 -7
- package/src/services/resource-tagging.ts +8 -2
- package/src/services/rulesets.ts +3283 -963
- package/src/services/spectrum.ts +36 -52
- package/src/services/workers-for-platforms.ts +63 -4
- package/src/services/workers.ts +63 -4
- package/src/services/zero-trust.ts +3071 -478
- package/src/services/zones.ts +3 -0
|
@@ -23,7 +23,7 @@ export interface CreateContentRequest {
|
|
|
23
23
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
24
24
|
cacheTTL?: number;
|
|
25
25
|
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
26
|
-
url
|
|
26
|
+
url?: string;
|
|
27
27
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
28
28
|
actionTimeout?: number;
|
|
29
29
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -148,12 +148,14 @@ export interface CreateContentRequest {
|
|
|
148
148
|
};
|
|
149
149
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
150
150
|
waitForTimeout?: number;
|
|
151
|
+
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
152
|
+
html?: string;
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
export const CreateContentRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
154
156
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
155
157
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
156
|
-
url: Schema.String,
|
|
158
|
+
url: Schema.optional(Schema.String),
|
|
157
159
|
actionTimeout: Schema.optional(Schema.Number),
|
|
158
160
|
addScriptTag: Schema.optional(
|
|
159
161
|
Schema.Array(
|
|
@@ -322,6 +324,7 @@ export const CreateContentRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
322
324
|
}),
|
|
323
325
|
),
|
|
324
326
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
327
|
+
html: Schema.optional(Schema.String),
|
|
325
328
|
}).pipe(
|
|
326
329
|
T.Http({
|
|
327
330
|
method: "POST",
|
|
@@ -621,7 +624,7 @@ export interface CreateCrawlRequest {
|
|
|
621
624
|
| (string & {})
|
|
622
625
|
)[];
|
|
623
626
|
/** Body param: Whether to render the page or fetch static content. True by default. */
|
|
624
|
-
render?: true;
|
|
627
|
+
render?: true | false;
|
|
625
628
|
/** Body param */
|
|
626
629
|
setExtraHTTPHeaders?: Record<string, unknown>;
|
|
627
630
|
/** Body param */
|
|
@@ -854,7 +857,7 @@ export const CreateCrawlRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
854
857
|
]),
|
|
855
858
|
),
|
|
856
859
|
),
|
|
857
|
-
render: Schema.optional(Schema.
|
|
860
|
+
render: Schema.optional(Schema.Literals([true, false])),
|
|
858
861
|
setExtraHTTPHeaders: Schema.optional(
|
|
859
862
|
Schema.Record(Schema.String, Schema.Unknown),
|
|
860
863
|
),
|
|
@@ -1777,7 +1780,7 @@ export interface CreateJsonRequest {
|
|
|
1777
1780
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
1778
1781
|
cacheTTL?: number;
|
|
1779
1782
|
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
1780
|
-
html
|
|
1783
|
+
html?: string;
|
|
1781
1784
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
1782
1785
|
actionTimeout?: number;
|
|
1783
1786
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -1911,12 +1914,14 @@ export interface CreateJsonRequest {
|
|
|
1911
1914
|
};
|
|
1912
1915
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
1913
1916
|
waitForTimeout?: number;
|
|
1917
|
+
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
1918
|
+
url?: string;
|
|
1914
1919
|
}
|
|
1915
1920
|
|
|
1916
1921
|
export const CreateJsonRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1917
1922
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1918
1923
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
1919
|
-
html: Schema.String,
|
|
1924
|
+
html: Schema.optional(Schema.String),
|
|
1920
1925
|
actionTimeout: Schema.optional(Schema.Number),
|
|
1921
1926
|
addScriptTag: Schema.optional(
|
|
1922
1927
|
Schema.Array(
|
|
@@ -2105,6 +2110,7 @@ export const CreateJsonRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
2105
2110
|
}),
|
|
2106
2111
|
),
|
|
2107
2112
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
2113
|
+
url: Schema.optional(Schema.String),
|
|
2108
2114
|
}).pipe(
|
|
2109
2115
|
Schema.encodeKeys({
|
|
2110
2116
|
html: "html",
|
|
@@ -2129,6 +2135,7 @@ export const CreateJsonRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
2129
2135
|
viewport: "viewport",
|
|
2130
2136
|
waitForSelector: "waitForSelector",
|
|
2131
2137
|
waitForTimeout: "waitForTimeout",
|
|
2138
|
+
url: "url",
|
|
2132
2139
|
}),
|
|
2133
2140
|
T.Http({
|
|
2134
2141
|
method: "POST",
|
|
@@ -2168,7 +2175,7 @@ export interface CreateLinkRequest {
|
|
|
2168
2175
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
2169
2176
|
cacheTTL?: number;
|
|
2170
2177
|
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
2171
|
-
html
|
|
2178
|
+
html?: string;
|
|
2172
2179
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
2173
2180
|
actionTimeout?: number;
|
|
2174
2181
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -2297,12 +2304,14 @@ export interface CreateLinkRequest {
|
|
|
2297
2304
|
};
|
|
2298
2305
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
2299
2306
|
waitForTimeout?: number;
|
|
2307
|
+
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
2308
|
+
url?: string;
|
|
2300
2309
|
}
|
|
2301
2310
|
|
|
2302
2311
|
export const CreateLinkRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2303
2312
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2304
2313
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
2305
|
-
html: Schema.String,
|
|
2314
|
+
html: Schema.optional(Schema.String),
|
|
2306
2315
|
actionTimeout: Schema.optional(Schema.Number),
|
|
2307
2316
|
addScriptTag: Schema.optional(
|
|
2308
2317
|
Schema.Array(
|
|
@@ -2473,6 +2482,7 @@ export const CreateLinkRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
2473
2482
|
}),
|
|
2474
2483
|
),
|
|
2475
2484
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
2485
|
+
url: Schema.optional(Schema.String),
|
|
2476
2486
|
}).pipe(
|
|
2477
2487
|
T.Http({
|
|
2478
2488
|
method: "POST",
|
|
@@ -2511,7 +2521,7 @@ export interface CreateMarkdownRequest {
|
|
|
2511
2521
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
2512
2522
|
cacheTTL?: number;
|
|
2513
2523
|
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
2514
|
-
url
|
|
2524
|
+
url?: string;
|
|
2515
2525
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
2516
2526
|
actionTimeout?: number;
|
|
2517
2527
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -2636,12 +2646,14 @@ export interface CreateMarkdownRequest {
|
|
|
2636
2646
|
};
|
|
2637
2647
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
2638
2648
|
waitForTimeout?: number;
|
|
2649
|
+
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
2650
|
+
html?: string;
|
|
2639
2651
|
}
|
|
2640
2652
|
|
|
2641
2653
|
export const CreateMarkdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2642
2654
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2643
2655
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
2644
|
-
url: Schema.String,
|
|
2656
|
+
url: Schema.optional(Schema.String),
|
|
2645
2657
|
actionTimeout: Schema.optional(Schema.Number),
|
|
2646
2658
|
addScriptTag: Schema.optional(
|
|
2647
2659
|
Schema.Array(
|
|
@@ -2810,6 +2822,7 @@ export const CreateMarkdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
2810
2822
|
}),
|
|
2811
2823
|
),
|
|
2812
2824
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
2825
|
+
html: Schema.optional(Schema.String),
|
|
2813
2826
|
}).pipe(
|
|
2814
2827
|
T.Http({
|
|
2815
2828
|
method: "POST",
|
|
@@ -2847,7 +2860,7 @@ export interface CreatePdfRequest {
|
|
|
2847
2860
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
2848
2861
|
cacheTTL?: number;
|
|
2849
2862
|
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
2850
|
-
html
|
|
2863
|
+
html?: string;
|
|
2851
2864
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
2852
2865
|
actionTimeout?: number;
|
|
2853
2866
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -3008,12 +3021,14 @@ export interface CreatePdfRequest {
|
|
|
3008
3021
|
};
|
|
3009
3022
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
3010
3023
|
waitForTimeout?: number;
|
|
3024
|
+
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
3025
|
+
url?: string;
|
|
3011
3026
|
}
|
|
3012
3027
|
|
|
3013
3028
|
export const CreatePdfRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3014
3029
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3015
3030
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
3016
|
-
html: Schema.String,
|
|
3031
|
+
html: Schema.optional(Schema.String),
|
|
3017
3032
|
actionTimeout: Schema.optional(Schema.Number),
|
|
3018
3033
|
addScriptTag: Schema.optional(
|
|
3019
3034
|
Schema.Array(
|
|
@@ -3226,6 +3241,7 @@ export const CreatePdfRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
3226
3241
|
}),
|
|
3227
3242
|
),
|
|
3228
3243
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
3244
|
+
url: Schema.optional(Schema.String),
|
|
3229
3245
|
}).pipe(
|
|
3230
3246
|
T.Http({
|
|
3231
3247
|
method: "POST",
|
|
@@ -3263,7 +3279,7 @@ export interface CreateScrapeRequest {
|
|
|
3263
3279
|
/** Body param */
|
|
3264
3280
|
elements: { selector: string }[];
|
|
3265
3281
|
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
3266
|
-
html
|
|
3282
|
+
html?: string;
|
|
3267
3283
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
3268
3284
|
actionTimeout?: number;
|
|
3269
3285
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -3388,6 +3404,8 @@ export interface CreateScrapeRequest {
|
|
|
3388
3404
|
};
|
|
3389
3405
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
3390
3406
|
waitForTimeout?: number;
|
|
3407
|
+
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
3408
|
+
url?: string;
|
|
3391
3409
|
}
|
|
3392
3410
|
|
|
3393
3411
|
export const CreateScrapeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
@@ -3398,7 +3416,7 @@ export const CreateScrapeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
3398
3416
|
selector: Schema.String,
|
|
3399
3417
|
}),
|
|
3400
3418
|
),
|
|
3401
|
-
html: Schema.String,
|
|
3419
|
+
html: Schema.optional(Schema.String),
|
|
3402
3420
|
actionTimeout: Schema.optional(Schema.Number),
|
|
3403
3421
|
addScriptTag: Schema.optional(
|
|
3404
3422
|
Schema.Array(
|
|
@@ -3567,6 +3585,7 @@ export const CreateScrapeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
3567
3585
|
}),
|
|
3568
3586
|
),
|
|
3569
3587
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
3588
|
+
url: Schema.optional(Schema.String),
|
|
3570
3589
|
}).pipe(
|
|
3571
3590
|
T.Http({
|
|
3572
3591
|
method: "POST",
|
|
@@ -3632,7 +3651,7 @@ export interface CreateScreenshotRequest {
|
|
|
3632
3651
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
3633
3652
|
cacheTTL?: number;
|
|
3634
3653
|
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
3635
|
-
html
|
|
3654
|
+
html?: string;
|
|
3636
3655
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
3637
3656
|
actionTimeout?: number;
|
|
3638
3657
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -3779,13 +3798,15 @@ export interface CreateScreenshotRequest {
|
|
|
3779
3798
|
};
|
|
3780
3799
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
3781
3800
|
waitForTimeout?: number;
|
|
3801
|
+
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
3802
|
+
url?: string;
|
|
3782
3803
|
}
|
|
3783
3804
|
|
|
3784
3805
|
export const CreateScreenshotRequest =
|
|
3785
3806
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3786
3807
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3787
3808
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
3788
|
-
html: Schema.String,
|
|
3809
|
+
html: Schema.optional(Schema.String),
|
|
3789
3810
|
actionTimeout: Schema.optional(Schema.Number),
|
|
3790
3811
|
addScriptTag: Schema.optional(
|
|
3791
3812
|
Schema.Array(
|
|
@@ -3984,6 +4005,7 @@ export const CreateScreenshotRequest =
|
|
|
3984
4005
|
}),
|
|
3985
4006
|
),
|
|
3986
4007
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
4008
|
+
url: Schema.optional(Schema.String),
|
|
3987
4009
|
}).pipe(
|
|
3988
4010
|
T.Http({
|
|
3989
4011
|
method: "POST",
|
|
@@ -4036,7 +4058,7 @@ export interface CreateSnapshotRequest {
|
|
|
4036
4058
|
/** Query param: Cache TTL default is 5s. Set to 0 to disable. */
|
|
4037
4059
|
cacheTTL?: number;
|
|
4038
4060
|
/** Body param: Set the content of the page, eg: `<h1>Hello World!!</h1>`. Either `html` or `url` must be set. */
|
|
4039
|
-
html
|
|
4061
|
+
html?: string;
|
|
4040
4062
|
/** Body param: The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceed */
|
|
4041
4063
|
actionTimeout?: number;
|
|
4042
4064
|
/** Body param: Adds a `<script>` tag into the page with the desired URL or content. */
|
|
@@ -4178,12 +4200,14 @@ export interface CreateSnapshotRequest {
|
|
|
4178
4200
|
};
|
|
4179
4201
|
/** Body param: Waits for a specified timeout before continuing. */
|
|
4180
4202
|
waitForTimeout?: number;
|
|
4203
|
+
/** Body param: URL to navigate to, eg. `https://example.com`. */
|
|
4204
|
+
url?: string;
|
|
4181
4205
|
}
|
|
4182
4206
|
|
|
4183
4207
|
export const CreateSnapshotRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
4184
4208
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
4185
4209
|
cacheTTL: Schema.optional(Schema.Number).pipe(T.HttpQuery("cacheTTL")),
|
|
4186
|
-
html: Schema.String,
|
|
4210
|
+
html: Schema.optional(Schema.String),
|
|
4187
4211
|
actionTimeout: Schema.optional(Schema.Number),
|
|
4188
4212
|
addScriptTag: Schema.optional(
|
|
4189
4213
|
Schema.Array(
|
|
@@ -4374,6 +4398,7 @@ export const CreateSnapshotRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
4374
4398
|
}),
|
|
4375
4399
|
),
|
|
4376
4400
|
waitForTimeout: Schema.optional(Schema.Number),
|
|
4401
|
+
url: Schema.optional(Schema.String),
|
|
4377
4402
|
}).pipe(
|
|
4378
4403
|
T.Http({
|
|
4379
4404
|
method: "POST",
|
package/src/services/cache.ts
CHANGED
|
@@ -21,12 +21,43 @@ export interface PurgeCacheRequest {
|
|
|
21
21
|
zoneId: string;
|
|
22
22
|
/** Body param: For more information on cache tags and purging by tags, please refer to [purge by cache-tags documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/). */
|
|
23
23
|
tags?: string[];
|
|
24
|
+
/** Body param: For more information purging by hostnames, please refer to [purge by hostname documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-hostname/). */
|
|
25
|
+
hosts?: string[];
|
|
26
|
+
/** Body param: For more information on purging by prefixes, please refer to [purge by prefix documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge_by_prefix/). */
|
|
27
|
+
prefixes?: string[];
|
|
28
|
+
/** Body param: For more information, please refer to [purge everything documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/). */
|
|
29
|
+
purgeEverything?: boolean;
|
|
30
|
+
/** Body param: For more information on purging files, please refer to [purge by single-file documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/). */
|
|
31
|
+
files?: string[] | { headers?: Record<string, unknown>; url?: string }[];
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
export const PurgeCacheRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
27
35
|
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
28
36
|
tags: Schema.optional(Schema.Array(Schema.String)),
|
|
37
|
+
hosts: Schema.optional(Schema.Array(Schema.String)),
|
|
38
|
+
prefixes: Schema.optional(Schema.Array(Schema.String)),
|
|
39
|
+
purgeEverything: Schema.optional(Schema.Boolean),
|
|
40
|
+
files: Schema.optional(
|
|
41
|
+
Schema.Union([
|
|
42
|
+
Schema.Array(Schema.String),
|
|
43
|
+
Schema.Array(
|
|
44
|
+
Schema.Struct({
|
|
45
|
+
headers: Schema.optional(
|
|
46
|
+
Schema.Record(Schema.String, Schema.Unknown),
|
|
47
|
+
),
|
|
48
|
+
url: Schema.optional(Schema.String),
|
|
49
|
+
}),
|
|
50
|
+
),
|
|
51
|
+
]),
|
|
52
|
+
),
|
|
29
53
|
}).pipe(
|
|
54
|
+
Schema.encodeKeys({
|
|
55
|
+
tags: "tags",
|
|
56
|
+
hosts: "hosts",
|
|
57
|
+
prefixes: "prefixes",
|
|
58
|
+
purgeEverything: "purge_everything",
|
|
59
|
+
files: "files",
|
|
60
|
+
}),
|
|
30
61
|
T.Http({ method: "POST", path: "/zones/{zone_id}/purge_cache" }),
|
|
31
62
|
) as unknown as Schema.Schema<PurgeCacheRequest>;
|
|
32
63
|
|
|
@@ -574,14 +574,13 @@ export interface CreateDirectoryServiceRequest {
|
|
|
574
574
|
/** Path param: Account identifier */
|
|
575
575
|
accountId: string;
|
|
576
576
|
/** Body param */
|
|
577
|
-
host:
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
};
|
|
577
|
+
host: {
|
|
578
|
+
ipv4?: string;
|
|
579
|
+
network?: { tunnelId: string };
|
|
580
|
+
ipv6?: string;
|
|
581
|
+
hostname?: string;
|
|
582
|
+
resolverNetwork?: { tunnelId: string; resolverIps?: string[] | null };
|
|
583
|
+
};
|
|
585
584
|
/** Body param */
|
|
586
585
|
name: string;
|
|
587
586
|
/** Body param */
|
|
@@ -592,34 +591,26 @@ export interface CreateDirectoryServiceRequest {
|
|
|
592
591
|
httpsPort?: number | null;
|
|
593
592
|
/** Body param: TLS settings for a connectivity service. If omitted, the default mode (`verify_full`) is used. */
|
|
594
593
|
tlsSettings?: { certVerificationMode: string } | null;
|
|
594
|
+
/** Body param */
|
|
595
|
+
appProtocol?: "postgresql" | "mysql" | null;
|
|
596
|
+
/** Body param */
|
|
597
|
+
tcpPort?: number | null;
|
|
595
598
|
}
|
|
596
599
|
|
|
597
600
|
export const CreateDirectoryServiceRequest =
|
|
598
601
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
599
602
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
600
|
-
host: Schema.
|
|
601
|
-
Schema.
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
network: Schema.Struct({
|
|
605
|
-
tunnelId: Schema.String,
|
|
606
|
-
}).pipe(Schema.encodeKeys({ tunnelId: "tunnel_id" })),
|
|
607
|
-
}),
|
|
608
|
-
Schema.Struct({
|
|
609
|
-
ipv4: Schema.String,
|
|
610
|
-
network: Schema.Struct({
|
|
611
|
-
tunnelId: Schema.String,
|
|
612
|
-
}).pipe(Schema.encodeKeys({ tunnelId: "tunnel_id" })),
|
|
613
|
-
}),
|
|
614
|
-
Schema.Struct({
|
|
615
|
-
ipv6: Schema.String,
|
|
616
|
-
network: Schema.Struct({
|
|
603
|
+
host: Schema.Struct({
|
|
604
|
+
ipv4: Schema.optional(Schema.String),
|
|
605
|
+
network: Schema.optional(
|
|
606
|
+
Schema.Struct({
|
|
617
607
|
tunnelId: Schema.String,
|
|
618
608
|
}).pipe(Schema.encodeKeys({ tunnelId: "tunnel_id" })),
|
|
619
|
-
|
|
620
|
-
Schema.
|
|
621
|
-
|
|
622
|
-
|
|
609
|
+
),
|
|
610
|
+
ipv6: Schema.optional(Schema.String),
|
|
611
|
+
hostname: Schema.optional(Schema.String),
|
|
612
|
+
resolverNetwork: Schema.optional(
|
|
613
|
+
Schema.Struct({
|
|
623
614
|
tunnelId: Schema.String,
|
|
624
615
|
resolverIps: Schema.optional(
|
|
625
616
|
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
@@ -630,13 +621,16 @@ export const CreateDirectoryServiceRequest =
|
|
|
630
621
|
resolverIps: "resolver_ips",
|
|
631
622
|
}),
|
|
632
623
|
),
|
|
633
|
-
}).pipe(
|
|
634
|
-
Schema.encodeKeys({
|
|
635
|
-
hostname: "hostname",
|
|
636
|
-
resolverNetwork: "resolver_network",
|
|
637
|
-
}),
|
|
638
624
|
),
|
|
639
|
-
|
|
625
|
+
}).pipe(
|
|
626
|
+
Schema.encodeKeys({
|
|
627
|
+
ipv4: "ipv4",
|
|
628
|
+
network: "network",
|
|
629
|
+
ipv6: "ipv6",
|
|
630
|
+
hostname: "hostname",
|
|
631
|
+
resolverNetwork: "resolver_network",
|
|
632
|
+
}),
|
|
633
|
+
),
|
|
640
634
|
name: Schema.String,
|
|
641
635
|
type: Schema.Union([Schema.Literals(["tcp", "http"]), Schema.String]),
|
|
642
636
|
httpPort: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
@@ -651,6 +645,14 @@ export const CreateDirectoryServiceRequest =
|
|
|
651
645
|
Schema.Null,
|
|
652
646
|
]),
|
|
653
647
|
),
|
|
648
|
+
appProtocol: Schema.optional(
|
|
649
|
+
Schema.Union([
|
|
650
|
+
Schema.Literal("postgresql"),
|
|
651
|
+
Schema.Literal("mysql"),
|
|
652
|
+
Schema.Null,
|
|
653
|
+
]),
|
|
654
|
+
),
|
|
655
|
+
tcpPort: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
654
656
|
}).pipe(
|
|
655
657
|
Schema.encodeKeys({
|
|
656
658
|
host: "host",
|
|
@@ -659,6 +661,8 @@ export const CreateDirectoryServiceRequest =
|
|
|
659
661
|
httpPort: "http_port",
|
|
660
662
|
httpsPort: "https_port",
|
|
661
663
|
tlsSettings: "tls_settings",
|
|
664
|
+
appProtocol: "app_protocol",
|
|
665
|
+
tcpPort: "tcp_port",
|
|
662
666
|
}),
|
|
663
667
|
T.Http({
|
|
664
668
|
method: "POST",
|
|
@@ -889,14 +893,13 @@ export interface UpdateDirectoryServiceRequest {
|
|
|
889
893
|
/** Path param */
|
|
890
894
|
accountId: string;
|
|
891
895
|
/** Body param */
|
|
892
|
-
host:
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
};
|
|
896
|
+
host: {
|
|
897
|
+
ipv4?: string;
|
|
898
|
+
network?: { tunnelId: string };
|
|
899
|
+
ipv6?: string;
|
|
900
|
+
hostname?: string;
|
|
901
|
+
resolverNetwork?: { tunnelId: string; resolverIps?: string[] | null };
|
|
902
|
+
};
|
|
900
903
|
/** Body param */
|
|
901
904
|
name: string;
|
|
902
905
|
/** Body param */
|
|
@@ -907,35 +910,27 @@ export interface UpdateDirectoryServiceRequest {
|
|
|
907
910
|
httpsPort?: number | null;
|
|
908
911
|
/** Body param: TLS settings for a connectivity service. If omitted, the default mode (`verify_full`) is used. */
|
|
909
912
|
tlsSettings?: { certVerificationMode: string } | null;
|
|
913
|
+
/** Body param */
|
|
914
|
+
appProtocol?: "postgresql" | "mysql" | null;
|
|
915
|
+
/** Body param */
|
|
916
|
+
tcpPort?: number | null;
|
|
910
917
|
}
|
|
911
918
|
|
|
912
919
|
export const UpdateDirectoryServiceRequest =
|
|
913
920
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
914
921
|
serviceId: Schema.String.pipe(T.HttpPath("serviceId")),
|
|
915
922
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
916
|
-
host: Schema.
|
|
917
|
-
Schema.
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
network: Schema.Struct({
|
|
921
|
-
tunnelId: Schema.String,
|
|
922
|
-
}).pipe(Schema.encodeKeys({ tunnelId: "tunnel_id" })),
|
|
923
|
-
}),
|
|
924
|
-
Schema.Struct({
|
|
925
|
-
ipv4: Schema.String,
|
|
926
|
-
network: Schema.Struct({
|
|
927
|
-
tunnelId: Schema.String,
|
|
928
|
-
}).pipe(Schema.encodeKeys({ tunnelId: "tunnel_id" })),
|
|
929
|
-
}),
|
|
930
|
-
Schema.Struct({
|
|
931
|
-
ipv6: Schema.String,
|
|
932
|
-
network: Schema.Struct({
|
|
923
|
+
host: Schema.Struct({
|
|
924
|
+
ipv4: Schema.optional(Schema.String),
|
|
925
|
+
network: Schema.optional(
|
|
926
|
+
Schema.Struct({
|
|
933
927
|
tunnelId: Schema.String,
|
|
934
928
|
}).pipe(Schema.encodeKeys({ tunnelId: "tunnel_id" })),
|
|
935
|
-
|
|
936
|
-
Schema.
|
|
937
|
-
|
|
938
|
-
|
|
929
|
+
),
|
|
930
|
+
ipv6: Schema.optional(Schema.String),
|
|
931
|
+
hostname: Schema.optional(Schema.String),
|
|
932
|
+
resolverNetwork: Schema.optional(
|
|
933
|
+
Schema.Struct({
|
|
939
934
|
tunnelId: Schema.String,
|
|
940
935
|
resolverIps: Schema.optional(
|
|
941
936
|
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
@@ -946,13 +941,16 @@ export const UpdateDirectoryServiceRequest =
|
|
|
946
941
|
resolverIps: "resolver_ips",
|
|
947
942
|
}),
|
|
948
943
|
),
|
|
949
|
-
}).pipe(
|
|
950
|
-
Schema.encodeKeys({
|
|
951
|
-
hostname: "hostname",
|
|
952
|
-
resolverNetwork: "resolver_network",
|
|
953
|
-
}),
|
|
954
944
|
),
|
|
955
|
-
|
|
945
|
+
}).pipe(
|
|
946
|
+
Schema.encodeKeys({
|
|
947
|
+
ipv4: "ipv4",
|
|
948
|
+
network: "network",
|
|
949
|
+
ipv6: "ipv6",
|
|
950
|
+
hostname: "hostname",
|
|
951
|
+
resolverNetwork: "resolver_network",
|
|
952
|
+
}),
|
|
953
|
+
),
|
|
956
954
|
name: Schema.String,
|
|
957
955
|
type: Schema.Union([Schema.Literals(["tcp", "http"]), Schema.String]),
|
|
958
956
|
httpPort: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
@@ -967,6 +965,14 @@ export const UpdateDirectoryServiceRequest =
|
|
|
967
965
|
Schema.Null,
|
|
968
966
|
]),
|
|
969
967
|
),
|
|
968
|
+
appProtocol: Schema.optional(
|
|
969
|
+
Schema.Union([
|
|
970
|
+
Schema.Literal("postgresql"),
|
|
971
|
+
Schema.Literal("mysql"),
|
|
972
|
+
Schema.Null,
|
|
973
|
+
]),
|
|
974
|
+
),
|
|
975
|
+
tcpPort: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
970
976
|
}).pipe(
|
|
971
977
|
Schema.encodeKeys({
|
|
972
978
|
host: "host",
|
|
@@ -975,6 +981,8 @@ export const UpdateDirectoryServiceRequest =
|
|
|
975
981
|
httpPort: "http_port",
|
|
976
982
|
httpsPort: "https_port",
|
|
977
983
|
tlsSettings: "tls_settings",
|
|
984
|
+
appProtocol: "app_protocol",
|
|
985
|
+
tcpPort: "tcp_port",
|
|
978
986
|
}),
|
|
979
987
|
T.Http({
|
|
980
988
|
method: "PUT",
|
package/src/services/d1.ts
CHANGED
|
@@ -828,17 +828,32 @@ export interface ImportDatabaseRequest {
|
|
|
828
828
|
/** Path param: Account identifier tag. */
|
|
829
829
|
accountId: string;
|
|
830
830
|
/** Body param: Indicates you have a new SQL file to upload. */
|
|
831
|
-
action: "init";
|
|
831
|
+
action: "init" | "ingest" | "poll" | (string & {});
|
|
832
832
|
/** Body param: Required when action is 'init' or 'ingest'. An md5 hash of the file you're uploading. Used to check if it already exists, and validate its contents before ingesting. */
|
|
833
|
-
etag
|
|
833
|
+
etag?: string;
|
|
834
|
+
/** Body param: The filename you have successfully uploaded. */
|
|
835
|
+
filename?: string;
|
|
836
|
+
/** Body param: This identifies the currently-running import, checking its status. */
|
|
837
|
+
currentBookmark?: string;
|
|
834
838
|
}
|
|
835
839
|
|
|
836
840
|
export const ImportDatabaseRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
837
841
|
databaseId: Schema.String.pipe(T.HttpPath("databaseId")),
|
|
838
842
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
839
|
-
action: Schema.
|
|
840
|
-
|
|
843
|
+
action: Schema.Union([
|
|
844
|
+
Schema.Literals(["init", "ingest", "poll"]),
|
|
845
|
+
Schema.String,
|
|
846
|
+
]),
|
|
847
|
+
etag: Schema.optional(Schema.String),
|
|
848
|
+
filename: Schema.optional(Schema.String),
|
|
849
|
+
currentBookmark: Schema.optional(Schema.String),
|
|
841
850
|
}).pipe(
|
|
851
|
+
Schema.encodeKeys({
|
|
852
|
+
action: "action",
|
|
853
|
+
etag: "etag",
|
|
854
|
+
filename: "filename",
|
|
855
|
+
currentBookmark: "current_bookmark",
|
|
856
|
+
}),
|
|
842
857
|
T.Http({
|
|
843
858
|
method: "POST",
|
|
844
859
|
path: "/accounts/{account_id}/d1/database/{databaseId}/import",
|
|
@@ -1038,16 +1053,26 @@ export interface QueryDatabaseRequest {
|
|
|
1038
1053
|
/** Path param: Account identifier tag. */
|
|
1039
1054
|
accountId: string;
|
|
1040
1055
|
/** Body param: Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch. */
|
|
1041
|
-
sql
|
|
1056
|
+
sql?: string;
|
|
1042
1057
|
/** Body param */
|
|
1043
1058
|
params?: string[];
|
|
1059
|
+
/** Body param */
|
|
1060
|
+
batch?: { sql: string; params?: string[] }[];
|
|
1044
1061
|
}
|
|
1045
1062
|
|
|
1046
1063
|
export const QueryDatabaseRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1047
1064
|
databaseId: Schema.String.pipe(T.HttpPath("databaseId")),
|
|
1048
1065
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1049
|
-
sql: Schema.String,
|
|
1066
|
+
sql: Schema.optional(Schema.String),
|
|
1050
1067
|
params: Schema.optional(Schema.Array(Schema.String)),
|
|
1068
|
+
batch: Schema.optional(
|
|
1069
|
+
Schema.Array(
|
|
1070
|
+
Schema.Struct({
|
|
1071
|
+
sql: Schema.String,
|
|
1072
|
+
params: Schema.optional(Schema.Array(Schema.String)),
|
|
1073
|
+
}),
|
|
1074
|
+
),
|
|
1075
|
+
),
|
|
1051
1076
|
}).pipe(
|
|
1052
1077
|
T.Http({
|
|
1053
1078
|
method: "POST",
|
|
@@ -1192,16 +1217,26 @@ export interface RawDatabaseRequest {
|
|
|
1192
1217
|
/** Path param: Account identifier tag. */
|
|
1193
1218
|
accountId: string;
|
|
1194
1219
|
/** Body param: Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch. */
|
|
1195
|
-
sql
|
|
1220
|
+
sql?: string;
|
|
1196
1221
|
/** Body param */
|
|
1197
1222
|
params?: string[];
|
|
1223
|
+
/** Body param */
|
|
1224
|
+
batch?: { sql: string; params?: string[] }[];
|
|
1198
1225
|
}
|
|
1199
1226
|
|
|
1200
1227
|
export const RawDatabaseRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1201
1228
|
databaseId: Schema.String.pipe(T.HttpPath("databaseId")),
|
|
1202
1229
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1203
|
-
sql: Schema.String,
|
|
1230
|
+
sql: Schema.optional(Schema.String),
|
|
1204
1231
|
params: Schema.optional(Schema.Array(Schema.String)),
|
|
1232
|
+
batch: Schema.optional(
|
|
1233
|
+
Schema.Array(
|
|
1234
|
+
Schema.Struct({
|
|
1235
|
+
sql: Schema.String,
|
|
1236
|
+
params: Schema.optional(Schema.Array(Schema.String)),
|
|
1237
|
+
}),
|
|
1238
|
+
),
|
|
1239
|
+
),
|
|
1205
1240
|
}).pipe(
|
|
1206
1241
|
T.Http({
|
|
1207
1242
|
method: "POST",
|