@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.
Files changed (51) hide show
  1. package/lib/schemas.d.ts +7 -8
  2. package/lib/schemas.d.ts.map +1 -1
  3. package/lib/schemas.js +9 -12
  4. package/lib/schemas.js.map +1 -1
  5. package/lib/services/custom-pages.d.ts +40 -13
  6. package/lib/services/custom-pages.d.ts.map +1 -1
  7. package/lib/services/custom-pages.js +68 -15
  8. package/lib/services/custom-pages.js.map +1 -1
  9. package/lib/services/firewall.d.ts +66 -23
  10. package/lib/services/firewall.d.ts.map +1 -1
  11. package/lib/services/firewall.js +120 -26
  12. package/lib/services/firewall.js.map +1 -1
  13. package/lib/services/intel.d.ts +2 -0
  14. package/lib/services/intel.d.ts.map +1 -1
  15. package/lib/services/intel.js +2 -0
  16. package/lib/services/intel.js.map +1 -1
  17. package/lib/services/logpush.d.ts +157 -64
  18. package/lib/services/logpush.d.ts.map +1 -1
  19. package/lib/services/logpush.js +292 -63
  20. package/lib/services/logpush.js.map +1 -1
  21. package/lib/services/r2.d.ts +29 -2
  22. package/lib/services/r2.d.ts.map +1 -1
  23. package/lib/services/r2.js +20 -6
  24. package/lib/services/r2.js.map +1 -1
  25. package/lib/services/rulesets.d.ts +204 -69
  26. package/lib/services/rulesets.d.ts.map +1 -1
  27. package/lib/services/rulesets.js +5077 -4705
  28. package/lib/services/rulesets.js.map +1 -1
  29. package/lib/services/security-center.d.ts +66 -19
  30. package/lib/services/security-center.d.ts.map +1 -1
  31. package/lib/services/security-center.js +128 -22
  32. package/lib/services/security-center.js.map +1 -1
  33. package/lib/services/waiting-rooms.d.ts +14 -3
  34. package/lib/services/waiting-rooms.d.ts.map +1 -1
  35. package/lib/services/waiting-rooms.js +25 -7
  36. package/lib/services/waiting-rooms.js.map +1 -1
  37. package/lib/services/zero-trust.d.ts +579 -204
  38. package/lib/services/zero-trust.d.ts.map +1 -1
  39. package/lib/services/zero-trust.js +1159 -268
  40. package/lib/services/zero-trust.js.map +1 -1
  41. package/package.json +2 -2
  42. package/src/schemas.ts +19 -17
  43. package/src/services/custom-pages.ts +170 -66
  44. package/src/services/firewall.ts +300 -121
  45. package/src/services/intel.ts +4 -0
  46. package/src/services/logpush.ts +798 -372
  47. package/src/services/r2.ts +66 -9
  48. package/src/services/rulesets.ts +9882 -9033
  49. package/src/services/security-center.ts +247 -63
  50. package/src/services/waiting-rooms.ts +49 -11
  51. package/src/services/zero-trust.ts +4097 -2417
@@ -8,7 +8,10 @@ import * as Schema from "effect/Schema";
8
8
  import * as API from "../client/api.js";
9
9
  import * as T from "../traits.js";
10
10
  import {} from "../errors.js";
11
- export const GetDatasetFieldRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
11
+ // =============================================================================
12
+ // DatasetField
13
+ // =============================================================================
14
+ const GetDatasetFieldBaseFields = {
12
15
  datasetId: Schema.Union([
13
16
  Schema.Literal("access_requests"),
14
17
  Schema.Literal("audit_logs"),
@@ -42,18 +45,39 @@ export const GetDatasetFieldRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
42
45
  Schema.Literal("zero_trust_network_sessions"),
43
46
  Schema.Null,
44
47
  ]).pipe(T.HttpPath("datasetId")),
48
+ };
49
+ export const GetDatasetFieldForAccountRequest =
50
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
51
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
52
+ ...GetDatasetFieldBaseFields,
53
+ }).pipe(T.Http({
54
+ method: "GET",
55
+ path: "/accounts/{account_id}/logpush/datasets/{datasetId}/fields",
56
+ }));
57
+ export const GetDatasetFieldForZoneRequest =
58
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
59
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
60
+ ...GetDatasetFieldBaseFields,
45
61
  }).pipe(T.Http({
46
62
  method: "GET",
47
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/datasets/{datasetId}/fields",
63
+ path: "/zones/{zone_id}/logpush/datasets/{datasetId}/fields",
48
64
  }));
