export interface BucketPolicyAuth { type: "bucket_policy"; account_id: string; } export interface RoleAuth { type: "role"; account_id: string; external_id?: string; /** The ARN of the role to assume to perform bucket management operations. */ role?: string; } export type ResourceAuth = BucketPolicyAuth | RoleAuth; export interface Resource { id: string; company_id: number; auth: ResourceAuth; name: string; created_at: string; updated_at: string; is_access_mutable: boolean; } export interface RoleBasedBucketAccess { type: "role"; external_id?: string; } export interface PolicyBasedBucketAccess { type: "bucket_policy"; } export interface UpdateAccessTypeRequest { bucket_name: string; new_access: BucketAccess; } export type BucketAccess = RoleBasedBucketAccess | PolicyBasedBucketAccess; export interface BucketCreationRequest { account_id: string; resource_id: string; /** Defaults server-side to role-based access (with no external id) when omitted. */ access?: BucketAccess; }