@distilled.cloud/cloudflare 0.19.0 → 0.19.2
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/schemas.d.ts +7 -8
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +9 -12
- package/lib/schemas.js.map +1 -1
- package/lib/services/custom-pages.d.ts +40 -13
- package/lib/services/custom-pages.d.ts.map +1 -1
- package/lib/services/custom-pages.js +68 -15
- package/lib/services/custom-pages.js.map +1 -1
- package/lib/services/firewall.d.ts +66 -23
- package/lib/services/firewall.d.ts.map +1 -1
- package/lib/services/firewall.js +120 -26
- package/lib/services/firewall.js.map +1 -1
- package/lib/services/intel.d.ts +2 -0
- package/lib/services/intel.d.ts.map +1 -1
- package/lib/services/intel.js +2 -0
- package/lib/services/intel.js.map +1 -1
- package/lib/services/logpush.d.ts +157 -64
- package/lib/services/logpush.d.ts.map +1 -1
- package/lib/services/logpush.js +292 -63
- package/lib/services/logpush.js.map +1 -1
- package/lib/services/r2.d.ts +29 -2
- package/lib/services/r2.d.ts.map +1 -1
- package/lib/services/r2.js +20 -6
- package/lib/services/r2.js.map +1 -1
- package/lib/services/rulesets.d.ts +204 -69
- package/lib/services/rulesets.d.ts.map +1 -1
- package/lib/services/rulesets.js +5077 -4705
- package/lib/services/rulesets.js.map +1 -1
- package/lib/services/security-center.d.ts +66 -19
- package/lib/services/security-center.d.ts.map +1 -1
- package/lib/services/security-center.js +128 -22
- package/lib/services/security-center.js.map +1 -1
- package/lib/services/waiting-rooms.d.ts +14 -3
- package/lib/services/waiting-rooms.d.ts.map +1 -1
- package/lib/services/waiting-rooms.js +25 -7
- package/lib/services/waiting-rooms.js.map +1 -1
- package/lib/services/zero-trust.d.ts +579 -204
- package/lib/services/zero-trust.d.ts.map +1 -1
- package/lib/services/zero-trust.js +1159 -268
- package/lib/services/zero-trust.js.map +1 -1
- package/package.json +2 -2
- package/src/schemas.ts +19 -17
- package/src/services/custom-pages.ts +170 -66
- package/src/services/firewall.ts +300 -121
- package/src/services/intel.ts +4 -0
- package/src/services/logpush.ts +798 -372
- package/src/services/r2.ts +66 -9
- package/src/services/rulesets.ts +9882 -9033
- package/src/services/security-center.ts +247 -63
- package/src/services/waiting-rooms.ts +49 -11
- package/src/services/zero-trust.ts +4097 -2417
package/src/services/r2.ts
CHANGED
|
@@ -11,7 +11,10 @@ import * as API from "../client/api.ts";
|
|
|
11
11
|
import * as T from "../traits.ts";
|
|
12
12
|
import type { Credentials } from "../credentials.ts";
|
|
13
13
|
import { type DefaultErrors } from "../errors.ts";
|
|
14
|
-
import {
|
|
14
|
+
import { BinaryBodySchema } from "../schemas.ts";
|
|
15
|
+
import { BinaryStreamResponseSchema } from "../schemas.ts";
|
|
16
|
+
import type * as Stream from "effect/Stream";
|
|
17
|
+
import type * as HttpClientError from "effect/unstable/http/HttpClientError";
|
|
15
18
|
import { SensitiveString } from "../sensitive.ts";
|
|
16
19
|
|
|
17
20
|
// =============================================================================
|
|
@@ -2635,15 +2638,69 @@ export const GetObjectRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
2635
2638
|
T.Http({
|
|
2636
2639
|
method: "GET",
|
|
2637
2640
|
path: "/accounts/{account_id}/r2/buckets/{bucketName}/objects/{objectName}",
|
|
2641
|
+
responseContentType: "binary",
|
|
2638
2642
|
}),
|
|
2639
2643
|
) as unknown as Schema.Schema<GetObjectRequest>;
|
|
2640
2644
|
|
|
2641
|
-
export
|
|
2645
|
+
export interface GetObjectResponse {
|
|
2646
|
+
/** Raw object body as an Effect Stream. */
|
|
2647
|
+
body: Stream.Stream<Uint8Array, HttpClientError.HttpClientError>;
|
|
2648
|
+
/** Entity tag of the object (raw hex digest). */
|
|
2649
|
+
etag?: string;
|
|
2650
|
+
/** MIME type of the object. */
|
|
2651
|
+
contentType?: string;
|
|
2652
|
+
/** Object size in bytes. */
|
|
2653
|
+
contentLength?: number;
|
|
2654
|
+
/** Content encoding of the object (e.g. `gzip`). */
|
|
2655
|
+
contentEncoding?: string;
|
|
2656
|
+
/** Content disposition header for the object. */
|
|
2657
|
+
contentDisposition?: string;
|
|
2658
|
+
/** Content language of the object. */
|
|
2659
|
+
contentLanguage?: string;
|
|
2660
|
+
/** Byte range returned (set when the request used `Range`). */
|
|
2661
|
+
contentRange?: string;
|
|
2662
|
+
/** Cache-Control directives associated with the object. */
|
|
2663
|
+
cacheControl?: string;
|
|
2664
|
+
/** Expiration date of the object. */
|
|
2665
|
+
expires?: string;
|
|
2666
|
+
/** When the object was last modified (RFC 7231 date). */
|
|
2667
|
+
lastModified?: string;
|
|
2668
|
+
/** Storage class of the object (`Standard` or `InfrequentAccess`). */
|
|
2669
|
+
cfR2StorageClass?: "Standard" | "InfrequentAccess";
|
|
2670
|
+
}
|
|
2642
2671
|
|
|
2643
|
-
export const GetObjectResponse =
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2672
|
+
export const GetObjectResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2673
|
+
body: BinaryStreamResponseSchema.pipe(T.BinaryResponseBody()),
|
|
2674
|
+
etag: Schema.optional(Schema.String).pipe(T.HttpResponseHeader("etag")),
|
|
2675
|
+
contentType: Schema.optional(Schema.String).pipe(
|
|
2676
|
+
T.HttpResponseHeader("content-type"),
|
|
2677
|
+
),
|
|
2678
|
+
contentLength: Schema.optional(Schema.Number).pipe(
|
|
2679
|
+
T.HttpResponseHeader("content-length"),
|
|
2680
|
+
),
|
|
2681
|
+
contentEncoding: Schema.optional(Schema.String).pipe(
|
|
2682
|
+
T.HttpResponseHeader("content-encoding"),
|
|
2683
|
+
),
|
|
2684
|
+
contentDisposition: Schema.optional(Schema.String).pipe(
|
|
2685
|
+
T.HttpResponseHeader("content-disposition"),
|
|
2686
|
+
),
|
|
2687
|
+
contentLanguage: Schema.optional(Schema.String).pipe(
|
|
2688
|
+
T.HttpResponseHeader("content-language"),
|
|
2689
|
+
),
|
|
2690
|
+
contentRange: Schema.optional(Schema.String).pipe(
|
|
2691
|
+
T.HttpResponseHeader("content-range"),
|
|
2692
|
+
),
|
|
2693
|
+
cacheControl: Schema.optional(Schema.String).pipe(
|
|
2694
|
+
T.HttpResponseHeader("cache-control"),
|
|
2695
|
+
),
|
|
2696
|
+
expires: Schema.optional(Schema.String).pipe(T.HttpResponseHeader("expires")),
|
|
2697
|
+
lastModified: Schema.optional(Schema.String).pipe(
|
|
2698
|
+
T.HttpResponseHeader("last-modified"),
|
|
2699
|
+
),
|
|
2700
|
+
cfR2StorageClass: Schema.optional(
|
|
2701
|
+
Schema.Literals(["Standard", "InfrequentAccess"]),
|
|
2702
|
+
).pipe(T.HttpResponseHeader("cf-r2-storage-class")),
|
|
2703
|
+
}) as unknown as Schema.Schema<GetObjectResponse>;
|
|
2647
2704
|
|
|
2648
2705
|
export type GetObjectError =
|
|
2649
2706
|
| DefaultErrors
|
|
@@ -2819,7 +2876,7 @@ export interface PutObjectRequest {
|
|
|
2819
2876
|
expires?: string;
|
|
2820
2877
|
/** Storage class for the object. */
|
|
2821
2878
|
cfR2StorageClass?: "Standard" | "InfrequentAccess";
|
|
2822
|
-
body:
|
|
2879
|
+
body: Blob | Uint8Array | ArrayBuffer | string;
|
|
2823
2880
|
}
|
|
2824
2881
|
|
|
2825
2882
|
export const PutObjectRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
@@ -2851,12 +2908,12 @@ export const PutObjectRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
2851
2908
|
cfR2StorageClass: Schema.optional(
|
|
2852
2909
|
Schema.Literals(["Standard", "InfrequentAccess"]),
|
|
2853
2910
|
).pipe(T.HttpHeader("cf-r2-storage-class")),
|
|
2854
|
-
body:
|
|
2911
|
+
body: BinaryBodySchema.pipe(T.HttpBody()),
|
|
2855
2912
|
}).pipe(
|
|
2856
2913
|
T.Http({
|
|
2857
2914
|
method: "PUT",
|
|
2858
2915
|
path: "/accounts/{account_id}/r2/buckets/{bucketName}/objects/{objectName}",
|
|
2859
|
-
contentType: "
|
|
2916
|
+
contentType: "binary",
|
|
2860
2917
|
}),
|
|
2861
2918
|
) as unknown as Schema.Schema<PutObjectRequest>;
|
|
2862
2919
|
|