lib.supabase.generate

Generates Clojure client wrappers from lib.supabase.api/+admin+ metadata.

entry->args-form

(entry->args-form entry)

Builds the args vector for a generated function. Order: path params, query params, body params, then client.

entry->body-keys

(entry->body-keys entry)

Extracts body property names as kebab-cased symbols.

entry->input-form

(entry->input-form entry)

Builds the input map passed to call/call. Path, query and body maps are converted from kebab-case keywords back to snake_case keywords so that they match the OpenAPI path templates and the JSON keys the Supabase API expects.

entry->path-keys

(entry->path-keys entry)

Extracts path-param names as kebab-cased symbols.

entry->query-keys

(entry->query-keys entry)

Extracts query-param names as kebab-cased symbols.

entry->template-input

(entry->template-input [operation-id entry])

Converts a +admin+ map entry into template parameter values.

FN_TEMPLATE

Template for a single Supabase admin API wrapper function.

generate-admin-fn

(generate-admin-fn entry-pair)

Generates the source string for a single admin endpoint wrapper.

generate-admin-functions

(generate-admin-functions)

Generates wrapper source strings for all endpoints in +admin+.

generate-common-file

(generate-common-file)

Generates the full source for lib.supabase.common.

string->kebab

(string->kebab s)

Converts a snake_case string to kebab-case.

write-common-file!

(write-common-file!)

Writes the generated lib.supabase.common namespace to disk.