{"version":3,"file":"create-third-party-auth-integration.mjs","names":[],"sources":["../../src/actions/create-third-party-auth-integration.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 SupabaseCreateThirdPartyAuthIntegrationInput = z.object({\n  ref: z.string().describe(\"The unique identifier of the Supabase project.\"),\n  jwks_url: z.string().describe(\"URL of the JSON Web Key Set (JWKS) for public key verification. Required if `oidc_issuer_url` is not provided.\").optional(),\n  oidc_issuer_url: z.string().describe(\"URL of the OpenID Connect (OIDC) issuer. Required if `jwks_url` is not provided.\").optional(),\n}).describe(\"Request schema for `CreateThirdPartyAuthIntegration`\");\nexport const SupabaseCreateThirdPartyAuthIntegrationOutput = z.object({\n  id: z.string().describe(\"Unique identifier of the third-party auth integration (UUID).\").nullable(),\n  type: z.string().describe(\"Integration type as determined by the configuration (e.g., custom, oidc, jwks).\").nullable(),\n  jwks_url: z.string().describe(\"Direct URL to the JSON Web Key Set (JWKS) if configured. Mutually exclusive with oidc_issuer_url.\").nullable().optional(),\n  updated_at: z.string().describe(\"Timestamp when the integration was last updated (ISO 8601).\").nullable(),\n  custom_jwks: z.record(z.string(), z.unknown()).describe(\"Custom JWKS object provided directly when creating the integration, if used.\").nullable().optional(),\n  inserted_at: z.string().describe(\"Timestamp when the integration was created (ISO 8601).\").nullable(),\n  resolved_at: z.string().describe(\"Timestamp when the JWKS for this integration was last resolved/refreshed (ISO 8601).\").nullable().optional(),\n  resolved_jwks: z.record(z.string(), z.unknown()).describe(\"The effective JWKS that Supabase resolved for this integration (discovered or fetched).\").nullable().optional(),\n  oidc_issuer_url: z.string().describe(\"OIDC Issuer Discovery URL for the provider, if configured. Mutually exclusive with jwks_url.\").nullable().optional(),\n}).passthrough().describe(\"Third-party auth integration object returned after creation.\\n\\nMatches POST /v1/projects/{ref}/config/auth/third-party-auth.\");\n\nexport const supabaseCreateThirdPartyAuthIntegration: AppAction<\n  typeof SupabaseCreateThirdPartyAuthIntegrationInput,\n  typeof SupabaseCreateThirdPartyAuthIntegrationOutput,\n  typeof supabase.credential\n> = action(\"SUPABASE_CREATE_THIRD_PARTY_AUTH_INTEGRATION\", {\n  slug: \"supabase-create-third-party-auth-integration\",\n  name: \"Create a new third-party auth integration\",\n  description: \"Call this to add a new third-party authentication method (OIDC or JWKS) to a Supabase project for integrating external identity providers (e.g., for SSO); the API may also support `custom_jwks` if sent directly.\",\n  input: SupabaseCreateThirdPartyAuthIntegrationInput,\n  output: SupabaseCreateThirdPartyAuthIntegrationOutput,\n});\n"],"mappings":";;;AAuBA,MAAa,0CAIT,OAAO,gDAAgD;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAzB0D,EAAE,OAAO;EACnE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;EACzE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,gHAAgH,CAAC,CAAC,SAAS;EACzJ,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACpI,CAAC,CAAC,CAAC,SAAS,sDAqBH;CACP,QArB2D,EAAE,OAAO;EACpE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;EAClG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;EACtH,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvJ,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EACxG,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5J,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;EACpG,aAAa,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