mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 20:01:04 +00:00
added API docs
This commit is contained in:
+10
@@ -4,6 +4,8 @@ import { sleep } from "./utils.js";
|
||||
|
||||
/**
|
||||
* Gets Zero Trust lists.
|
||||
*
|
||||
* API docs: https://developers.cloudflare.com/api/operations/zero-trust-lists-list-zero-trust-lists
|
||||
* @returns {Promise<Object>}
|
||||
*/
|
||||
export const getZeroTrustLists = () =>
|
||||
@@ -83,6 +85,8 @@ export const createZeroTrustListsAtOnce = async (items) => {
|
||||
|
||||
/**
|
||||
* Deletes a Zero Trust list.
|
||||
*
|
||||
* API docs: https://developers.cloudflare.com/api/operations/zero-trust-lists-delete-zero-trust-list
|
||||
* @param {number} id The ID of the list.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@@ -129,6 +133,8 @@ export const deleteZeroTrustListsAtOnce = async (lists) => {
|
||||
|
||||
/**
|
||||
* Gets Zero Trust rules.
|
||||
*
|
||||
* API docs: https://developers.cloudflare.com/api/operations/zero-trust-gateway-rules-list-zero-trust-gateway-rules
|
||||
* @returns {Promise<Object>}
|
||||
*/
|
||||
export const getZeroTrustRules = () =>
|
||||
@@ -136,6 +142,8 @@ export const getZeroTrustRules = () =>
|
||||
|
||||
/**
|
||||
* Creates a Zero Trust rule.
|
||||
*
|
||||
* API docs: https://developers.cloudflare.com/api/operations/zero-trust-gateway-rules-create-zero-trust-gateway-rule
|
||||
* @param {string} wirefilterExpression The expression to be used for the rule.
|
||||
* @returns {Promise<Object>}
|
||||
*/
|
||||
@@ -155,6 +163,8 @@ export const createZeroTrustRule = (wirefilterExpression) =>
|
||||
|
||||
/**
|
||||
* Deletes a Zero Trust rule.
|
||||
*
|
||||
* API docs: https://developers.cloudflare.com/api/operations/zero-trust-gateway-rules-delete-zero-trust-gateway-rule
|
||||
* @param {number} id The ID of the rule to be deleted.
|
||||
* @returns {Promise<Object>}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user