@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.
Files changed (101) hide show
  1. package/lib/services/abuse-reports.d.ts +39 -11
  2. package/lib/services/abuse-reports.d.ts.map +1 -1
  3. package/lib/services/abuse-reports.js +89 -11
  4. package/lib/services/abuse-reports.js.map +1 -1
  5. package/lib/services/accounts.d.ts +21 -1
  6. package/lib/services/accounts.d.ts.map +1 -1
  7. package/lib/services/accounts.js +33 -1
  8. package/lib/services/accounts.js.map +1 -1
  9. package/lib/services/ai.d.ts +97 -1
  10. package/lib/services/ai.d.ts.map +1 -1
  11. package/lib/services/ai.js +119 -2
  12. package/lib/services/ai.js.map +1 -1
  13. package/lib/services/bot-management.d.ts +16 -0
  14. package/lib/services/bot-management.d.ts.map +1 -1
  15. package/lib/services/bot-management.js +22 -0
  16. package/lib/services/bot-management.js.map +1 -1
  17. package/lib/services/browser-rendering.d.ts +25 -9
  18. package/lib/services/browser-rendering.d.ts.map +1 -1
  19. package/lib/services/browser-rendering.js +18 -9
  20. package/lib/services/browser-rendering.js.map +1 -1
  21. package/lib/services/cache.d.ts +11 -0
  22. package/lib/services/cache.d.ts.map +1 -1
  23. package/lib/services/cache.js +17 -1
  24. package/lib/services/cache.js.map +1 -1
  25. package/lib/services/connectivity.d.ts +18 -32
  26. package/lib/services/connectivity.d.ts.map +1 -1
  27. package/lib/services/connectivity.js +56 -66
  28. package/lib/services/connectivity.js.map +1 -1
  29. package/lib/services/d1.d.ts +18 -4
  30. package/lib/services/d1.d.ts.map +1 -1
  31. package/lib/services/d1.js +23 -5
  32. package/lib/services/d1.js.map +1 -1
  33. package/lib/services/dns.d.ts +129 -3
  34. package/lib/services/dns.d.ts.map +1 -1
  35. package/lib/services/dns.js +330 -6
  36. package/lib/services/dns.js.map +1 -1
  37. package/lib/services/magic-transit.d.ts +7 -1
  38. package/lib/services/magic-transit.d.ts.map +1 -1
  39. package/lib/services/magic-transit.js +7 -1
  40. package/lib/services/magic-transit.js.map +1 -1
  41. package/lib/services/network-interconnects.d.ts +5 -1
  42. package/lib/services/network-interconnects.d.ts.map +1 -1
  43. package/lib/services/network-interconnects.js +21 -1
  44. package/lib/services/network-interconnects.js.map +1 -1
  45. package/lib/services/queues.d.ts +6 -4
  46. package/lib/services/queues.d.ts.map +1 -1
  47. package/lib/services/queues.js +8 -4
  48. package/lib/services/queues.js.map +1 -1
  49. package/lib/services/r2.d.ts +11 -4
  50. package/lib/services/r2.d.ts.map +1 -1
  51. package/lib/services/r2.js +13 -4
  52. package/lib/services/r2.js.map +1 -1
  53. package/lib/services/resource-tagging.d.ts +4 -2
  54. package/lib/services/resource-tagging.d.ts.map +1 -1
  55. package/lib/services/resource-tagging.js +4 -1
  56. package/lib/services/resource-tagging.js.map +1 -1
  57. package/lib/services/rulesets.d.ts +510 -6
  58. package/lib/services/rulesets.d.ts.map +1 -1
  59. package/lib/services/rulesets.js +1298 -36
  60. package/lib/services/rulesets.js.map +1 -1
  61. package/lib/services/spectrum.d.ts +4 -8
  62. package/lib/services/spectrum.d.ts.map +1 -1
  63. package/lib/services/spectrum.js +12 -34
  64. package/lib/services/spectrum.js.map +1 -1
  65. package/lib/services/workers-for-platforms.d.ts +12 -2
  66. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  67. package/lib/services/workers-for-platforms.js +35 -3
  68. package/lib/services/workers-for-platforms.js.map +1 -1
  69. package/lib/services/workers.d.ts +12 -2
  70. package/lib/services/workers.d.ts.map +1 -1
  71. package/lib/services/workers.js +35 -3
  72. package/lib/services/workers.js.map +1 -1
  73. package/lib/services/zero-trust.d.ts +1463 -557
  74. package/lib/services/zero-trust.d.ts.map +1 -1
  75. package/lib/services/zero-trust.js +1654 -93
  76. package/lib/services/zero-trust.js.map +1 -1
  77. package/lib/services/zones.d.ts +2 -0
  78. package/lib/services/zones.d.ts.map +1 -1
  79. package/lib/services/zones.js +1 -0
  80. package/lib/services/zones.js.map +1 -1
  81. package/package.json +2 -2
  82. package/src/services/abuse-reports.ts +173 -22
  83. package/src/services/accounts.ts +66 -2
  84. package/src/services/ai.ts +235 -2
  85. package/src/services/bot-management.ts +48 -0
  86. package/src/services/browser-rendering.ts +43 -18
  87. package/src/services/cache.ts +31 -0
  88. package/src/services/connectivity.ts +78 -70
  89. package/src/services/d1.ts +43 -8
  90. package/src/services/dns.ts +549 -12
  91. package/src/services/magic-transit.ts +14 -2
  92. package/src/services/network-interconnects.ts +41 -2
  93. package/src/services/queues.ts +16 -8
  94. package/src/services/r2.ts +30 -7
  95. package/src/services/resource-tagging.ts +8 -2
  96. package/src/services/rulesets.ts +3283 -963
  97. package/src/services/spectrum.ts +36 -52
  98. package/src/services/workers-for-platforms.ts +63 -4
  99. package/src/services/workers.ts +63 -4
  100. package/src/services/zero-trust.ts +3071 -478
  101. package/src/services/zones.ts +3 -0
