@distilled.cloud/cloudflare 0.19.0 → 0.19.1
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 +200 -65
- package/lib/services/rulesets.d.ts.map +1 -1
- package/lib/services/rulesets.js +371 -75
- 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 +3991 -3426
- 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/firewall.ts
CHANGED
|
@@ -16,18 +16,45 @@ import { type DefaultErrors } from "../errors.ts";
|
|
|
16
16
|
// AccessRule
|
|
17
17
|
// =============================================================================
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const GetAccessRuleBaseFields = {
|
|
20
|
+
ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
interface GetAccessRuleBaseRequest {
|
|
20
24
|
ruleId: string;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
export interface GetAccessRuleForAccountRequest extends GetAccessRuleBaseRequest {
|
|
28
|
+
/** Path param: The Account ID to use for this endpoint. */
|
|
29
|
+
accountId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface GetAccessRuleForZoneRequest extends GetAccessRuleBaseRequest {
|
|
33
|
+
/** Path param: The Zone ID to use for this endpoint. */
|
|
34
|
+
zoneId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const GetAccessRuleForAccountRequest =
|
|
38
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
39
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
40
|
+
...GetAccessRuleBaseFields,
|
|
41
|
+
}).pipe(
|
|
42
|
+
T.Http({
|
|
43
|
+
method: "GET",
|
|
44
|
+
path: "/accounts/{account_id}/firewall/access_rules/rules/{ruleId}",
|
|
45
|
+
}),
|
|
46
|
+
) as unknown as Schema.Schema<GetAccessRuleForAccountRequest>;
|
|
47
|
+
|
|
48
|
+
export const GetAccessRuleForZoneRequest =
|
|
49
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
50
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
51
|
+
...GetAccessRuleBaseFields,
|
|
52
|
+
}).pipe(
|
|
53
|
+
T.Http({
|
|
54
|
+
method: "GET",
|
|
55
|
+
path: "/zones/{zone_id}/firewall/access_rules/rules/{ruleId}",
|
|
56
|
+
}),
|
|
57
|
+
) as unknown as Schema.Schema<GetAccessRuleForZoneRequest>;
|
|
31
58
|
|
|
32
59
|
export interface GetAccessRuleResponse {
|
|
33
60
|
/** The unique identifier of the IP Access rule. */
|
|
@@ -155,27 +182,63 @@ export const GetAccessRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
155
182
|
|
|
156
183
|
export type GetAccessRuleError = DefaultErrors;
|
|
157
184
|
|
|
158
|
-
export const
|
|
159
|
-
|
|
185
|
+
export const getAccessRuleForAccount: API.OperationMethod<
|
|
186
|
+
GetAccessRuleForAccountRequest,
|
|
160
187
|
GetAccessRuleResponse,
|
|
161
188
|
GetAccessRuleError,
|
|
162
189
|
Credentials | HttpClient.HttpClient
|
|
163
190
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
164
|
-
input:
|
|
191
|
+
input: GetAccessRuleForAccountRequest,
|
|
165
192
|
output: GetAccessRuleResponse,
|
|
166
193
|
errors: [],
|
|
167
194
|
}));
|
|
168
195
|
|
|
169
|
-
export
|
|
196
|
+
export const getAccessRuleForZone: API.OperationMethod<
|
|
197
|
+
GetAccessRuleForZoneRequest,
|
|
198
|
+
GetAccessRuleResponse,
|
|
199
|
+
GetAccessRuleError,
|
|
200
|
+
Credentials | HttpClient.HttpClient
|
|
201
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
202
|
+
input: GetAccessRuleForZoneRequest,
|
|
203
|
+
output: GetAccessRuleResponse,
|
|
204
|
+
errors: [],
|
|
205
|
+
}));
|
|
170
206
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
207
|
+
const ListAccessRulesBaseFields = {} as const;
|
|
208
|
+
|
|
209
|
+
interface ListAccessRulesBaseRequest {}
|
|
210
|
+
|
|
211
|
+
export interface ListAccessRulesForAccountRequest extends ListAccessRulesBaseRequest {
|
|
212
|
+
/** Path param: The Account ID to use for this endpoint. */
|
|
213
|
+
accountId: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface ListAccessRulesForZoneRequest extends ListAccessRulesBaseRequest {
|
|
217
|
+
/** Path param: The Zone ID to use for this endpoint. */
|
|
218
|
+
zoneId: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const ListAccessRulesForAccountRequest =
|
|
222
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
223
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
224
|
+
...ListAccessRulesBaseFields,
|
|
225
|
+
}).pipe(
|
|
226
|
+
T.Http({
|
|
227
|
+
method: "GET",
|
|
228
|
+
path: "/accounts/{account_id}/firewall/access_rules/rules",
|
|
229
|
+
}),
|
|
230
|
+
) as unknown as Schema.Schema<ListAccessRulesForAccountRequest>;
|
|
231
|
+
|
|
232
|
+
export const ListAccessRulesForZoneRequest =
|
|
233
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
234
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
235
|
+
...ListAccessRulesBaseFields,
|
|
236
|
+
}).pipe(
|
|
237
|
+
T.Http({
|
|
238
|
+
method: "GET",
|
|
239
|
+
path: "/zones/{zone_id}/firewall/access_rules/rules",
|
|
240
|
+
}),
|
|
241
|
+
) as unknown as Schema.Schema<ListAccessRulesForZoneRequest>;
|
|
179
242
|
|
|
180
243
|
export interface ListAccessRulesResponse {
|
|
181
244
|
result: {
|
|
@@ -328,13 +391,13 @@ export const ListAccessRulesResponse =
|
|
|
328
391
|
|
|
329
392
|
export type ListAccessRulesError = DefaultErrors;
|
|
330
393
|
|
|
331
|
-
export const
|
|
332
|
-
|
|
394
|
+
export const listAccessRulesForAccount: API.PaginatedOperationMethod<
|
|
395
|
+
ListAccessRulesForAccountRequest,
|
|
333
396
|
ListAccessRulesResponse,
|
|
334
397
|
ListAccessRulesError,
|
|
335
398
|
Credentials | HttpClient.HttpClient
|
|
336
399
|
> = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
|
|
337
|
-
input:
|
|
400
|
+
input: ListAccessRulesForAccountRequest,
|
|
338
401
|
output: ListAccessRulesResponse,
|
|
339
402
|
errors: [],
|
|
340
403
|
pagination: {
|
|
@@ -346,11 +409,58 @@ export const listAccessRules: API.PaginatedOperationMethod<
|
|
|
346
409
|
} as const,
|
|
347
410
|
}));
|
|
348
411
|
|
|
349
|
-
export
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
412
|
+
export const listAccessRulesForZone: API.PaginatedOperationMethod<
|
|
413
|
+
ListAccessRulesForZoneRequest,
|
|
414
|
+
ListAccessRulesResponse,
|
|
415
|
+
ListAccessRulesError,
|
|
416
|
+
Credentials | HttpClient.HttpClient
|
|
417
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
|
|
418
|
+
input: ListAccessRulesForZoneRequest,
|
|
419
|
+
output: ListAccessRulesResponse,
|
|
420
|
+
errors: [],
|
|
421
|
+
pagination: {
|
|
422
|
+
mode: "page",
|
|
423
|
+
inputToken: "page",
|
|
424
|
+
outputToken: "resultInfo.page",
|
|
425
|
+
items: "result",
|
|
426
|
+
pageSize: "perPage",
|
|
427
|
+
} as const,
|
|
428
|
+
}));
|
|
429
|
+
|
|
430
|
+
const CreateAccessRuleBaseFields = {
|
|
431
|
+
configuration: Schema.Union([
|
|
432
|
+
Schema.Struct({
|
|
433
|
+
target: Schema.optional(Schema.Literal("ip")),
|
|
434
|
+
value: Schema.optional(Schema.String),
|
|
435
|
+
}),
|
|
436
|
+
Schema.Struct({
|
|
437
|
+
target: Schema.optional(Schema.Literal("ip6")),
|
|
438
|
+
value: Schema.optional(Schema.String),
|
|
439
|
+
}),
|
|
440
|
+
Schema.Struct({
|
|
441
|
+
target: Schema.optional(Schema.Literal("ip_range")),
|
|
442
|
+
value: Schema.optional(Schema.String),
|
|
443
|
+
}),
|
|
444
|
+
Schema.Struct({
|
|
445
|
+
target: Schema.optional(Schema.Literal("asn")),
|
|
446
|
+
value: Schema.optional(Schema.String),
|
|
447
|
+
}),
|
|
448
|
+
Schema.Struct({
|
|
449
|
+
target: Schema.optional(Schema.Literal("country")),
|
|
450
|
+
value: Schema.optional(Schema.String),
|
|
451
|
+
}),
|
|
452
|
+
]),
|
|
453
|
+
mode: Schema.Literals([
|
|
454
|
+
"block",
|
|
455
|
+
"challenge",
|
|
456
|
+
"whitelist",
|
|
457
|
+
"js_challenge",
|
|
458
|
+
"managed_challenge",
|
|
459
|
+
]),
|
|
460
|
+
notes: Schema.optional(Schema.String),
|
|
461
|
+
} as const;
|
|
462
|
+
|
|
463
|
+
interface CreateAccessRuleBaseRequest {
|
|
354
464
|
/** Body param: The rule configuration. */
|
|
355
465
|
configuration:
|
|
356
466
|
| { target?: "ip"; value?: string }
|
|
@@ -369,46 +479,37 @@ export interface CreateAccessRuleRequest {
|
|
|
369
479
|
notes?: string;
|
|
370
480
|
}
|
|
371
481
|
|
|
372
|
-
export
|
|
482
|
+
export interface CreateAccessRuleForAccountRequest extends CreateAccessRuleBaseRequest {
|
|
483
|
+
/** Path param: The Account ID to use for this endpoint. */
|
|
484
|
+
accountId: string;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface CreateAccessRuleForZoneRequest extends CreateAccessRuleBaseRequest {
|
|
488
|
+
/** Path param: The Zone ID to use for this endpoint. */
|
|
489
|
+
zoneId: string;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export const CreateAccessRuleForAccountRequest =
|
|
373
493
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
374
494
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
495
|
+
...CreateAccessRuleBaseFields,
|
|
496
|
+
}).pipe(
|
|
497
|
+
T.Http({
|
|
498
|
+
method: "POST",
|
|
499
|
+
path: "/accounts/{account_id}/firewall/access_rules/rules",
|
|
500
|
+
}),
|
|
501
|
+
) as unknown as Schema.Schema<CreateAccessRuleForAccountRequest>;
|
|
502
|
+
|
|
503
|
+
export const CreateAccessRuleForZoneRequest =
|
|
504
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
375
505
|
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
376
|
-
|
|
377
|
-
Schema.Struct({
|
|
378
|
-
target: Schema.optional(Schema.Literal("ip")),
|
|
379
|
-
value: Schema.optional(Schema.String),
|
|
380
|
-
}),
|
|
381
|
-
Schema.Struct({
|
|
382
|
-
target: Schema.optional(Schema.Literal("ip6")),
|
|
383
|
-
value: Schema.optional(Schema.String),
|
|
384
|
-
}),
|
|
385
|
-
Schema.Struct({
|
|
386
|
-
target: Schema.optional(Schema.Literal("ip_range")),
|
|
387
|
-
value: Schema.optional(Schema.String),
|
|
388
|
-
}),
|
|
389
|
-
Schema.Struct({
|
|
390
|
-
target: Schema.optional(Schema.Literal("asn")),
|
|
391
|
-
value: Schema.optional(Schema.String),
|
|
392
|
-
}),
|
|
393
|
-
Schema.Struct({
|
|
394
|
-
target: Schema.optional(Schema.Literal("country")),
|
|
395
|
-
value: Schema.optional(Schema.String),
|
|
396
|
-
}),
|
|
397
|
-
]),
|
|
398
|
-
mode: Schema.Literals([
|
|
399
|
-
"block",
|
|
400
|
-
"challenge",
|
|
401
|
-
"whitelist",
|
|
402
|
-
"js_challenge",
|
|
403
|
-
"managed_challenge",
|
|
404
|
-
]),
|
|
405
|
-
notes: Schema.optional(Schema.String),
|
|
506
|
+
...CreateAccessRuleBaseFields,
|
|
406
507
|
}).pipe(
|
|
407
508
|
T.Http({
|
|
408
509
|
method: "POST",
|
|
409
|
-
path: "/
|
|
510
|
+
path: "/zones/{zone_id}/firewall/access_rules/rules",
|
|
410
511
|
}),
|
|
411
|
-
) as unknown as Schema.Schema<
|
|
512
|
+
) as unknown as Schema.Schema<CreateAccessRuleForZoneRequest>;
|
|
412
513
|
|
|
413
514
|
export interface CreateAccessRuleResponse {
|
|
414
515
|
/** The unique identifier of the IP Access rule. */
|
|
@@ -537,23 +638,64 @@ export const CreateAccessRuleResponse =
|
|
|
537
638
|
|
|
538
639
|
export type CreateAccessRuleError = DefaultErrors;
|
|
539
640
|
|
|
540
|
-
export const
|
|
541
|
-
|
|
641
|
+
export const createAccessRuleForAccount: API.OperationMethod<
|
|
642
|
+
CreateAccessRuleForAccountRequest,
|
|
643
|
+
CreateAccessRuleResponse,
|
|
644
|
+
CreateAccessRuleError,
|
|
645
|
+
Credentials | HttpClient.HttpClient
|
|
646
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
647
|
+
input: CreateAccessRuleForAccountRequest,
|
|
648
|
+
output: CreateAccessRuleResponse,
|
|
649
|
+
errors: [],
|
|
650
|
+
}));
|
|
651
|
+
|
|
652
|
+
export const createAccessRuleForZone: API.OperationMethod<
|
|
653
|
+
CreateAccessRuleForZoneRequest,
|
|
542
654
|
CreateAccessRuleResponse,
|
|
543
655
|
CreateAccessRuleError,
|
|
544
656
|
Credentials | HttpClient.HttpClient
|
|
545
657
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
546
|
-
input:
|
|
658
|
+
input: CreateAccessRuleForZoneRequest,
|
|
547
659
|
output: CreateAccessRuleResponse,
|
|
548
660
|
errors: [],
|
|
549
661
|
}));
|
|
550
662
|
|
|
551
|
-
|
|
663
|
+
const PatchAccessRuleBaseFields = {
|
|
664
|
+
ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
|
|
665
|
+
configuration: Schema.Union([
|
|
666
|
+
Schema.Struct({
|
|
667
|
+
target: Schema.optional(Schema.Literal("ip")),
|
|
668
|
+
value: Schema.optional(Schema.String),
|
|
669
|
+
}),
|
|
670
|
+
Schema.Struct({
|
|
671
|
+
target: Schema.optional(Schema.Literal("ip6")),
|
|
672
|
+
value: Schema.optional(Schema.String),
|
|
673
|
+
}),
|
|
674
|
+
Schema.Struct({
|
|
675
|
+
target: Schema.optional(Schema.Literal("ip_range")),
|
|
676
|
+
value: Schema.optional(Schema.String),
|
|
677
|
+
}),
|
|
678
|
+
Schema.Struct({
|
|
679
|
+
target: Schema.optional(Schema.Literal("asn")),
|
|
680
|
+
value: Schema.optional(Schema.String),
|
|
681
|
+
}),
|
|
682
|
+
Schema.Struct({
|
|
683
|
+
target: Schema.optional(Schema.Literal("country")),
|
|
684
|
+
value: Schema.optional(Schema.String),
|
|
685
|
+
}),
|
|
686
|
+
]),
|
|
687
|
+
mode: Schema.Literals([
|
|
688
|
+
"block",
|
|
689
|
+
"challenge",
|
|
690
|
+
"whitelist",
|
|
691
|
+
"js_challenge",
|
|
692
|
+
"managed_challenge",
|
|
693
|
+
]),
|
|
694
|
+
notes: Schema.optional(Schema.String),
|
|
695
|
+
} as const;
|
|
696
|
+
|
|
697
|
+
interface PatchAccessRuleBaseRequest {
|
|
552
698
|
ruleId: string;
|
|
553
|
-
/** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
|
|
554
|
-
accountId?: string;
|
|
555
|
-
/** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
|
|
556
|
-
zoneId?: string;
|
|
557
699
|
/** Body param: The rule configuration. */
|
|
558
700
|
configuration:
|
|
559
701
|
| { target?: "ip"; value?: string }
|
|
@@ -572,48 +714,37 @@ export interface PatchAccessRuleRequest {
|
|
|
572
714
|
notes?: string;
|
|
573
715
|
}
|
|
574
716
|
|
|
575
|
-
export
|
|
576
|
-
|
|
577
|
-
|
|
717
|
+
export interface PatchAccessRuleForAccountRequest extends PatchAccessRuleBaseRequest {
|
|
718
|
+
/** Path param: The Account ID to use for this endpoint. */
|
|
719
|
+
accountId: string;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export interface PatchAccessRuleForZoneRequest extends PatchAccessRuleBaseRequest {
|
|
723
|
+
/** Path param: The Zone ID to use for this endpoint. */
|
|
724
|
+
zoneId: string;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export const PatchAccessRuleForAccountRequest =
|
|
728
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
578
729
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
730
|
+
...PatchAccessRuleBaseFields,
|
|
731
|
+
}).pipe(
|
|
732
|
+
T.Http({
|
|
733
|
+
method: "PATCH",
|
|
734
|
+
path: "/accounts/{account_id}/firewall/access_rules/rules/{ruleId}",
|
|
735
|
+
}),
|
|
736
|
+
) as unknown as Schema.Schema<PatchAccessRuleForAccountRequest>;
|
|
737
|
+
|
|
738
|
+
export const PatchAccessRuleForZoneRequest =
|
|
739
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
579
740
|
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
value: Schema.optional(Schema.String),
|
|
588
|
-
}),
|
|
589
|
-
Schema.Struct({
|
|
590
|
-
target: Schema.optional(Schema.Literal("ip_range")),
|
|
591
|
-
value: Schema.optional(Schema.String),
|
|
592
|
-
}),
|
|
593
|
-
Schema.Struct({
|
|
594
|
-
target: Schema.optional(Schema.Literal("asn")),
|
|
595
|
-
value: Schema.optional(Schema.String),
|
|
596
|
-
}),
|
|
597
|
-
Schema.Struct({
|
|
598
|
-
target: Schema.optional(Schema.Literal("country")),
|
|
599
|
-
value: Schema.optional(Schema.String),
|
|
600
|
-
}),
|
|
601
|
-
]),
|
|
602
|
-
mode: Schema.Literals([
|
|
603
|
-
"block",
|
|
604
|
-
"challenge",
|
|
605
|
-
"whitelist",
|
|
606
|
-
"js_challenge",
|
|
607
|
-
"managed_challenge",
|
|
608
|
-
]),
|
|
609
|
-
notes: Schema.optional(Schema.String),
|
|
610
|
-
},
|
|
611
|
-
).pipe(
|
|
612
|
-
T.Http({
|
|
613
|
-
method: "PATCH",
|
|
614
|
-
path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
|
|
615
|
-
}),
|
|
616
|
-
) as unknown as Schema.Schema<PatchAccessRuleRequest>;
|
|
741
|
+
...PatchAccessRuleBaseFields,
|
|
742
|
+
}).pipe(
|
|
743
|
+
T.Http({
|
|
744
|
+
method: "PATCH",
|
|
745
|
+
path: "/zones/{zone_id}/firewall/access_rules/rules/{ruleId}",
|
|
746
|
+
}),
|
|
747
|
+
) as unknown as Schema.Schema<PatchAccessRuleForZoneRequest>;
|
|
617
748
|
|
|
618
749
|
export interface PatchAccessRuleResponse {
|
|
619
750
|
/** The unique identifier of the IP Access rule. */
|
|
@@ -742,30 +873,67 @@ export const PatchAccessRuleResponse =
|
|
|
742
873
|
|
|
743
874
|
export type PatchAccessRuleError = DefaultErrors;
|
|
744
875
|
|
|
745
|
-
export const
|
|
746
|
-
|
|
876
|
+
export const patchAccessRuleForAccount: API.OperationMethod<
|
|
877
|
+
PatchAccessRuleForAccountRequest,
|
|
747
878
|
PatchAccessRuleResponse,
|
|
748
879
|
PatchAccessRuleError,
|
|
749
880
|
Credentials | HttpClient.HttpClient
|
|
750
881
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
751
|
-
input:
|
|
882
|
+
input: PatchAccessRuleForAccountRequest,
|
|
752
883
|
output: PatchAccessRuleResponse,
|
|
753
884
|
errors: [],
|
|
754
885
|
}));
|
|
755
886
|
|
|
756
|
-
export
|
|
887
|
+
export const patchAccessRuleForZone: API.OperationMethod<
|
|
888
|
+
PatchAccessRuleForZoneRequest,
|
|
889
|
+
PatchAccessRuleResponse,
|
|
890
|
+
PatchAccessRuleError,
|
|
891
|
+
Credentials | HttpClient.HttpClient
|
|
892
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
893
|
+
input: PatchAccessRuleForZoneRequest,
|
|
894
|
+
output: PatchAccessRuleResponse,
|
|
895
|
+
errors: [],
|
|
896
|
+
}));
|
|
897
|
+
|
|
898
|
+
const DeleteAccessRuleBaseFields = {
|
|
899
|
+
ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
|
|
900
|
+
} as const;
|
|
901
|
+
|
|
902
|
+
interface DeleteAccessRuleBaseRequest {
|
|
757
903
|
ruleId: string;
|
|
758
904
|
}
|
|
759
905
|
|
|
760
|
-
export
|
|
906
|
+
export interface DeleteAccessRuleForAccountRequest extends DeleteAccessRuleBaseRequest {
|
|
907
|
+
/** Path param: The Account ID to use for this endpoint. */
|
|
908
|
+
accountId: string;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export interface DeleteAccessRuleForZoneRequest extends DeleteAccessRuleBaseRequest {
|
|
912
|
+
/** Path param: The Zone ID to use for this endpoint. */
|
|
913
|
+
zoneId: string;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
export const DeleteAccessRuleForAccountRequest =
|
|
761
917
|
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
762
|
-
|
|
918
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
919
|
+
...DeleteAccessRuleBaseFields,
|
|
920
|
+
}).pipe(
|
|
921
|
+
T.Http({
|
|
922
|
+
method: "DELETE",
|
|
923
|
+
path: "/accounts/{account_id}/firewall/access_rules/rules/{ruleId}",
|
|
924
|
+
}),
|
|
925
|
+
) as unknown as Schema.Schema<DeleteAccessRuleForAccountRequest>;
|
|
926
|
+
|
|
927
|
+
export const DeleteAccessRuleForZoneRequest =
|
|
928
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
929
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
930
|
+
...DeleteAccessRuleBaseFields,
|
|
763
931
|
}).pipe(
|
|
764
932
|
T.Http({
|
|
765
933
|
method: "DELETE",
|
|
766
|
-
path: "/
|
|
934
|
+
path: "/zones/{zone_id}/firewall/access_rules/rules/{ruleId}",
|
|
767
935
|
}),
|
|
768
|
-
) as unknown as Schema.Schema<
|
|
936
|
+
) as unknown as Schema.Schema<DeleteAccessRuleForZoneRequest>;
|
|
769
937
|
|
|
770
938
|
export interface DeleteAccessRuleResponse {
|
|
771
939
|
/** Defines an identifier. */
|
|
@@ -781,13 +949,24 @@ export const DeleteAccessRuleResponse =
|
|
|
781
949
|
|
|
782
950
|
export type DeleteAccessRuleError = DefaultErrors;
|
|
783
951
|
|
|
784
|
-
export const
|
|
785
|
-
|
|
952
|
+
export const deleteAccessRuleForAccount: API.OperationMethod<
|
|
953
|
+
DeleteAccessRuleForAccountRequest,
|
|
954
|
+
DeleteAccessRuleResponse,
|
|
955
|
+
DeleteAccessRuleError,
|
|
956
|
+
Credentials | HttpClient.HttpClient
|
|
957
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
958
|
+
input: DeleteAccessRuleForAccountRequest,
|
|
959
|
+
output: DeleteAccessRuleResponse,
|
|
960
|
+
errors: [],
|
|
961
|
+
}));
|
|
962
|
+
|
|
963
|
+
export const deleteAccessRuleForZone: API.OperationMethod<
|
|
964
|
+
DeleteAccessRuleForZoneRequest,
|
|
786
965
|
DeleteAccessRuleResponse,
|
|
787
966
|
DeleteAccessRuleError,
|
|
788
967
|
Credentials | HttpClient.HttpClient
|
|
789
968
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
790
|
-
input:
|
|
969
|
+
input: DeleteAccessRuleForZoneRequest,
|
|
791
970
|
output: DeleteAccessRuleResponse,
|
|
792
971
|
errors: [],
|
|
793
972
|
}));
|
package/src/services/intel.ts
CHANGED
|
@@ -19,10 +19,12 @@ import { type DefaultErrors } from "../errors.ts";
|
|
|
19
19
|
export interface GetAsnRequest {
|
|
20
20
|
/** Identifier. */
|
|
21
21
|
accountId: string;
|
|
22
|
+
asn: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export const GetAsnRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
25
26
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
27
|
+
asn: Schema.String.pipe(T.HttpPath("asn")),
|
|
26
28
|
}).pipe(
|
|
27
29
|
T.Http({ method: "GET", path: "/accounts/{account_id}/intel/asn/{asn}" }),
|
|
28
30
|
) as unknown as Schema.Schema<GetAsnRequest>;
|
|
@@ -53,10 +55,12 @@ export const getAsn: API.OperationMethod<
|
|
|
53
55
|
export interface GetAsnSubnetRequest {
|
|
54
56
|
/** Identifier. */
|
|
55
57
|
accountId: string;
|
|
58
|
+
asn: string;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
export const GetAsnSubnetRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
59
62
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
63
|
+
asn: Schema.String.pipe(T.HttpPath("asn")),
|
|
60
64
|
}).pipe(
|
|
61
65
|
T.Http({
|
|
62
66
|
method: "GET",
|