cloudflare 3.0.0-beta.8 → 3.0.0-beta.9

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 (67) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +6 -6
  3. package/index.d.mts +1 -5
  4. package/index.d.ts +1 -5
  5. package/index.d.ts.map +1 -1
  6. package/index.js +1 -1
  7. package/index.js.map +1 -1
  8. package/index.mjs +1 -1
  9. package/index.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/dns/dns.d.ts +1 -6
  12. package/resources/dns/dns.d.ts.map +1 -1
  13. package/resources/dns/dns.js +1 -1
  14. package/resources/dns/dns.js.map +1 -1
  15. package/resources/dns/dns.mjs +1 -1
  16. package/resources/dns/dns.mjs.map +1 -1
  17. package/resources/dns/index.d.ts +1 -1
  18. package/resources/dns/index.d.ts.map +1 -1
  19. package/resources/dns/index.js +2 -2
  20. package/resources/dns/index.js.map +1 -1
  21. package/resources/dns/index.mjs +1 -1
  22. package/resources/dns/index.mjs.map +1 -1
  23. package/resources/dns/records.d.ts +16 -9776
  24. package/resources/dns/records.d.ts.map +1 -1
  25. package/resources/dns/records.js +8 -5
  26. package/resources/dns/records.js.map +1 -1
  27. package/resources/dns/records.mjs +6 -3
  28. package/resources/dns/records.mjs.map +1 -1
  29. package/resources/index.d.ts +1 -1
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +2 -2
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +1 -1
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/zero-trust/dlp/profiles/custom.d.ts +13 -0
  36. package/resources/zero-trust/dlp/profiles/custom.d.ts.map +1 -1
  37. package/resources/zero-trust/dlp/profiles/custom.js.map +1 -1
  38. package/resources/zero-trust/dlp/profiles/custom.mjs.map +1 -1
  39. package/resources/zero-trust/dlp/profiles/predefined.d.ts +9 -0
  40. package/resources/zero-trust/dlp/profiles/predefined.d.ts.map +1 -1
  41. package/resources/zero-trust/dlp/profiles/predefined.js.map +1 -1
  42. package/resources/zero-trust/dlp/profiles/predefined.mjs.map +1 -1
  43. package/resources/zones/index.d.ts +1 -1
  44. package/resources/zones/index.d.ts.map +1 -1
  45. package/resources/zones/index.js +2 -2
  46. package/resources/zones/index.js.map +1 -1
  47. package/resources/zones/index.mjs +1 -1
  48. package/resources/zones/index.mjs.map +1 -1
  49. package/resources/zones/zones.d.ts +7 -491
  50. package/resources/zones/zones.d.ts.map +1 -1
  51. package/resources/zones/zones.js +5 -5
  52. package/resources/zones/zones.js.map +1 -1
  53. package/resources/zones/zones.mjs +3 -3
  54. package/resources/zones/zones.mjs.map +1 -1
  55. package/src/index.ts +1 -5
  56. package/src/resources/dns/dns.ts +1 -6
  57. package/src/resources/dns/index.ts +1 -6
  58. package/src/resources/dns/records.ts +25 -11876
  59. package/src/resources/index.ts +1 -5
  60. package/src/resources/zero-trust/dlp/profiles/custom.ts +16 -0
  61. package/src/resources/zero-trust/dlp/profiles/predefined.ts +11 -0
  62. package/src/resources/zones/index.ts +1 -5
  63. package/src/resources/zones/zones.ts +15 -603
  64. package/src/version.ts +1 -1
  65. package/version.d.ts +1 -1
  66. package/version.js +1 -1
  67. package/version.mjs +1 -1
