chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:32:57 +08:00
commit cd420f9332
4811 changed files with 884702 additions and 0 deletions
@@ -0,0 +1,30 @@
import type { OrganizationIntegration } from "@trigger.dev/database";
import { BaseService } from "./baseService.server";
import { OrgIntegrationRepository } from "~/models/orgIntegration.server";
export class CreateOrgIntegrationService extends BaseService {
public async call(
userId: string,
orgId: string,
serviceName: string,
code: string
): Promise<OrganizationIntegration | undefined> {
// Get the org
const org = await this._prisma.organization.findUnique({
where: {
id: orgId,
members: {
some: {
userId,
},
},
},
});
if (!org) {
throw new Error("Organization not found");
}
return OrgIntegrationRepository.createOrgIntegration(serviceName, code, org);
}
}