Confirm this is a Typescript library issue and not an underlying Cloudflare API issue
Describe the bug
App-scoped PolicyCreateParams / PolicyUpdateParams missing name, decision, include, require fields
The app-scoped policy endpoints (POST /accounts/{account_id}/access/apps/{app_id}/policies and PUT .../{policy_id}) accept name, decision, include, require, and exclude in the request body — inherited via the access_app_policy_request → access_policy_req → access_base_policy_req allOf chain in the OpenAPI spec.
However, the generated TypeScript types at cloudflare/resources/zero-trust/access/applications/policies.d.ts only include:
export interface PolicyCreateParams {
account_id?: string;
zone_id?: string;
approval_groups?: Array<...>;
approval_required?: boolean;
isolation_required?: boolean;
precedence?: number;
purpose_justification_prompt?: string;
purpose_justification_required?: boolean;
session_duration?: string;
// name, decision, include, require, exclude are missing
}
The account-level policy types at cloudflare/resources/zero-trust/access/policies.d.ts correctly include all fields:
export interface PolicyCreateParams {
account_id: string;
decision: DecisionParam; // ✓
include: Array<AccessRuleParam>; // ✓
name: string; // ✓
require?: Array<AccessRuleParam>; // ✓
exclude?: Array<AccessRuleParam>; // ✓
// ...
}
It looks like the code generator isn't resolving the allOf inheritance chain for the app-scoped variant.
This report generated by Claude
To Reproduce
- Try to use all parameters that are supported
- Get Type Error
Code snippets
OS
Windows
Runtime version
Bun 1.3.9
Library version
v5.2.0
Confirm this is a Typescript library issue and not an underlying Cloudflare API issue
Describe the bug
App-scoped
PolicyCreateParams/PolicyUpdateParamsmissingname,decision,include,requirefieldsThe app-scoped policy endpoints (
POST /accounts/{account_id}/access/apps/{app_id}/policiesandPUT .../{policy_id}) acceptname,decision,include,require, andexcludein the request body — inherited via theaccess_app_policy_request→access_policy_req→access_base_policy_reqallOf chain in the OpenAPI spec.However, the generated TypeScript types at
cloudflare/resources/zero-trust/access/applications/policies.d.tsonly include:The account-level policy types at
cloudflare/resources/zero-trust/access/policies.d.tscorrectly include all fields:It looks like the code generator isn't resolving the
allOfinheritance chain for the app-scoped variant.This report generated by Claude
To Reproduce
Code snippets
OS
Windows
Runtime version
Bun 1.3.9
Library version
v5.2.0