@@ -25,9 +25,9 @@ export class Zones extends APIResource {
25
25
  /**
26
26
  * Create Zone
27
27
  */
28
- create(body: ZoneCreateParams, options?: Core.RequestOptions): Core.APIPromise<ZoneCreateResponse> {
28
+ create(body: ZoneCreateParams, options?: Core.RequestOptions): Core.APIPromise<Zone> {
29
29
  return (
30
- this._client.post('/zones', { body, ...options }) as Core.APIPromise<{ result: ZoneCreateResponse }>
30
+ this._client.post('/zones', { body, ...options }) as Core.APIPromise<{ result: Zone }>
31
31
  )._thenUnwrap((obj) => obj.result);
32
32
  }
33
33
 
@@ -37,18 +37,16 @@ export class Zones extends APIResource {
37
37
  list(
38
38
  query?: ZoneListParams,
39
39
  options?: Core.RequestOptions,
40
- ): Core.PagePromise<ZoneListResponsesV4PagePaginationArray, ZoneListResponse>;
41
- list(
42
- options?: Core.RequestOptions,
43
- ): Core.PagePromise<ZoneListResponsesV4PagePaginationArray, ZoneListResponse>;
40
+ ): Core.PagePromise<ZonesV4PagePaginationArray, Zone>;
41
+ list(options?: Core.RequestOptions): Core.PagePromise<ZonesV4PagePaginationArray, Zone>;
44
42
  list(
45
43
  query: ZoneListParams | Core.RequestOptions = {},
46
44
  options?: Core.RequestOptions,
47
- ): Core.PagePromise<ZoneListResponsesV4PagePaginationArray, ZoneListResponse> {
45
+ ): Core.PagePromise<ZonesV4PagePaginationArray, Zone> {
48
46
  if (isRequestOptions(query)) {
49
47
  return this.list({}, query);
50
48
  }
51
- return this._client.getAPIList('/zones', ZoneListResponsesV4PagePaginationArray, { query, ...options });
49
+ return this._client.getAPIList('/zones', ZonesV4PagePaginationArray, { query, ...options });
52
50
  }
53
51
 
54
52
  /**
@@ -69,27 +67,25 @@ export class Zones extends APIResource {
69
67
  /**
70
68
  * Edits a zone. Only one zone property can be changed at a time.
71
69
  */
72
- edit(params: ZoneEditParams, options?: Core.RequestOptions): Core.APIPromise<ZoneEditResponse> {
70
+ edit(params: ZoneEditParams, options?: Core.RequestOptions): Core.APIPromise<Zone> {
73
71
  const { zone_id, ...body } = params;
74
72
  return (
75
- this._client.patch(`/zones/${zone_id}`, { body, ...options }) as Core.APIPromise<{
76
- result: ZoneEditResponse;
77
- }>
73
+ this._client.patch(`/zones/${zone_id}`, { body, ...options }) as Core.APIPromise<{ result: Zone }>
78
74
  )._thenUnwrap((obj) => obj.result);
79
75
  }
80
76
 
81
77
  /**
82
78
  * Zone Details
83
79
  */
84
- get(params: ZoneGetParams, options?: Core.RequestOptions): Core.APIPromise<ZoneGetResponse> {
80
+ get(params: ZoneGetParams, options?: Core.RequestOptions): Core.APIPromise<Zone> {
85
81
  const { zone_id } = params;
86
- return (
87
- this._client.get(`/zones/${zone_id}`, options) as Core.APIPromise<{ result: ZoneGetResponse }>
88
- )._thenUnwrap((obj) => obj.result);
82
+ return (this._client.get(`/zones/${zone_id}`, options) as Core.APIPromise<{ result: Zone }>)._thenUnwrap(
83
+ (obj) => obj.result,
84
+ );
89
85
  }
90
86
  }
91
87
 
92
- export class ZoneListResponsesV4PagePaginationArray extends V4PagePaginationArray<ZoneListResponse> {}
88
+ export class ZonesV4PagePaginationArray extends V4PagePaginationArray<Zone> {}
93
89
 
94
90
  export interface Zone {
95
91
  /**
@@ -236,591 +232,11 @@ export namespace Zone {
236
232
  }
237
233
  }
238
234
 
239
- export interface ZoneCreateResponse {
240
- /**
241
- * Identifier
242
- */
243
- id: string;
244
-
245
- /**
246
- * The account the zone belongs to
247
- */
248
- account: ZoneCreateResponse.Account;
249
-
250
- /**
251
- * The last time proof of ownership was detected and the zone was made active
252
- */
253
- activated_on: string | null;
254
-
255
- /**
256
- * When the zone was created
257
- */
258
- created_on: string;
259
-
260
- /**
261
- * The interval (in seconds) from when development mode expires (positive integer)
262
- * or last expired (negative integer) for the domain. If development mode has never
263
- * been enabled, this value is 0.
264
- */
265
- development_mode: number;
266
-
267
- /**
268
- * Metadata about the zone
269
- */
270
- meta: ZoneCreateResponse.Meta;
271
-
272
- /**
273
- * When the zone was last modified
274
- */
275
- modified_on: string;
276
-
277
- /**
278
- * The domain name
279
- */
280
- name: string;
281
-
282
- /**
283
- * DNS host at the time of switching to Cloudflare
284
- */
285
- original_dnshost: string | null;
286
-
287
- /**
288
- * Original name servers before moving to Cloudflare Notes: Is this only available
289
- * for full zones?
290
- */
291
- original_name_servers: Array<string> | null;
292
-
293
- /**
294
- * Registrar for the domain at the time of switching to Cloudflare
295
- */
296
- original_registrar: string | null;
297
-
298
- /**
299
- * The owner of the zone
300
- */
301
- owner: ZoneCreateResponse.Owner;
302
-
303
- /**
304
- * An array of domains used for custom name servers. This is only available for
305
- * Business and Enterprise plans.
306
- */
307
- vanity_name_servers?: Array<string>;
308
- }
309
-
310
- export namespace ZoneCreateResponse {
311
- /**
312
- * The account the zone belongs to
313
- */
314
- export interface Account {
315
- /**
316
- * Identifier
317
- */
318
- id?: string;
319
-
320
- /**
321
- * The name of the account
322
- */
323
- name?: string;
324
- }
325
-
326
- /**
327
- * Metadata about the zone
328
- */
329
- export interface Meta {
330
- /**
331
- * The zone is only configured for CDN
332
- */
333
- cdn_only?: boolean;
334
-
335
- /**
336
- * Number of Custom Certificates the zone can have
337
- */
338
- custom_certificate_quota?: number;
339
-
340
- /**
341
- * The zone is only configured for DNS
342
- */
343
- dns_only?: boolean;
344
-
345
- /**
346
- * The zone is setup with Foundation DNS
347
- */
348
- foundation_dns?: boolean;
349
-
350
- /**
351
- * Number of Page Rules a zone can have
352
- */
353
- page_rule_quota?: number;
354
-
355
- /**
356
- * The zone has been flagged for phishing
357
- */
358
- phishing_detected?: boolean;
359
-
360
- step?: number;
361
- }
362
-
363
- /**
364
- * The owner of the zone
365
- */
366
- export interface Owner {
367
- /**
368
- * Identifier
369
- */
370
- id?: string;
371
-
372
- /**
373
- * Name of the owner
374
- */
375
- name?: string;
376
-
377
- /**
378
- * The type of owner
379
- */
380
- type?: string;
381
- }
382
- }
383
-
384
- export interface ZoneListResponse {
235
+ export interface ZoneDeleteResponse {
385
236
  /**
386
237
  * Identifier
387
238
  */
388
239
  id: string;
389
-
390
- /**
391
- * The account the zone belongs to
392
- */
393
- account: ZoneListResponse.Account;
394
-
395
- /**
396
- * The last time proof of ownership was detected and the zone was made active
397
- */
398
- activated_on: string | null;
399
-
400
- /**
401
- * When the zone was created
402
- */
403
- created_on: string;
404
-
405
- /**
406
- * The interval (in seconds) from when development mode expires (positive integer)
407
- * or last expired (negative integer) for the domain. If development mode has never
408
- * been enabled, this value is 0.
409
- */
410
- development_mode: number;
411
-
412
- /**
413
- * Metadata about the zone
414
- */
415
- meta: ZoneListResponse.Meta;
416
-
417
- /**
418
- * When the zone was last modified
419
- */
420
- modified_on: string;
421
-
422
- /**
423
- * The domain name
424
- */
425
- name: string;
426
-
427
- /**
428
- * DNS host at the time of switching to Cloudflare
429
- */
430
- original_dnshost: string | null;
431
-
432
- /**
433
- * Original name servers before moving to Cloudflare Notes: Is this only available
434
- * for full zones?
435
- */
436
- original_name_servers: Array<string> | null;
437
-
438
- /**
439
- * Registrar for the domain at the time of switching to Cloudflare
440
- */
441
- original_registrar: string | null;
442
-
443
- /**
444
- * The owner of the zone
445
- */
446
- owner: ZoneListResponse.Owner;
447
-
448
- /**
449
- * An array of domains used for custom name servers. This is only available for
450
- * Business and Enterprise plans.
451
- */
452
- vanity_name_servers?: Array<string>;
453
- }
454
-
455
- export namespace ZoneListResponse {
456
- /**
457
- * The account the zone belongs to
458
- */
459
- export interface Account {
460
- /**
461
- * Identifier
462
- */
463
- id?: string;
464
-
465
- /**
466
- * The name of the account
467
- */
468
- name?: string;
469
- }
470
-
471
- /**
472
- * Metadata about the zone
473
- */
474
- export interface Meta {
475
- /**
476
- * The zone is only configured for CDN
477
- */
478
- cdn_only?: boolean;
479
-
480
- /**
481
- * Number of Custom Certificates the zone can have
482
- */
483
- custom_certificate_quota?: number;
484
-
485
- /**
486
- * The zone is only configured for DNS
487
- */
488
- dns_only?: boolean;
489
-
490
- /**
491
- * The zone is setup with Foundation DNS
492
- */
493
- foundation_dns?: boolean;
494
-
495
- /**
496
- * Number of Page Rules a zone can have
497
- */
498
- page_rule_quota?: number;
499
-
500
- /**
501
- * The zone has been flagged for phishing
502
- */
503
- phishing_detected?: boolean;
504
-
505
- step?: number;
506
- }
507
-
508
- /**
509
- * The owner of the zone
510
- */
511
- export interface Owner {
512
- /**
513
- * Identifier
514
- */
515
- id?: string;
516
-
517
- /**
518
- * Name of the owner
519
- */
520
- name?: string;
521
-
522
- /**
523
- * The type of owner
524
- */
525
- type?: string;
526
- }
527
- }
528
-
529
- export interface ZoneDeleteResponse {
530
- /**
531
- * Identifier
532
- */
533
- id: string;
534
- }
535
-
536
- export interface ZoneEditResponse {
537
- /**
538
- * Identifier
539
- */
540
- id: string;
541
-
542
- /**
543
- * The account the zone belongs to
544
- */
545
- account: ZoneEditResponse.Account;
546
-
547
- /**
548
- * The last time proof of ownership was detected and the zone was made active
549
- */
550
- activated_on: string | null;
551
-
552
- /**
553
- * When the zone was created
554
- */
555
- created_on: string;
556
-
557
- /**
558
- * The interval (in seconds) from when development mode expires (positive integer)
559
- * or last expired (negative integer) for the domain. If development mode has never
560
- * been enabled, this value is 0.
561
- */
562
- development_mode: number;
563
-
564
- /**
565
- * Metadata about the zone
566
- */
567
- meta: ZoneEditResponse.Meta;
568
-
569
- /**
570
- * When the zone was last modified
571
- */
572
- modified_on: string;
573
-
574
- /**
575
- * The domain name
576
- */
577
- name: string;
578
-
579
- /**
580
- * DNS host at the time of switching to Cloudflare
581
- */
582
- original_dnshost: string | null;
583
-
584
- /**
585
- * Original name servers before moving to Cloudflare Notes: Is this only available
586
- * for full zones?
587
- */
588
- original_name_servers: Array<string> | null;
589
-
590
- /**
591
- * Registrar for the domain at the time of switching to Cloudflare
592
- */
593
- original_registrar: string | null;
594
-
595
- /**
596
- * The owner of the zone
597
- */
598
- owner: ZoneEditResponse.Owner;
599
-
600
- /**
601
- * An array of domains used for custom name servers. This is only available for
602
- * Business and Enterprise plans.
603
- */
604
- vanity_name_servers?: Array<string>;
605
- }
606
-
607
- export namespace ZoneEditResponse {
608
- /**
609
- * The account the zone belongs to
610
- */
611
- export interface Account {
612
- /**
613
- * Identifier
614
- */
615
- id?: string;
616
-
617
- /**
618
- * The name of the account
619
- */
620
- name?: string;
621
- }
622
-
623
- /**
624
- * Metadata about the zone
625
- */
626
- export interface Meta {
627
- /**
628
- * The zone is only configured for CDN
629
- */
630
- cdn_only?: boolean;
631
-
632
- /**
633
- * Number of Custom Certificates the zone can have
634
- */
635
- custom_certificate_quota?: number;
636
-
637
- /**
638
- * The zone is only configured for DNS
639
- */
640
- dns_only?: boolean;
641
-
642
- /**
643
- * The zone is setup with Foundation DNS
644
- */
645
- foundation_dns?: boolean;
646
-
647
- /**
648
- * Number of Page Rules a zone can have
649
- */
650
- page_rule_quota?: number;
651
-
652
- /**
653
- * The zone has been flagged for phishing
654
- */
655
- phishing_detected?: boolean;
656
-
657
- step?: number;
658
- }
659
-
660
- /**
661
- * The owner of the zone
662
- */
663
- export interface Owner {
664
- /**
665
- * Identifier
666
- */
667
- id?: string;
668
-
669
- /**
670
- * Name of the owner
671
- */
672
- name?: string;
673
-
674
- /**
675
- * The type of owner
676
- */
677
- type?: string;
678
- }
679
- }
680
-
681
- export interface ZoneGetResponse {
682
- /**
683
- * Identifier
684
- */
685
- id: string;
686
-
687
- /**
688
- * The account the zone belongs to
689
- */
690
- account: ZoneGetResponse.Account;
691
-
692
- /**
693
- * The last time proof of ownership was detected and the zone was made active
694
- */
695
- activated_on: string | null;
696
-
697
- /**
698
- * When the zone was created
699
- */
700
- created_on: string;
701
-
702
- /**
703
- * The interval (in seconds) from when development mode expires (positive integer)
704
- * or last expired (negative integer) for the domain. If development mode has never
705
- * been enabled, this value is 0.
706
- */
707
- development_mode: number;
708
-
709
- /**
710
- * Metadata about the zone
711
- */
712
- meta: ZoneGetResponse.Meta;
713
-
714
- /**
715
- * When the zone was last modified
716
- */
717
- modified_on: string;
718
-
719
- /**
720
- * The domain name
721
- */
722
- name: string;
723
-
724
- /**
725
- * DNS host at the time of switching to Cloudflare
726
- */
727
- original_dnshost: string | null;
728
-
729
- /**
730
- * Original name servers before moving to Cloudflare Notes: Is this only available
731
- * for full zones?
732
- */
733
- original_name_servers: Array<string> | null;
734
-
735
- /**
736
- * Registrar for the domain at the time of switching to Cloudflare
737
- */
738
- original_registrar: string | null;
739
-
740
- /**
741
- * The owner of the zone
742
- */
743
- owner: ZoneGetResponse.Owner;
744
-
745
- /**
746
- * An array of domains used for custom name servers. This is only available for
747
- * Business and Enterprise plans.
748
- */
749
- vanity_name_servers?: Array<string>;
750
- }
751
-
752
- export namespace ZoneGetResponse {
753
- /**
754
- * The account the zone belongs to
755
- */
756
- export interface Account {
757
- /**
758
- * Identifier
759
- */
760
- id?: string;
761
-
762
- /**
763
- * The name of the account
764
- */
765
- name?: string;
766
- }
767
-
768
- /**
769
- * Metadata about the zone
770
- */
771
- export interface Meta {
772
- /**
773
- * The zone is only configured for CDN
774
- */
775
- cdn_only?: boolean;
776
-
777
- /**
778
- * Number of Custom Certificates the zone can have
779
- */
780
- custom_certificate_quota?: number;
781
-
782
- /**
783
- * The zone is only configured for DNS
784
- */
785
- dns_only?: boolean;
786
-
787
- /**
788
- * The zone is setup with Foundation DNS
789
- */
790
- foundation_dns?: boolean;
791
-
792
- /**
793
- * Number of Page Rules a zone can have
794
- */
795
- page_rule_quota?: number;
796
-
797
- /**
798
- * The zone has been flagged for phishing
799
- */
800
- phishing_detected?: boolean;
801
-
802
- step?: number;
803
- }
804
-
805
- /**
806
- * The owner of the zone
807
- */
808
- export interface Owner {
809
- /**
810
- * Identifier
811
- */
812
- id?: string;
813
-
814
- /**
815
- * Name of the owner
816
- */
817
- name?: string;
818
-
819
- /**
820
- * The type of owner
821
- */
822
- type?: string;
823
- }
824
240
  }
825
241
 
826
242
  export interface ZoneCreateParams {
@@ -968,12 +384,8 @@ export interface ZoneGetParams {
968
384
 
969
385
  export namespace Zones {
970
386
  export import Zone = ZonesAPI.Zone;
971
- export import ZoneCreateResponse = ZonesAPI.ZoneCreateResponse;
972
- export import ZoneListResponse = ZonesAPI.ZoneListResponse;
973
387
  export import ZoneDeleteResponse = ZonesAPI.ZoneDeleteResponse;
974
- export import ZoneEditResponse = ZonesAPI.ZoneEditResponse;
975
- export import ZoneGetResponse = ZonesAPI.ZoneGetResponse;
976
- export import ZoneListResponsesV4PagePaginationArray = ZonesAPI.ZoneListResponsesV4PagePaginationArray;
388
+ export import ZonesV4PagePaginationArray = ZonesAPI.ZonesV4PagePaginationArray;
977
389
  export import ZoneCreateParams = ZonesAPI.ZoneCreateParams;
978
390
  export import ZoneListParams = ZonesAPI.ZoneListParams;
979
391
  export import ZoneDeleteParams = ZonesAPI.ZoneDeleteParams;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.0.0-beta.8'; // x-release-please-version
1
+ export const VERSION = '3.0.0-beta.9'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.0.0-beta.8";
1
+ export declare const VERSION = "3.0.0-beta.9";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '3.0.0-beta.8'; // x-release-please-version
4
+ exports.VERSION = '3.0.0-beta.9'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.0.0-beta.8'; // x-release-please-version
1
+ export const VERSION = '3.0.0-beta.9'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map