49
65
  export const GetDatasetFieldResponse =
50
66
  /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
51
- export const getDatasetField = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
52
- input: GetDatasetFieldRequest,
67
+ export const getDatasetFieldForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
68
+ input: GetDatasetFieldForAccountRequest,
69
+ output: GetDatasetFieldResponse,
70
+ errors: [],
71
+ }));
72
+ export const getDatasetFieldForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
73
+ input: GetDatasetFieldForZoneRequest,
53
74
  output: GetDatasetFieldResponse,
54
75
  errors: [],
55
76
  }));
56
- export const GetDatasetJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
77
+ // =============================================================================
78
+ // DatasetJob
79
+ // =============================================================================
80
+ const GetDatasetJobBaseFields = {
57
81
  datasetId: Schema.Union([
58
82
  Schema.Literal("access_requests"),
59
83
  Schema.Literal("audit_logs"),
@@ -87,9 +111,22 @@ export const GetDatasetJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
87
111
  Schema.Literal("zero_trust_network_sessions"),
88
112
  Schema.Null,
89
113
  ]).pipe(T.HttpPath("datasetId")),
114
+ };
115
+ export const GetDatasetJobForAccountRequest =
116
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
117
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
118
+ ...GetDatasetJobBaseFields,
90
119
  }).pipe(T.Http({
91
120
  method: "GET",
92
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/datasets/{datasetId}/jobs",
121
+ path: "/accounts/{account_id}/logpush/datasets/{datasetId}/jobs",
122
+ }));
123
+ export const GetDatasetJobForZoneRequest =
124
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
125
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
126
+ ...GetDatasetJobBaseFields,
127
+ }).pipe(T.Http({
128
+ method: "GET",
129
+ path: "/zones/{zone_id}/logpush/datasets/{datasetId}/jobs",
93
130
  }));
94
131
  export const GetDatasetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
95
132
  result: Schema.Array(Schema.Union([
@@ -197,8 +234,17 @@ export const GetDatasetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
197
234
  Schema.Null,
198
235
  ])),
199
236
  });
200
- export const getDatasetJob = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
201
- input: GetDatasetJobRequest,
237
+ export const getDatasetJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
238
+ input: GetDatasetJobForAccountRequest,
239
+ output: GetDatasetJobResponse,
240
+ errors: [],
241
+ pagination: {
242
+ mode: "single",
243
+ items: "result",
244
+ },
245
+ }));
246
+ export const getDatasetJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
247
+ input: GetDatasetJobForZoneRequest,
202
248
  output: GetDatasetJobResponse,
203
249
  errors: [],
204
250
  pagination: {
@@ -262,30 +308,60 @@ export const createEdge = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
262
308
  output: CreateEdgeResponse,
263
309
  errors: [],
264
310
  }));
265
- export const DestinationExistsValidateRequest =
311
+ // =============================================================================
312
+ // ExistsValidate
313
+ // =============================================================================
314
+ const DestinationExistsValidateBaseFields = {
315
+ destinationConf: Schema.String,
316
+ };
317
+ export const DestinationExistsValidateForAccountRequest =
266
318
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
267
319
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
320
+ ...DestinationExistsValidateBaseFields,
321
+ }).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
322
+ method: "POST",
323
+ path: "/accounts/{account_id}/logpush/validate/destination/exists",
324
+ }));
325
+ export const DestinationExistsValidateForZoneRequest =
326
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
268
327
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
269
- destinationConf: Schema.String,
328
+ ...DestinationExistsValidateBaseFields,
270
329
  }).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
271
330
  method: "POST",
272
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/validate/destination/exists",
331
+ path: "/zones/{zone_id}/logpush/validate/destination/exists",
273
332
  }));