@@ -8613,7 +8613,7 @@ export interface CreatePcapRequest {
8613
8613
  /** Path param: Identifier. */
8614
8614
  accountId: string;
8615
8615
  /** Body param: The limit of packets contained in a packet capture. */
8616
- packetLimit: number;
8616
+ packetLimit?: number;
8617
8617
  /** Body param: The system used to collect packet captures. */
8618
8618
  system: "magic-transit";
8619
8619
  /** Body param: The packet capture duration in seconds. */
@@ -8630,11 +8630,17 @@ export interface CreatePcapRequest {
8630
8630
  };
8631
8631
  /** Body param: The RFC 3339 offset timestamp from which to query backwards for packets. Must be within the last 24h. When this field is empty, defaults to time of request. */
8632
8632
  offsetTime?: string;
8633
+ /** Body param: The name of the data center used for the packet capture. This can be a specific colo (ord02) or a multi-colo name (ORD). This field only applies to `full` packet captures. */
8634
+ coloName?: string;
8635
+ /** Body param: The full URI for the bucket. This field only applies to `full` packet captures. */
8636
+ destinationConf?: string;
8637
+ /** Body param: The maximum number of bytes to capture. This field only applies to `full` packet captures. */
8638
+ byteLimit?: number;
8633
8639
  }
8634
8640
 
8635
8641
  export const CreatePcapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8636
8642
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
8637
- packetLimit: Schema.Number,
8643
+ packetLimit: Schema.optional(Schema.Number),
8638
8644
  system: Schema.Literal("magic-transit"),
8639
8645
  timeLimit: Schema.Number,
8640
8646
  type: Schema.Union([Schema.Literals(["simple", "full"]), Schema.String]),
@@ -8656,6 +8662,9 @@ export const CreatePcapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8656
8662
  ),
8657
8663
  ),
8658
8664
  offsetTime: Schema.optional(Schema.String),
8665
+ coloName: Schema.optional(Schema.String),
8666
+ destinationConf: Schema.optional(Schema.String),
8667
+ byteLimit: Schema.optional(Schema.Number),
8659
8668
  }).pipe(
8660
8669
  Schema.encodeKeys({
8661
8670
  packetLimit: "packet_limit",
@@ -8664,6 +8673,9 @@ export const CreatePcapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8664
8673
  type: "type",
8665
8674
  filterV1: "filter_v1",
8666
8675
  offsetTime: "offset_time",
8676
+ coloName: "colo_name",
8677
+ destinationConf: "destination_conf",
8678
+ byteLimit: "byte_limit",
8667
8679
  }),
8668
8680
  T.Http({ method: "POST", path: "/accounts/{account_id}/pcaps" }),
8669
8681
  ) as unknown as Schema.Schema<CreatePcapRequest>;
