(sessionId: string)
| 73 | ); |
| 74 | |
| 75 | export 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 | |
| 92 | export const createCheckoutSession = async ({ |
| 93 | source, |
no test coverage detected