274
333
  export const DestinationExistsValidateResponse =
275
334
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
276
335
  exists: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
277
336
  }).pipe(T.ResponsePath("result"));
278
- export const destinationExistsValidate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
279
- input: DestinationExistsValidateRequest,
337
+ export const destinationExistsValidateForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
338
+ input: DestinationExistsValidateForAccountRequest,
339
+ output: DestinationExistsValidateResponse,
340
+ errors: [],
341
+ }));
342
+ export const destinationExistsValidateForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
343
+ input: DestinationExistsValidateForZoneRequest,
280
344
  output: DestinationExistsValidateResponse,
281
345
  errors: [],
282
346
  }));
283
- export const GetJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
347
+ // =============================================================================
348
+ // Job
349
+ // =============================================================================
350
+ const GetJobBaseFields = {
284
351
  jobId: Schema.Number.pipe(T.HttpPath("jobId")),
352
+ };
353
+ export const GetJobForAccountRequest =
354
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
355
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
356
+ ...GetJobBaseFields,
285
357
  }).pipe(T.Http({
286
358
  method: "GET",
287
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs/{jobId}",
359
+ path: "/accounts/{account_id}/logpush/jobs/{jobId}",
288
360
  }));
361
+ export const GetJobForZoneRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
362
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
363
+ ...GetJobBaseFields,
364
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }));
289
365
  export const GetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
290
366
  id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
291
367
  dataset: Schema.optional(Schema.Union([
@@ -385,15 +461,26 @@ export const GetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
385
461
  outputOptions: "output_options",
386
462
  }))
387
463
  .pipe(T.ResponsePath("result"));
388
- export const getJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
389
- input: GetJobRequest,
464
+ export const getJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
465
+ input: GetJobForAccountRequest,
390
466
  output: GetJobResponse,
391
467
  errors: [],
392
468
  }));
393
- export const ListJobsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.Http({
394
- method: "GET",
395
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs",
469
+ export const getJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
470
+ input: GetJobForZoneRequest,
471
+ output: GetJobResponse,
472
+ errors: [],
396
473
  }));
474
+ const ListJobsBaseFields = {};
475
+ export const ListJobsForAccountRequest =
476
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
477
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
478
+ ...ListJobsBaseFields,
479
+ }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/logpush/jobs" }));
480
+ export const ListJobsForZoneRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
481
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
482
+ ...ListJobsBaseFields,
483
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/jobs" }));
397
484
  export const ListJobsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
398
485
  result: Schema.Array(Schema.Union([
399
486
  Schema.Struct({
@@ -500,8 +587,8 @@ export const ListJobsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
500
587
  Schema.Null,
501
588
  ])),
502
589
  });
503
- export const listJobs = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
504
- input: ListJobsRequest,
590
+ export const listJobsForAccount = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
591
+ input: ListJobsForAccountRequest,
505
592
  output: ListJobsResponse,
506
593
  errors: [],
507
594
  pagination: {
@@ -509,9 +596,16 @@ export const listJobs = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
509
596
  items: "result",
510
597
  },
511
598
  }));
