Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brightbeanxyz/brightbean-studio
/ functions
Functions
3,156 in github.com/brightbeanxyz/brightbean-studio
⨍
Functions
3,156
◇
Types & classes
668
↳
Endpoints
120
↓ 6 callers
Function
de
(t,n,r,o,i,D)
static/js/htmx.min.js:1
↓ 6 callers
Function
p
(t,r,n)
static/js/htmx.min.js:1
↓ 6 callers
Function
parse_and_truncate_youtube_tag_string
YouTube-specific tag normalization for HTML form POSTs. YouTube's Data API caps total tag-list characters at 500 (delimiters counted); we cap
apps/common/validators.py:174
↓ 6 callers
Function
peek_magic_link
Validate a magic link token *without* consuming it. Used to render the confirmation page on GET so that email link scanners that prefetch the
apps/client_portal/services.py:89
↓ 6 callers
Function
post_metrics_for
Metrics that show up in per-post views (table columns, detail drawer). Account-only metrics (follows, subscribers) are filtered out — you can't
apps/analytics/metrics.py:123
↓ 6 callers
Function
prioritize
Place ``post`` at the queue's earliest slot, laddering others up by one. Comment §2: if the earliest upcoming slot is free, ``post`` takes it and
apps/calendar/services.py:220
↓ 6 callers
Function
register_recurring_task
Idempotently schedule a ``@background`` task to repeat every ``repeat`` seconds. Safe to call from a ``post_migrate`` handler. A fresh DB without
apps/common/background.py:14
↓ 6 callers
Function
sniff_mime
Return the sniffed MIME type for an uploaded-file-like object, or None. Reads the first 32 bytes and matches them against a small allowlist of
apps/media_library/validators.py:60
↓ 6 callers
Function
transition_platform_post
Apply a state-machine transition and persist. Wraps ``PlatformPost.transition_to`` (which only mutates the model in memory) with the persiste
apps/composer/services.py:221
↓ 5 callers
Function
$
(e)
static/js/htmx.min.js:1
↓ 5 callers
Function
C
(e="")
static/js/alpine.min.js:5
↓ 5 callers
Function
F
(e)
static/js/htmx.min.js:1
↓ 5 callers
Function
P
(e,t=D)
static/js/alpine.min.js:5
↓ 5 callers
Function
T
(e)
static/js/htmx.min.js:1
↓ 5 callers
Function
_account_metrics_to_dict
Flatten ``AccountMetrics`` into ``{metric_key: value}``. ``platform`` gates per-platform persistence rules (e.g. ``followers`` is only persis
apps/analytics/tasks.py:210
↓ 5 callers
Method
_build_post_body
(self, author: str, commentary: str)
providers/linkedin.py:228
↓ 5 callers
Method
_create_draft
(self, client, social_account, **extra)
apps/api/tests/test_routers.py:677
↓ 5 callers
Method
_create_post_url
(self, idea_id)
apps/composer/tests/test_idea_media_flows.py:57
↓ 5 callers
Method
_dispatch_to_provider
Dispatch to the appropriate platform provider. Resolves credentials, refreshes tokens if needed, builds a PublishContent payload, and
apps/publisher/engine.py:311
↓ 5 callers
Function
_dispatch_webhook
Send notification via webhook (HTTP POST with HMAC-SHA256 signature). The webhook URL is re-validated with is_safe_url at dispatch time (not just
apps/notifications/engine.py:266
↓ 5 callers
Function
_e
(e,t,r)
static/js/alpine.min.js:5
↓ 5 callers
Method
_entry_url
(self, token=None)
apps/client_portal/tests.py:83
↓ 5 callers
Function
_get_workspace_post
Fetch a Post that belongs to the key's workspace **and** whose every ``PlatformPost`` child targets a ``SocialAccount`` in the key's allowlist
apps/api/routers/posts.py:103
↓ 5 callers
Function
_make_key
(workspace, *, name: str, permissions: list[str])
apps/api_keys/tests/test_migration_0002.py:43
↓ 5 callers
Function
_make_response
(payload: dict)
tests/providers/test_linkedin_company.py:8
↓ 5 callers
Function
_normalize_media_asset_ids
Normalize media IDs from mixed inputs while preserving first-seen order.
apps/composer/views.py:2352
↓ 5 callers
Function
_parse_selected_account_ids
Split a comma-separated ``selected_accounts`` value into account IDs. Non-UUID entries are dropped: they can only come from a crafted or corr
apps/composer/views.py:80
↓ 5 callers
Function
_platform_post_for
The post's PlatformPost child on this channel (or ``None``).
apps/calendar/services.py:144
↓ 5 callers
Function
_platform_status_map
Return ``{platform_post_id: status}`` for HTMX response headers.
apps/composer/views.py:688
↓ 5 callers
Function
_post
(client, body: dict)
apps/api/tests/test_platform_overrides.py:97
↓ 5 callers
Function
_post_to_response
(request: HttpRequest, post: Post)
apps/api/routers/posts.py:99
↓ 5 callers
Method
_post_urn_to_url
Convert a LinkedIn post URN to a web URL. URN format: urn:li:share:123456 or urn:li:ugcPost:123456
providers/linkedin.py:810
↓ 5 callers
Function
_response
(status_code=200, json_data=None, content=b"", headers=None)
apps/composer/tests/test_unsplash.py:32
↓ 5 callers
Function
_revert_approved_to_review
Option A: editing an approved post's content sends it back for re-approval. Silently reverts any ``approved`` children to ``pending_review`` so e
apps/composer/views.py:671
↓ 5 callers
Method
_save
(self, cover_value=None)
apps/composer/tests/test_unsplash.py:380
↓ 5 callers
Function
_save_version
Create a PostVersion snapshot.
apps/composer/views.py:252
↓ 5 callers
Function
_serialize_post
Serialize a Post for an MCP tool response. Delegates to the same Pydantic schema the REST router returns so the two surfaces cannot drift in
apps/mcp/handlers.py:118
↓ 5 callers
Function
_serialize_utc_z
Render a datetime as ISO 8601 with a trailing ``Z`` for UTC. Pydantic's default datetime serialization emits ``+00:00`` for UTC, while Django
apps/api/schemas.py:26
↓ 5 callers
Function
_slots_updated_response
Return a 204 response with an HX-Trigger header for slot grid refresh.
apps/calendar/views.py:52
↓ 5 callers
Function
_sync_account_metrics
Fetch account-level metrics for ``on_date`` and any recent missing days. Walks ``on_date`` and the prior ``_ACCOUNT_METRICS_RECENT_DAYS - 1`` day
apps/analytics/tasks.py:390
↓ 5 callers
Function
_sync_idea_media_attachments
Synchronize IdeaMedia rows to match ordered ids and keep cover pointer aligned.
apps/composer/views.py:2364
↓ 5 callers
Function
_sync_platform_posts
Sync platform post selections from form data. When ``initial_status`` is given, newly-created PlatformPost rows are initialised to that statu
apps/composer/views.py:130
↓ 5 callers
Function
_tool_call_msg
(name, args, *, id_=1)
apps/mcp/tests/test_review_fixes.py:43
↓ 5 callers
Function
add_to_queue
Add a post to a queue (back-compat dispatcher). Routes to the stable-slot ops: ``prioritize`` (top of queue) or ``add_post_next_available`` (
apps/calendar/services.py:334
↓ 5 callers
Function
calculate_engagement_rate
(engagements: float, views: float | None = None, reach: float | None = None)
apps/analytics/derive.py:27
↓ 5 callers
Function
create_version
Create a new version of an asset.
apps/media_library/services.py:261
↓ 5 callers
Function
d
(e)
static/js/htmx.min.js:1
↓ 5 callers
Function
engagement_rate
Compute derived engagement rate per the design's formula. rate = (sum of engagement parts over period) / denom * 100 Where denom is the firs
apps/analytics/derive.py:72
↓ 5 callers
Method
for_workspace
(self, workspace_id)
apps/media_library/managers.py:8
↓ 5 callers
Function
ge
(e)
static/js/htmx.min.js:1
↓ 5 callers
Method
get_user_pages
(self, access_token: str)
providers/linkedin_company.py:33
↓ 5 callers
Function
invalidate_api_key_cache
Bust the cached ``ApiKey`` row immediately. Used by: * ``revoke_api_key`` (manual revocation) * The ``m2m_changed`` signal on ``ApiKe
apps/api_keys/services.py:303
↓ 5 callers
Function
oe
static/js/alpine.min.js:5
↓ 5 callers
Function
process_media_asset
Process a newly uploaded media asset: extract metadata and generate thumbnail.
apps/media_library/tasks.py:22
↓ 5 callers
Function
qn
(e)
static/js/htmx.min.js:1
↓ 5 callers
Function
re
(e,t,r=void 0)
static/js/alpine.min.js:1
↓ 5 callers
Function
release_idempotent_claim
Delete a claimed-but-not-finalized slot so retries can succeed. Call this on the error path inside the route when ``create_post`` or any late
apps/api/middleware.py:212
↓ 5 callers
Method
sync_all
Poll each connected account for new messages.
apps/inbox/tasks.py:48
↓ 5 callers
Function
to_url_slug
Return the URL-path slug for ``platform`` (e.g. ``tiktok`` → ``social1``).
apps/social_accounts/oauth_aliases.py:26
↓ 5 callers
Function
x
(e,t)
static/js/htmx.min.js:1
↓ 4 callers
Function
Ge
(e,t,r=!1,n=!1)
static/js/alpine.min.js:5
↓ 4 callers
Function
M
(t)
static/js/htmx.min.js:1
↓ 4 callers
Function
Mt
(e,t)
static/js/htmx.min.js:1
↓ 4 callers
Function
N
(e)
static/js/htmx.min.js:1
↓ 4 callers
Function
Qe
static/js/alpine.min.js:5
↓ 4 callers
Function
Qt
(e,t)
static/js/htmx.min.js:1
↓ 4 callers
Function
R
(e,t,r={})
static/js/alpine.min.js:5
↓ 4 callers
Function
Te
()
static/js/htmx.min.js:1
↓ 4 callers
Function
Ve
(e,t,n)
static/js/htmx.min.js:1
↓ 4 callers
Function
We
static/js/alpine.min.js:5
↓ 4 callers
Function
Xe
(e,t)
static/js/alpine.min.js:5
↓ 4 callers
Function
Ye
(e,t=!1)
static/js/alpine.min.js:5
↓ 4 callers
Function
Ze
(e,t,r)
static/js/alpine.min.js:5
↓ 4 callers
Function
_active_cache_key
(lookup_prefix: str)
apps/api_keys/services.py:327
↓ 4 callers
Function
_base_content_snapshot
Reviewable base content used to detect edits to an approved post.
apps/composer/views.py:666
↓ 4 callers
Method
_build_delivery
(self, user, webhook_url)
apps/notifications/tests.py:247
↓ 4 callers
Function
_build_dispatch_mocks
Build the minimal mocks needed to exercise _dispatch_to_provider's extras-assembly without DB or filesystem side effects. Returns (engine, pl
apps/publisher/tests.py:98
↓ 4 callers
Function
_build_redirect_uri
Build the OAuth callback URL. Platforms with an entry in ``PLATFORM_TO_URL_ALIAS`` (currently only TikTok → ``social1``) use the opaque slug
apps/social_accounts/views.py:99
↓ 4 callers
Function
_create_if_new
Create InboxMessage if it doesn't already exist (deduplication).
apps/inbox/webhooks.py:233
↓ 4 callers
Method
_create_social_account
(self, platform, suffix, status=SocialAccount.ConnectionStatus.CONNECTED)
apps/composer/tests/test_idea_media_flows.py:60
↓ 4 callers
Function
_encode_urn
Percent-encode a LinkedIn URN for use as a URL path segment. LinkedIn rejects path-variable URNs unless their colons (and parens/commas in co
providers/linkedin.py:49
↓ 4 callers
Function
_format_quota_message
Plain-text body for the HttpError so Ninja's default 429 page renders. The router-level error handler in ``api.py`` rewraps this into the uni
apps/api/limits.py:166
↓ 4 callers
Function
_get_configured_platforms
Return set of platform names that have credentials configured.
apps/social_accounts/views.py:74
↓ 4 callers
Method
_get_post_fields
(self, access_token: str, post_id: str)
providers/facebook.py:541
↓ 4 callers
Function
_get_post_for_key
Allowlist-respecting Post fetch shared by ``get_post`` / ``cancel_post``. Same rule as REST's ``_get_workspace_post``: must be in the key's w
apps/mcp/handlers.py:131
↓ 4 callers
Function
_is_protected
(pp)
apps/calendar/services.py:149
↓ 4 callers
Method
_is_video_url
Heuristically detect a video URL by file extension. Uses the URL path only so presigned query strings (R2/S3) don't defeat the check.
providers/facebook.py:393
↓ 4 callers
Function
_lock_channel
Serialize slot writes for a channel within the current transaction. Occupancy is computed from ``PlatformPost`` rows (the publisher's truth),
apps/calendar/services.py:155
↓ 4 callers
Function
_looks_like_uuid
(value: str)
apps/analytics/tasks.py:567
↓ 4 callers
Function
_make_user
(email)
apps/approvals/test_workflow.py:24
↓ 4 callers
Method
_mcp
(self, client, name, args)
apps/api/tests/test_media_router.py:394
↓ 4 callers
Function
_msg
A minimal stand-in for the message objects providers return.
apps/inbox/tests/test_sync.py:33
↓ 4 callers
Method
_ok_photo_mocks
(self, photo_id="abc123")
apps/composer/tests/test_unsplash.py:236
↓ 4 callers
Function
_org_role_choices_for
Org-role options the *viewer* is allowed to assign. Only owners can grant the Admin role (mirrors the owner-only guard in ``services.create_i
apps/members/views.py:16
↓ 4 callers
Method
_payload
(self, **overrides)
apps/approvals/test_workflow.py:296
↓ 4 callers
Function
_portal_error
Feedback for a failed portal action: an error toast for htmx, 400 otherwise.
apps/client_portal/views.py:30
↓ 4 callers
Function
_portal_response
204 + HX-Trigger: refresh the portal list (portalAction) and show a toast.
apps/client_portal/views.py:20
↓ 4 callers
Function
_render_tab
Shared HTMX-tab renderer used by the four `publish_tab_*` endpoints.
apps/calendar/views.py:983
↓ 4 callers
Function
_rpc
(method, params=None, *, id_=1)
apps/mcp/tests/test_review_fixes.py:36
↓ 4 callers
Method
_safe_json
Try to parse response as JSON, return empty dict on failure.
providers/base.py:264
← previous
next →
201–300 of 3,156, ranked by callers