{"version":3,"file":"beta-get-project-network-restrictions.mjs","names":[],"sources":["../../src/actions/beta-get-project-network-restrictions.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { supabase } from \"../app\";\n\nexport const SupabaseBetaGetProjectNetworkRestrictionsInput = z.object({\n  ref: z.string().describe(\"The unique project reference ID (also called project ID or ref). This is a 20-character alphanumeric string that identifies the Supabase project. Can be found in the project URL or retrieved via SUPABASE_LIST_ALL_PROJECTS.\"),\n}).describe(\"Request model for retrieving the network restrictions of a Supabase project.\");\nconst SupabaseBetaGetProjectNetworkRestrictions_NetworkRestrictionsConfigSchema = z.object({\n  dbAllowedCidrs: z.array(z.string()).describe(\"List of IPv4 CIDR blocks currently allowed to connect to the project's Postgres/database pooler. An empty array means no IPv4 allowlist is currently set.\"),\n  dbAllowedCidrsV6: z.array(z.string()).describe(\"List of IPv6 CIDR blocks currently allowed to connect to the project's Postgres/database pooler. An empty array means no IPv6 allowlist is currently set.\"),\n}).passthrough().describe(\"The current network restrictions configuration associated with the project.\");\nconst SupabaseBetaGetProjectNetworkRestrictions_NetworkRestrictionsOldConfigSchema = z.object({\n  dbAllowedCidrs: z.array(z.string()).describe(\"Previously configured IPv4 CIDR blocks.\"),\n  dbAllowedCidrsV6: z.array(z.string()).describe(\"Previously configured IPv6 CIDR blocks.\"),\n}).passthrough().describe(\"The previously stored network restrictions configuration (prior state).\");\nexport const SupabaseBetaGetProjectNetworkRestrictionsOutput = z.object({\n  config: SupabaseBetaGetProjectNetworkRestrictions_NetworkRestrictionsConfigSchema.nullable(),\n  status: z.string().describe(\"Status of the stored configuration. Examples: \\\"stored\\\" (saved but not yet applied), \\\"applied\\\" (active). Only present after modifications.\").nullable().optional(),\n  applied_at: z.string().describe(\"ISO-8601 timestamp when the configuration was last applied.\").nullable().optional(),\n  old_config: SupabaseBetaGetProjectNetworkRestrictions_NetworkRestrictionsOldConfigSchema.nullable().optional(),\n  updated_at: z.string().describe(\"ISO-8601 timestamp when the configuration was last updated.\").nullable().optional(),\n  entitlement: z.string().describe(\"Whether the project is entitled to use Network Restrictions based on the Supabase plan. Values: \\\"allowed\\\" (Pro/Team/Enterprise plans can configure restrictions) or \\\"disallowed\\\" (Free plan cannot use this feature).\").nullable(),\n}).passthrough().describe(\"Response for retrieving a project's network restrictions. Contains the project's entitlement status, current network restriction configuration (IPv4/IPv6 CIDR allowlists), and optionally the previous configuration and status.\");\n\nexport const supabaseBetaGetProjectNetworkRestrictions: AppAction<\n  typeof SupabaseBetaGetProjectNetworkRestrictionsInput,\n  typeof SupabaseBetaGetProjectNetworkRestrictionsOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_BETA_GET_PROJECT_NETWORK_RESTRICTIONS\", {\n  slug: \"supabase-beta-get-project-network-restrictions\",\n  name: \"Get project network restrictions\",\n  description: \"Retrieves the network restriction settings (IP allowlists) for a Supabase project. Use this action to: - Check which IPv4/IPv6 CIDR blocks are allowed to connect to the project's database - Verify if network restrictions are enabled (entitlement: \\\"allowed\\\") or disabled (\\\"disallowed\\\") - Audit current network security configuration - Check if network restrictions have been modified (old_config present) Note: Default values 0.0.0.0/0 (IPv4) and ::/0 (IPv6) mean all IPs are allowed. Network restrictions require a Pro, Team, or Enterprise plan.\",\n  input: SupabaseBetaGetProjectNetworkRestrictionsInput,\n  output: SupabaseBetaGetProjectNetworkRestrictionsOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,iDAAiD,EAAE,OAAO,EACrE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gOAAgO,EAC3P,CAAC,CAAC,CAAC,SAAS,8EAA8E;AAC1F,MAAM,4EAA4E,EAAE,OAAO;CACzF,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,2JAA2J;CACxM,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,2JAA2J;AAC5M,CAAC,CAAC,CAAC,YAAY,C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