MCPcopy Create free account

hub / github.com/ArnasDon/wacrm / functions

Functions1,053 in github.com/ArnasDon/wacrm

↓ 171 callersFunctioncn
(...inputs: ClassValue[])
src/lib/utils.ts:4
↓ 76 callersFunctioncreateClient
()
src/lib/supabase/client.ts:9
↓ 39 callersFunctionfail
( code: string, message: string, status: number, headers?: Record<string, string> )
src/lib/api/v1/respond.ts:107
↓ 36 callersFunctioncheckRateLimit
( key: string, { limit, windowMs }: RateLimitOptions, )
src/lib/rate-limit.ts:60
↓ 36 callersFunctiondecrypt
(encryptedText: string)
src/lib/whatsapp/encryption.ts:50
↓ 33 callersFunctionuseAuth
()
src/hooks/use-auth.tsx:359
↓ 28 callersFunctionvalidateFlowForActivation
( flow: FlowInput, nodes: NodeInput[], )
src/lib/flows/validate.ts:51
↓ 27 callersFunctionlogEvent
( db: AdminClient, flowRunId: string, event_type: | "started" | "node_entered" | "message_se
src/lib/flows/engine.ts:247
↓ 25 callersFunctionrequireApiKey
( request: Request, scope?: ApiScope )
src/lib/auth/api-context.ts:80
↓ 25 callersFunctionsupabaseAdmin
()
src/app/api/whatsapp/webhook/route.ts:26
↓ 25 callersFunctiontoErrorResponse
(err: unknown)
src/lib/auth/account.ts:69
↓ 23 callersFunctionrateLimitResponse
(result: RateLimitResult)
src/lib/rate-limit.ts:96
↓ 21 callersFunctionbuildSendComponents
( template: MessageTemplate, params: SendTimeParams = {}, )
src/lib/whatsapp/template-send-builder.ts:219
↓ 21 callersFunctioncreateClient
()
src/lib/supabase/server.ts:4
↓ 21 callersFunctionisValidE164
(phone: string)
src/lib/whatsapp/phone-utils.ts:39
↓ 20 callersFunctionrow
(overrides: Partial<MessageTemplate> = {})
src/lib/whatsapp/template-send-builder.test.ts:5
↓ 18 callersFunctionencrypt
(text: string)
src/lib/whatsapp/encryption.ts:37
↓ 18 callersFunctionrequireRole
(min: AccountRole)
src/lib/auth/account.ts:182
↓ 18 callersFunctionvalidateStepsForActivation
(steps: StepLike[])
src/lib/automations/validate.ts:29
↓ 17 callersFunctionformatCurrency
( value: number, currency: string = DEFAULT_CURRENCY, )
src/lib/currency.ts:60
↓ 17 callersFunctionset
(patch: Record<string, unknown>)
src/components/automations/automation-builder.tsx:1174
↓ 16 callersFunctionago
(ms: number)
src/lib/presence.test.ts:13
↓ 16 callersFunctionmatchesKeywordTrigger
( text: string, cfg: KeywordTriggerConfig, )
src/lib/flows/engine.ts:95
↓ 16 callersFunctionsanitizePhoneForMeta
(phone: string)
src/lib/whatsapp/phone-utils.ts:6
↓ 16 callersFunctionsupabaseAdmin
()
src/lib/ai/admin-client.ts:9
↓ 16 callersFunctiontoApiErrorResponse
(err: unknown)
src/lib/api/v1/respond.ts:121
↓ 16 callersFunctionvalidateButtons
(buttons: TemplateButton[] | undefined)
src/lib/whatsapp/template-validators.ts:182
↓ 15 callersFunctionextractVariableIndices
(text: string)
src/lib/whatsapp/template-validators.ts:64
↓ 15 callersFunctionsupabaseAdmin
()
src/lib/automations/admin-client.ts:8
↓ 15 callersFunctionthrowMetaError
(response: Response, fallback: string)
src/lib/whatsapp/meta-api.ts:30
↓ 14 callersFunctionderiveCanvasEdges
(nodes: BuilderNode[])
src/lib/flows/edges.ts:40
↓ 14 callersFunctionendRun
( db: AdminClient, runId: string, status: "completed" | "handed_off" | "timed_out" | "failed", reason:
src/lib/flows/engine.ts:524
↓ 14 callersFunctiongetCurrentAccount
()
src/lib/auth/account.ts:106
↓ 14 callersFunctionisRecipientNotAllowedError
(message: string)
src/lib/whatsapp/phone-utils.ts:102
↓ 14 callersFunctionmatchReplyId
( node: { node_type: string; config: Record<string, unknown> }, reply_id: string, )
src/lib/flows/engine.ts:70
↓ 14 callersFunctionresolveFallbackPolicy
( raw: unknown, )
src/lib/flows/fallback.ts:35
↓ 14 callersFunctiontruncate
(s: string, max = 80)
src/components/flows/shared.tsx:302
↓ 13 callersFunctionclampExpiryDays
(expiresInDays: number | undefined)
src/lib/auth/invitations.ts:92
↓ 13 callersFunctionnonEmpty
(v: unknown)
src/lib/automations/validate.ts:182
↓ 13 callersFunctionphoneVariants
(sanitized: string)
src/lib/whatsapp/phone-utils.ts:64
↓ 12 callersFunctionapplyEdgeConnection
( node: BuilderNode, sourceHandle: string, targetKey: string, )
src/lib/flows/edges.ts:245
↓ 12 callersFunctiondispatchInboundToAiReply
( args: DispatchArgs, )
src/lib/ai/auto-reply.ts:39
↓ 12 callersFunctionevaluateConditionPredicate
(args: { operator: ConditionNodeConfig["operator"]; /** * Resolved value of the subject. `undefined` me
src/lib/flows/engine.ts:142
↓ 12 callersFunctionhasMinRole
(role: AccountRole, min: AccountRole)
src/lib/auth/roles.ts:49
↓ 12 callersFunctionisAccountRole
(value: unknown)
src/lib/auth/roles.ts:54
↓ 12 callersFunctionmatchesContactFilters
( conversation: Conversation, { tagIds, company }: ContactFilters, )
src/lib/inbox/conversations.ts:57
↓ 12 callersFunctionnodes
(...ns: BuilderNode[])
src/lib/flows/edges.test.ts:10
↓ 12 callersFunctionok
(data: T, status = 200)
src/lib/api/v1/respond.ts:85
↓ 12 callersFunctionroleRank
(role: AccountRole)
src/lib/auth/roles.ts:32
↓ 12 callersFunctionvalidateTriggerForActivation
( triggerType: AutomationTriggerType | string, triggerConfig: unknown, )
src/lib/automations/validate.ts:143
↓ 11 callersFunctionbuildMetaTemplatePayload
( payload: TemplatePayload, )
src/lib/whatsapp/template-components.ts:137
↓ 11 callersFunctionfindExistingContact
( db: SupabaseClient, accountId: string, phone: string, )
src/lib/contacts/dedupe.ts:35
↓ 11 callersFunctionhandleTemplateWebhookChange
( change: TemplateWebhookChange, // SupabaseClient typed loosely — the webhook route lazy-initialises //
src/lib/whatsapp/template-webhook.ts:76
↓ 11 callersFunctionisAutoAdvancing
(node_type: string)
src/lib/flows/engine.ts:113
↓ 11 callersFunctionparseListParams
(request: Request)
src/lib/api/v1/pagination.ts:41
↓ 10 callersFunctionderivePresence
( stored: StoredPresence | undefined, lastSeenAt: string | null | undefined, now: number, )
src/lib/presence.ts:45
↓ 10 callersFunctionembedTexts
( apiKey: string, inputs: string[], )
src/lib/ai/embeddings.ts:41
↓ 10 callersFunctionformatLastSeen
( lastSeenAt: string | null | undefined, now: number, )
src/lib/presence.ts:68
↓ 10 callersFunctiongenerateReply
(args: GenerateArgs)
src/lib/ai/generate.ts:19
↓ 10 callersFunctionhashApiKey
(plaintext: string)
src/lib/api-keys/keys.ts:66
↓ 10 callersFunctionisSuspending
(node_type: string)
src/lib/flows/engine.ts:124
↓ 10 callersFunctionmakeSupabaseStub
( selectResult: { data: { id: string }[] | null; error: { message: string } | null } = { data: [{ id: 'r
src/lib/whatsapp/template-webhook.test.ts:12
↓ 10 callersFunctionnormalizeStatus
(raw: string)
src/lib/whatsapp/template-status-normalize.ts:22
↓ 9 callersFunctiondaysAgoStart
(days: number)
src/lib/dashboard/date-utils.ts:12
↓ 9 callersFunctiongetBroadcastStatus
(status: string)
src/lib/broadcast-status.ts:82
↓ 9 callersFunctionhashInviteToken
(token: string)
src/lib/auth/invitations.ts:57
↓ 9 callersFunctionisUniqueViolation
(error: unknown)
src/lib/contacts/dedupe.ts:72
↓ 9 callersFunctionmakeDb
()
src/lib/ai/knowledge.test.ts:21
↓ 9 callersFunctionmondayIndex
(d: Date)
src/lib/dashboard/date-utils.ts:47
↓ 9 callersFunctionreqWith
(authHeader?: string)
src/lib/auth/api-context.test.ts:27
↓ 9 callersFunctionuseCan
(action: CanAction)
src/hooks/use-can.ts:40
↓ 9 callersFunctionverifyMetaWebhookSignature
( rawBody: string, signatureHeader: string | null, )
src/lib/whatsapp/webhook-signature.ts:21
↓ 8 callersFunctiondecideFallback
(args: { policy: FlowFallbackPolicy; /** Reprompt count AFTER incrementing (so 1 = first reprompt). */ r
src/lib/flows/fallback.ts:74
↓ 8 callersFunctionensureImageHeaderHandle
( payload: TemplatePayload, accessToken: string, )
src/lib/whatsapp/template-header-handle.ts:21
↓ 8 callersFunctionformatCurrencyShort
( value: number, currency: string = DEFAULT_CURRENCY, )
src/lib/currency.ts:87
↓ 8 callersFunctionisDeliverableUrl
(rawUrl: string)
src/lib/webhooks/ssrf.ts:56
↓ 8 callersFunctionmakeConversation
( contact: Partial<Conversation["contact"]> | null, )
src/lib/inbox/conversations.test.ts:8
↓ 8 callersFunctionnodeColors
(type: NodeType)
src/components/flows/shared.tsx:223
↓ 8 callersFunctionnormalizeKey
(phone: string)
src/lib/contacts/dedupe.ts:17
↓ 8 callersFunctionoutgoingSlots
(node: BuilderNode)
src/lib/flows/edges.ts:174
↓ 8 callersFunctionphonesMatch
(phone1: string, phone2: string)
src/lib/whatsapp/phone-utils.ts:25
↓ 8 callersFunctionreq
(qs: string)
src/lib/api/v1/pagination.test.ts:12
↓ 8 callersFunctionretrieveKnowledge
( db: SupabaseClient, accountId: string, config: Pick<AiConfig, 'embeddingsApiKey'>, queryText: string
src/lib/ai/knowledge.ts:84
↓ 8 callersFunctionrunAutomationsForTrigger
(input: DispatchInput)
src/lib/automations/engine.ts:57
↓ 8 callersFunctionsendInteractiveButtons
( args: SendInteractiveButtonsArgs )
src/lib/whatsapp/meta-api.ts:766
↓ 8 callersFunctionvalidateHeader
( payload: Pick< TemplatePayload, 'header_type' | 'header_content' | 'header_media_url' | 'header_ha
src/lib/whatsapp/template-validators.ts:119
↓ 7 callersFunctionautoLayout
( nodes: LayoutNode[], edges: LayoutEdge[], options: LayoutOptions = {}, )
src/lib/flows/layout.ts:89
↓ 7 callersFunctionbad
(message: string)
src/app/api/ai/config/route.ts:13
↓ 7 callersFunctionchunkText
( content: string, opts: { maxChars?: number } = {}, )
src/lib/ai/chunk.ts:13
↓ 7 callersFunctiondecodeCursor
(value: string | null)
src/lib/api/v1/pagination.ts:71
↓ 7 callersFunctiondefaultConfigFor
(type: NodeType)
src/components/flows/flow-editor-state.tsx:136
↓ 7 callersFunctiondispatchWebhookEvent
( db: SupabaseClient, accountId: string, event: WebhookEvent, data: unknown )
src/lib/webhooks/deliver.ts:46
↓ 7 callersFunctionexpectSendError
( params: SendMessageParams, status: number, messageMatch?: RegExp )
src/lib/whatsapp/send-message.test.ts:20
↓ 7 callersFunctioningestDocument
( db: SupabaseClient, accountId: string, config: Pick<AiConfig, 'embeddingsApiKey'>, documentId: strin
src/lib/ai/knowledge.ts:27
↓ 7 callersFunctionload
()
src/app/(dashboard)/automations/page.tsx:68
↓ 7 callersFunctionresolve
(ops: { table: string; type: string; payload?: unknown; filters: [string, string, unknown][];
src/lib/automations/engine.test.ts:20
↓ 7 callersFunctionresolveConversationByPhone
( db: SupabaseClient, accountId: string, phone: string, name?: string | null )
src/lib/whatsapp/resolve-conversation.ts:41
↓ 7 callersFunctionsendInteractiveList
( args: SendInteractiveListArgs )
src/lib/whatsapp/meta-api.ts:866
↓ 6 callersFunction__resetRateLimitForTests
()
src/lib/rate-limit.ts:166
↓ 6 callersFunctionbuildMediaPath
( accountId: string, fileName: string, now: number = Date.now(), )
src/lib/storage/upload-media.ts:46
next →1–100 of 1,053, ranked by callers