512
- export const CreateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
513
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
514
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
599
+ export const listJobsForZone = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
600
+ input: ListJobsForZoneRequest,
601
+ output: ListJobsResponse,
602
+ errors: [],
603
+ pagination: {
604
+ mode: "single",
605
+ items: "result",
606
+ },
607
+ }));
608
+ const CreateJobBaseFields = {
515
609
  destinationConf: Schema.String,
516
610
  dataset: Schema.optional(Schema.Union([
517
611
  Schema.Literal("access_requests"),
@@ -586,6 +680,11 @@ export const CreateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
586
680
  Schema.Null,
587
681
  ])),
588
682
  ownershipChallenge: Schema.optional(Schema.String),
683
+ };
684
+ export const CreateJobForAccountRequest =
685
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
686
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
687
+ ...CreateJobBaseFields,
589
688
  }).pipe(Schema.encodeKeys({
590
689
  destinationConf: "destination_conf",
591
690
  dataset: "dataset",
@@ -600,10 +699,26 @@ export const CreateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
600
699
  name: "name",
601
700
  outputOptions: "output_options",
602
701
  ownershipChallenge: "ownership_challenge",
603
- }), T.Http({
604
- method: "POST",
605
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs",
606
- }));
702
+ }), T.Http({ method: "POST", path: "/accounts/{account_id}/logpush/jobs" }));
703
+ export const CreateJobForZoneRequest =
704
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
705
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
706
+ ...CreateJobBaseFields,
707
+ }).pipe(Schema.encodeKeys({
708
+ destinationConf: "destination_conf",
709
+ dataset: "dataset",
710
+ enabled: "enabled",
711
+ filter: "filter",
712
+ frequency: "frequency",
713
+ kind: "kind",
714
+ logpullOptions: "logpull_options",
715
+ maxUploadBytes: "max_upload_bytes",
716
+ maxUploadIntervalSeconds: "max_upload_interval_seconds",
717
+ maxUploadRecords: "max_upload_records",
718
+ name: "name",
719
+ outputOptions: "output_options",
720
+ ownershipChallenge: "ownership_challenge",
721
+ }), T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/jobs" }));
607
722
  export const CreateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
608
723
  id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
609
724
  dataset: Schema.optional(Schema.Union([
@@ -703,15 +818,18 @@ export const CreateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
703
818
  outputOptions: "output_options",
704
819
  }))
705
820
  .pipe(T.ResponsePath("result"));
706
- export const createJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
707
- input: CreateJobRequest,
821
+ export const createJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
822
+ input: CreateJobForAccountRequest,
823
+ output: CreateJobResponse,
824
+ errors: [],
825
+ }));
826
+ export const createJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
827
+ input: CreateJobForZoneRequest,
708
828
  output: CreateJobResponse,
709
829
  errors: [],
710
830
  }));
711
- export const UpdateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
831
+ const UpdateJobBaseFields = {
712
832
  jobId: Schema.Number.pipe(T.HttpPath("jobId")),
713
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
714
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
715
833
  destinationConf: Schema.optional(Schema.String),
716
834
  enabled: Schema.optional(Schema.Boolean),
717
835
  filter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -753,6 +871,11 @@ export const UpdateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
753
871
  Schema.Null,
754
872
  ])),
755
873
  ownershipChallenge: Schema.optional(Schema.String),
874
+ };
875
+ export const UpdateJobForAccountRequest =
876
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
877
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
878
+ ...UpdateJobBaseFields,
756
879
  }).pipe(Schema.encodeKeys({
757
880
  destinationConf: "destination_conf",
758
881
  enabled: "enabled",
@@ -768,8 +891,26 @@ export const UpdateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
768
891
  ownershipChallenge: "ownership_challenge",
769
892
  }), T.Http({
770
893
  method: "PUT",
771
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs/{jobId}",
894
+ path: "/accounts/{account_id}/logpush/jobs/{jobId}",
772
895
  }));
896
+ export const UpdateJobForZoneRequest =
897
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
898
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
899
+ ...UpdateJobBaseFields,
900
+ }).pipe(Schema.encodeKeys({
901
+ destinationConf: "destination_conf",
902
+ enabled: "enabled",
903
+ filter: "filter",
904
+ frequency: "frequency",
905
+ kind: "kind",
906
+ logpullOptions: "logpull_options",
907
+ maxUploadBytes: "max_upload_bytes",
908
+ maxUploadIntervalSeconds: "max_upload_interval_seconds",
909
+ maxUploadRecords: "max_upload_records",
910
+ name: "name",
911
+ outputOptions: "output_options",
912
+ ownershipChallenge: "ownership_challenge",
913
+ }), T.Http({ method: "PUT", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }));
773
914
  export const UpdateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
774
915
  id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
775
916
  dataset: Schema.optional(Schema.Union([
@@ -869,99 +1010,187 @@ export const UpdateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
869
1010
  outputOptions: "output_options",
870
1011
  }))
871
1012
  .pipe(T.ResponsePath("result"));
