MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / claimActivationCode

Function claimActivationCode

packages/web/src/features/billing/actions.ts:75–90  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

73);
74
75export const claimActivationCode = async (sessionId: string): Promise<{ activationCode: string } | ServiceError> => sew(() =>
76 withAuth(async ({ role }) =>
77 withMinimumOrgRole(role, OrgRole.OWNER, async () => {
78 const result = await client.claimActivationCode({
79 sessionId,
80 installId: env.SOURCEBOT_INSTALL_ID,
81 });
82
83 if (isServiceError(result)) {
84 return result;
85 }
86
87 return { activationCode: result.activationCode };
88 })
89 )
90);
91
92export const createCheckoutSession = async ({
93 source,

Callers 1

runFunction · 0.90

Calls 4

sewFunction · 0.90
withAuthFunction · 0.90
withMinimumOrgRoleFunction · 0.90
isServiceErrorFunction · 0.90

Tested by

no test coverage detected