@@ -795,26 +795,65 @@ export interface CreateInterconnectRequest {
795
795
  /** Body param */
796
796
  account: string;
797
797
  /** Body param */
798
- slotId: string;
798
+ slotId?: string;
799
799
  /** Body param */
800
800
  type: string;
801
801
  /** Body param */
802
802
  speed?: string | null;
803
+ /** Body param: Bandwidth structure as visible through the customer-facing API. */
804
+ bandwidth?:
805
+ | "50M"
806
+ | "100M"
807
+ | "200M"
808
+ | "300M"
809
+ | "400M"
810
+ | "500M"
811
+ | "1G"
812
+ | "2G"
813
+ | "5G"
814
+ | "10G"
815
+ | "20G"
816
+ | "50G"
817
+ | (string & {});
818
+ /** Body param: Pairing key provided by GCP */
819
+ pairingKey?: string;
803
820
  }
804
821
 
805
822
  export const CreateInterconnectRequest =
806
823
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
807
824
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
808
825
  account: Schema.String,
809
- slotId: Schema.String,
826
+ slotId: Schema.optional(Schema.String),
810
827
  type: Schema.String,
811
828
  speed: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
829
+ bandwidth: Schema.optional(
830
+ Schema.Union([
831
+ Schema.Literals([
832
+ "50M",
833
+ "100M",
834
+ "200M",
835
+ "300M",
836
+ "400M",
837
+ "500M",
838
+ "1G",
839
+ "2G",
840
+ "5G",
841
+ "10G",
842
+ "20G",
843
+ "50G",
844
+ ]),
845
+ Schema.String,
846
+ ]),
847
+ ),
848
+ pairingKey: Schema.optional(Schema.String),
812
849
  }).pipe(
813
850
  Schema.encodeKeys({
814
851
  account: "account",
815
852
  slotId: "slot_id",
816
853
  type: "type",
817
854
  speed: "speed",
855
+ bandwidth: "bandwidth",
856
+ pairingKey: "pairing_key",
818
857
  }),
819
858
  T.Http({
820
859
  method: "POST",
@@ -453,7 +453,7 @@ export interface CreateConsumerRequest {
453
453
  /** Path param: A Resource identifier. */
454
454
  accountId: string;
455
455
  /** Body param: Name of a Worker */
456
- scriptName: string;
456
+ scriptName?: string;
457
457
  /** Body param */
458
458
  type: "worker" | "http_pull" | (string & {});
459
459
  /** Body param */
@@ -465,13 +465,14 @@ export interface CreateConsumerRequest {
465
465
  maxRetries?: number;
466
466
  maxWaitTimeMs?: number;
467
467
  retryDelay?: number;
468
+ visibilityTimeoutMs?: number;
468
469
  };
469
470
  }
470
471
 
471
472
  export const CreateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
472
473
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
473
474
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
474
- scriptName: Schema.String,
475
+ scriptName: Schema.optional(Schema.String),
475
476
  type: Schema.Union([Schema.Literals(["worker", "http_pull"]), Schema.String]),
476
477
  deadLetterQueue: Schema.optional(Schema.String),
477
478
  settings: Schema.optional(
@@ -481,6 +482,7 @@ export const CreateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
481
482
  maxRetries: Schema.optional(Schema.Number),
482
483
  maxWaitTimeMs: Schema.optional(Schema.Number),
483
484
  retryDelay: Schema.optional(Schema.Number),
485
+ visibilityTimeoutMs: Schema.optional(Schema.Number),
484
486
  }).pipe(
485
487
  Schema.encodeKeys({
486
488
  batchSize: "batch_size",
@@ -488,6 +490,7 @@ export const CreateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
488
490
  maxRetries: "max_retries",
489
491
  maxWaitTimeMs: "max_wait_time_ms",
490
492
  retryDelay: "retry_delay",
493
+ visibilityTimeoutMs: "visibility_timeout_ms",
491
494
  }),
492
495
  ),
493
496
  ),
@@ -670,9 +673,9 @@ export interface UpdateConsumerRequest {
670
673
  /** Path param: A Resource identifier. */
671
674
  accountId: string;
672
675
  /** Body param: Name of a Worker */
673
- scriptName: string;
676
+ scriptName?: string;
674
677
  /** Body param */
675
- type: "worker";
678
+ type: "worker" | "http_pull" | (string & {});
676
679
  /** Body param */
677
680
  deadLetterQueue?: string;
678
681
  /** Body param */
@@ -682,6 +685,7 @@ export interface UpdateConsumerRequest {
682
685
  maxRetries?: number;
683
686
  maxWaitTimeMs?: number;
684
687
  retryDelay?: number;
688
+ visibilityTimeoutMs?: number;
685
689
  };
686
690
  }
687
691
 
@@ -689,8 +693,8 @@ export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
689
693
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
690
694
  consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
691
695
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
692
- scriptName: Schema.String,
693
- type: Schema.Literal("worker"),
696
+ scriptName: Schema.optional(Schema.String),
697
+ type: Schema.Union([Schema.Literals(["worker", "http_pull"]), Schema.String]),
694
698
  deadLetterQueue: Schema.optional(Schema.String),
695
699
  settings: Schema.optional(
696
700
  Schema.Struct({
@@ -699,6 +703,7 @@ export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
699
703
  maxRetries: Schema.optional(Schema.Number),
700
704
  maxWaitTimeMs: Schema.optional(Schema.Number),
701
705
  retryDelay: Schema.optional(Schema.Number),
706
+ visibilityTimeoutMs: Schema.optional(Schema.Number),
702
707
  }).pipe(
703
708
  Schema.encodeKeys({
704
709
  batchSize: "batch_size",
@@ -706,6 +711,7 @@ export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
706
711
  maxRetries: "max_retries",
707
712
  maxWaitTimeMs: "max_wait_time_ms",
708
713
  retryDelay: "retry_delay",
714
+ visibilityTimeoutMs: "visibility_timeout_ms",
709
715
  }),
710
716
  ),
711
717
  ),
@@ -1226,7 +1232,7 @@ export interface PushMessageRequest {
1226
1232
  /** Body param */
1227
1233
  body?: string;
1228
1234
  /** Body param */
1229
- contentType?: "text";
1235
+ contentType?: "text" | "json" | (string & {});
1230
1236
  /** Body param: The number of seconds to wait for attempting to deliver this message to consumers */
1231
1237
  delaySeconds?: number;
1232
1238
  }
@@ -1235,7 +1241,9 @@ export const PushMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1235
1241
  queueId: Schema.String.pipe(T.HttpPath("queueId")),
1236
1242
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1237
1243
  body: Schema.optional(Schema.String),
1238
- contentType: Schema.optional(Schema.Literal("text")),
1244
+ contentType: Schema.optional(
1245
+ Schema.Union([Schema.Literals(["text", "json"]), Schema.String]),
1246
+ ),
1239
1247
  delaySeconds: Schema.optional(Schema.Number),
1240
1248
  }).pipe(
1241
1249
  Schema.encodeKeys({
@@ -3033,9 +3033,12 @@ export interface PutBucketSippyRequest {
3033
3033
  source?: {
3034
3034
  accessKeyId?: string;
3035
3035
  bucket?: string;
3036
- provider?: "aws";
3036
+ provider?: "aws" | "gcs" | "s3" | (string & {});
3037
3037
  region?: string;
3038
3038
  secretAccessKey?: string;
3039
+ clientEmail?: string;
3040
+ privateKey?: string;
3041
+ bucketUrl?: string;
3039
3042
  };
3040
3043
  }
3041
3044
 
@@ -3059,9 +3062,14 @@ export const PutBucketSippyRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3059
3062
  Schema.Struct({
3060
3063
  accessKeyId: Schema.optional(SensitiveString),
3061
3064
  bucket: Schema.optional(Schema.String),
3062
- provider: Schema.optional(Schema.Literal("aws")),
3065
+ provider: Schema.optional(
3066
+ Schema.Union([Schema.Literals(["aws", "gcs", "s3"]), Schema.String]),
3067
+ ),
3063
3068
  region: Schema.optional(Schema.String),
3064
3069
  secretAccessKey: Schema.optional(SensitiveString),
3070
+ clientEmail: Schema.optional(Schema.String),
3071
+ privateKey: Schema.optional(SensitiveString),
3072
+ bucketUrl: Schema.optional(Schema.String),
3065
3073
  }),
3066
3074
  ),
3067
3075
  }).pipe(
@@ -3729,9 +3737,14 @@ export interface SourceSuperSlurperConnectivityPrecheckRequest {
3729
3737
  /** Body param */
3730
3738
  bucket: string;
3731
3739
  /** Body param */
3732
- secret: { accessKeyId: string; secretAccessKey: string };
3740
+ secret: {
3741
+ accessKeyId?: string;
3742
+ secretAccessKey?: string;
3743
+ clientEmail?: string;
3744
+ privateKey?: string;
3745
+ };
3733
3746
  /** Body param */
3734
- vendor: "s3";
3747
+ vendor: "s3" | "gcs" | "r2" | (string & {});
3735
3748
  /** Body param */
3736
3749
  endpoint?: string | null;
3737
3750
  /** Body param */
@@ -3740,6 +3753,8 @@ export interface SourceSuperSlurperConnectivityPrecheckRequest {
3740
3753
  pathPrefix?: string | null;
3741
3754
  /** Body param */
3742
3755
  region?: string | null;
3756
+ /** Body param */
3757
+ jurisdiction?: "default" | "eu" | "fedramp" | (string & {});
3743
3758
  }
3744
3759
 
3745
3760
  export const SourceSuperSlurperConnectivityPrecheckRequest =
@@ -3747,16 +3762,24 @@ export const SourceSuperSlurperConnectivityPrecheckRequest =
3747
3762
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
3748
3763
  bucket: Schema.String,
3749
3764
  secret: Schema.Struct({
3750
- accessKeyId: SensitiveString,
3751
- secretAccessKey: SensitiveString,
3765
+ accessKeyId: Schema.optional(SensitiveString),
3766
+ secretAccessKey: Schema.optional(SensitiveString),
3767
+ clientEmail: Schema.optional(Schema.String),
3768
+ privateKey: Schema.optional(SensitiveString),
3752
3769
  }),
3753
- vendor: Schema.Literal("s3"),
3770
+ vendor: Schema.Union([Schema.Literals(["s3", "gcs", "r2"]), Schema.String]),
3754
3771
  endpoint: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3755
3772
  keys: Schema.optional(
3756
3773
  Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3757
3774
  ),
3758
3775
  pathPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3759
3776
  region: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3777
+ jurisdiction: Schema.optional(
3778
+ Schema.Union([
3779
+ Schema.Literals(["default", "eu", "fedramp"]),
3780
+ Schema.String,
3781
+ ]),
3782
+ ),
3760
3783
  }).pipe(
3761
3784
  T.Http({
3762
3785
  method: "PUT",
@@ -601,7 +601,7 @@ export interface PutAccountTagRequest {
601
601
  | "worker_version"
602
602
  | (string & {});
603
603
  /** Body param: Worker ID is required only for worker_version resources */
604
- workerId: string;
604
+ workerId?: string;
605
605
  /** Body param: Contains key-value pairs of tags. */
606
606
  tags?: Record<string, unknown>;
607
607
  }
@@ -635,7 +635,7 @@ export const PutAccountTagRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
635
635
  ]),
636
636
  Schema.String,
637
637
  ]),
