Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Merge branch 'main' into webhook

Kiran K73fc2764dc43
diff --cc apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
index da025dd3f0,c46063cbab..9e42daf6d3
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
@@@ -85,24 -80,11 +81,20 @@@ export default function WorkspaceSettin
icon: Key,
segment: "tokens",
},
- ...(flags?.integrations
- ? [
- {
- name: "OAuth Apps",
- icon: CubeSettings,
- segment: "oauth-apps",
- },
- ]
- : []),
+ {
+ name: "OAuth Apps",
+ icon: CubeSettings,
+ segment: "oauth-apps",
+ },
+ ...(flags?.webhooks
+ ? [
+ {
+ name: "Webhooks",
+ icon: Webhook,
+ segment: "webhooks",
+ },
+ ]
+ : []),
],
},
diff --cc apps/web/lib/edge-config/get-feature-flags.ts
index 0b9ae6cafc,08a835cc89..03f1292409
--- a/apps/web/lib/edge-config/get-feature-flags.ts
+++ b/apps/web/lib/edge-config/get-feature-flags.ts
@@@ -17,10 -17,8 +17,9 @@@ export const getFeatureFlags = async (
}
const workspaceFeatures: Record<BetaFeatures, boolean> = {
- integrations: false,
dublink: false,
referrals: false,
+ webhooks: true,
};
if (!process.env.NEXT_PUBLIC_IS_DUB || !process.env.EDGE_CONFIG) {
diff --cc apps/web/lib/types.ts
index 27a508114d,7a9e80e1c2..7279466e59
--- a/apps/web/lib/types.ts
+++ b/apps/web/lib/types.ts
@@@ -1,17 -1,11 +1,17 @@@
import z from "@/lib/zod";
import { metaTagsSchema } from "@/lib/zod/schemas/metatags";
import { DirectorySyncProviders } from "@boxyhq/saml-jackson";
-import { Link, Project } from "@prisma/client";
+import { Link, Project, Webhook } from "@prisma/client";
+import { WEBHOOK_TRIGGER_DESCRIPTIONS } from "./webhook/constants";
import { integrationSchema } from "./zod/schemas/integration";
import { createLinkBodySchema } from "./zod/schemas/links";
- import { oAuthAppSchema } from "./zod/schemas/oauth";
+ import { createOAuthAppSchema, oAuthAppSchema } from "./zod/schemas/oauth";
import { tokenSchema } from "./zod/schemas/token";
+import {
+ createWebhookSchema,
+ webhookEventSchemaTB,
+ webhookSchema,
+} from "./zod/schemas/webhooks";
export type LinkProps = Link;
@@@ -77,11 -70,7 +77,7 @@@ export type PlanProps = (typeof plans)[
export type RoleProps = (typeof roles)[number];
- export type BetaFeatures =
- | "integrations"
- | "dublink"
- | "referrals"
- | "webhooks";
-export type BetaFeatures = "dublink" | "referrals";
++export type BetaFeatures = "dublink" | "referrals" | "webhooks";
export type AddOns = "conversion" | "sso";