{
 "version": 1,
 "destinations": {
  "api": {
   "origin": "https://api.cloudflare.com",
   "network": "public"
  }
 },
 "credentials": {
  "primary": {
   "service_ref": "{{CF_SERVICE_REF}}",
   "account_ref": "{{CF_ACCOUNT_REF}}",
   "generation": 1
  }
 },
 "authentication": [
  {
   "id": "auth",
   "kind": "bearer",
   "credential": "primary"
  }
 ],
 "operations": {
  "zone_get": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "dns_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/dns_records",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string"
     },
     "type": {
      "type": "string"
     },
     "per_page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "name": {
     "parameter": "name"
    },
    "type": {
     "parameter": "type"
    },
    "per_page": {
     "parameter": "per_page"
    }
   }
  },
  "worker_settings_get": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/settings",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "worker_subdomain_get": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/subdomain",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "deployments_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/deployments",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "versions_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/versions",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "per_page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "per_page": {
     "parameter": "per_page"
    }
   }
  },
  "version_get": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/versions/{version_id}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "version_id": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "custom_domains_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/domains",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "hostname": {
      "type": "string"
     },
     "service": {
      "type": "string"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "hostname": {
     "parameter": "hostname"
    },
    "service": {
     "parameter": "service"
    }
   }
  },
  "builds_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/builds/workers/{script_tag}/builds",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "script_tag": {
      "type": "string",
      "required": true
     },
     "per_page": {
      "type": "integer"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "per_page": {
     "parameter": "per_page"
    }
   }
  },
  "build_get": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/builds/builds/{build_uuid}",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "build_uuid": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "build_logs": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/builds/builds/{build_uuid}/logs",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "build_uuid": {
      "type": "string",
      "required": true
     },
     "cursor": {
      "type": "string"
     }
    }
   },
   "response": {
    "format": "json"
   },
   "query": {
    "cursor": {
     "parameter": "cursor"
    }
   }
  },
  "build_triggers_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/builds/workers/{script_tag}/triggers",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "script_tag": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "telemetry_query": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/observability/telemetry/query",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "queryId": {
        "type": "string"
       },
       "timeframe": {
        "type": "object",
        "properties": {
         "from": {
          "type": "integer"
         },
         "to": {
          "type": "integer"
         }
        }
       },
       "view": {
        "type": "string"
       },
       "limit": {
        "type": "integer"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "deployment_create": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/deployments",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "strategy": {
        "type": "string"
       },
       "versions": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "version_id": {
           "type": "string"
          },
          "percentage": {
           "type": "number"
          }
         }
        }
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "build_trigger_run": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/builds/triggers/{trigger_uuid}/builds",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "trigger_uuid": {
      "type": "string",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "branch": {
        "type": "string"
       },
       "commit_hash": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "custom_domain_attach": {
   "destination": "api",
   "method": "PUT",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/domains",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "hostname": {
        "type": "string"
       },
       "service": {
        "type": "string"
       },
       "zone_id": {
        "type": "string"
       },
       "environment": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "worker_subdomain_set": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/scripts/{{WORKER_NAME}}/subdomain",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "enabled": {
        "type": "boolean"
       },
       "previews_enabled": {
        "type": "boolean"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "dns_create": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/dns_records",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "type": {
        "type": "string"
       },
       "name": {
        "type": "string"
       },
       "content": {
        "type": "string"
       },
       "proxied": {
        "type": "boolean"
       },
       "ttl": {
        "type": "integer"
       },
       "comment": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "dns_update": {
   "destination": "api",
   "method": "PATCH",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/dns_records/{record_id}",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "record_id": {
      "type": "string",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "content": {
        "type": "string"
       },
       "proxied": {
        "type": "boolean"
       },
       "ttl": {
        "type": "integer"
       },
       "comment": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "custom_domain_detach": {
   "destination": "api",
   "method": "DELETE",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/workers/domains/{domain_id}",
   "effect": "destructive",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "domain_id": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "dns_delete": {
   "destination": "api",
   "method": "DELETE",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/dns_records/{record_id}",
   "effect": "destructive",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "record_id": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "r2_buckets_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/r2/buckets",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "r2_bucket_create": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/r2/buckets",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "name": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "routes_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/workers/routes",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {}
   },
   "response": {
    "format": "json"
   }
  },
  "route_create": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/workers/routes",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "pattern": {
        "type": "string"
       },
       "script": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "route_update": {
   "destination": "api",
   "method": "PUT",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/workers/routes/{route_id}",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "route_id": {
      "type": "string",
      "required": true
     },
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "pattern": {
        "type": "string"
       },
       "script": {
        "type": "string"
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "route_delete": {
   "destination": "api",
   "method": "DELETE",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/workers/routes/{route_id}",
   "effect": "destructive",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "route_id": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "cache_purge": {
   "destination": "api",
   "method": "POST",
   "path": "/client/v4/zones/{{CF_ZONE_ID}}/purge_cache",
   "effect": "write",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "body": {
      "type": "object",
      "required": true,
      "properties": {
       "purge_everything": {
        "type": "boolean"
       },
       "files": {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      }
     }
    }
   },
   "response": {
    "format": "json"
   },
   "body_parameter": "body"
  },
  "r2_object_put": {
   "destination": "api",
   "method": "PUT",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/r2/buckets/{{R2_BUCKET}}/objects/{key}",
   "effect": "write",
   "format": "binary",
   "body_sources": [
    "file"
   ],
   "parameters": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  },
  "r2_objects_list": {
   "destination": "api",
   "method": "GET",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/r2/buckets/{{R2_BUCKET}}/objects",
   "effect": "read",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "prefix": {
      "type": "string"
     },
     "cursor": {
      "type": "string"
     },
     "per_page": {
      "type": "integer"
     }
    }
   },
   "query": {
    "prefix": {
     "parameter": "prefix"
    },
    "cursor": {
     "parameter": "cursor"
    },
    "per_page": {
     "parameter": "per_page"
    }
   },
   "response": {
    "format": "json"
   }
  },
  "r2_object_delete": {
   "destination": "api",
   "method": "DELETE",
   "path": "/client/v4/accounts/{{CF_ACCOUNT_ID}}/r2/buckets/{{R2_BUCKET}}/objects/{key}",
   "effect": "destructive",
   "format": "json",
   "parameters": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string",
      "required": true
     }
    }
   },
   "response": {
    "format": "json"
   }
  }
 }
}