872
- export const updateJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
873
- input: UpdateJobRequest,
1013
+ export const updateJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1014
+ input: UpdateJobForAccountRequest,
1015
+ output: UpdateJobResponse,
1016
+ errors: [],
1017
+ }));
1018
+ export const updateJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1019
+ input: UpdateJobForZoneRequest,
874
1020
  output: UpdateJobResponse,
875
1021
  errors: [],
876
1022
  }));
877
- export const DeleteJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1023
+ const DeleteJobBaseFields = {
878
1024
  jobId: Schema.Number.pipe(T.HttpPath("jobId")),
1025
+ };
1026
+ export const DeleteJobForAccountRequest =
1027
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1028
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1029
+ ...DeleteJobBaseFields,
879
1030
  }).pipe(T.Http({
880
1031
  method: "DELETE",
881
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs/{jobId}",
1032
+ path: "/accounts/{account_id}/logpush/jobs/{jobId}",
882
1033
  }));
1034
+ export const DeleteJobForZoneRequest =
1035
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1036
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1037
+ ...DeleteJobBaseFields,
1038
+ }).pipe(T.Http({ method: "DELETE", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }));
883
1039
  export const DeleteJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
884
1040
  id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
885
1041
  }).pipe(T.ResponsePath("result"));
886
- export const deleteJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
887
- input: DeleteJobRequest,
1042
+ export const deleteJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1043
+ input: DeleteJobForAccountRequest,
888
1044
  output: DeleteJobResponse,
889
1045
  errors: [],
890
1046
  }));
891
- export const CreateOwnershipRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
892
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
893
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1047
+ export const deleteJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1048
+ input: DeleteJobForZoneRequest,
1049
+ output: DeleteJobResponse,
1050
+ errors: [],
1051
+ }));
1052
+ // =============================================================================
1053
+ // Ownership
1054
+ // =============================================================================
1055
+ const CreateOwnershipBaseFields = {
894
1056
  destinationConf: Schema.String,
1057
+ };
1058
+ export const CreateOwnershipForAccountRequest =
1059
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1060
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1061
+ ...CreateOwnershipBaseFields,
895
1062
  }).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
896
1063
  method: "POST",
897
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/ownership",
1064
+ path: "/accounts/{account_id}/logpush/ownership",
898
1065
  }));
1066
+ export const CreateOwnershipForZoneRequest =
1067
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1068
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1069
+ ...CreateOwnershipBaseFields,
1070
+ }).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/ownership" }));
899
1071
  export const CreateOwnershipResponse =
900
1072
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
901
1073
  filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
902
1074
  message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
903
1075
  valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
904
1076
  }).pipe(T.ResponsePath("result"));
905
- export const createOwnership = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
906
- input: CreateOwnershipRequest,
1077
+ export const createOwnershipForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1078
+ input: CreateOwnershipForAccountRequest,
907
1079
  output: CreateOwnershipResponse,
908
1080
  errors: [],
909
1081
  }));
910
- export const ValidateOwnershipRequest =
1082
+ export const createOwnershipForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1083
+ input: CreateOwnershipForZoneRequest,
1084
+ output: CreateOwnershipResponse,
1085
+ errors: [],
1086
+ }));
1087
+ const ValidateOwnershipBaseFields = {
1088
+ destinationConf: Schema.String,
1089
+ ownershipChallenge: Schema.String,
1090
+ };
1091
+ export const ValidateOwnershipForAccountRequest =
911
1092
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
912
1093
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1094
+ ...ValidateOwnershipBaseFields,
1095
+ }).pipe(Schema.encodeKeys({
1096
+ destinationConf: "destination_conf",
1097
+ ownershipChallenge: "ownership_challenge",
1098
+ }), T.Http({
1099
+ method: "POST",
1100
+ path: "/accounts/{account_id}/logpush/ownership/validate",
1101
+ }));
1102
+ export const ValidateOwnershipForZoneRequest =
1103
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
913
1104
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
914
- destinationConf: Schema.String,
915
- ownershipChallenge: Schema.String,
1105
+ ...ValidateOwnershipBaseFields,
916
1106
  }).pipe(Schema.encodeKeys({
917
1107
  destinationConf: "destination_conf",
918
1108
  ownershipChallenge: "ownership_challenge",
919
1109
  }), T.Http({
920
1110
  method: "POST",
921
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/ownership/validate",
1111
+ path: "/zones/{zone_id}/logpush/ownership/validate",
922
1112
  }));
