@distilled.cloud/cloudflare 0.7.11 → 0.7.12

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.
@@ -2740,6 +2740,272 @@ export interface DeleteScriptDeploymentResponse {
2740
2740
  export declare const DeleteScriptDeploymentResponse: Schema.Schema<DeleteScriptDeploymentResponse>;
2741
2741
  export type DeleteScriptDeploymentError = DefaultErrors | WorkerNotFound | DeploymentNotFound;
2742
2742
  export declare const deleteScriptDeployment: API.OperationMethod<DeleteScriptDeploymentRequest, DeleteScriptDeploymentResponse, DeleteScriptDeploymentError, Credentials | HttpClient.HttpClient>;
2743
+ export interface CreateScriptEdgePreviewRequest {
2744
+ accountId: string;
2745
+ scriptName: string;
2746
+ /** The session token returned by createZoneEdgePreviewSession or createSubdomainEdgePreviewSession. */
2747
+ cfPreviewUploadConfigToken: string;
2748
+ metadata?: {
2749
+ mainModule?: string;
2750
+ bodyPart?: string;
2751
+ compatibilityDate?: string;
2752
+ compatibilityFlags?: string[];
2753
+ usageModel?: "bundled" | "unbound" | "standard";
2754
+ bindings?: ({
2755
+ type: "plain_text";
2756
+ name: string;
2757
+ text: string;
2758
+ } | {
2759
+ type: "secret_text";
2760
+ name: string;
2761
+ text: string;
2762
+ } | {
2763
+ type: "json";
2764
+ name: string;
2765
+ json: unknown;
2766
+ } | {
2767
+ type: "kv_namespace";
2768
+ name: string;
2769
+ namespaceId: string;
2770
+ raw?: boolean;
2771
+ } | {
2772
+ type: "durable_object_namespace";
2773
+ name: string;
2774
+ className: string;
2775
+ scriptName?: string;
2776
+ environment?: string;
2777
+ namespaceId?: string;
2778
+ } | {
2779
+ type: "r2_bucket";
2780
+ name: string;
2781
+ bucketName: string;
2782
+ jurisdiction?: string;
2783
+ raw?: boolean;
2784
+ } | {
2785
+ type: "d1";
2786
+ name: string;
2787
+ id: string;
2788
+ raw?: boolean;
2789
+ } | {
2790
+ type: "queue";
2791
+ name: string;
2792
+ queueName: string;
2793
+ deliveryDelay?: number;
2794
+ raw?: boolean;
2795
+ } | {
2796
+ type: "service";
2797
+ name: string;
2798
+ service: string;
2799
+ environment?: string;
2800
+ entrypoint?: string;
2801
+ } | {
2802
+ type: "ai";
2803
+ name: string;
2804
+ staging?: boolean;
2805
+ raw?: boolean;
2806
+ } | {
2807
+ type: "browser";
2808
+ name: string;
2809
+ raw?: boolean;
2810
+ } | {
2811
+ type: "images";
2812
+ name: string;
2813
+ raw?: boolean;
2814
+ } | {
2815
+ type: "vectorize";
2816
+ name: string;
2817
+ indexName: string;
2818
+ raw?: boolean;
2819
+ } | {
2820
+ type: "workflow";
2821
+ name: string;
2822
+ workflowName: string;
2823
+ className: string;
2824
+ scriptName?: string;
2825
+ raw?: boolean;
2826
+ } | {
2827
+ type: "hyperdrive";
2828
+ name: string;
2829
+ id: string;
2830
+ } | {
2831
+ type: "analytics_engine";
2832
+ name: string;
2833
+ dataset?: string;
2834
+ } | {
2835
+ type: "dispatch_namespace";
2836
+ name: string;
2837
+ namespace: string;
2838
+ outbound?: {
2839
+ worker?: {
2840
+ service?: string;
2841
+ environment?: string;
2842
+ };
2843
+ params?: {
2844
+ name: string;
2845
+ }[];
2846
+ };
2847
+ } | {
2848
+ type: "send_email";
2849
+ name: string;
2850
+ destinationAddress?: string;
2851
+ allowedDestinationAddresses?: string[];
2852
+ allowedSenderAddresses?: string[];
2853
+ } | {
2854
+ type: "mtls_certificate";
2855
+ name: string;
2856
+ certificateId: string;
2857
+ } | {
2858
+ type: "wasm_module";
2859
+ name: string;
2860
+ part: string;
2861
+ } | {
2862
+ type: "text_blob";
2863
+ name: string;
2864
+ part: string;
2865
+ } | {
2866
+ type: "data_blob";
2867
+ name: string;
2868
+ part: string;
2869
+ } | {
2870
+ type: "pipelines";
2871
+ name: string;
2872
+ pipeline: string;
2873
+ } | {
2874
+ type: "secrets_store_secret";
2875
+ name: string;
2876
+ storeId: string;
2877
+ secretName: string;
2878
+ } | {
2879
+ type: "stream";
2880
+ name: string;
2881
+ } | {
2882
+ type: "media";
2883
+ name: string;
2884
+ } | {
2885
+ type: "version_metadata";
2886
+ name: string;
2887
+ } | {
2888
+ type: "assets";
2889
+ name: string;
2890
+ } | {
2891
+ type: "worker_loader";
2892
+ name: string;
2893
+ } | {
2894
+ type: "logfwdr";
2895
+ name: string;
2896
+ destination: string;
2897
+ } | {
2898
+ type: "ai_search_namespace";
2899
+ name: string;
2900
+ namespace: string;
2901
+ } | {
2902
+ type: "ai_search";
2903
+ name: string;
2904
+ instanceName: string;
2905
+ } | {
2906
+ type: "ratelimit";
2907
+ name: string;
2908
+ namespaceId: string;
2909
+ simple: {
2910
+ limit: number;
2911
+ period: "10" | "60";
2912
+ };
2913
+ } | {
2914
+ type: "inherit";
2915
+ name: string;
2916
+ })[];
2917
+ keepBindings?: string[];
2918
+ migrations?: {
2919
+ oldTag?: string;
2920
+ newTag?: string;
2921
+ steps?: {
2922
+ newClasses?: string[];
2923
+ newSqliteClasses?: string[];
2924
+ renamedClasses?: {
2925
+ from?: string;
2926
+ to?: string;
2927
+ }[];
2928
+ deletedClasses?: string[];
2929
+ }[];
2930
+ };
2931
+ capnpSchema?: string;
2932
+ logpush?: boolean;
2933
+ placement?: {
2934
+ mode: "smart";
2935
+ hint?: string;
2936
+ } | {
2937
+ region: string;
2938
+ } | {
2939
+ host: string;
2940
+ } | {
2941
+ hostname: string;
2942
+ };
2943
+ tailConsumers?: {
2944
+ service: string;
2945
+ environment?: string;
2946
+ }[];
2947
+ streamingTailConsumers?: {
2948
+ service: string;
2949
+ environment?: string;
2950
+ }[];
2951
+ limits?: {
2952
+ cpuMs?: number;
2953
+ subrequests?: number;
2954
+ };
2955
+ assets?: {
2956
+ jwt?: string;
2957
+ config?: {
2958
+ htmlHandling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
2959
+ notFoundHandling?: "single-page-application" | "404-page" | "none";
2960
+ runWorkerFirst?: boolean | string[];
2961
+ redirects?: string;
2962
+ headers?: string;
2963
+ };
2964
+ };
2965
+ observability?: {
2966
+ enabled?: boolean;
2967
+ headSamplingRate?: number;
2968
+ logs?: {
2969
+ enabled?: boolean;
2970
+ headSamplingRate?: number;
2971
+ invocationLogs?: boolean;
2972
+ persist?: boolean;
2973
+ destinations?: string[];
2974
+ };
2975
+ traces?: {
2976
+ enabled?: boolean;
2977
+ headSamplingRate?: number;
2978
+ persist?: boolean;
2979
+ destinations?: string[];
2980
+ };
2981
+ };
2982
+ containers?: {
2983
+ className: string;
2984
+ }[];
2985
+ annotations?: unknown;
2986
+ keepAssets?: boolean;
2987
+ tags?: string[];
2988
+ };
2989
+ /** Module files comprising the worker script. */
2990
+ files?: (File | Blob)[];
2991
+ wranglerSessionConfig?: {
2992
+ workersDev: true;
2993
+ minimalMode?: boolean;
2994
+ } | {
2995
+ routes: string[];
2996
+ minimalMode?: boolean;
2997
+ };
2998
+ }
2999
+ export declare const CreateScriptEdgePreviewRequest: Schema.Schema<CreateScriptEdgePreviewRequest>;
3000
+ export interface CreateScriptEdgePreviewResponse {
3001
+ /** Token to send as cf-workers-preview-token header when making requests to the preview host. */
3002
+ previewToken: string;
3003
+ /** URL for tailing live logs from the preview worker. */
3004
+ tailUrl: string;
3005
+ }
3006
+ export declare const CreateScriptEdgePreviewResponse: Schema.Schema<CreateScriptEdgePreviewResponse>;
3007
+ export type CreateScriptEdgePreviewError = DefaultErrors | InvalidRoute;
3008
+ export declare const createScriptEdgePreview: API.OperationMethod<CreateScriptEdgePreviewRequest, CreateScriptEdgePreviewResponse, CreateScriptEdgePreviewError, Credentials | HttpClient.HttpClient>;
2743
3009
  export interface GetScriptScheduleRequest {
2744
3010
  scriptName: string;
2745
3011
  /** Identifier. */
@@ -4166,6 +4432,273 @@ export interface CreateScriptVersionResponse {
4166
4432
  export declare const CreateScriptVersionResponse: Schema.Schema<CreateScriptVersionResponse>;
4167
4433
  export type CreateScriptVersionError = DefaultErrors | WorkerNotFound;
4168
4434
  export declare const createScriptVersion: API.OperationMethod<CreateScriptVersionRequest, CreateScriptVersionResponse, CreateScriptVersionError, Credentials | HttpClient.HttpClient>;
4435
+ export interface CreateServiceEdgePreviewRequest {
4436
+ accountId: string;
4437
+ serviceName: string;
4438
+ environmentName: string;
4439
+ /** The session token returned by createZoneEdgePreviewSession or createSubdomainEdgePreviewSession. */
4440
+ cfPreviewUploadConfigToken: string;
4441
+ metadata?: {
4442
+ mainModule?: string;
4443
+ bodyPart?: string;
4444
+ compatibilityDate?: string;
4445
+ compatibilityFlags?: string[];
4446
+ usageModel?: "bundled" | "unbound" | "standard";
4447
+ bindings?: ({
4448
+ type: "plain_text";
4449
+ name: string;
4450
+ text: string;
4451
+ } | {
4452
+ type: "secret_text";
4453
+ name: string;
4454
+ text: string;
4455
+ } | {
4456
+ type: "json";
4457
+ name: string;
4458
+ json: unknown;
4459
+ } | {
4460
+ type: "kv_namespace";
4461
+ name: string;
4462
+ namespaceId: string;
4463
+ raw?: boolean;
4464
+ } | {
4465
+ type: "durable_object_namespace";
4466
+ name: string;
4467
+ className: string;
4468
+ scriptName?: string;
4469
+ environment?: string;
4470
+ namespaceId?: string;
4471
+ } | {
4472
+ type: "r2_bucket";
4473
+ name: string;
4474
+ bucketName: string;
4475
+ jurisdiction?: string;
4476
+ raw?: boolean;
4477
+ } | {
4478
+ type: "d1";
4479
+ name: string;
4480
+ id: string;
4481
+ raw?: boolean;
4482
+ } | {
4483
+ type: "queue";
4484
+ name: string;
4485
+ queueName: string;
4486
+ deliveryDelay?: number;
4487
+ raw?: boolean;
4488
+ } | {
4489
+ type: "service";
4490
+ name: string;
4491
+ service: string;
4492
+ environment?: string;
4493
+ entrypoint?: string;
4494
+ } | {
4495
+ type: "ai";
4496
+ name: string;
4497
+ staging?: boolean;
4498
+ raw?: boolean;
4499
+ } | {
4500
+ type: "browser";
4501
+ name: string;
4502
+ raw?: boolean;
4503
+ } | {
4504
+ type: "images";
4505
+ name: string;
4506
+ raw?: boolean;
4507
+ } | {
4508
+ type: "vectorize";
4509
+ name: string;
4510
+ indexName: string;
4511
+ raw?: boolean;
4512
+ } | {
4513
+ type: "workflow";
4514
+ name: string;
4515
+ workflowName: string;
4516
+ className: string;
4517
+ scriptName?: string;
4518
+ raw?: boolean;
4519
+ } | {
4520
+ type: "hyperdrive";
4521
+ name: string;
4522
+ id: string;
4523
+ } | {
4524
+ type: "analytics_engine";
4525
+ name: string;
4526
+ dataset?: string;
4527
+ } | {
4528
+ type: "dispatch_namespace";
4529
+ name: string;
4530
+ namespace: string;
4531
+ outbound?: {
4532
+ worker?: {
4533
+ service?: string;
4534
+ environment?: string;
4535
+ };
4536
+ params?: {
4537
+ name: string;
4538
+ }[];
4539
+ };
4540
+ } | {
4541
+ type: "send_email";
4542
+ name: string;
4543
+ destinationAddress?: string;
4544
+ allowedDestinationAddresses?: string[];
4545
+ allowedSenderAddresses?: string[];
4546
+ } | {
4547
+ type: "mtls_certificate";
4548
+ name: string;
4549
+ certificateId: string;
4550
+ } | {
4551
+ type: "wasm_module";
4552
+ name: string;
4553
+ part: string;
4554
+ } | {
4555
+ type: "text_blob";
4556
+ name: string;
4557
+ part: string;
4558
+ } | {
4559
+ type: "data_blob";
4560
+ name: string;
4561
+ part: string;
4562
+ } | {
4563
+ type: "pipelines";
4564
+ name: string;
4565
+ pipeline: string;
4566
+ } | {
4567
+ type: "secrets_store_secret";
4568
+ name: string;
4569
+ storeId: string;
4570
+ secretName: string;
4571
+ } | {
4572
+ type: "stream";
4573
+ name: string;
4574
+ } | {
4575
+ type: "media";
4576
+ name: string;
4577
+ } | {
4578
+ type: "version_metadata";
4579
+ name: string;
4580
+ } | {
4581
+ type: "assets";
4582
+ name: string;
4583
+ } | {
4584
+ type: "worker_loader";
4585
+ name: string;
4586
+ } | {
4587
+ type: "logfwdr";
4588
+ name: string;
4589
+ destination: string;
4590
+ } | {
4591
+ type: "ai_search_namespace";
4592
+ name: string;
4593
+ namespace: string;
4594
+ } | {
4595
+ type: "ai_search";
4596
+ name: string;
4597
+ instanceName: string;
4598
+ } | {
4599
+ type: "ratelimit";
4600
+ name: string;
4601
+ namespaceId: string;
4602
+ simple: {
4603
+ limit: number;
4604
+ period: "10" | "60";
4605
+ };
4606
+ } | {
4607
+ type: "inherit";
4608
+ name: string;
4609
+ })[];
4610
+ keepBindings?: string[];
4611
+ migrations?: {
4612
+ oldTag?: string;
4613
+ newTag?: string;
4614
+ steps?: {
4615
+ newClasses?: string[];
4616
+ newSqliteClasses?: string[];
4617
+ renamedClasses?: {
4618
+ from?: string;
4619
+ to?: string;
4620
+ }[];
4621
+ deletedClasses?: string[];
4622
+ }[];
4623
+ };
4624
+ capnpSchema?: string;
4625
+ logpush?: boolean;
4626
+ placement?: {
4627
+ mode: "smart";
4628
+ hint?: string;
4629
+ } | {
4630
+ region: string;
4631
+ } | {
4632
+ host: string;
4633
+ } | {
4634
+ hostname: string;
4635
+ };
4636
+ tailConsumers?: {
4637
+ service: string;
4638
+ environment?: string;
4639
+ }[];
4640
+ streamingTailConsumers?: {
4641
+ service: string;
4642
+ environment?: string;
4643
+ }[];
4644
+ limits?: {
4645
+ cpuMs?: number;
4646
+ subrequests?: number;
4647
+ };
4648
+ assets?: {
4649
+ jwt?: string;
4650
+ config?: {
4651
+ htmlHandling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
4652
+ notFoundHandling?: "single-page-application" | "404-page" | "none";
4653
+ runWorkerFirst?: boolean | string[];
4654
+ redirects?: string;
4655
+ headers?: string;
4656
+ };
4657
+ };
4658
+ observability?: {
4659
+ enabled?: boolean;
4660
+ headSamplingRate?: number;
4661
+ logs?: {
4662
+ enabled?: boolean;
4663
+ headSamplingRate?: number;
4664
+ invocationLogs?: boolean;
4665
+ persist?: boolean;
4666
+ destinations?: string[];
4667
+ };
4668
+ traces?: {
4669
+ enabled?: boolean;
4670
+ headSamplingRate?: number;
4671
+ persist?: boolean;
4672
+ destinations?: string[];
4673
+ };
4674
+ };
4675
+ containers?: {
4676
+ className: string;
4677
+ }[];
4678
+ annotations?: unknown;
4679
+ keepAssets?: boolean;
4680
+ tags?: string[];
4681
+ };
4682
+ /** Module files comprising the worker script. */
4683
+ files?: (File | Blob)[];
4684
+ wranglerSessionConfig?: {
4685
+ workersDev: true;
4686
+ minimalMode?: boolean;
4687
+ } | {
4688
+ routes: string[];
4689
+ minimalMode?: boolean;
4690
+ };
4691
+ }
4692
+ export declare const CreateServiceEdgePreviewRequest: Schema.Schema<CreateServiceEdgePreviewRequest>;
4693
+ export interface CreateServiceEdgePreviewResponse {
4694
+ /** Token to send as cf-workers-preview-token header when making requests to the preview host. */
4695
+ previewToken: string;
4696
+ /** URL for tailing live logs from the preview worker. */
4697
+ tailUrl: string;
4698
+ }
4699
+ export declare const CreateServiceEdgePreviewResponse: Schema.Schema<CreateServiceEdgePreviewResponse>;
4700
+ export type CreateServiceEdgePreviewError = DefaultErrors | InvalidRoute;
4701
+ export declare const createServiceEdgePreview: API.OperationMethod<CreateServiceEdgePreviewRequest, CreateServiceEdgePreviewResponse, CreateServiceEdgePreviewError, Credentials | HttpClient.HttpClient>;
4169
4702
  export interface GetSubdomainRequest {
4170
4703
  /** Identifier. */
4171
4704
  accountId: string;
@@ -4199,5 +4732,31 @@ export type DeleteSubdomainResponse = unknown;
4199
4732
  export declare const DeleteSubdomainResponse: Schema.Schema<DeleteSubdomainResponse>;
4200
4733
  export type DeleteSubdomainError = DefaultErrors | InvalidRoute;
4201
4734
  export declare const deleteSubdomain: API.OperationMethod<DeleteSubdomainRequest, DeleteSubdomainResponse, DeleteSubdomainError, Credentials | HttpClient.HttpClient>;
4735
+ export interface CreateSubdomainEdgePreviewSessionRequest {
4736
+ accountId: string;
4737
+ }
4738
+ export declare const CreateSubdomainEdgePreviewSessionRequest: Schema.Schema<CreateSubdomainEdgePreviewSessionRequest>;
4739
+ export interface CreateSubdomainEdgePreviewSessionResponse {
4740
+ /** Session token used as cf-preview-upload-config-token when uploading a preview worker. */
4741
+ token: string;
4742
+ /** Optional URL to exchange the token for a re-encoded version. */
4743
+ exchangeUrl?: string | null;
4744
+ }
4745
+ export declare const CreateSubdomainEdgePreviewSessionResponse: Schema.Schema<CreateSubdomainEdgePreviewSessionResponse>;
4746
+ export type CreateSubdomainEdgePreviewSessionError = DefaultErrors | InvalidRoute;
4747
+ export declare const createSubdomainEdgePreviewSession: API.OperationMethod<CreateSubdomainEdgePreviewSessionRequest, CreateSubdomainEdgePreviewSessionResponse, CreateSubdomainEdgePreviewSessionError, Credentials | HttpClient.HttpClient>;
4748
+ export interface CreateZoneEdgePreviewSessionRequest {
4749
+ zoneId: string;
4750
+ }
4751
+ export declare const CreateZoneEdgePreviewSessionRequest: Schema.Schema<CreateZoneEdgePreviewSessionRequest>;
4752
+ export interface CreateZoneEdgePreviewSessionResponse {
4753
+ /** Session token used as cf-preview-upload-config-token when uploading a preview worker. */
4754
+ token: string;
4755
+ /** Optional URL to exchange the token for a re-encoded version. */
4756
+ exchangeUrl?: string | null;
4757
+ }
4758
+ export declare const CreateZoneEdgePreviewSessionResponse: Schema.Schema<CreateZoneEdgePreviewSessionResponse>;
4759
+ export type CreateZoneEdgePreviewSessionError = DefaultErrors | InvalidRoute;
4760
+ export declare const createZoneEdgePreviewSession: API.OperationMethod<CreateZoneEdgePreviewSessionRequest, CreateZoneEdgePreviewSessionResponse, CreateZoneEdgePreviewSessionError, Credentials | HttpClient.HttpClient>;
4202
4761
  export {};
4203
4762
  //# sourceMappingURL=workers.d.ts.map