-
Notifications
You must be signed in to change notification settings - Fork 605
feat: script to notify users to migrate to v2 #3924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chronark
merged 8 commits into
main
from
09-07-feat_script_to_notify_users_to_migrate_to_v2
Sep 9, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5f27976
feat: script to notify users to migrate to v2
chronark c037b75
Apply suggestions from code review
chronark 938c582
[autofix.ci] apply automated fixes
autofix-ci[bot] 20ba177
fix: address james' feedback
chronark f157157
Merge branch '09-07-feat_script_to_notify_users_to_migrate_to_v2' of …
chronark 4122761
merge
chronark 74b2029
fix: exclude analytics
chronark 869f481
Merge branch 'main' of https://github.com/unkeyed/unkey into 09-07-fe…
chronark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| "use client"; | ||
| import { Button } from "@react-email/button"; | ||
| import { Heading } from "@react-email/heading"; | ||
| import { Hr } from "@react-email/hr"; | ||
| import { Link } from "@react-email/link"; | ||
| import { Section } from "@react-email/section"; | ||
| import { Text } from "@react-email/text"; | ||
| // biome-ignore lint/correctness/noUnusedImports: react-email needs this imported | ||
| import React from "react"; | ||
| import { Layout } from "../src/components/layout"; | ||
| import { Signature } from "../src/components/signature"; | ||
|
|
||
| export type Props = { | ||
| username: string; | ||
| workspaceName: string; | ||
| deprecatedEndpoints: string[]; | ||
| }; | ||
chronark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| export function ApiV1Migration({ username, workspaceName, deprecatedEndpoints }: Props) { | ||
| return ( | ||
| <Layout> | ||
| <Heading className="font-sans text-3xl text-semibold text-center"> | ||
| Action Required: Migrate from API v1 to v2 | ||
| </Heading> | ||
| <Text>Hey {username},</Text> | ||
chronark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Text> | ||
| This is a follow-up to our previous email in August about the deprecation of our API v1. | ||
| We're reaching out because your workspace <strong>{workspaceName}</strong> is still using | ||
| deprecated v1 endpoints. | ||
| </Text> | ||
|
|
||
chronark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Text className="font-semibold text-red-600"> | ||
| Important: <span className="font-mono">api.unkey.dev/v1</span> will be discontinued on | ||
| January 1st, 2026. | ||
| </Text> | ||
chronark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <Section> | ||
| <Text className="font-semibold"> | ||
| Your workspace is currently using the following deprecated v1 endpoints: | ||
| </Text> | ||
| <ul className="pb-4"> | ||
| {deprecatedEndpoints.map((endpoint) => ( | ||
| <li key={endpoint} className="pb-2"> | ||
| <code className="bg-gray-100 px-2 py-1 rounded text-sm">{endpoint}</code> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
chronark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </Section> | ||
|
|
||
| <Section className="text-center py-3"> | ||
| <Button | ||
| href="https://www.unkey.com/docs/api-reference/v1/migration" | ||
| className="bg-gray-900 text-gray-50 rounded-lg p-3 w-2/3" | ||
| > | ||
| View Migration Guide | ||
| </Button> | ||
| </Section> | ||
|
|
||
| <Text> | ||
| Our migration guide includes step-by-step instructions, code examples, and a complete | ||
| mapping of v1 to v2 endpoints. | ||
| </Text> | ||
|
|
||
| <Hr /> | ||
|
|
||
| <Text> | ||
| Need help with your migration? Please reach out to{" "} | ||
| <Link href="mailto:support@unkey.dev">support@unkey.dev</Link> or just reply to this email. | ||
| Our team is ready to help with anything. | ||
| </Text> | ||
|
|
||
| <Signature signedBy="Andreas" /> | ||
| </Layout> | ||
| ); | ||
| } | ||
|
|
||
| ApiV1Migration.PreviewProps = { | ||
| username: "John Doe", | ||
| workspaceName: "Acme Corp", | ||
| deprecatedEndpoints: ["/v1/keys.create", "/v1/keys.verify", "/v1/apis.create"], | ||
| } satisfies Props; | ||
|
|
||
| // biome-ignore lint/style/noDefaultExport: Too scared to modify that one | ||
| export default ApiV1Migration; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.