638
- workerId: Schema.String,
638
+ workerId: Schema.optional(Schema.String),
639
639
  tags: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
640
640
  }).pipe(
641
641
  Schema.encodeKeys({
@@ -2524,9 +2524,12 @@ export interface PutZoneTagRequest {
2524
2524
  | "dns_record"
2525
2525
  | "managed_client_certificate"
2526
2526
  | "zone"
2527
+ | "access_application_policy"
2527
2528
  | (string & {});
2528
2529
  /** Body param: Contains key-value pairs of tags. */
2529
2530
  tags?: Record<string, unknown>;
2531
+ /** Body param: Access application ID is required only for access_application_policy resources */
2532
+ accessApplicationId?: string;
2530
2533
  }
2531
2534
 
2532
2535
  export const PutZoneTagRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -2541,15 +2544,18 @@ export const PutZoneTagRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2541
2544
  "dns_record",
2542
2545
  "managed_client_certificate",
2543
2546
  "zone",
2547
+ "access_application_policy",
2544
2548
  ]),
2545
2549
  Schema.String,
2546
2550
  ]),
2547
2551
  tags: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
2552
+ accessApplicationId: Schema.optional(Schema.String),
2548
2553
  }).pipe(
2549
2554
  Schema.encodeKeys({
2550
2555
  resourceId: "resource_id",
2551
2556
  resourceType: "resource_type",
2552
2557
  tags: "tags",
2558
+ accessApplicationId: "access_application_id",
2553
2559
  }),
2554
2560
  T.Http({ method: "PUT", path: "/zones/{zone_id}/tags" }),
2555
2561
  ) as unknown as Schema.Schema<PutZoneTagRequest>;