923
1113
  export const ValidateOwnershipResponse =
924
1114
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
925
1115
  valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
926
1116
  }).pipe(T.ResponsePath("result"));
927
- export const validateOwnership = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
928
- input: ValidateOwnershipRequest,
1117
+ export const validateOwnershipForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1118
+ input: ValidateOwnershipForAccountRequest,
929
1119
  output: ValidateOwnershipResponse,
930
1120
  errors: [],
931
1121
  }));
932
- export const DestinationValidateRequest =
1122
+ export const validateOwnershipForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1123
+ input: ValidateOwnershipForZoneRequest,
1124
+ output: ValidateOwnershipResponse,
1125
+ errors: [],
1126
+ }));
1127
+ // =============================================================================
1128
+ // Validate
1129
+ // =============================================================================
1130
+ const DestinationValidateBaseFields = {
1131
+ destinationConf: Schema.String,
1132
+ };
1133
+ export const DestinationValidateForAccountRequest =
933
1134
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
934
1135
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1136
+ ...DestinationValidateBaseFields,
1137
+ }).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
1138
+ method: "POST",
1139
+ path: "/accounts/{account_id}/logpush/validate/destination",
1140
+ }));
1141
+ export const DestinationValidateForZoneRequest =
1142
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
935
1143
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
936
- destinationConf: Schema.String,
1144
+ ...DestinationValidateBaseFields,
937
1145
  }).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
938
1146
  method: "POST",
939
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/validate/destination",
1147
+ path: "/zones/{zone_id}/logpush/validate/destination",
940
1148
  }));
941
1149
  export const DestinationValidateResponse =
942
1150
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
943
1151
  message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
944
1152
  valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
945
1153
  }).pipe(T.ResponsePath("result"));
946
- export const destinationValidate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
947
- input: DestinationValidateRequest,
1154
+ export const destinationValidateForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1155
+ input: DestinationValidateForAccountRequest,
948
1156
  output: DestinationValidateResponse,
949
1157
  errors: [],
950
1158
  }));
951
- export const OriginValidateRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1159
+ export const destinationValidateForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1160
+ input: DestinationValidateForZoneRequest,
1161
+ output: DestinationValidateResponse,
1162
+ errors: [],
1163
+ }));
1164
+ const OriginValidateBaseFields = {
1165
+ logpullOptions: Schema.Union([Schema.String, Schema.Null]),
1166
+ };
1167
+ export const OriginValidateForAccountRequest =
1168
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
952
1169
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
1170
+ ...OriginValidateBaseFields,
1171
+ }).pipe(Schema.encodeKeys({ logpullOptions: "logpull_options" }), T.Http({
1172
+ method: "POST",
1173
+ path: "/accounts/{account_id}/logpush/validate/origin",
1174
+ }));
1175
+ export const OriginValidateForZoneRequest =
1176
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
953
1177
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
954
- logpullOptions: Schema.Union([Schema.String, Schema.Null]),
1178
+ ...OriginValidateBaseFields,
955
1179
  }).pipe(Schema.encodeKeys({ logpullOptions: "logpull_options" }), T.Http({
956
1180
  method: "POST",
957
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/validate/origin",
1181
+ path: "/zones/{zone_id}/logpush/validate/origin",
958
1182
  }));
959
1183
  export const OriginValidateResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
960
1184
  message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
961
1185
  valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
962
1186
  }).pipe(T.ResponsePath("result"));
963
- export const originValidate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
964
- input: OriginValidateRequest,
1187
+ export const originValidateForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1188
+ input: OriginValidateForAccountRequest,
1189
+ output: OriginValidateResponse,
1190
+ errors: [],
1191
+ }));
1192
+ export const originValidateForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1193
+ input: OriginValidateForZoneRequest,
965
1194
  output: OriginValidateResponse,
966
1195
  errors: [],
967
1196
  }));