diff --git a/clients/.changeset/config.json b/clients/.changeset/config.json index c49ce7f94b..7e89bc0320 100644 --- a/clients/.changeset/config.json +++ b/clients/.changeset/config.json @@ -12,6 +12,6 @@ "@examples/checkout-embed", "eslint-config-custom", "polarkit", - "@polar-sh/sdk" + "@polar-sh/api" ] -} +} \ No newline at end of file diff --git a/clients/apps/web/package.json b/clients/apps/web/package.json index d42a6a078e..7e090039bd 100644 --- a/clients/apps/web/package.json +++ b/clients/apps/web/package.json @@ -31,9 +31,9 @@ "@next/mdx": "^14.2.18", "@next/third-parties": "^15.0.3", "@observablehq/plot": "^0.6.16", + "@polar-sh/api": "workspace:*", "@polar-sh/checkout": "workspace:^", "@polar-sh/mdx": "workspace:*", - "@polar-sh/sdk": "workspace:*", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-toast": "^1.2.2", "@react-three/drei": "^9.117.3", diff --git a/clients/apps/web/src/app/(main)/(installation)/github/installation/page.tsx b/clients/apps/web/src/app/(main)/(installation)/github/installation/page.tsx index 05bf78d0f9..7e142efceb 100644 --- a/clients/apps/web/src/app/(main)/(installation)/github/installation/page.tsx +++ b/clients/apps/web/src/app/(main)/(installation)/github/installation/page.tsx @@ -13,7 +13,7 @@ import { Organization, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { usePathname, useRouter, useSearchParams } from 'next/navigation' import Avatar from 'polarkit/components/ui/atoms/avatar' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/finance/incoming/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/finance/incoming/ClientPage.tsx index 31df19b402..25f82a1aaa 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/finance/incoming/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/finance/incoming/ClientPage.tsx @@ -12,7 +12,7 @@ import { getAPIParams, serializeSearchParams, } from '@/utils/datatable' -import { TransactionType } from '@polar-sh/sdk' +import { TransactionType } from '@polar-sh/api' import { usePathname, useRouter, useSearchParams } from 'next/navigation' import { Tabs, diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/file-downloads/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/file-downloads/ClientPage.tsx index de0e18b2d6..f4c2336c7d 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/file-downloads/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/file-downloads/ClientPage.tsx @@ -11,7 +11,7 @@ import { } from '@/hooks/queries' import { api } from '@/utils/api' import { FileDownloadOutlined } from '@mui/icons-material' -import { DownloadableRead } from '@polar-sh/sdk' +import { DownloadableRead } from '@polar-sh/api' import Link from 'next/link' import { useSearchParams } from 'next/navigation' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/license-keys/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/license-keys/ClientPage.tsx index 1581efd100..8dda86cfbe 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/license-keys/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/license-keys/ClientPage.tsx @@ -12,7 +12,7 @@ import { } from '@/hooks/queries' import { api } from '@/utils/api' import { Key } from '@mui/icons-material' -import { BenefitType, CustomerBenefitGrantLicenseKeys } from '@polar-sh/sdk' +import { BenefitType, CustomerBenefitGrantLicenseKeys } from '@polar-sh/api' import Link from 'next/link' import { useSearchParams } from 'next/navigation' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/ClientPage.tsx index 46600f5e8e..2d4dbcb16d 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/ClientPage.tsx @@ -8,7 +8,7 @@ import AmountLabel from '@/components/Shared/AmountLabel' import { useCustomerOrders } from '@/hooks/queries' import { api } from '@/utils/api' import { Search, ShoppingBagOutlined } from '@mui/icons-material' -import { CustomerOrder, ProductPriceType } from '@polar-sh/sdk' +import { CustomerOrder, ProductPriceType } from '@polar-sh/api' import Link from 'next/link' import { useSearchParams } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/ClientPage.tsx index e48113a3e7..abc1fdf64d 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/ClientPage.tsx @@ -3,7 +3,7 @@ import CustomerPortalOrder from '@/components/CustomerPortal/CustomerPortalOrder' import { api } from '@/utils/api' import { ArrowBackOutlined } from '@mui/icons-material' -import { CustomerOrder } from '@polar-sh/sdk' +import { CustomerOrder } from '@polar-sh/api' import Link from 'next/link' const ClientPage = ({ order }: { order: CustomerOrder }) => { diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/page.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/page.tsx index 1f364e0d38..ff5310dbcb 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/page.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/products/[id]/page.tsx @@ -1,5 +1,5 @@ import { getServerSideAPI } from '@/utils/api/serverside' -import { CustomerOrder, ResponseError } from '@polar-sh/sdk' +import { CustomerOrder, ResponseError } from '@polar-sh/api' import { notFound } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/ClientPage.tsx index a9727ace1c..b3ce5873f2 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/ClientPage.tsx @@ -8,7 +8,7 @@ import { SubscriptionStatusLabel } from '@/components/Subscriptions/utils' import { useCustomerSubscriptions } from '@/hooks/queries' import { api } from '@/utils/api' import { Search, ShoppingBagOutlined } from '@mui/icons-material' -import { CustomerSubscription } from '@polar-sh/sdk' +import { CustomerSubscription } from '@polar-sh/api' import Link from 'next/link' import { useSearchParams } from 'next/navigation' import { Switch } from 'polarkit/components/ui/atoms' @@ -201,14 +201,11 @@ const SubscriptionItem = ({ {nextEventTitle} - {nextEventDate.toLocaleDateString( - 'en-US', - { - year: 'numeric', - month: 'long', - day: 'numeric', - }, - )} + {nextEventDate.toLocaleDateString('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric', + })} )} diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/ClientPage.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/ClientPage.tsx index 7602086185..0c866418c8 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/ClientPage.tsx @@ -3,7 +3,7 @@ import CustomerPortalSubscription from '@/components/CustomerPortal/CustomerPortalSubscription' import { api } from '@/utils/api' import { ArrowBackOutlined } from '@mui/icons-material' -import { CustomerSubscription } from '@polar-sh/sdk' +import { CustomerSubscription } from '@polar-sh/api' import Link from 'next/link' const ClientPage = ({ @@ -25,5 +25,4 @@ const ClientPage = ({ ) } - export default ClientPage diff --git a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/page.tsx b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/page.tsx index 0c5f5770e0..1033045182 100644 --- a/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/page.tsx +++ b/clients/apps/web/src/app/(main)/(topbar)/(backer)/purchases/subscriptions/[id]/page.tsx @@ -1,5 +1,5 @@ import { getServerSideAPI } from '@/utils/api/serverside' -import { CustomerSubscription, ResponseError } from '@polar-sh/sdk' +import { CustomerSubscription, ResponseError } from '@polar-sh/api' import { notFound } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/[organization]/(header)/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/(header)/ClientPage.tsx index 73ec4af0f6..9b60d9497c 100644 --- a/clients/apps/web/src/app/(main)/[organization]/(header)/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/(header)/ClientPage.tsx @@ -1,7 +1,7 @@ 'use client' import { Storefront } from '@/components/Profile/Storefront' -import { IssueFunding, Organization, ProductStorefront } from '@polar-sh/sdk' +import { IssueFunding, Organization, ProductStorefront } from '@polar-sh/api' const ClientPage = ({ organization, diff --git a/clients/apps/web/src/app/(main)/[organization]/(header)/issues/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/(header)/issues/ClientPage.tsx index d527d7ed92..9c16c85527 100644 --- a/clients/apps/web/src/app/(main)/[organization]/(header)/issues/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/(header)/issues/ClientPage.tsx @@ -2,7 +2,7 @@ import IssuesLookingForFunding from '@/components/Organization/IssuesLookingForFunding' import { organizationPageLink } from '@/utils/nav' -import { ListResourceIssueFunding, Organization } from '@polar-sh/sdk' +import { ListResourceIssueFunding, Organization } from '@polar-sh/api' import { redirect } from 'next/navigation' import { ShadowBoxOnMd } from 'polarkit/components/ui/atoms/shadowbox' diff --git a/clients/apps/web/src/app/(main)/[organization]/(header)/layout.tsx b/clients/apps/web/src/app/(main)/[organization]/(header)/layout.tsx index df9bc90a20..8b1e271843 100644 --- a/clients/apps/web/src/app/(main)/[organization]/(header)/layout.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/(header)/layout.tsx @@ -5,7 +5,7 @@ import { StorefrontNav } from '@/components/Organization/StorefrontNav' import { StorefrontHeader } from '@/components/Profile/StorefrontHeader' import { getServerSideAPI } from '@/utils/api/serverside' import { getStorefrontOrNotFound } from '@/utils/storefront' -import { UserRead } from '@polar-sh/sdk' +import { UserRead } from '@polar-sh/api' import React from 'react' export default async function Layout({ diff --git a/clients/apps/web/src/app/(main)/[organization]/(header)/page.tsx b/clients/apps/web/src/app/(main)/[organization]/(header)/page.tsx index 26a614964a..00830c91d2 100644 --- a/clients/apps/web/src/app/(main)/[organization]/(header)/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/(header)/page.tsx @@ -1,5 +1,5 @@ import { getServerSideAPI } from '@/utils/api/serverside' -import { ListResourceIssueFunding } from '@polar-sh/sdk' +import { ListResourceIssueFunding } from '@polar-sh/api' import type { Metadata } from 'next' import { notFound } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/ClientPage.tsx index 43fb48bf2d..b8e7a2941e 100644 --- a/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/ClientPage.tsx @@ -1,7 +1,7 @@ 'use client' import { Checkout } from '@/components/Checkout/Checkout' -import { CheckoutPublic, Organization } from '@polar-sh/sdk' +import { CheckoutPublic, Organization } from '@polar-sh/api' import { useTheme } from 'next-themes' export default function ClientPage({ diff --git a/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/page.tsx b/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/page.tsx index 52716c0370..970b45512b 100644 --- a/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/(header)/products/[productId]/page.tsx @@ -2,7 +2,7 @@ import CheckoutProductInfo from '@/components/Checkout/CheckoutProductInfo' import { getServerSideAPI } from '@/utils/api/serverside' import { isCrawler } from '@/utils/crawlers' import { getStorefrontOrNotFound } from '@/utils/storefront' -import { CheckoutPublic } from '@polar-sh/sdk' +import { CheckoutPublic } from '@polar-sh/api' import type { Metadata } from 'next' import { headers } from 'next/headers' import { notFound } from 'next/navigation' diff --git a/clients/apps/web/src/app/(main)/[organization]/[repo]/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/[repo]/ClientPage.tsx index 8066fef373..e19ff62790 100644 --- a/clients/apps/web/src/app/(main)/[organization]/[repo]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/[repo]/ClientPage.tsx @@ -19,7 +19,7 @@ import { Organization, Repository, RepositoryProfileSettingsUpdate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import type { SuccessResult } from 'open-graph-scraper-lite' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/ClientPage.tsx index a4975fc6a4..2ca5ac417f 100644 --- a/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/ClientPage.tsx @@ -6,7 +6,7 @@ import HowItWorks from '@/components/Pledge/HowItWorks' import IssueCard from '@/components/Pledge/IssueCard' import PledgeCheckoutPanel from '@/components/Pledge/PledgeCheckoutPanel' import { usePostHog } from '@/hooks/posthog' -import { Issue, Organization, Pledger, RewardsSummary } from '@polar-sh/sdk' +import { Issue, Organization, Pledger, RewardsSummary } from '@polar-sh/api' import { Banner } from 'polarkit/components/ui/molecules' import { useEffect, useState } from 'react' diff --git a/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/page.tsx b/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/page.tsx index 8d54ea57a5..cfdbc85182 100644 --- a/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/(create)/page.tsx @@ -1,7 +1,7 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { resolveIssuePath } from '@/utils/issue' import { organizationPageLink } from '@/utils/nav' -import { Pledger, ResponseError, RewardsSummary } from '@polar-sh/sdk' +import { Pledger, ResponseError, RewardsSummary } from '@polar-sh/api' import { Metadata } from 'next' import { notFound, redirect } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/status/page.tsx b/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/status/page.tsx index 65f59fd1d5..de3c1ced85 100644 --- a/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/status/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/[repo]/issues/[number]/status/page.tsx @@ -1,7 +1,7 @@ import Status from '@/components/Pledge/Status' import { api } from '@/utils/api' import { resolveRepositoryPath } from '@/utils/repository' -import { Pledge, ResponseError } from '@polar-sh/sdk' +import { Pledge, ResponseError } from '@polar-sh/api' import { notFound } from 'next/navigation' const cacheConfig = { diff --git a/clients/apps/web/src/app/(main)/[organization]/[repo]/page.tsx b/clients/apps/web/src/app/(main)/[organization]/[repo]/page.tsx index 8a6aea0e53..0d9b27a5ea 100644 --- a/clients/apps/web/src/app/(main)/[organization]/[repo]/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/[repo]/page.tsx @@ -7,7 +7,7 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { organizationPageLink } from '@/utils/nav' import { resolveRepositoryPath } from '@/utils/repository' import { getUserOrganizations } from '@/utils/user' -import { ListResourceIssueFunding, Organization } from '@polar-sh/sdk' +import { ListResourceIssueFunding, Organization } from '@polar-sh/api' import { Metadata } from 'next' import { notFound, redirect } from 'next/navigation' import type { SuccessResult } from 'open-graph-scraper-lite' diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/authenticate/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/authenticate/ClientPage.tsx index 48a14ad5e8..f41f7312b2 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/authenticate/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/authenticate/ClientPage.tsx @@ -3,7 +3,7 @@ import { useCustomerPortalSessionAuthenticate } from '@/hooks/queries' import { api } from '@/utils/api' import { setValidationErrors } from '@/utils/api/errors' -import { Organization, ResponseError, ValidationError } from '@polar-sh/sdk' +import { Organization, ResponseError, ValidationError } from '@polar-sh/api' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/ClientPage.tsx index a55e79bc4a..55446fcec2 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/ClientPage.tsx @@ -2,7 +2,7 @@ import CustomerPortalOrder from '@/components/CustomerPortal/CustomerPortalOrder' import { buildAPI } from '@/utils/api' -import { CustomerOrder, Organization } from '@polar-sh/sdk' +import { CustomerOrder, Organization } from '@polar-sh/api' const ClientPage = ({ order, diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/page.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/page.tsx index b3f0220838..a31b8262f8 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/orders/[id]/page.tsx @@ -1,6 +1,6 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { getOrganizationOrNotFound } from '@/utils/customerPortal' -import { CustomerOrder, ResponseError } from '@polar-sh/sdk' +import { CustomerOrder, ResponseError } from '@polar-sh/api' import type { Metadata } from 'next' import { redirect } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/request/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/request/ClientPage.tsx index b04928668e..e6c35c5deb 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/request/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/request/ClientPage.tsx @@ -3,7 +3,7 @@ import { useCustomerPortalSessionRequest } from '@/hooks/queries' import { api } from '@/utils/api' import { setValidationErrors } from '@/utils/api/errors' -import { Organization, ResponseError, ValidationError } from '@polar-sh/sdk' +import { Organization, ResponseError, ValidationError } from '@polar-sh/api' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import Input from 'polarkit/components/ui/atoms/input' diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/ClientPage.tsx index 8c5c53c542..e20f095efd 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/ClientPage.tsx @@ -2,7 +2,7 @@ import CustomerPortalSubscription from '@/components/CustomerPortal/CustomerPortalSubscription' import { buildAPI } from '@/utils/api' -import { CustomerSubscription, Organization } from '@polar-sh/sdk' +import { CustomerSubscription, Organization } from '@polar-sh/api' const ClientPage = ({ subscription, diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/page.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/page.tsx index ef6bb08623..d18c4cfdb9 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/(topbar)/subscriptions/[id]/page.tsx @@ -1,6 +1,6 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { getOrganizationOrNotFound } from '@/utils/customerPortal' -import { CustomerSubscription, ResponseError } from '@polar-sh/sdk' +import { CustomerSubscription, ResponseError } from '@polar-sh/api' import type { Metadata } from 'next' import { redirect } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/ClientPage.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/ClientPage.tsx index 03db4d0142..a09db798bf 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/ClientPage.tsx @@ -5,7 +5,7 @@ import { ListResourceCustomerOrder, ListResourceCustomerSubscription, Organization, -} from '@polar-sh/sdk' +} from '@polar-sh/api' const ClientPage = ({ organization, diff --git a/clients/apps/web/src/app/(main)/[organization]/portal/page.tsx b/clients/apps/web/src/app/(main)/[organization]/portal/page.tsx index b71a1fc6ed..c927b82cca 100644 --- a/clients/apps/web/src/app/(main)/[organization]/portal/page.tsx +++ b/clients/apps/web/src/app/(main)/[organization]/portal/page.tsx @@ -4,7 +4,7 @@ import { ListResourceCustomerOrder, ListResourceCustomerSubscription, ResponseError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import type { Metadata } from 'next' import { redirect } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/dashboard/(create)/create/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/(create)/create/ClientPage.tsx index 30ec2326ae..00e7912bce 100644 --- a/clients/apps/web/src/app/(main)/dashboard/(create)/create/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/(create)/create/ClientPage.tsx @@ -9,7 +9,7 @@ import { useCreateOrganization } from '@/hooks/queries' import { setValidationErrors } from '@/utils/api/errors' import { CONFIG } from '@/utils/config' import { FormControl } from '@mui/material' -import { ResponseError, ValidationError } from '@polar-sh/sdk' +import { ResponseError, ValidationError } from '@polar-sh/api' import Link from 'next/link' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/app/(main)/dashboard/(create)/create/page.tsx b/clients/apps/web/src/app/(main)/dashboard/(create)/create/page.tsx index 7faed4036c..fc819dea93 100644 --- a/clients/apps/web/src/app/(main)/dashboard/(create)/create/page.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/(create)/create/page.tsx @@ -1,7 +1,7 @@ import revalidate from '@/app/actions' import { getServerSideAPI } from '@/utils/api/serverside' import { getAuthenticatedUser } from '@/utils/user' -import { Organization, ResponseError, ValidationError } from '@polar-sh/sdk' +import { Organization, ResponseError, ValidationError } from '@polar-sh/api' import { Metadata } from 'next' import { redirect } from 'next/navigation' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/(home)/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/(home)/ClientPage.tsx index 1d450e32ae..547db8f4c6 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/(home)/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/(home)/ClientPage.tsx @@ -14,7 +14,7 @@ import { SubscribersWidget } from '@/components/Widgets/SubscribersWidget' import { useProducts } from '@/hooks/queries' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { ChevronRight } from '@mui/icons-material' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import Link from 'next/link' import Button from 'polarkit/components/ui/atoms/button' import { @@ -69,7 +69,7 @@ const IntegrationView = () => {

Install the SDK

-          pnpm install @polar-sh/sdk
+          pnpm install @polar-sh/api
         
@@ -120,7 +120,7 @@ const IntegrationView = () => { { +const EmbedPage = ({ organization }: { organization: Organization }) => { const searchParams = useSearchParams() const repoSlug = searchParams.get('repo') const repositories = useListRepositories( @@ -49,11 +43,21 @@ const EmbedPage = ({ const embeds: Record = { Issues: { - preview: GitHub Embed of Fundable Backlog, + preview: ( + GitHub Embed of Fundable Backlog + ), tag: ``, }, Shield: { - preview: GitHub Shield of Fundable Issues, + preview: ( + GitHub Shield of Fundable Issues + ), tag: ``, }, } diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/organizations/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/organizations/ClientPage.tsx index 77586ee7ef..bcecdea56d 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/organizations/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/organizations/ClientPage.tsx @@ -9,7 +9,7 @@ import { useExternalOrganizations } from '@/hooks/queries/externalOrganizations' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { getGitHubOrganizationInstallationURL } from '@/utils/auth' import { GitHub } from '@mui/icons-material' -import { Platforms } from '@polar-sh/sdk' +import { Platforms } from '@polar-sh/api' import Link from 'next/link' import { usePathname } from 'next/navigation' import { ShadowListGroup } from 'polarkit/components/ui/atoms' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/overview/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/overview/ClientPage.tsx index f3d9fd687f..af0912e023 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/overview/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/issues/overview/ClientPage.tsx @@ -13,7 +13,7 @@ import { useDashboard, useListRepositories } from '@/hooks/queries' import { useOrganizationSSE } from '@/hooks/sse' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { HowToVoteOutlined } from '@mui/icons-material' -import { IssueSortBy, Organization, Repository } from '@polar-sh/sdk' +import { IssueSortBy, Organization, Repository } from '@polar-sh/api' import { useSearchParams } from 'next/navigation' import { ShadowBoxOnMd } from 'polarkit/components/ui/atoms/shadowbox' import { diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/ClientPage.tsx index 0b91ef5093..c9ac032df5 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/ClientPage.tsx @@ -9,7 +9,7 @@ import { serializeSearchParams, } from '@/utils/datatable' import { AddOutlined } from '@mui/icons-material' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { PaginationState, RowSelectionState, diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/[slug]/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/[slug]/ClientPage.tsx index 797dfb05eb..9333cc9c90 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/[slug]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/meters/[slug]/ClientPage.tsx @@ -8,7 +8,7 @@ import { MeterEvents } from '@/components/Meter/MeterEvents' import { MeterGetStarted } from '@/components/Meter/MeterGetStarted' import { useMeter, useMeterEvents } from '@/hooks/queries/meters' import { MoreVert } from '@mui/icons-material' -import { Interval, MetricType } from '@polar-sh/sdk' +import { Interval, MetricType } from '@polar-sh/api' import { useParams } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/ClientPage.tsx index b937e7a614..4076d974cc 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/ClientPage.tsx @@ -5,9 +5,9 @@ import { InlineModal } from '@/components/Modal/InlineModal' import { useModal } from '@/components/Modal/useModal' import Pagination from '@/components/Pagination/Pagination' import { ProductCheckoutModal } from '@/components/Products/ProductCheckoutModal' -import { ProductThumbnail } from '@/components/Products/ProductThumbnail' import ProductPriceLabel from '@/components/Products/ProductPriceLabel' import ProductPrices from '@/components/Products/ProductPrices' +import { ProductThumbnail } from '@/components/Products/ProductThumbnail' import { useProducts } from '@/hooks/queries/products' import useDebouncedCallback from '@/hooks/utils' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' @@ -29,7 +29,7 @@ import { Product, ProductPrice, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Markdown from 'markdown-to-jsx' import Link from 'next/link' import { usePathname, useRouter } from 'next/navigation' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/benefits/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/benefits/ClientPage.tsx index 74cab0b759..dd5cfcce34 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/benefits/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/benefits/ClientPage.tsx @@ -18,7 +18,7 @@ import { useDeleteBenefit, } from '@/hooks/queries' import { AddOutlined, MoreVertOutlined } from '@mui/icons-material' -import { type Benefit, Organization } from '@polar-sh/sdk' +import { type Benefit, Organization } from '@polar-sh/api' import { encode } from 'html-entities' import Link from 'next/link' import { useSearchParams } from 'next/navigation' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/discounts/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/discounts/ClientPage.tsx index 6c4bc8a65b..39358bff24 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/discounts/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/products/discounts/ClientPage.tsx @@ -16,7 +16,7 @@ import { } from '@/utils/datatable' import { getDiscountDisplay } from '@/utils/discount' import { AddOutlined, MoreVertOutlined, Search } from '@mui/icons-material' -import { Discount, Organization } from '@polar-sh/sdk' +import { Discount, Organization } from '@polar-sh/api' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/ClientPage.tsx index 869cc1f046..e10a76873d 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/ClientPage.tsx @@ -9,7 +9,7 @@ import { getAPIParams, serializeSearchParams, } from '@/utils/datatable' -import { Order, OrderCustomer, Organization, Product } from '@polar-sh/sdk' +import { Order, OrderCustomer, Organization, Product } from '@polar-sh/api' import { RowSelectionState } from '@tanstack/react-table' import { useRouter } from 'next/navigation' import { FormattedDateTime } from 'polarkit/components/ui/atoms' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/[id]/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/[id]/ClientPage.tsx index 3cf8cbfb18..efb7bea09b 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/[id]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/[id]/ClientPage.tsx @@ -7,17 +7,17 @@ import { ProductThumbnail } from '@/components/Products/ProductThumbnail' import { useCustomFields, useProduct } from '@/hooks/queries' import { useOrder } from '@/hooks/queries/orders' import { markdownOptionsJustText } from '@/utils/markdown' -import { Organization, Product} from '@polar-sh/sdk' +import { Organization, Product } from '@polar-sh/api' import { formatCurrencyAndAmount } from '@polarkit/lib/money' import { Separator } from '@radix-ui/react-dropdown-menu' import Markdown from 'markdown-to-jsx' import Link from 'next/link' import { FormattedDateTime, Pill } from 'polarkit/components/ui/atoms' +import { Status } from 'polarkit/components/ui/atoms/Status' import Button from 'polarkit/components/ui/atoms/button' import ShadowBox from 'polarkit/components/ui/atoms/shadowbox' import React, { PropsWithChildren } from 'react' import { twMerge } from 'tailwind-merge' -import { Status } from 'polarkit/components/ui/atoms/Status' interface OrderProductItemProps { product: Product @@ -25,14 +25,12 @@ interface OrderProductItemProps { const OrderProductItem = ({ product }: OrderProductItemProps) => { return ( -
+
-
+

{product.name}

- {product.is_archived && ( - Archived - )} + {product.is_archived && Archived}
{product.description && (
= ({ - organization, - orderId -}) => { +const ClientPage: React.FC = ({ organization, orderId }) => { const { data: order } = useOrder(orderId) const { data: product } = useProduct(order?.product.id) const { data: customFields } = useCustomFields(organization.id) @@ -71,22 +66,35 @@ const ClientPage: React.FC = ({ return ( +

Order

- {order.id} + + {order.id} +
} - className='gap-y-8' + className="gap-y-8" contextView={} > - +
- {!product.is_archived && - - } - - + {!product.is_archived && ( + + + + )} + +
@@ -94,16 +102,21 @@ const ClientPage: React.FC = ({

Order Details

- {order.id} + {order.id} - + + + - + - + {formatCurrencyAndAmount(order.tax_amount)} @@ -116,7 +129,7 @@ const ClientPage: React.FC = ({ {order.billing_address ? ( <> - + {order.billing_address?.country} @@ -124,7 +137,7 @@ const ClientPage: React.FC = ({ {order.billing_address?.line1 ?? '—'} - {order.billing_address?.line2 ?? '—'} + {order.billing_address?.line2 ?? '—'} {order.billing_address?.postal_code ?? '—'} @@ -135,7 +148,10 @@ const ClientPage: React.FC = ({ {order.billing_address?.state ?? '—'} - ) : <>} + + ) : ( + <> + )}
@@ -167,7 +183,10 @@ const ClientPage: React.FC = ({ ) } -const DetailRow = ({ title, children }: PropsWithChildren<{ title: string;}>) => { +const DetailRow = ({ + title, + children, +}: PropsWithChildren<{ title: string }>) => { return (
{title} diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/page.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/page.tsx index aa5d624a12..3a79681852 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/page.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/page.tsx @@ -1,7 +1,7 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { DataTableSearchParams, parseSearchParams } from '@/utils/datatable' import { getOrganizationBySlugOrNotFound } from '@/utils/organization' -import { ProductPriceType } from '@polar-sh/sdk' +import { ProductPriceType } from '@polar-sh/api' import { Metadata } from 'next' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/ClientPage.tsx index 3c5052b414..c8e8c3da23 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/ClientPage.tsx @@ -37,7 +37,7 @@ import { SubscriptionCancel, SubscriptionStatus, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { RowSelectionState } from '@tanstack/react-table' import { useRouter } from 'next/navigation' import { FormattedDateTime, Pill } from 'polarkit/components/ui/atoms' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/page.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/page.tsx index 1a5d11c7c3..dc8da70507 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/page.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/sales/subscriptions/page.tsx @@ -1,7 +1,7 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { DataTableSearchParams, parseSearchParams } from '@/utils/datatable' import { getOrganizationBySlugOrNotFound } from '@/utils/organization' -import { SubscriptionStatus } from '@polar-sh/sdk' +import { SubscriptionStatus } from '@polar-sh/api' import { Metadata } from 'next' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/ClientPage.tsx index 8093449e15..98365c1085 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/ClientPage.tsx @@ -14,7 +14,7 @@ import { serializeSearchParams, } from '@/utils/datatable' import { AddOutlined, MoreVertOutlined } from '@mui/icons-material' -import { CustomField, CustomFieldType, Organization } from '@polar-sh/sdk' +import { CustomField, CustomFieldType, Organization } from '@polar-sh/api' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/page.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/page.tsx index ef15e57e3b..dea70547cf 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/page.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/custom-fields/page.tsx @@ -1,7 +1,7 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { DataTableSearchParams, parseSearchParams } from '@/utils/datatable' import { getOrganizationBySlugOrNotFound } from '@/utils/organization' -import { CustomFieldType } from '@polar-sh/sdk' +import { CustomFieldType } from '@polar-sh/api' import { Metadata } from 'next' import ClientPage from './ClientPage' diff --git a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/ClientPage.tsx b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/ClientPage.tsx index 7b8c87c4fc..3222b3848b 100644 --- a/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/ClientPage.tsx +++ b/clients/apps/web/src/app/(main)/dashboard/[organization]/(header)/settings/webhooks/endpoints/[id]/ClientPage.tsx @@ -10,7 +10,7 @@ import { DataTablePaginationState, DataTableSortingState, } from '@/utils/datatable' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { useParams } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { Checkbox } from 'polarkit/components/ui/checkbox' diff --git a/clients/apps/web/src/app/(main)/oauth2/authorize/AuthorizePage.tsx b/clients/apps/web/src/app/(main)/oauth2/authorize/AuthorizePage.tsx index 346b6a8f5c..a45aaafb3f 100644 --- a/clients/apps/web/src/app/(main)/oauth2/authorize/AuthorizePage.tsx +++ b/clients/apps/web/src/app/(main)/oauth2/authorize/AuthorizePage.tsx @@ -7,7 +7,7 @@ import { AuthorizeResponseUser, AuthorizeUser, Scope, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Avatar from 'polarkit/components/ui/atoms/avatar' import Button from 'polarkit/components/ui/atoms/button' import { List, ListItem } from 'polarkit/components/ui/atoms/list' diff --git a/clients/apps/web/src/app/(main)/oauth2/authorize/OrganizationSelectionPage.tsx b/clients/apps/web/src/app/(main)/oauth2/authorize/OrganizationSelectionPage.tsx index bf6d8f5c8b..ef0cfd8074 100644 --- a/clients/apps/web/src/app/(main)/oauth2/authorize/OrganizationSelectionPage.tsx +++ b/clients/apps/web/src/app/(main)/oauth2/authorize/OrganizationSelectionPage.tsx @@ -4,7 +4,7 @@ import { AddOutlined } from '@mui/icons-material' import { AuthorizeOrganization, AuthorizeResponseOrganization, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import Avatar from 'polarkit/components/ui/atoms/avatar' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/app/(main)/oauth2/authorize/page.tsx b/clients/apps/web/src/app/(main)/oauth2/authorize/page.tsx index c27b5898ac..b43eb6e2f5 100644 --- a/clients/apps/web/src/app/(main)/oauth2/authorize/page.tsx +++ b/clients/apps/web/src/app/(main)/oauth2/authorize/page.tsx @@ -1,5 +1,5 @@ import { getServerURL } from '@/utils/api' -import { Scope } from '@polar-sh/sdk' +import { Scope } from '@polar-sh/api' import { cookies } from 'next/headers' import { redirect } from 'next/navigation' import AuthorizeErrorPage from './AuthorizeErrorPage' diff --git a/clients/apps/web/src/app/(main)/oauth2/authorize/types.ts b/clients/apps/web/src/app/(main)/oauth2/authorize/types.ts index 4bdb4038ae..f895c35774 100644 --- a/clients/apps/web/src/app/(main)/oauth2/authorize/types.ts +++ b/clients/apps/web/src/app/(main)/oauth2/authorize/types.ts @@ -1,3 +1,3 @@ -import { ResponseOauth2Authorize } from '@polar-sh/sdk' +import { ResponseOauth2Authorize } from '@polar-sh/api' export type AuthorizeResponse = ResponseOauth2Authorize diff --git a/clients/apps/web/src/app/api/checkout/route.ts b/clients/apps/web/src/app/api/checkout/route.ts index 4dd5da17f2..0223798982 100644 --- a/clients/apps/web/src/app/api/checkout/route.ts +++ b/clients/apps/web/src/app/api/checkout/route.ts @@ -1,6 +1,6 @@ import { getServerSideAPI } from '@/utils/api/serverside' import { isCrawler } from '@/utils/crawlers' -import { ResponseError } from '@polar-sh/sdk' +import { ResponseError } from '@polar-sh/api' import { NextRequest, NextResponse } from 'next/server' export const runtime = 'edge' diff --git a/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge-injected.svg/route.tsx b/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge-injected.svg/route.tsx index 0de18952d0..b4c1bc35b6 100644 --- a/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge-injected.svg/route.tsx +++ b/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge-injected.svg/route.tsx @@ -1,5 +1,5 @@ import IssueBadge from '@/components/Embed/IssueBadge' -import { Funding } from '@polar-sh/sdk' +import { Funding } from '@polar-sh/api' const { default: satori } = require('satori') export const runtime = 'edge' diff --git a/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge.svg/route.tsx b/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge.svg/route.tsx index 6597f00f2f..2478f3dd93 100644 --- a/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge.svg/route.tsx +++ b/clients/apps/web/src/app/api/github/[org]/[repo]/issues/[number]/pledge.svg/route.tsx @@ -9,7 +9,7 @@ import { Pledger, PolarAPI, State, -} from '@polar-sh/sdk' +} from '@polar-sh/api' const { default: satori } = require('satori') export const runtime = 'edge' diff --git a/clients/apps/web/src/app/checkout/[clientSecret]/confirmation/page.tsx b/clients/apps/web/src/app/checkout/[clientSecret]/confirmation/page.tsx index 90e8f31d36..56bee05d3f 100644 --- a/clients/apps/web/src/app/checkout/[clientSecret]/confirmation/page.tsx +++ b/clients/apps/web/src/app/checkout/[clientSecret]/confirmation/page.tsx @@ -2,7 +2,7 @@ import { CheckoutConfirmation } from '@/components/Checkout/CheckoutConfirmation import CheckoutLayout from '@/components/Checkout/CheckoutLayout' import { getServerSideAPI } from '@/utils/api/serverside' import { getCheckoutByClientSecret } from '@/utils/checkout' -import { CheckoutStatus } from '@polar-sh/sdk' +import { CheckoutStatus } from '@polar-sh/api' import { redirect } from 'next/navigation' export default async function Page({ diff --git a/clients/apps/web/src/app/checkout/[clientSecret]/page.tsx b/clients/apps/web/src/app/checkout/[clientSecret]/page.tsx index bff59f46fb..ceea7823f0 100644 --- a/clients/apps/web/src/app/checkout/[clientSecret]/page.tsx +++ b/clients/apps/web/src/app/checkout/[clientSecret]/page.tsx @@ -2,7 +2,7 @@ import { Checkout } from '@/components/Checkout/Checkout' import CheckoutLayout from '@/components/Checkout/CheckoutLayout' import { getServerSideAPI } from '@/utils/api/serverside' import { getCheckoutByClientSecret } from '@/utils/checkout' -import { CheckoutStatus } from '@polar-sh/sdk' +import { CheckoutStatus } from '@polar-sh/api' import { redirect } from 'next/navigation' export default async function Page({ diff --git a/clients/apps/web/src/app/embed/fund-our-backlog.svg/route.tsx b/clients/apps/web/src/app/embed/fund-our-backlog.svg/route.tsx index 6eb44b7d79..55832d470e 100644 --- a/clients/apps/web/src/app/embed/fund-our-backlog.svg/route.tsx +++ b/clients/apps/web/src/app/embed/fund-our-backlog.svg/route.tsx @@ -1,7 +1,7 @@ import { FundOurBacklog } from '@/components/Embed/FundOurBacklog' import { getServerSideAPI } from '@/utils/api/serverside' import { getStorefrontOrNotFound } from '@/utils/storefront' -import { Issue, ListResourceIssue, PolarAPI } from '@polar-sh/sdk' +import { Issue, ListResourceIssue, PolarAPI } from '@polar-sh/api' const { default: satori } = require('satori') export const runtime = 'edge' diff --git a/clients/apps/web/src/app/embed/product.svg/route.tsx b/clients/apps/web/src/app/embed/product.svg/route.tsx index 4bba92d7bd..f94c9f680e 100644 --- a/clients/apps/web/src/app/embed/product.svg/route.tsx +++ b/clients/apps/web/src/app/embed/product.svg/route.tsx @@ -1,19 +1,14 @@ import { ProductCardEmbed } from '@/components/Embed/ProductCardEmbed' import { getServerURL } from '@/utils/api' -import { - ProductEmbed, -} from '@polar-sh/sdk' +import { ProductEmbed } from '@polar-sh/api' const { default: satori } = require('satori') export const runtime = 'edge' const generate304Response = () => { - return new Response( - null, - { - status: 304, - }, - ) + return new Response(null, { + status: 304, + }) } const generate404Response = () => { @@ -47,7 +42,7 @@ const getEmbed = async ( const response = await fetch(url, { method: 'GET', - headers: headers + headers: headers, }) const useCache = response.status === 304 @@ -78,11 +73,7 @@ const render = async ( ).then((res) => res.arrayBuffer()) return await satori( - , + , { fonts: [ { @@ -125,18 +116,14 @@ export async function GET(request: Request) { return generate404Response() } - const svg = await render( - embed, - cta, - darkmode, - ) + const svg = await render(embed, cta, darkmode) - const cacheTTL = 60 * 60 * 24 * 100 // 100 days + const cacheTTL = 60 * 60 * 24 * 100 // 100 days return new Response(svg, { headers: { 'Content-Type': 'image/svg+xml', 'Cache-Control': `public, max-age=${cacheTTL}`, - 'ETag': embed.etag, + ETag: embed.etag, }, status: 200, }) diff --git a/clients/apps/web/src/app/embed/seeks-funding-shield.svg/route.tsx b/clients/apps/web/src/app/embed/seeks-funding-shield.svg/route.tsx index 482d6c2067..ac1f5411a9 100644 --- a/clients/apps/web/src/app/embed/seeks-funding-shield.svg/route.tsx +++ b/clients/apps/web/src/app/embed/seeks-funding-shield.svg/route.tsx @@ -1,7 +1,7 @@ import { SeeksFundingShield } from '@/components/Embed/SeeksFundingShield' import { getServerSideAPI } from '@/utils/api/serverside' import { getStorefrontOrNotFound } from '@/utils/storefront' -import { PolarAPI } from '@polar-sh/sdk' +import { PolarAPI } from '@polar-sh/api' const { default: satori } = require('satori') export const runtime = 'edge' diff --git a/clients/apps/web/src/app/embed/subscribe.svg/route.tsx b/clients/apps/web/src/app/embed/subscribe.svg/route.tsx index cbe7f384df..8d0ce9aacd 100644 --- a/clients/apps/web/src/app/embed/subscribe.svg/route.tsx +++ b/clients/apps/web/src/app/embed/subscribe.svg/route.tsx @@ -1,6 +1,6 @@ import { Subscribe } from '@/components/Embed/Subscribe' import { getServerURL } from '@/utils/api' -import { Storefront, StorefrontCustomer } from '@polar-sh/sdk' +import { Storefront, StorefrontCustomer } from '@polar-sh/api' import { notFound } from 'next/navigation' const { default: satori } = require('satori') diff --git a/clients/apps/web/src/app/embed/tiers.svg/route.tsx b/clients/apps/web/src/app/embed/tiers.svg/route.tsx index 8c2e97fc68..027059587d 100644 --- a/clients/apps/web/src/app/embed/tiers.svg/route.tsx +++ b/clients/apps/web/src/app/embed/tiers.svg/route.tsx @@ -4,7 +4,7 @@ import { ProductStorefront, Storefront, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { notFound } from 'next/navigation' const { default: satori } = require('satori') diff --git a/clients/apps/web/src/app/layout.tsx b/clients/apps/web/src/app/layout.tsx index 42aab17d1a..673ed44575 100644 --- a/clients/apps/web/src/app/layout.tsx +++ b/clients/apps/web/src/app/layout.tsx @@ -5,7 +5,7 @@ import { UserContextProvider } from '@/providers/auth' import { getServerSideAPI } from '@/utils/api/serverside' import { getAuthenticatedUser, getUserOrganizations } from '@/utils/user' import { GoogleTagManager } from '@next/third-parties/google' -import { Organization, UserRead } from '@polar-sh/sdk' +import { Organization, UserRead } from '@polar-sh/api' import { GeistSans } from 'geist/font/sans' import { PHASE_PRODUCTION_BUILD } from 'next/constants' import { Metadata } from 'next/types' diff --git a/clients/apps/web/src/app/og/route.tsx b/clients/apps/web/src/app/og/route.tsx index f2711f8aa2..ca55e4a302 100644 --- a/clients/apps/web/src/app/og/route.tsx +++ b/clients/apps/web/src/app/og/route.tsx @@ -5,7 +5,7 @@ import { Organization, Repository, Storefront, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { ImageResponse } from 'next/og' import { NextRequest } from 'next/server' diff --git a/clients/apps/web/src/components/Accounts/AccountAssociations.tsx b/clients/apps/web/src/components/Accounts/AccountAssociations.tsx index 2152a3ab36..fbe910e26f 100644 --- a/clients/apps/web/src/components/Accounts/AccountAssociations.tsx +++ b/clients/apps/web/src/components/Accounts/AccountAssociations.tsx @@ -1,4 +1,4 @@ -import { Account } from '@polar-sh/sdk' +import { Account } from '@polar-sh/api' import React, { useMemo } from 'react' interface AccountAssociationsProps { diff --git a/clients/apps/web/src/components/Accounts/AccountCreateModal.tsx b/clients/apps/web/src/components/Accounts/AccountCreateModal.tsx index 06cf2e2f2f..e9cf2e4aaf 100644 --- a/clients/apps/web/src/components/Accounts/AccountCreateModal.tsx +++ b/clients/apps/web/src/components/Accounts/AccountCreateModal.tsx @@ -7,7 +7,7 @@ import { AccountType, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import CountryPicker from 'polarkit/components/ui/atoms/countrypicker' import Input from 'polarkit/components/ui/atoms/input' diff --git a/clients/apps/web/src/components/Accounts/AccountSetup.tsx b/clients/apps/web/src/components/Accounts/AccountSetup.tsx index 2ef9a43cf3..c74c874ece 100644 --- a/clients/apps/web/src/components/Accounts/AccountSetup.tsx +++ b/clients/apps/web/src/components/Accounts/AccountSetup.tsx @@ -3,7 +3,7 @@ import AccountAssociations from '@/components/Accounts/AccountAssociations' import { ACCOUNT_TYPE_DISPLAY_NAMES } from '@/utils/account' import { api } from '@/utils/api' -import { Account, Organization, Status } from '@polar-sh/sdk' +import { Account, Organization, Status } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Select, @@ -60,7 +60,7 @@ export const AccountSetup: React.FC = ({ const link = await api.accounts.dashboardLink({ id: account.id, }) - window.open(link.url, '_blank'); + window.open(link.url, '_blank') } return ( diff --git a/clients/apps/web/src/components/Accounts/AccountsList.tsx b/clients/apps/web/src/components/Accounts/AccountsList.tsx index a53e2ae8f0..c69f16f494 100644 --- a/clients/apps/web/src/components/Accounts/AccountsList.tsx +++ b/clients/apps/web/src/components/Accounts/AccountsList.tsx @@ -3,7 +3,7 @@ import { ACCOUNT_TYPE_DISPLAY_NAMES, } from '@/utils/account' import { api } from '@/utils/api' -import { Account, Status } from '@polar-sh/sdk' +import { Account, Status } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { twMerge } from 'tailwind-merge' import AccountAssociations from './AccountAssociations' diff --git a/clients/apps/web/src/components/Auth/AuthModal.tsx b/clients/apps/web/src/components/Auth/AuthModal.tsx index 59dc28bd68..449b33e2f5 100644 --- a/clients/apps/web/src/components/Auth/AuthModal.tsx +++ b/clients/apps/web/src/components/Auth/AuthModal.tsx @@ -1,4 +1,4 @@ -import { UserSignupAttribution } from '@polar-sh/sdk' +import { UserSignupAttribution } from '@polar-sh/api' import ShadowBox from 'polarkit/components/ui/atoms/shadowbox' import LogoIcon from '../Brand/LogoIcon' import Login from './Login' diff --git a/clients/apps/web/src/components/Auth/GetStartedButton.tsx b/clients/apps/web/src/components/Auth/GetStartedButton.tsx index 296e058527..bc3fe6f7cf 100644 --- a/clients/apps/web/src/components/Auth/GetStartedButton.tsx +++ b/clients/apps/web/src/components/Auth/GetStartedButton.tsx @@ -1,15 +1,14 @@ 'use client' +import { usePostHog } from '@/hooks/posthog' import { KeyboardArrowRight } from '@mui/icons-material' +import { Organization } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' -import { ComponentProps } from 'react' +import { ComponentProps, FormEvent, useCallback, useMemo } from 'react' import { twMerge } from 'tailwind-merge' -import { Organization } from '@polar-sh/sdk' import { Modal } from '../Modal' import { useModal } from '../Modal/useModal' import { AuthModal } from './AuthModal' -import { useCallback, useMemo, FormEvent } from 'react' -import { usePostHog } from '@/hooks/posthog' interface GetStartedButtonProps extends ComponentProps { text?: string @@ -44,11 +43,14 @@ const GetStartedButton: React.FC = ({ }, [signup, posthog, showModal]) // Supporting embedding the button in a form - const onSubmit = useCallback((e: FormEvent) => { - e.preventDefault() - e.stopPropagation() - onClick() - }, [onClick]) + const onSubmit = useCallback( + (e: FormEvent) => { + e.preventDefault() + e.stopPropagation() + onClick() + }, + [onClick], + ) return ( <> @@ -77,7 +79,7 @@ const GetStartedButton: React.FC = ({ returnParams={slug ? { slug, auto: 'true' } : {}} signup={{ intent: 'creator', - ...signup + ...signup, }} /> } diff --git a/clients/apps/web/src/components/Auth/GithubLoginButton.tsx b/clients/apps/web/src/components/Auth/GithubLoginButton.tsx index eed878f65c..d865f5dc77 100644 --- a/clients/apps/web/src/components/Auth/GithubLoginButton.tsx +++ b/clients/apps/web/src/components/Auth/GithubLoginButton.tsx @@ -1,17 +1,17 @@ 'use client' +import { usePostHog, type EventName } from '@/hooks/posthog' import { getGitHubAuthorizeURL } from '@/utils/auth' +import { UserSignupAttribution } from '@polar-sh/api' import Link from 'next/link' import { useSearchParams } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { twMerge } from 'tailwind-merge' -import { UserSignupAttribution } from '@polar-sh/sdk' -import { usePostHog, type EventName } from '@/hooks/posthog' const GithubLoginButton = (props: { className?: string returnTo?: string - signup?: UserSignupAttribution, + signup?: UserSignupAttribution size?: 'large' | 'small' fullWidth?: boolean text: string @@ -34,7 +34,7 @@ const GithubLoginButton = (props: { } posthog.capture(eventName, { - method: 'github' + method: 'github', }) } diff --git a/clients/apps/web/src/components/Auth/GoogleLoginButton.tsx b/clients/apps/web/src/components/Auth/GoogleLoginButton.tsx index b38f2972fa..5a96d905bd 100644 --- a/clients/apps/web/src/components/Auth/GoogleLoginButton.tsx +++ b/clients/apps/web/src/components/Auth/GoogleLoginButton.tsx @@ -1,16 +1,19 @@ +import { usePostHog, type EventName } from '@/hooks/posthog' import { getGoogleAuthorizeURL } from '@/utils/auth' import { Google } from '@mui/icons-material' -import Button from 'polarkit/components/ui/atoms/button' -import { UserSignupAttribution } from '@polar-sh/sdk' +import { UserSignupAttribution } from '@polar-sh/api' import Link from 'next/link' -import { usePostHog, type EventName } from '@/hooks/posthog' +import Button from 'polarkit/components/ui/atoms/button' interface GoogleLoginButtonProps { returnTo?: string signup?: UserSignupAttribution } -const GoogleLoginButton: React.FC = ({ returnTo, signup }) => { +const GoogleLoginButton: React.FC = ({ + returnTo, + signup, +}) => { const posthog = usePostHog() const onClick = () => { @@ -20,15 +23,18 @@ const GoogleLoginButton: React.FC = ({ returnTo, signup } posthog.capture(eventName, { - method: 'google' + method: 'google', }) } return ( - + )} diff --git a/clients/apps/web/src/components/Benefit/BenefitForm.tsx b/clients/apps/web/src/components/Benefit/BenefitForm.tsx index e99c7a80b1..3aba3c5c70 100644 --- a/clients/apps/web/src/components/Benefit/BenefitForm.tsx +++ b/clients/apps/web/src/components/Benefit/BenefitForm.tsx @@ -7,7 +7,7 @@ import { BenefitDiscordCreate, BenefitType, Organization, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { usePathname } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import Input from 'polarkit/components/ui/atoms/input' diff --git a/clients/apps/web/src/components/Benefit/BenefitGrant.tsx b/clients/apps/web/src/components/Benefit/BenefitGrant.tsx index 780dc34a01..9dd24782bf 100644 --- a/clients/apps/web/src/components/Benefit/BenefitGrant.tsx +++ b/clients/apps/web/src/components/Benefit/BenefitGrant.tsx @@ -7,7 +7,7 @@ import { CustomerBenefitGrantGitHubRepository, CustomerBenefitGrantLicenseKeys, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { usePathname } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { diff --git a/clients/apps/web/src/components/Benefit/CreateBenefitModalContent.tsx b/clients/apps/web/src/components/Benefit/CreateBenefitModalContent.tsx index 1849d46ac7..c63d597c51 100644 --- a/clients/apps/web/src/components/Benefit/CreateBenefitModalContent.tsx +++ b/clients/apps/web/src/components/Benefit/CreateBenefitModalContent.tsx @@ -7,7 +7,7 @@ import { ResponseError, ValidationError, type Benefit, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useSearchParams } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' diff --git a/clients/apps/web/src/components/Benefit/Downloadables/BenefitForm.tsx b/clients/apps/web/src/components/Benefit/Downloadables/BenefitForm.tsx index 77039008ce..8fdb077ddf 100644 --- a/clients/apps/web/src/components/Benefit/Downloadables/BenefitForm.tsx +++ b/clients/apps/web/src/components/Benefit/Downloadables/BenefitForm.tsx @@ -5,7 +5,7 @@ import { FileRead, FileServiceTypes, Organization, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { FileUploadOutlined as FileUploadIcon } from '@mui/icons-material' diff --git a/clients/apps/web/src/components/Benefit/Downloadables/DownloadablesBenefitGrant.tsx b/clients/apps/web/src/components/Benefit/Downloadables/DownloadablesBenefitGrant.tsx index 0e9b075b0f..81506453e2 100644 --- a/clients/apps/web/src/components/Benefit/Downloadables/DownloadablesBenefitGrant.tsx +++ b/clients/apps/web/src/components/Benefit/Downloadables/DownloadablesBenefitGrant.tsx @@ -2,7 +2,7 @@ import { CustomerBenefitGrantDownloadables, DownloadableRead, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useCustomerDownloadables } from '@/hooks/queries' import { ArrowDownward, MoreVertOutlined } from '@mui/icons-material' diff --git a/clients/apps/web/src/components/Benefit/Downloadables/FileList/FileListItem.tsx b/clients/apps/web/src/components/Benefit/Downloadables/FileList/FileListItem.tsx index 5763fe9d34..439f7908ad 100644 --- a/clients/apps/web/src/components/Benefit/Downloadables/FileList/FileListItem.tsx +++ b/clients/apps/web/src/components/Benefit/Downloadables/FileList/FileListItem.tsx @@ -10,7 +10,7 @@ import { MoreVertOutlined, VideoFileOutlined, } from '@mui/icons-material' -import { FileRead } from '@polar-sh/sdk' +import { FileRead } from '@polar-sh/api' import { Switch } from 'polarkit/components/ui/atoms' import { FocusEvent, diff --git a/clients/apps/web/src/components/Benefit/GitHubRepositoryBenefitForm.tsx b/clients/apps/web/src/components/Benefit/GitHubRepositoryBenefitForm.tsx index 66a71a7a82..9e81e412cc 100644 --- a/clients/apps/web/src/components/Benefit/GitHubRepositoryBenefitForm.tsx +++ b/clients/apps/web/src/components/Benefit/GitHubRepositoryBenefitForm.tsx @@ -12,7 +12,7 @@ import { GitHubInvitesBenefitOrganization, GitHubInvitesBenefitRepository, OAuthPlatform, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { usePathname } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { diff --git a/clients/apps/web/src/components/Benefit/LicenseKeys/BenefitForm.tsx b/clients/apps/web/src/components/Benefit/LicenseKeys/BenefitForm.tsx index 838ad647e0..76d2d5eb06 100644 --- a/clients/apps/web/src/components/Benefit/LicenseKeys/BenefitForm.tsx +++ b/clients/apps/web/src/components/Benefit/LicenseKeys/BenefitForm.tsx @@ -4,7 +4,7 @@ import { BenefitLicenseKeyActivationProperties, BenefitLicenseKeyExpirationProperties, BenefitLicenseKeysCreate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { Switch } from 'polarkit/components/ui/atoms' import Input from 'polarkit/components/ui/atoms/input' import { diff --git a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyActivations.tsx b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyActivations.tsx index d9d70b79b8..674da2831d 100644 --- a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyActivations.tsx +++ b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyActivations.tsx @@ -1,7 +1,7 @@ import { toast } from '@/components/Toast/use-toast' import { useCustomerLicenseKeyDeactivate } from '@/hooks/queries' import { CloseOutlined } from '@mui/icons-material' -import { LicenseKeyWithActivations, PolarAPI } from '@polar-sh/sdk' +import { LicenseKeyWithActivations, PolarAPI } from '@polar-sh/api' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' import { List, ListItem } from 'polarkit/components/ui/atoms/list' diff --git a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyBenefitGrant.tsx b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyBenefitGrant.tsx index 9ce3baec6b..436e200c4e 100644 --- a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyBenefitGrant.tsx +++ b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyBenefitGrant.tsx @@ -2,7 +2,7 @@ import { CustomerBenefitGrantLicenseKeys, LicenseKeyWithActivations, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { toast } from '@/components/Toast/use-toast' import { useCustomerLicenseKey } from '@/hooks/queries' diff --git a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyDetails.tsx b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyDetails.tsx index 93b9888699..e98d47a5c9 100644 --- a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyDetails.tsx +++ b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeyDetails.tsx @@ -1,4 +1,4 @@ -import { LicenseKeyRead } from '@polar-sh/sdk' +import { LicenseKeyRead } from '@polar-sh/api' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import ShadowBox from 'polarkit/components/ui/atoms/shadowbox' import { twMerge } from 'tailwind-merge' diff --git a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeysList.tsx b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeysList.tsx index 9e249571a8..e1379b2c67 100644 --- a/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeysList.tsx +++ b/clients/apps/web/src/components/Benefit/LicenseKeys/LicenseKeysList.tsx @@ -1,5 +1,5 @@ import { DataTableSortingState } from '@/utils/datatable' -import { LicenseKeyRead } from '@polar-sh/sdk' +import { LicenseKeyRead } from '@polar-sh/api' import { OnChangeFn, PaginationState, diff --git a/clients/apps/web/src/components/Benefit/UpdateBenefitModalContent.tsx b/clients/apps/web/src/components/Benefit/UpdateBenefitModalContent.tsx index eb6117c62d..ca216c8ce7 100644 --- a/clients/apps/web/src/components/Benefit/UpdateBenefitModalContent.tsx +++ b/clients/apps/web/src/components/Benefit/UpdateBenefitModalContent.tsx @@ -7,7 +7,7 @@ import { Organization, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' import { MouseEvent, useCallback, useState } from 'react' diff --git a/clients/apps/web/src/components/Benefit/utils.tsx b/clients/apps/web/src/components/Benefit/utils.tsx index 4190593d05..04739fe301 100644 --- a/clients/apps/web/src/components/Benefit/utils.tsx +++ b/clients/apps/web/src/components/Benefit/utils.tsx @@ -5,7 +5,7 @@ import { KeyOutlined, WebOutlined, } from '@mui/icons-material' -import { BenefitBase, BenefitType } from '@polar-sh/sdk' +import { BenefitBase, BenefitType } from '@polar-sh/api' import { twMerge } from 'tailwind-merge' export type CreatableBenefit = BenefitType diff --git a/clients/apps/web/src/components/Checkout/Checkout.tsx b/clients/apps/web/src/components/Checkout/Checkout.tsx index f6bf01b7d7..0f30a3831f 100644 --- a/clients/apps/web/src/components/Checkout/Checkout.tsx +++ b/clients/apps/web/src/components/Checkout/Checkout.tsx @@ -10,7 +10,7 @@ import { Organization, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useTheme } from 'next-themes' import ShadowBox, { ShadowBoxOnMd, diff --git a/clients/apps/web/src/components/Checkout/CheckoutBenefits.tsx b/clients/apps/web/src/components/Checkout/CheckoutBenefits.tsx index d342186626..dc55312cb9 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutBenefits.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutBenefits.tsx @@ -1,7 +1,7 @@ import { useCustomerBenefitGrants } from '@/hooks/queries/customerPortal' import { useCustomerSSE } from '@/hooks/sse' import { buildAPI } from '@/utils/api' -import { CheckoutPublic } from '@polar-sh/sdk' +import { CheckoutPublic } from '@polar-sh/api' import { List, ListItem } from 'polarkit/components/ui/atoms/list' import { useEffect } from 'react' import { BenefitGrant } from '../Benefit/BenefitGrant' diff --git a/clients/apps/web/src/components/Checkout/CheckoutCard.tsx b/clients/apps/web/src/components/Checkout/CheckoutCard.tsx index af3abc7888..b3852b0817 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutCard.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutCard.tsx @@ -10,7 +10,7 @@ import { CheckoutPublic, CheckoutUpdatePublic, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { formatCurrencyAndAmount } from '@polarkit/lib/money' import MoneyInput from 'polarkit/components/ui/atoms/moneyinput' import ShadowBox from 'polarkit/components/ui/atoms/shadowbox' diff --git a/clients/apps/web/src/components/Checkout/CheckoutConfirmation.tsx b/clients/apps/web/src/components/Checkout/CheckoutConfirmation.tsx index 63b6ddf143..87ae80e69a 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutConfirmation.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutConfirmation.tsx @@ -3,7 +3,7 @@ import { useCheckoutClientSSE } from '@/hooks/sse' import { api } from '@/utils/api' import { organizationPageLink } from '@/utils/nav' -import { CheckoutPublic, CheckoutStatus, Organization } from '@polar-sh/sdk' +import { CheckoutPublic, CheckoutStatus, Organization } from '@polar-sh/api' import { Elements, ElementsConsumer } from '@stripe/react-stripe-js' import { Stripe, loadStripe } from '@stripe/stripe-js' import Link from 'next/link' @@ -110,7 +110,7 @@ export const CheckoutConfirmation = ({ return (
- {organization.profile_settings?.enabled ? + {organization.profile_settings?.enabled ? ( - : + + ) : ( - } + )}

{status === CheckoutStatus.CONFIRMED && 'We are processing your order'} diff --git a/clients/apps/web/src/components/Checkout/CheckoutForm.tsx b/clients/apps/web/src/components/Checkout/CheckoutForm.tsx index 3701cb9177..7bd8e2c2b1 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutForm.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutForm.tsx @@ -4,14 +4,14 @@ import { useCheckoutClientSSE } from '@/hooks/sse' import { CONFIG } from '@/utils/config' import { getDiscountDisplay } from '@/utils/discount' import { CloseOutlined } from '@mui/icons-material' -import { PolarEmbedCheckout } from '@polar-sh/checkout/embed' import { CheckoutConfirmStripe, CheckoutPublic, CheckoutPublicConfirmed, CheckoutStatus, CheckoutUpdatePublic, -} from '@polar-sh/sdk' +} from '@polar-sh/api' +import { PolarEmbedCheckout } from '@polar-sh/checkout/embed' import { formatCurrencyAndAmount } from '@polarkit/lib/money' import { Elements, diff --git a/clients/apps/web/src/components/Checkout/CheckoutInfo.tsx b/clients/apps/web/src/components/Checkout/CheckoutInfo.tsx index ca36ac4873..3780cb632e 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutInfo.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutInfo.tsx @@ -2,7 +2,7 @@ import { CheckoutPublic, CheckoutUpdatePublic, Organization, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { twMerge } from 'tailwind-merge' import { CheckoutCard } from './CheckoutCard' import CheckoutProductInfo from './CheckoutProductInfo' diff --git a/clients/apps/web/src/components/Checkout/CheckoutLayout.tsx b/clients/apps/web/src/components/Checkout/CheckoutLayout.tsx index 8caacb8275..67ce707248 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutLayout.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutLayout.tsx @@ -1,5 +1,5 @@ import { PolarThemeProvider } from '@/app/providers' -import { CheckoutPublic } from '@polar-sh/sdk' +import { CheckoutPublic } from '@polar-sh/api' import PublicLayout from '../Layout/PublicLayout' import CheckoutEmbedLayout from './Embed/CheckoutEmbedLayout' diff --git a/clients/apps/web/src/components/Checkout/CheckoutProductInfo.tsx b/clients/apps/web/src/components/Checkout/CheckoutProductInfo.tsx index f1a397255f..97009687eb 100644 --- a/clients/apps/web/src/components/Checkout/CheckoutProductInfo.tsx +++ b/clients/apps/web/src/components/Checkout/CheckoutProductInfo.tsx @@ -1,7 +1,7 @@ import { Slideshow } from '@/components/Products/Slideshow' import { markdownOptions } from '@/utils/markdown' import { organizationPageLink } from '@/utils/nav' -import { CheckoutProduct, Organization } from '@polar-sh/sdk' +import { CheckoutProduct, Organization } from '@polar-sh/api' import Markdown from 'markdown-to-jsx' import Link from 'next/link' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedClose.tsx b/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedClose.tsx index fd15918ede..5b1240d3a2 100644 --- a/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedClose.tsx +++ b/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedClose.tsx @@ -1,8 +1,8 @@ 'use client' import { XMarkIcon } from '@heroicons/react/24/outline' +import { CheckoutPublic } from '@polar-sh/api' import { PolarEmbedCheckout } from '@polar-sh/checkout/embed' -import { CheckoutPublic } from '@polar-sh/sdk' import { useCallback, useEffect } from 'react' interface CheckoutEmbedCloseProps { diff --git a/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLayout.tsx b/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLayout.tsx index 6207d0477e..ddbf3d5e9e 100644 --- a/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLayout.tsx +++ b/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLayout.tsx @@ -1,4 +1,4 @@ -import { CheckoutPublic } from '@polar-sh/sdk' +import { CheckoutPublic } from '@polar-sh/api' import CheckoutEmbedClose from './CheckoutEmbedClose' import CheckoutEmbedLoaded from './CheckoutEmbedLoaded' diff --git a/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLoaded.tsx b/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLoaded.tsx index 74b079ec38..8b05628f58 100644 --- a/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLoaded.tsx +++ b/clients/apps/web/src/components/Checkout/Embed/CheckoutEmbedLoaded.tsx @@ -1,7 +1,7 @@ 'use client' +import { CheckoutPublic } from '@polar-sh/api' import { PolarEmbedCheckout } from '@polar-sh/checkout/embed' -import { CheckoutPublic } from '@polar-sh/sdk' import { useEffect } from 'react' interface CheckoutEmbedLoadedProps { diff --git a/clients/apps/web/src/components/CustomFields/CreateCustomFieldModalContent.tsx b/clients/apps/web/src/components/CustomFields/CreateCustomFieldModalContent.tsx index 91068b8f45..add78d1c5d 100644 --- a/clients/apps/web/src/components/CustomFields/CreateCustomFieldModalContent.tsx +++ b/clients/apps/web/src/components/CustomFields/CreateCustomFieldModalContent.tsx @@ -7,7 +7,7 @@ import { Organization, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' import { useCallback, useState } from 'react' diff --git a/clients/apps/web/src/components/CustomFields/CustomFieldForm.tsx b/clients/apps/web/src/components/CustomFields/CustomFieldForm.tsx index 7b7196cd82..5af2743e92 100644 --- a/clients/apps/web/src/components/CustomFields/CustomFieldForm.tsx +++ b/clients/apps/web/src/components/CustomFields/CustomFieldForm.tsx @@ -3,14 +3,14 @@ import { CustomFieldCreate, CustomFieldType, CustomFieldUpdate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' +import { Switch } from 'polarkit/components/ui/atoms' import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from 'polarkit/components/ui/atoms/Accordion' -import { Switch } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' import Input from 'polarkit/components/ui/atoms/input' import { diff --git a/clients/apps/web/src/components/CustomFields/CustomFieldInput.tsx b/clients/apps/web/src/components/CustomFields/CustomFieldInput.tsx index d1b65609a3..4ba45ecd35 100644 --- a/clients/apps/web/src/components/CustomFields/CustomFieldInput.tsx +++ b/clients/apps/web/src/components/CustomFields/CustomFieldInput.tsx @@ -6,7 +6,7 @@ import { CustomFieldSelect, CustomFieldText, CustomFieldType, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Markdown, { MarkdownToJSX } from 'markdown-to-jsx' import Input from 'polarkit/components/ui/atoms/input' import { diff --git a/clients/apps/web/src/components/CustomFields/CustomFieldTypeIcon.tsx b/clients/apps/web/src/components/CustomFields/CustomFieldTypeIcon.tsx index b96fd127a1..0f1a045018 100644 --- a/clients/apps/web/src/components/CustomFields/CustomFieldTypeIcon.tsx +++ b/clients/apps/web/src/components/CustomFields/CustomFieldTypeIcon.tsx @@ -5,7 +5,7 @@ import { Numbers, TextSnippet, } from '@mui/icons-material' -import { CustomFieldType } from '@polar-sh/sdk' +import { CustomFieldType } from '@polar-sh/api' const getIcon = (type: CustomFieldType) => { switch (type) { diff --git a/clients/apps/web/src/components/CustomFields/CustomFieldTypeLabel.tsx b/clients/apps/web/src/components/CustomFields/CustomFieldTypeLabel.tsx index aaa6ebb9d9..4884779f1d 100644 --- a/clients/apps/web/src/components/CustomFields/CustomFieldTypeLabel.tsx +++ b/clients/apps/web/src/components/CustomFields/CustomFieldTypeLabel.tsx @@ -1,4 +1,4 @@ -import { CustomFieldType } from '@polar-sh/sdk' +import { CustomFieldType } from '@polar-sh/api' import CustomFieldTypeIcon from './CustomFieldTypeIcon' const getLabel = (type: CustomFieldType) => { diff --git a/clients/apps/web/src/components/CustomFields/CustomFieldValue.tsx b/clients/apps/web/src/components/CustomFields/CustomFieldValue.tsx index 0a928eae29..0f017cfc5b 100644 --- a/clients/apps/web/src/components/CustomFields/CustomFieldValue.tsx +++ b/clients/apps/web/src/components/CustomFields/CustomFieldValue.tsx @@ -1,5 +1,5 @@ import { CheckOutlined, CloseOutlined } from '@mui/icons-material' -import { CustomField } from '@polar-sh/sdk' +import { CustomField } from '@polar-sh/api' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import TextArea from 'polarkit/components/ui/atoms/textarea' diff --git a/clients/apps/web/src/components/CustomFields/UpdateCustomFieldModalContent.tsx b/clients/apps/web/src/components/CustomFields/UpdateCustomFieldModalContent.tsx index c4f5f50793..1452759a05 100644 --- a/clients/apps/web/src/components/CustomFields/UpdateCustomFieldModalContent.tsx +++ b/clients/apps/web/src/components/CustomFields/UpdateCustomFieldModalContent.tsx @@ -6,7 +6,7 @@ import { CustomFieldUpdate, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' import { useCallback, useState } from 'react' diff --git a/clients/apps/web/src/components/Customer/CustomerModal.tsx b/clients/apps/web/src/components/Customer/CustomerModal.tsx index cf5b13a300..e80fdfe38f 100644 --- a/clients/apps/web/src/components/Customer/CustomerModal.tsx +++ b/clients/apps/web/src/components/Customer/CustomerModal.tsx @@ -5,7 +5,7 @@ import { useOrders } from '@/hooks/queries/orders' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { api } from '@/utils/api' import { CONFIG } from '@/utils/config' -import { Customer, CustomerSession } from '@polar-sh/sdk' +import { Customer, CustomerSession } from '@polar-sh/api' import Link from 'next/link' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/components/Customer/EditCustomerModal.tsx b/clients/apps/web/src/components/Customer/EditCustomerModal.tsx index 12d1e7e073..a49b40ffc8 100644 --- a/clients/apps/web/src/components/Customer/EditCustomerModal.tsx +++ b/clients/apps/web/src/components/Customer/EditCustomerModal.tsx @@ -1,6 +1,6 @@ import { useUpdateCustomer } from '@/hooks/queries' import { ArrowBackOutlined } from '@mui/icons-material' -import { Customer, CustomerUpdate } from '@polar-sh/sdk' +import { Customer, CustomerUpdate } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import Input from 'polarkit/components/ui/atoms/input' import { diff --git a/clients/apps/web/src/components/CustomerPortal/CustomerPortal.tsx b/clients/apps/web/src/components/CustomerPortal/CustomerPortal.tsx index cc3404719a..cc51ea3052 100644 --- a/clients/apps/web/src/components/CustomerPortal/CustomerPortal.tsx +++ b/clients/apps/web/src/components/CustomerPortal/CustomerPortal.tsx @@ -6,7 +6,7 @@ import { CustomerSubscription, Organization, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import { parseAsString, useQueryState } from 'nuqs' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/components/CustomerPortal/CustomerPortalOrder.tsx b/clients/apps/web/src/components/CustomerPortal/CustomerPortalOrder.tsx index 2b0cbcc229..ddd0c35f23 100644 --- a/clients/apps/web/src/components/CustomerPortal/CustomerPortalOrder.tsx +++ b/clients/apps/web/src/components/CustomerPortal/CustomerPortalOrder.tsx @@ -6,7 +6,7 @@ import { useCustomerOrderInvoice, } from '@/hooks/queries' import { organizationPageLink } from '@/utils/nav' -import { CustomerOrder, PolarAPI } from '@polar-sh/sdk' +import { CustomerOrder, PolarAPI } from '@polar-sh/api' import Link from 'next/link' import Button from 'polarkit/components/ui/atoms/button' import { List, ListItem } from 'polarkit/components/ui/atoms/list' diff --git a/clients/apps/web/src/components/CustomerPortal/CustomerPortalSubscription.tsx b/clients/apps/web/src/components/CustomerPortal/CustomerPortalSubscription.tsx index c7ef3ec9e4..c4c157f779 100644 --- a/clients/apps/web/src/components/CustomerPortal/CustomerPortalSubscription.tsx +++ b/clients/apps/web/src/components/CustomerPortal/CustomerPortalSubscription.tsx @@ -8,7 +8,7 @@ import { useCustomerOrders, } from '@/hooks/queries' import { ReceiptOutlined } from '@mui/icons-material' -import { CustomerOrder, CustomerSubscription, PolarAPI } from '@polar-sh/sdk' +import { CustomerOrder, CustomerSubscription, PolarAPI } from '@polar-sh/api' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' import { List, ListItem } from 'polarkit/components/ui/atoms/list' diff --git a/clients/apps/web/src/components/Customization/Checkout/CheckoutCustomization.tsx b/clients/apps/web/src/components/Customization/Checkout/CheckoutCustomization.tsx index 0671db51ff..cf807fce1f 100644 --- a/clients/apps/web/src/components/Customization/Checkout/CheckoutCustomization.tsx +++ b/clients/apps/web/src/components/Customization/Checkout/CheckoutCustomization.tsx @@ -1,6 +1,6 @@ 'use client' -import { Product } from '@polar-sh/sdk' +import { Product } from '@polar-sh/api' import { CheckoutPreview } from './CheckoutPreview' export interface CheckoutCustomizationProps { diff --git a/clients/apps/web/src/components/Customization/Checkout/CheckoutPreview.tsx b/clients/apps/web/src/components/Customization/Checkout/CheckoutPreview.tsx index 9687756bfe..8cd8e034d0 100644 --- a/clients/apps/web/src/components/Customization/Checkout/CheckoutPreview.tsx +++ b/clients/apps/web/src/components/Customization/Checkout/CheckoutPreview.tsx @@ -6,7 +6,7 @@ import TopbarRight from '@/components/Layout/Public/TopbarRight' import { StorefrontHeader } from '@/components/Profile/StorefrontHeader' import { useAuth } from '@/hooks' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' -import { Product } from '@polar-sh/sdk' +import { Product } from '@polar-sh/api' import { useTheme } from 'next-themes' import ShadowBox from 'polarkit/components/ui/atoms/shadowbox' import { useContext } from 'react' diff --git a/clients/apps/web/src/components/Customization/CustomizationPage.tsx b/clients/apps/web/src/components/Customization/CustomizationPage.tsx index 3f93b4974f..126bb8d876 100644 --- a/clients/apps/web/src/components/Customization/CustomizationPage.tsx +++ b/clients/apps/web/src/components/Customization/CustomizationPage.tsx @@ -10,7 +10,7 @@ import { useAuth } from '@/hooks' import { useProduct } from '@/hooks/queries' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { ArrowBack } from '@mui/icons-material' -import { OrganizationUpdate } from '@polar-sh/sdk' +import { OrganizationUpdate } from '@polar-sh/api' import { useRouter, useSearchParams } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { Tabs, TabsList, TabsTrigger } from 'polarkit/components/ui/atoms/tabs' diff --git a/clients/apps/web/src/components/Customization/Storefront/StorefrontPreview.tsx b/clients/apps/web/src/components/Customization/Storefront/StorefrontPreview.tsx index 961e26aa68..ca29b63a1f 100644 --- a/clients/apps/web/src/components/Customization/Storefront/StorefrontPreview.tsx +++ b/clients/apps/web/src/components/Customization/Storefront/StorefrontPreview.tsx @@ -5,7 +5,7 @@ import TopbarRight from '@/components/Layout/Public/TopbarRight' import { useAuth } from '@/hooks' import { useProducts, useSearchFunding } from '@/hooks/queries' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' -import { Organization, OrganizationUpdate } from '@polar-sh/sdk' +import { Organization, OrganizationUpdate } from '@polar-sh/api' import ShadowBox from 'polarkit/components/ui/atoms/shadowbox' import { useContext } from 'react' import { useFormContext } from 'react-hook-form' diff --git a/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx b/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx index 65ec29db05..e78ec8533b 100644 --- a/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx +++ b/clients/apps/web/src/components/Customization/Storefront/StorefrontSidebar.tsx @@ -15,7 +15,7 @@ import { OrganizationUpdate, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import Avatar from 'polarkit/components/ui/atoms/avatar' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Customization/utils.ts b/clients/apps/web/src/components/Customization/utils.ts index 368fb49ccc..f22eefa31a 100644 --- a/clients/apps/web/src/components/Customization/utils.ts +++ b/clients/apps/web/src/components/Customization/utils.ts @@ -6,7 +6,7 @@ import { CustomerSubscription, ProductPrice, ProductStorefront, -} from '@polar-sh/sdk' +} from '@polar-sh/api' const PRODUCT_DESCRIPTION = `# Et Tritonia pectora partus praebentem ## Clipeo mentiris arquato obliqua lacerta diff --git a/clients/apps/web/src/components/Dashboard/DashboardProvider.tsx b/clients/apps/web/src/components/Dashboard/DashboardProvider.tsx index c83e0390c2..bf6d2040d7 100644 --- a/clients/apps/web/src/components/Dashboard/DashboardProvider.tsx +++ b/clients/apps/web/src/components/Dashboard/DashboardProvider.tsx @@ -1,4 +1,4 @@ -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { PropsWithChildren, createContext, useContext } from 'react' export interface DashboardContextValue {} diff --git a/clients/apps/web/src/components/Dashboard/MaintainerRepoSelection.tsx b/clients/apps/web/src/components/Dashboard/MaintainerRepoSelection.tsx index 95a32e0402..82979b5071 100644 --- a/clients/apps/web/src/components/Dashboard/MaintainerRepoSelection.tsx +++ b/clients/apps/web/src/components/Dashboard/MaintainerRepoSelection.tsx @@ -1,4 +1,4 @@ -import { Repository } from '@polar-sh/sdk' +import { Repository } from '@polar-sh/api' import { useRouter } from 'next/navigation' import RepoSelection from '../Organization/RepoSelection' diff --git a/clients/apps/web/src/components/Dashboard/Upsell.tsx b/clients/apps/web/src/components/Dashboard/Upsell.tsx index 79fea30645..98558613a0 100644 --- a/clients/apps/web/src/components/Dashboard/Upsell.tsx +++ b/clients/apps/web/src/components/Dashboard/Upsell.tsx @@ -2,7 +2,7 @@ import { useAuth } from '@/hooks' import { useRedirectToGitHubInstallation } from '@/hooks/github' import { ExclamationCircleIcon } from '@heroicons/react/20/solid' import { ArrowForwardOutlined } from '@mui/icons-material' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import Link from 'next/link' import Button from 'polarkit/components/ui/atoms/button' import { Banner } from 'polarkit/components/ui/molecules' diff --git a/clients/apps/web/src/components/Dashboard/navigation.tsx b/clients/apps/web/src/components/Dashboard/navigation.tsx index 2e7559963d..27f031ae66 100644 --- a/clients/apps/web/src/components/Dashboard/navigation.tsx +++ b/clients/apps/web/src/components/Dashboard/navigation.tsx @@ -1,4 +1,4 @@ -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { PolarHog, usePostHog } from '@/hooks/posthog' import { diff --git a/clients/apps/web/src/components/Discounts/CreateDiscountModalContent.tsx b/clients/apps/web/src/components/Discounts/CreateDiscountModalContent.tsx index cc9473cd99..6ddde23f29 100644 --- a/clients/apps/web/src/components/Discounts/CreateDiscountModalContent.tsx +++ b/clients/apps/web/src/components/Discounts/CreateDiscountModalContent.tsx @@ -8,7 +8,7 @@ import { Organization, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' import { useCallback, useState } from 'react' diff --git a/clients/apps/web/src/components/Discounts/DiscountForm.tsx b/clients/apps/web/src/components/Discounts/DiscountForm.tsx index 7070fcd841..409fe5afc8 100644 --- a/clients/apps/web/src/components/Discounts/DiscountForm.tsx +++ b/clients/apps/web/src/components/Discounts/DiscountForm.tsx @@ -5,7 +5,7 @@ import { DiscountType, DiscountUpdate, Organization, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { Accordion, AccordionContent, @@ -123,10 +123,9 @@ const DiscountForm: React.FC = ({ - Optional code (case insensitive) that the customer can use to apply the discount. - - If left empty, the discount can only be applied through a - Checkout Link or the API. + Optional code (case insensitive) that the customer can use to + apply the discount. If left empty, the discount can only be + applied through a Checkout Link or the API. ) diff --git a/clients/apps/web/src/components/Discounts/UpdateDiscountModalContent.tsx b/clients/apps/web/src/components/Discounts/UpdateDiscountModalContent.tsx index 1718449f2c..36f7965ac7 100644 --- a/clients/apps/web/src/components/Discounts/UpdateDiscountModalContent.tsx +++ b/clients/apps/web/src/components/Discounts/UpdateDiscountModalContent.tsx @@ -6,7 +6,7 @@ import { Organization, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' import { useCallback, useState } from 'react' diff --git a/clients/apps/web/src/components/Embed/FundOurBacklog.tsx b/clients/apps/web/src/components/Embed/FundOurBacklog.tsx index c270f0fa2c..4b56345c4f 100644 --- a/clients/apps/web/src/components/Embed/FundOurBacklog.tsx +++ b/clients/apps/web/src/components/Embed/FundOurBacklog.tsx @@ -1,4 +1,4 @@ -import { Issue } from '@polar-sh/sdk' +import { Issue } from '@polar-sh/api' import { getCentsInDollarString } from 'polarkit/lib/money' const PolarLogo = () => { diff --git a/clients/apps/web/src/components/Embed/HighlightedTiers.tsx b/clients/apps/web/src/components/Embed/HighlightedTiers.tsx index 86d2264b2c..0ee553eb43 100644 --- a/clients/apps/web/src/components/Embed/HighlightedTiers.tsx +++ b/clients/apps/web/src/components/Embed/HighlightedTiers.tsx @@ -1,5 +1,5 @@ import LogoIcon from '@/components/Brand/LogoIcon' -import { ProductStorefront, SubscriptionRecurringInterval } from '@polar-sh/sdk' +import { ProductStorefront, SubscriptionRecurringInterval } from '@polar-sh/api' import { formatCurrencyAndAmount } from 'polarkit/lib/money' import { getRecurringBillingLabel, diff --git a/clients/apps/web/src/components/Embed/IssueBadge.tsx b/clients/apps/web/src/components/Embed/IssueBadge.tsx index a29c42f03b..e33a39ff5f 100644 --- a/clients/apps/web/src/components/Embed/IssueBadge.tsx +++ b/clients/apps/web/src/components/Embed/IssueBadge.tsx @@ -1,4 +1,4 @@ -import { Funding } from '@polar-sh/sdk' +import { Funding } from '@polar-sh/api' import { getCentsInDollarString } from 'polarkit/lib/money' const IssueBadge = ({ diff --git a/clients/apps/web/src/components/Embed/ProductCardEmbed.tsx b/clients/apps/web/src/components/Embed/ProductCardEmbed.tsx index c2e2e87773..54e68beee8 100644 --- a/clients/apps/web/src/components/Embed/ProductCardEmbed.tsx +++ b/clients/apps/web/src/components/Embed/ProductCardEmbed.tsx @@ -1,9 +1,7 @@ import LogoIcon from '@/components/Brand/LogoIcon' -import { ProductEmbed, ProductPrice } from '@polar-sh/sdk' +import { ProductEmbed, ProductPrice } from '@polar-sh/api' import { formatCurrencyAndAmount } from 'polarkit/lib/money' -import { - getRecurringBillingLabel, -} from '../Subscriptions/utils' +import { getRecurringBillingLabel } from '../Subscriptions/utils' export const ProductCardEmbed = ({ embed, @@ -16,7 +14,7 @@ export const ProductCardEmbed = ({ }) => { const price: ProductPrice = embed.price - const isSubscription = ('recurring_interval' in price) + const isSubscription = 'recurring_interval' in price const isPWYW = price.amount_type === 'custom' const recurringBillingLabel = isSubscription ? getRecurringBillingLabel(price.recurring_interval) @@ -37,17 +35,17 @@ export const ProductCardEmbed = ({ switch (price.amount_type) { case 'free': priceLabel = 'Free' - break; + break case 'custom': priceLabel = 'Pay what you want' - break; + break case 'fixed': priceLabel = formatCurrencyAndAmount( price.price_amount, price.price_currency, 0, ) - break; + break } return ( @@ -104,7 +102,11 @@ export const ProductCardEmbed = ({

{coverUrl && ( - + )} {embed.description && (
@@ -197,7 +197,7 @@ export const HeaderPill = (props: { {props.active && props.amount > 0 && ( <> -
+
)} diff --git a/clients/apps/web/src/components/Finance/IssueFunding/Contributors.tsx b/clients/apps/web/src/components/Finance/IssueFunding/Contributors.tsx index 27958a52ea..189d1b6988 100644 --- a/clients/apps/web/src/components/Finance/IssueFunding/Contributors.tsx +++ b/clients/apps/web/src/components/Finance/IssueFunding/Contributors.tsx @@ -2,7 +2,7 @@ import Finance from '@/components/Finance/Finance' import { useListPledgesForOrganization, useListRewards } from '@/hooks/queries' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' export default function ClientPage({ organization, diff --git a/clients/apps/web/src/components/Finance/IssueFunding/Current.tsx b/clients/apps/web/src/components/Finance/IssueFunding/Current.tsx index 076facf8e1..28173a2f4a 100644 --- a/clients/apps/web/src/components/Finance/IssueFunding/Current.tsx +++ b/clients/apps/web/src/components/Finance/IssueFunding/Current.tsx @@ -3,7 +3,7 @@ import Finance from '@/components/Finance/Finance' import { useToast } from '@/components/Toast/use-toast' import { useListPledgesForOrganization, useListRewards } from '@/hooks/queries' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { useSearchParams } from 'next/navigation' import { useEffect } from 'react' diff --git a/clients/apps/web/src/components/Finance/IssueFunding/Rewarded.tsx b/clients/apps/web/src/components/Finance/IssueFunding/Rewarded.tsx index 8bb90f3514..b60ca27dd4 100644 --- a/clients/apps/web/src/components/Finance/IssueFunding/Rewarded.tsx +++ b/clients/apps/web/src/components/Finance/IssueFunding/Rewarded.tsx @@ -2,7 +2,7 @@ import Finance from '@/components/Finance/Finance' import { useListPledgesForOrganization, useListRewards } from '@/hooks/queries' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' export default function ClientPage({ organization, diff --git a/clients/apps/web/src/components/Finance/ListPledges.tsx b/clients/apps/web/src/components/Finance/ListPledges.tsx index 00281f6317..c24d97966f 100644 --- a/clients/apps/web/src/components/Finance/ListPledges.tsx +++ b/clients/apps/web/src/components/Finance/ListPledges.tsx @@ -4,7 +4,7 @@ import Icon from '@/components/Icons/Icon' import RefundIcon from '@/components/Icons/RefundIcon' import { githubIssueLink } from '@/utils/github' import { dateOrString } from '@/utils/time' -import { Pledge, PledgeState, PledgeType } from '@polar-sh/sdk' +import { Pledge, PledgeState, PledgeType } from '@polar-sh/api' import { formatCurrencyAndAmount } from 'polarkit/lib/money' export type Column = 'ESTIMATED_PAYOUT_DATE' | 'REFUNDED_DATE' @@ -53,26 +53,26 @@ const List = (props: { {subtitle} Backer Date {showEstimatedPayoutDate && ( Est. payout date @@ -80,7 +80,7 @@ const List = (props: { {showRefundedDate && ( Refunded date @@ -88,7 +88,7 @@ const List = (props: { Amount @@ -98,7 +98,7 @@ const List = (props: { {pledges && pledges.map((t) => ( - +
{icon(t)} @@ -115,7 +115,7 @@ const List = (props: {
-
+
{t.pledger?.avatar_url && ( {subtitle} @@ -59,7 +59,7 @@ const List = (props: { {showReceiver && ( Receiver @@ -68,7 +68,7 @@ const List = (props: { {showBacker && ( Backer @@ -84,7 +84,7 @@ const List = (props: { {showPaymentStatus && ( Status @@ -93,7 +93,7 @@ const List = (props: { {showPaidOutDate && ( Paid out date @@ -101,7 +101,7 @@ const List = (props: { Amount @@ -129,7 +129,7 @@ const List = (props: { {showReceiver && ( -
+
{t.user && ( -
+
{t.pledge.pledger && ( { var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) diff --git a/clients/apps/web/src/components/Issues/IssueList.tsx b/clients/apps/web/src/components/Issues/IssueList.tsx index 4d199f82fd..a4524474a8 100644 --- a/clients/apps/web/src/components/Issues/IssueList.tsx +++ b/clients/apps/web/src/components/Issues/IssueList.tsx @@ -4,7 +4,7 @@ import { FunnelIcon, MagnifyingGlassIcon, } from '@heroicons/react/24/outline' -import { IssueListResponse, IssueSortBy } from '@polar-sh/sdk' +import { IssueListResponse, IssueSortBy } from '@polar-sh/api' import { InfiniteData } from '@tanstack/react-query' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Issues/IssueListItem.stories.tsx b/clients/apps/web/src/components/Issues/IssueListItem.stories.tsx index c7db3ad264..af222cd97b 100644 --- a/clients/apps/web/src/components/Issues/IssueListItem.stories.tsx +++ b/clients/apps/web/src/components/Issues/IssueListItem.stories.tsx @@ -17,7 +17,7 @@ import { PledgeType, Reward, RewardState, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import IssueListItem from './IssueListItem' type Story = StoryObj diff --git a/clients/apps/web/src/components/Issues/IssueListItem.tsx b/clients/apps/web/src/components/Issues/IssueListItem.tsx index c5c65ef34b..6acb8350eb 100644 --- a/clients/apps/web/src/components/Issues/IssueListItem.tsx +++ b/clients/apps/web/src/components/Issues/IssueListItem.tsx @@ -3,7 +3,7 @@ import { ModalBox, Modal as ModernModal } from '@/components/Modal' import { useToastLatestPledged } from '@/hooks/stripe' import { api } from '@/utils/api' -import { Issue, Pledge, PledgesTypeSummaries, Reward } from '@polar-sh/sdk' +import { Issue, Pledge, PledgesTypeSummaries, Reward } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import TextArea from 'polarkit/components/ui/atoms/textarea' import { formatCurrencyAndAmount } from 'polarkit/lib/money' diff --git a/clients/apps/web/src/components/Issues/IssuePledge.tsx b/clients/apps/web/src/components/Issues/IssuePledge.tsx index e74cbd0afa..92a7df6b1e 100644 --- a/clients/apps/web/src/components/Issues/IssuePledge.tsx +++ b/clients/apps/web/src/components/Issues/IssuePledge.tsx @@ -10,7 +10,7 @@ import { PledgeState, PledgeType, PledgesTypeSummaries, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import Avatar from 'polarkit/components/ui/atoms/avatar' import { formatCurrencyAndAmount } from 'polarkit/lib/money' @@ -127,7 +127,7 @@ const IssuePledge = (props: Props) => {
diff --git a/clients/apps/web/src/components/Issues/IssuePromotionModal.tsx b/clients/apps/web/src/components/Issues/IssuePromotionModal.tsx index d76ec91da6..ce90219675 100644 --- a/clients/apps/web/src/components/Issues/IssuePromotionModal.tsx +++ b/clients/apps/web/src/components/Issues/IssuePromotionModal.tsx @@ -13,7 +13,7 @@ import { api, queryClient } from '@/utils/api' import { githubIssueLink } from '@/utils/github' import { HeartIcon } from '@heroicons/react/24/outline' import { CardGiftcardOutlined, WifiTethering } from '@mui/icons-material' -import { CurrencyAmount, Issue, Pledge, UserRead } from '@polar-sh/sdk' +import { CurrencyAmount, Issue, Pledge, UserRead } from '@polar-sh/api' import Image from 'next/image' import Avatar from 'polarkit/components/ui/atoms/avatar' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Issues/IssueRewards.tsx b/clients/apps/web/src/components/Issues/IssueRewards.tsx index e88e3d6656..3def340fda 100644 --- a/clients/apps/web/src/components/Issues/IssueRewards.tsx +++ b/clients/apps/web/src/components/Issues/IssueRewards.tsx @@ -1,4 +1,4 @@ -import { Reward, RewardState } from '@polar-sh/sdk' +import { Reward, RewardState } from '@polar-sh/api' import { getCentsInDollarString } from 'polarkit/lib/money' import { twMerge } from 'tailwind-merge' diff --git a/clients/apps/web/src/components/Issues/IssueSummary.tsx b/clients/apps/web/src/components/Issues/IssueSummary.tsx index 837a8da513..f5054fd25c 100644 --- a/clients/apps/web/src/components/Issues/IssueSummary.tsx +++ b/clients/apps/web/src/components/Issues/IssueSummary.tsx @@ -3,7 +3,7 @@ import { CONFIG } from '@/utils/config' import { CheckCircleIcon } from '@heroicons/react/24/outline' import { FavoriteBorderOutlined } from '@mui/icons-material' -import { Issue, Label, State } from '@polar-sh/sdk' +import { Issue, Label, State } from '@polar-sh/api' import Link from 'next/link' import { PolarTimeAgo } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Issues/ListItemDecoration.tsx b/clients/apps/web/src/components/Issues/ListItemDecoration.tsx index 049c7899eb..a9a79cb3a9 100644 --- a/clients/apps/web/src/components/Issues/ListItemDecoration.tsx +++ b/clients/apps/web/src/components/Issues/ListItemDecoration.tsx @@ -6,7 +6,7 @@ import { PledgeState, PledgesTypeSummaries, Reward, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { formatCurrencyAndAmount, getCentsInDollarString, diff --git a/clients/apps/web/src/components/Issues/PledgeSummaryPill.stories.tsx b/clients/apps/web/src/components/Issues/PledgeSummaryPill.stories.tsx index a94f401515..638eed1172 100644 --- a/clients/apps/web/src/components/Issues/PledgeSummaryPill.stories.tsx +++ b/clients/apps/web/src/components/Issues/PledgeSummaryPill.stories.tsx @@ -1,4 +1,4 @@ -import { Pledger } from '@polar-sh/sdk' +import { Pledger } from '@polar-sh/api' import type { Meta, StoryObj } from '@storybook/react' import PledgeSummaryPill from './PledgeSummaryPill' diff --git a/clients/apps/web/src/components/Issues/PledgeSummaryPill.tsx b/clients/apps/web/src/components/Issues/PledgeSummaryPill.tsx index 4860995ff9..098b867342 100644 --- a/clients/apps/web/src/components/Issues/PledgeSummaryPill.tsx +++ b/clients/apps/web/src/components/Issues/PledgeSummaryPill.tsx @@ -1,5 +1,5 @@ import { ClockIcon, HeartIcon } from '@heroicons/react/20/solid' -import { PledgesSummary } from '@polar-sh/sdk' +import { PledgesSummary } from '@polar-sh/api' import { getCentsInDollarString } from 'polarkit/lib/money' import Pledgers from './Pledgers' diff --git a/clients/apps/web/src/components/Issues/Pledgers.tsx b/clients/apps/web/src/components/Issues/Pledgers.tsx index 07e98001ab..e9e2baf8f9 100644 --- a/clients/apps/web/src/components/Issues/Pledgers.tsx +++ b/clients/apps/web/src/components/Issues/Pledgers.tsx @@ -1,4 +1,4 @@ -import { Pledger } from '@polar-sh/sdk' +import { Pledger } from '@polar-sh/api' import { useMemo } from 'react' interface PledgersProps { diff --git a/clients/apps/web/src/components/Issues/UpfrontRewards.tsx b/clients/apps/web/src/components/Issues/UpfrontRewards.tsx index ac51e58f47..a167e432b9 100644 --- a/clients/apps/web/src/components/Issues/UpfrontRewards.tsx +++ b/clients/apps/web/src/components/Issues/UpfrontRewards.tsx @@ -1,5 +1,5 @@ import { UserIcon } from '@heroicons/react/24/outline' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { Switch } from 'polarkit/components/ui/atoms' import Avatar from 'polarkit/components/ui/atoms/avatar' import Input from 'polarkit/components/ui/atoms/input' diff --git a/clients/apps/web/src/components/Issues/filters.ts b/clients/apps/web/src/components/Issues/filters.ts index 043ace7d96..318f8a6ba3 100644 --- a/clients/apps/web/src/components/Issues/filters.ts +++ b/clients/apps/web/src/components/Issues/filters.ts @@ -1,4 +1,4 @@ -import { IssueSortBy } from '@polar-sh/sdk' +import { IssueSortBy } from '@polar-sh/api' export type DashboardFilters = { q: string diff --git a/clients/apps/web/src/components/Landing/utils.ts b/clients/apps/web/src/components/Landing/utils.ts index 25ae1ee173..748511b412 100644 --- a/clients/apps/web/src/components/Landing/utils.ts +++ b/clients/apps/web/src/components/Landing/utils.ts @@ -1,4 +1,4 @@ -import { ProductStorefront } from '@polar-sh/sdk' +import { ProductStorefront } from '@polar-sh/api' export const MOCKED_WEBSITE_SUBSCRIPTION: Partial = { name: 'Just an Example', diff --git a/clients/apps/web/src/components/Layout/DashboardLayout.tsx b/clients/apps/web/src/components/Layout/DashboardLayout.tsx index 80567ec604..d22c0be1dc 100644 --- a/clients/apps/web/src/components/Layout/DashboardLayout.tsx +++ b/clients/apps/web/src/components/Layout/DashboardLayout.tsx @@ -6,7 +6,7 @@ import { MaintainerOrganizationContext } from '@/providers/maintainerOrganizatio import { setLastVisitedOrg } from '@/utils/cookies' import { organizationPageLink } from '@/utils/nav' import { CloseOutlined, ShortTextOutlined } from '@mui/icons-material' -import { Repository } from '@polar-sh/sdk' +import { Repository } from '@polar-sh/api' import Link from 'next/link' import { usePathname } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Layout/PolarMenu.tsx b/clients/apps/web/src/components/Layout/PolarMenu.tsx index 8ae32fdfb4..16a4d5d27f 100644 --- a/clients/apps/web/src/components/Layout/PolarMenu.tsx +++ b/clients/apps/web/src/components/Layout/PolarMenu.tsx @@ -2,10 +2,10 @@ import PublicProfileDropdown from '@/components/Navigation/PublicProfileDropdown' import { useLoginLink } from '@/hooks/login' +import { usePostHog } from '@/hooks/posthog' import { CONFIG } from '@/utils/config' -import { Organization, UserRead } from '@polar-sh/sdk' +import { Organization, UserRead } from '@polar-sh/api' import Link from 'next/link' -import { usePostHog } from '@/hooks/posthog' import Button from 'polarkit/components/ui/atoms/button' import GetStartedButton from '../Auth/GetStartedButton' @@ -57,7 +57,11 @@ const PolarMenu = ({
) : ( <> - + {shouldShowGitHubAuthUpsell && ( - + )} {!hasOrgs && ( @@ -85,7 +78,7 @@ const Topbar = ({
{!hideProfile ? ( -
+
{upsell}
diff --git a/clients/apps/web/src/components/Layout/Public/TopbarRight.tsx b/clients/apps/web/src/components/Layout/Public/TopbarRight.tsx index d49fab6421..ee5a368f81 100644 --- a/clients/apps/web/src/components/Layout/Public/TopbarRight.tsx +++ b/clients/apps/web/src/components/Layout/Public/TopbarRight.tsx @@ -7,7 +7,7 @@ import { useModal } from '@/components/Modal/useModal' import PublicProfileDropdown from '@/components/Navigation/PublicProfileDropdown' import Popover from '@/components/Notifications/Popover' import { usePostHog } from '@/hooks/posthog' -import { Organization, UserRead } from '@polar-sh/sdk' +import { Organization, UserRead } from '@polar-sh/api' import { usePathname } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Meter/MeterChart.tsx b/clients/apps/web/src/components/Meter/MeterChart.tsx index 240331df52..f93f039432 100644 --- a/clients/apps/web/src/components/Meter/MeterChart.tsx +++ b/clients/apps/web/src/components/Meter/MeterChart.tsx @@ -1,6 +1,6 @@ import { getValueFormatter } from '@/utils/metrics' import * as Plot from '@observablehq/plot' -import { Interval, Metric } from '@polar-sh/sdk' +import { Interval, Metric } from '@polar-sh/api' import * as d3 from 'd3' import { GeistMono } from 'geist/font/mono' import { useCallback, useEffect, useMemo, useState } from 'react' diff --git a/clients/apps/web/src/components/Metrics/IntervalPicker.tsx b/clients/apps/web/src/components/Metrics/IntervalPicker.tsx index 0ba603afb1..d1e0133779 100644 --- a/clients/apps/web/src/components/Metrics/IntervalPicker.tsx +++ b/clients/apps/web/src/components/Metrics/IntervalPicker.tsx @@ -1,4 +1,4 @@ -import { Interval } from '@polar-sh/sdk' +import { Interval } from '@polar-sh/api' import { Select, SelectContent, diff --git a/clients/apps/web/src/components/Metrics/MetricChart.tsx b/clients/apps/web/src/components/Metrics/MetricChart.tsx index 5b62711e32..b8d68e5bbe 100644 --- a/clients/apps/web/src/components/Metrics/MetricChart.tsx +++ b/clients/apps/web/src/components/Metrics/MetricChart.tsx @@ -1,7 +1,7 @@ import { ParsedMetricPeriod } from '@/hooks/queries' import { getValueFormatter } from '@/utils/metrics' import * as Plot from '@observablehq/plot' -import { Interval, Metric } from '@polar-sh/sdk' +import { Interval, Metric } from '@polar-sh/api' import * as d3 from 'd3' import { GeistMono } from 'geist/font/mono' import { useCallback, useEffect, useMemo, useState } from 'react' diff --git a/clients/apps/web/src/components/Metrics/MetricChartBox.tsx b/clients/apps/web/src/components/Metrics/MetricChartBox.tsx index 5ecbc26520..ab1eb563d7 100644 --- a/clients/apps/web/src/components/Metrics/MetricChartBox.tsx +++ b/clients/apps/web/src/components/Metrics/MetricChartBox.tsx @@ -1,6 +1,6 @@ import { ParsedMetricPeriod } from '@/hooks/queries' import { getTimestampFormatter, getValueFormatter } from '@/utils/metrics' -import { Interval, Metric } from '@polar-sh/sdk' +import { Interval, Metric } from '@polar-sh/api' import { useCallback, useMemo, useState } from 'react' import { twMerge } from 'tailwind-merge' import MetricChart from './MetricChart' diff --git a/clients/apps/web/src/components/Navigation/PublicProfileDropdown.tsx b/clients/apps/web/src/components/Navigation/PublicProfileDropdown.tsx index 9377be9b95..624e111651 100644 --- a/clients/apps/web/src/components/Navigation/PublicProfileDropdown.tsx +++ b/clients/apps/web/src/components/Navigation/PublicProfileDropdown.tsx @@ -10,7 +10,7 @@ import { ShoppingBagOutlined, SpaceDashboardOutlined, } from '@mui/icons-material' -import { UserRead } from '@polar-sh/sdk' +import { UserRead } from '@polar-sh/api' import Link from 'next/link' import Avatar from 'polarkit/components/ui/atoms/avatar' import { Separator } from 'polarkit/components/ui/separator' diff --git a/clients/apps/web/src/components/Notifications/Popover.tsx b/clients/apps/web/src/components/Notifications/Popover.tsx index b64ec7f36c..7eb379f856 100644 --- a/clients/apps/web/src/components/Notifications/Popover.tsx +++ b/clients/apps/web/src/components/Notifications/Popover.tsx @@ -24,7 +24,7 @@ import { PledgerPledgePendingNotification, RewardPaidNotification, TeamAdminMemberPledgedNotification, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import { PolarTimeAgo } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Organization/IssuesLookingForFunding.tsx b/clients/apps/web/src/components/Organization/IssuesLookingForFunding.tsx index f1aaaecd43..ff0232ef69 100644 --- a/clients/apps/web/src/components/Organization/IssuesLookingForFunding.tsx +++ b/clients/apps/web/src/components/Organization/IssuesLookingForFunding.tsx @@ -12,7 +12,7 @@ import { ListResourceIssueFunding, Organization, Repository, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { ReadonlyURLSearchParams, useRouter, diff --git a/clients/apps/web/src/components/Organization/OpenGraphImageCreator.tsx b/clients/apps/web/src/components/Organization/OpenGraphImageCreator.tsx index f2fa20f666..548c2499fb 100644 --- a/clients/apps/web/src/components/Organization/OpenGraphImageCreator.tsx +++ b/clients/apps/web/src/components/Organization/OpenGraphImageCreator.tsx @@ -1,5 +1,5 @@ import LogoIcon from '@/components/Brand/LogoIcon' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' const generatePostOGFallbackPath = (slug: string, maxInt: number) => { let sum = 0 diff --git a/clients/apps/web/src/components/Organization/OpenGraphImageFunding.tsx b/clients/apps/web/src/components/Organization/OpenGraphImageFunding.tsx index 342cb83866..2302ef9ee6 100644 --- a/clients/apps/web/src/components/Organization/OpenGraphImageFunding.tsx +++ b/clients/apps/web/src/components/Organization/OpenGraphImageFunding.tsx @@ -1,4 +1,4 @@ -import { Issue } from '@polar-sh/sdk' +import { Issue } from '@polar-sh/api' import { getCentsInDollarString } from 'polarkit/lib/money' const OpenGraphImageFunding = (props: { diff --git a/clients/apps/web/src/components/Organization/OrganizationIssueSummaryList.tsx b/clients/apps/web/src/components/Organization/OrganizationIssueSummaryList.tsx index e5dcfdfa75..0b8cdc07e5 100644 --- a/clients/apps/web/src/components/Organization/OrganizationIssueSummaryList.tsx +++ b/clients/apps/web/src/components/Organization/OrganizationIssueSummaryList.tsx @@ -1,5 +1,5 @@ import { organizationPageLink } from '@/utils/nav' -import { IssueFunding, Organization } from '@polar-sh/sdk' +import { IssueFunding, Organization } from '@polar-sh/api' import Link from 'next/link' import { ShadowBoxOnMd } from 'polarkit/components/ui/atoms/shadowbox' import { Fragment } from 'react' diff --git a/clients/apps/web/src/components/Organization/RepoPickerHeader.tsx b/clients/apps/web/src/components/Organization/RepoPickerHeader.tsx index 49dc701dc6..6cc5250527 100644 --- a/clients/apps/web/src/components/Organization/RepoPickerHeader.tsx +++ b/clients/apps/web/src/components/Organization/RepoPickerHeader.tsx @@ -1,4 +1,4 @@ -import { Repository } from '@polar-sh/sdk' +import { Repository } from '@polar-sh/api' import MaintainerRepoSelection from '../Dashboard/MaintainerRepoSelection' export const RepoPickerHeader = (props: { diff --git a/clients/apps/web/src/components/Organization/RepoSelection.tsx b/clients/apps/web/src/components/Organization/RepoSelection.tsx index d7cdb1ebd8..7413099481 100644 --- a/clients/apps/web/src/components/Organization/RepoSelection.tsx +++ b/clients/apps/web/src/components/Organization/RepoSelection.tsx @@ -1,7 +1,7 @@ 'use client' import { useOutsideClick } from '@/utils/useOutsideClick' -import { Repository } from '@polar-sh/sdk' +import { Repository } from '@polar-sh/api' import { Command } from 'cmdk' import React, { useEffect, useMemo, useRef, useState } from 'react' import { twMerge } from 'tailwind-merge' @@ -171,7 +171,7 @@ const SelectedRepository = ({
-
+
{displayOrganization && `${repository.organization.name}/`} {repository.name} diff --git a/clients/apps/web/src/components/Organization/StorefrontNav.tsx b/clients/apps/web/src/components/Organization/StorefrontNav.tsx index 102cf18965..77954800e8 100644 --- a/clients/apps/web/src/components/Organization/StorefrontNav.tsx +++ b/clients/apps/web/src/components/Organization/StorefrontNav.tsx @@ -3,7 +3,7 @@ import { useCustomerOrders } from '@/hooks/queries' import { api } from '@/utils/api' import { organizationPageLink } from '@/utils/nav' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import Link from 'next/link' import { useRouter, useSelectedLayoutSegment } from 'next/navigation' import { diff --git a/clients/apps/web/src/components/Organization/filters.ts b/clients/apps/web/src/components/Organization/filters.ts index 1178ddb194..811fafd74d 100644 --- a/clients/apps/web/src/components/Organization/filters.ts +++ b/clients/apps/web/src/components/Organization/filters.ts @@ -1,4 +1,4 @@ -import { ListFundingSortBy } from '@polar-sh/sdk' +import { ListFundingSortBy } from '@polar-sh/api' import { ReadonlyURLSearchParams } from 'next/navigation' export type FundingFilters = { diff --git a/clients/apps/web/src/components/Pledge/IssueCard.tsx b/clients/apps/web/src/components/Pledge/IssueCard.tsx index f5cc51da9d..a067566ecb 100644 --- a/clients/apps/web/src/components/Pledge/IssueCard.tsx +++ b/clients/apps/web/src/components/Pledge/IssueCard.tsx @@ -9,7 +9,7 @@ import { Organization, Pledger, RewardsSummary, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { IssueBodyRenderer, PolarTimeAgo } from 'polarkit/components/ui/atoms' import Alert from 'polarkit/components/ui/atoms/alert' import Avatar from 'polarkit/components/ui/atoms/avatar' @@ -58,7 +58,7 @@ const IssueCard = ({ {/* Issue details */}
{/* Left part */} -
+
diff --git a/clients/apps/web/src/components/Pledge/OrganizationSelect.tsx b/clients/apps/web/src/components/Pledge/OrganizationSelect.tsx index 3af87d6418..ec791861d7 100644 --- a/clients/apps/web/src/components/Pledge/OrganizationSelect.tsx +++ b/clients/apps/web/src/components/Pledge/OrganizationSelect.tsx @@ -1,5 +1,5 @@ import { useAuth } from '@/hooks' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import Avatar from 'polarkit/components/ui/atoms/avatar' import { Select, diff --git a/clients/apps/web/src/components/Pledge/PaymentForm.tsx b/clients/apps/web/src/components/Pledge/PaymentForm.tsx index e1983baee8..7a26c3a90e 100644 --- a/clients/apps/web/src/components/Pledge/PaymentForm.tsx +++ b/clients/apps/web/src/components/Pledge/PaymentForm.tsx @@ -1,13 +1,14 @@ 'use client' import { useAuth } from '@/hooks/auth' +import { usePostHog } from '@/hooks/posthog' import { Issue, Organization, PaymentMethod, PledgeStripePaymentIntentMutationResponse, Repository, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { PaymentElement, useElements, useStripe } from '@stripe/react-stripe-js' import { PaymentIntent, @@ -17,7 +18,6 @@ import Button from 'polarkit/components/ui/atoms/button' import { Checkbox } from 'polarkit/components/ui/checkbox' import { useEffect, useState } from 'react' import Subtotal from './Subtotal' -import { usePostHog } from '@/hooks/posthog' const PaymentForm = ({ paymentIntent, diff --git a/clients/apps/web/src/components/Pledge/PledgeCheckoutContribute.tsx b/clients/apps/web/src/components/Pledge/PledgeCheckoutContribute.tsx index b586ba8656..2618fb3162 100644 --- a/clients/apps/web/src/components/Pledge/PledgeCheckoutContribute.tsx +++ b/clients/apps/web/src/components/Pledge/PledgeCheckoutContribute.tsx @@ -1,5 +1,5 @@ import { WrenchScrewdriverIcon } from '@heroicons/react/24/outline' -import { Issue } from '@polar-sh/sdk' +import { Issue } from '@polar-sh/api' import CircledNumber from './CircledNumber' const PledgeCheckoutContribute = ({ issue }: { issue: Issue }) => { diff --git a/clients/apps/web/src/components/Pledge/PledgeCheckoutFund.tsx b/clients/apps/web/src/components/Pledge/PledgeCheckoutFund.tsx index 2b93b34c60..c5a8e16456 100644 --- a/clients/apps/web/src/components/Pledge/PledgeCheckoutFund.tsx +++ b/clients/apps/web/src/components/Pledge/PledgeCheckoutFund.tsx @@ -4,7 +4,7 @@ import { ClockIcon, CurrencyDollarIcon, } from '@heroicons/react/24/outline' -import { Issue, Organization } from '@polar-sh/sdk' +import { Issue, Organization } from '@polar-sh/api' import Link from 'next/link' import { Tabs, TabsContent } from 'polarkit/components/ui/atoms/tabs' import PledgeCheckoutFundByTeam from './PledgeCheckoutFundByTeam' diff --git a/clients/apps/web/src/components/Pledge/PledgeCheckoutFundByTeam.tsx b/clients/apps/web/src/components/Pledge/PledgeCheckoutFundByTeam.tsx index daea812714..94452b82ed 100644 --- a/clients/apps/web/src/components/Pledge/PledgeCheckoutFundByTeam.tsx +++ b/clients/apps/web/src/components/Pledge/PledgeCheckoutFundByTeam.tsx @@ -2,7 +2,7 @@ import { useAuth } from '@/hooks/auth' import { api } from '@/utils/api' import { toDetailError } from '@/utils/api/errors' import { ClockIcon } from '@heroicons/react/24/outline' -import { Issue, Organization } from '@polar-sh/sdk' +import { Issue, Organization } from '@polar-sh/api' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import MoneyInput from 'polarkit/components/ui/atoms/moneyinput' @@ -184,8 +184,8 @@ const PledgeCheckoutFundByTeam = ({ export default PledgeCheckoutFundByTeam const NextSteps = () => ( -
-
+
+
diff --git a/clients/apps/web/src/components/Pledge/PledgeCheckoutFundOnCompletion.tsx b/clients/apps/web/src/components/Pledge/PledgeCheckoutFundOnCompletion.tsx index 1e38222872..eb90dbeb7a 100644 --- a/clients/apps/web/src/components/Pledge/PledgeCheckoutFundOnCompletion.tsx +++ b/clients/apps/web/src/components/Pledge/PledgeCheckoutFundOnCompletion.tsx @@ -6,7 +6,7 @@ import { ClockIcon, UserCircleIcon, } from '@heroicons/react/24/outline' -import { Issue, Organization } from '@polar-sh/sdk' +import { Issue, Organization } from '@polar-sh/api' import { usePathname, useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import MoneyInput from 'polarkit/components/ui/atoms/moneyinput' @@ -216,8 +216,8 @@ const NotLoggedInBanner = () => { } const NextSteps = () => ( -
-
+
+
diff --git a/clients/apps/web/src/components/Pledge/PledgeCheckoutFundToday.tsx b/clients/apps/web/src/components/Pledge/PledgeCheckoutFundToday.tsx index 9858229948..c3ba5128ec 100644 --- a/clients/apps/web/src/components/Pledge/PledgeCheckoutFundToday.tsx +++ b/clients/apps/web/src/components/Pledge/PledgeCheckoutFundToday.tsx @@ -1,4 +1,5 @@ import { useAuth } from '@/hooks/auth' +import { usePostHog } from '@/hooks/posthog' import { useListPaymentMethods } from '@/hooks/queries' import { api } from '@/utils/api' import { EnvelopeIcon } from '@heroicons/react/24/outline' @@ -9,7 +10,7 @@ import { PledgeStripePaymentIntentCreateSetupFutureUsageEnum, PledgeStripePaymentIntentMutationResponse, ResponseError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { Elements } from '@stripe/react-stripe-js' import { PaymentIntent } from '@stripe/stripe-js' import { loadStripe } from '@stripe/stripe-js/pure' @@ -31,7 +32,6 @@ import { twMerge } from 'tailwind-merge' import OrganizationSelect from './OrganizationSelect' import PaymentForm from './PaymentForm' import { generateRedirectURL, prettyCardName, validateEmail } from './payment' -import { usePostHog } from '@/hooks/posthog' const stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_KEY || '') diff --git a/clients/apps/web/src/components/Pledge/PledgeCheckoutPanel.tsx b/clients/apps/web/src/components/Pledge/PledgeCheckoutPanel.tsx index e4c5b26a68..7d5168c13b 100644 --- a/clients/apps/web/src/components/Pledge/PledgeCheckoutPanel.tsx +++ b/clients/apps/web/src/components/Pledge/PledgeCheckoutPanel.tsx @@ -1,5 +1,5 @@ import { CommandLineIcon, HeartIcon } from '@heroicons/react/24/solid' -import { Issue, Organization } from '@polar-sh/sdk' +import { Issue, Organization } from '@polar-sh/api' import { Tabs, TabsContent, diff --git a/clients/apps/web/src/components/Pledge/RepositoryCard.tsx b/clients/apps/web/src/components/Pledge/RepositoryCard.tsx index ad031fa774..6dfeb7de8d 100644 --- a/clients/apps/web/src/components/Pledge/RepositoryCard.tsx +++ b/clients/apps/web/src/components/Pledge/RepositoryCard.tsx @@ -1,6 +1,6 @@ import { githubRepoUrl } from '@/utils/github' import { formatStarsNumber } from '@/utils/stars' -import { Organization, type Repository } from '@polar-sh/sdk' +import { Organization, type Repository } from '@polar-sh/api' import Avatar from 'polarkit/components/ui/atoms/avatar' import GrayCard from '../Cards/GrayCard' diff --git a/clients/apps/web/src/components/Pledge/Status.tsx b/clients/apps/web/src/components/Pledge/Status.tsx index 6a98306dd5..a4f194162e 100644 --- a/clients/apps/web/src/components/Pledge/Status.tsx +++ b/clients/apps/web/src/components/Pledge/Status.tsx @@ -6,7 +6,7 @@ import { useAuth } from '@/hooks' import { useSendMagicLink } from '@/hooks/magicLink' import { organizationPageLink } from '@/utils/nav' import { CheckCircleIcon } from '@heroicons/react/24/outline' -import { Organization, Pledge } from '@polar-sh/sdk' +import { Organization, Pledge } from '@polar-sh/api' import Link from 'next/link' import { useRouter } from 'next/navigation' import { PolarTimeAgo } from 'polarkit/components/ui/atoms' @@ -57,7 +57,7 @@ export const Status = (props: {
{currentUser ? ( -
+
diff --git a/clients/apps/web/src/components/Pledge/Subtotal.tsx b/clients/apps/web/src/components/Pledge/Subtotal.tsx index 6e09407def..0c5332a489 100644 --- a/clients/apps/web/src/components/Pledge/Subtotal.tsx +++ b/clients/apps/web/src/components/Pledge/Subtotal.tsx @@ -1,4 +1,4 @@ -import { PledgeStripePaymentIntentMutationResponse } from '@polar-sh/sdk' +import { PledgeStripePaymentIntentMutationResponse } from '@polar-sh/api' import { getCentsInDollarString } from 'polarkit/lib/money' const Subtotal = ({ diff --git a/clients/apps/web/src/components/Products/BenefitList.tsx b/clients/apps/web/src/components/Products/BenefitList.tsx index 208588064d..31f5741b18 100644 --- a/clients/apps/web/src/components/Products/BenefitList.tsx +++ b/clients/apps/web/src/components/Products/BenefitList.tsx @@ -3,7 +3,7 @@ import { KeyboardArrowRight, KeyboardArrowUp, } from '@mui/icons-material' -import { BenefitBase } from '@polar-sh/sdk' +import { BenefitBase } from '@polar-sh/api' import React, { ReactNode, useState } from 'react' import { resolveBenefitIcon } from '../Benefit/utils' diff --git a/clients/apps/web/src/components/Products/CheckoutButton.tsx b/clients/apps/web/src/components/Products/CheckoutButton.tsx index 55e21f84c1..48fb29ab57 100644 --- a/clients/apps/web/src/components/Products/CheckoutButton.tsx +++ b/clients/apps/web/src/components/Products/CheckoutButton.tsx @@ -6,7 +6,7 @@ import { ProductPriceRecurring, ProductPriceType, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import Button, { ButtonProps } from 'polarkit/components/ui/atoms/button' import React, { useMemo } from 'react' diff --git a/clients/apps/web/src/components/Products/CreateProductPage.tsx b/clients/apps/web/src/components/Products/CreateProductPage.tsx index 8aaedca232..da94c55c68 100644 --- a/clients/apps/web/src/components/Products/CreateProductPage.tsx +++ b/clients/apps/web/src/components/Products/CreateProductPage.tsx @@ -12,7 +12,7 @@ import { ProductPriceType, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' import { Form } from 'polarkit/components/ui/form' diff --git a/clients/apps/web/src/components/Products/EditProductPage.tsx b/clients/apps/web/src/components/Products/EditProductPage.tsx index 6b66484213..de6bc2c86f 100644 --- a/clients/apps/web/src/components/Products/EditProductPage.tsx +++ b/clients/apps/web/src/components/Products/EditProductPage.tsx @@ -11,7 +11,7 @@ import { ProductUpdate, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import { useRouter } from 'next/navigation' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Products/ProductBenefitsForm.tsx b/clients/apps/web/src/components/Products/ProductBenefitsForm.tsx index 696ccc1948..616aea85cb 100644 --- a/clients/apps/web/src/components/Products/ProductBenefitsForm.tsx +++ b/clients/apps/web/src/components/Products/ProductBenefitsForm.tsx @@ -7,7 +7,7 @@ import { MoreVertOutlined, RemoveOutlined, } from '@mui/icons-material' -import { type Benefit, BenefitType, Organization } from '@polar-sh/sdk' +import { type Benefit, BenefitType, Organization } from '@polar-sh/api' import { useSearchParams } from 'next/navigation' import { Switch } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Products/ProductCard.tsx b/clients/apps/web/src/components/Products/ProductCard.tsx index 69aa7f4957..91f437c0d2 100644 --- a/clients/apps/web/src/components/Products/ProductCard.tsx +++ b/clients/apps/web/src/components/Products/ProductCard.tsx @@ -1,6 +1,6 @@ 'use client' -import { ProductPrice, ProductStorefront } from '@polar-sh/sdk' +import { ProductPrice, ProductStorefront } from '@polar-sh/api' import LogoIcon from '../Brand/LogoIcon' import ProductPriceLabel from './ProductPriceLabel' import ProductPrices from './ProductPrices' diff --git a/clients/apps/web/src/components/Products/ProductCheckoutModal.tsx b/clients/apps/web/src/components/Products/ProductCheckoutModal.tsx index 435c4c64b2..298ab03186 100644 --- a/clients/apps/web/src/components/Products/ProductCheckoutModal.tsx +++ b/clients/apps/web/src/components/Products/ProductCheckoutModal.tsx @@ -22,7 +22,7 @@ import { Product, ResponseError, ValidationError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { Pill, Switch } from 'polarkit/components/ui/atoms' import { Accordion, diff --git a/clients/apps/web/src/components/Products/ProductForm/ProductCustomFieldSection.tsx b/clients/apps/web/src/components/Products/ProductForm/ProductCustomFieldSection.tsx index c47e2956cf..eedc674169 100644 --- a/clients/apps/web/src/components/Products/ProductForm/ProductCustomFieldSection.tsx +++ b/clients/apps/web/src/components/Products/ProductForm/ProductCustomFieldSection.tsx @@ -4,7 +4,7 @@ import CustomFieldTypeIcon from '@/components/CustomFields/CustomFieldTypeIcon' import { Section } from '@/components/Layout/Section' import { useCustomFields } from '@/hooks/queries' import { ClearOutlined } from '@mui/icons-material' -import { CustomField, Organization } from '@polar-sh/sdk' +import { CustomField, Organization } from '@polar-sh/api' import Link from 'next/link' import { Switch } from 'polarkit/components/ui/atoms' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Products/ProductForm/ProductForm.tsx b/clients/apps/web/src/components/Products/ProductForm/ProductForm.tsx index 14f027ee69..4bb980bec9 100644 --- a/clients/apps/web/src/components/Products/ProductForm/ProductForm.tsx +++ b/clients/apps/web/src/components/Products/ProductForm/ProductForm.tsx @@ -3,7 +3,7 @@ import { ProductCreate, ProductMediaFileRead, ProductUpdate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import React from 'react' import { ProductCustomFieldSection } from './ProductCustomFieldSection' import { ProductInfoSection } from './ProductInfoSection' diff --git a/clients/apps/web/src/components/Products/ProductForm/ProductMediaSection.tsx b/clients/apps/web/src/components/Products/ProductForm/ProductMediaSection.tsx index de83ef2d8e..c861f886ed 100644 --- a/clients/apps/web/src/components/Products/ProductForm/ProductMediaSection.tsx +++ b/clients/apps/web/src/components/Products/ProductForm/ProductMediaSection.tsx @@ -1,7 +1,7 @@ 'use client' import { Section } from '@/components/Layout/Section' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { FormControl, FormField, diff --git a/clients/apps/web/src/components/Products/ProductForm/ProductPricingSection.tsx b/clients/apps/web/src/components/Products/ProductForm/ProductPricingSection.tsx index fa15f5cbe4..bd89661832 100644 --- a/clients/apps/web/src/components/Products/ProductForm/ProductPricingSection.tsx +++ b/clients/apps/web/src/components/Products/ProductForm/ProductPricingSection.tsx @@ -6,7 +6,7 @@ import { ProductPrice, ProductPriceType, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import MoneyInput from 'polarkit/components/ui/atoms/moneyinput' import { diff --git a/clients/apps/web/src/components/Products/ProductMediasField/FileList.tsx b/clients/apps/web/src/components/Products/ProductMediasField/FileList.tsx index 2953c4eb9a..00f443738f 100644 --- a/clients/apps/web/src/components/Products/ProductMediasField/FileList.tsx +++ b/clients/apps/web/src/components/Products/ProductMediasField/FileList.tsx @@ -2,7 +2,7 @@ import { FileObject } from '@/components/FileUpload' import { useDraggable } from '@/hooks/draggable' import { DndContext, DragOverlay, closestCenter } from '@dnd-kit/core' import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable' -import { ProductMediaFileRead } from '@polar-sh/sdk' +import { ProductMediaFileRead } from '@polar-sh/api' import { DraggableFileListItem, FileListItem } from './FileListItem' type ProductMediaFileObject = FileObject diff --git a/clients/apps/web/src/components/Products/ProductMediasField/FileListItem.tsx b/clients/apps/web/src/components/Products/ProductMediasField/FileListItem.tsx index 914caabd20..06f0c97ebc 100644 --- a/clients/apps/web/src/components/Products/ProductMediasField/FileListItem.tsx +++ b/clients/apps/web/src/components/Products/ProductMediasField/FileListItem.tsx @@ -1,7 +1,7 @@ import { useDeleteFile } from '@/hooks/queries' import { useSortable } from '@dnd-kit/sortable' import { CSS } from '@dnd-kit/utilities' -import { ProductMediaFileRead } from '@polar-sh/sdk' +import { ProductMediaFileRead } from '@polar-sh/api' import { useCallback } from 'react' import { twMerge } from 'tailwind-merge' diff --git a/clients/apps/web/src/components/Products/ProductMediasField/index.tsx b/clients/apps/web/src/components/Products/ProductMediasField/index.tsx index 451b32aece..bea18c6a70 100644 --- a/clients/apps/web/src/components/Products/ProductMediasField/index.tsx +++ b/clients/apps/web/src/components/Products/ProductMediasField/index.tsx @@ -3,7 +3,7 @@ import { FileServiceTypes, Organization, ProductMediaFileRead, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { ReactElement, useCallback, useState } from 'react' import { FileRejection } from 'react-dropzone' import { twMerge } from 'tailwind-merge' diff --git a/clients/apps/web/src/components/Products/ProductPill.tsx b/clients/apps/web/src/components/Products/ProductPill.tsx index 892862ce11..4e293455a0 100644 --- a/clients/apps/web/src/components/Products/ProductPill.tsx +++ b/clients/apps/web/src/components/Products/ProductPill.tsx @@ -4,7 +4,7 @@ import { ProductPrice, ProductStorefront, TransactionProduct, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import ProductPriceLabel from './ProductPriceLabel' interface ProductPillProps { diff --git a/clients/apps/web/src/components/Products/ProductPriceLabel.tsx b/clients/apps/web/src/components/Products/ProductPriceLabel.tsx index 02b45292ca..77f3bfe981 100644 --- a/clients/apps/web/src/components/Products/ProductPriceLabel.tsx +++ b/clients/apps/web/src/components/Products/ProductPriceLabel.tsx @@ -1,4 +1,4 @@ -import { ProductPrice, ProductPriceType } from '@polar-sh/sdk' +import { ProductPrice, ProductPriceType } from '@polar-sh/api' import AmountLabel from '../Shared/AmountLabel' interface ProductPriceLabelProps { diff --git a/clients/apps/web/src/components/Products/ProductPriceTypeIcon.tsx b/clients/apps/web/src/components/Products/ProductPriceTypeIcon.tsx index db630829e5..140d56d6dd 100644 --- a/clients/apps/web/src/components/Products/ProductPriceTypeIcon.tsx +++ b/clients/apps/web/src/components/Products/ProductPriceTypeIcon.tsx @@ -1,5 +1,5 @@ import { LoopOutlined, ShoppingCartOutlined } from '@mui/icons-material' -import { ProductPriceType } from '@polar-sh/sdk' +import { ProductPriceType } from '@polar-sh/api' import React from 'react' interface ProductPriceTypeIconProps { diff --git a/clients/apps/web/src/components/Products/ProductPriceTypeLabel.tsx b/clients/apps/web/src/components/Products/ProductPriceTypeLabel.tsx index e554b6a8da..23ed6a4cde 100644 --- a/clients/apps/web/src/components/Products/ProductPriceTypeLabel.tsx +++ b/clients/apps/web/src/components/Products/ProductPriceTypeLabel.tsx @@ -1,4 +1,4 @@ -import { ProductPriceType } from '@polar-sh/sdk' +import { ProductPriceType } from '@polar-sh/api' import React from 'react' interface ProductPriceTypeLabelProps { diff --git a/clients/apps/web/src/components/Products/ProductPrices.tsx b/clients/apps/web/src/components/Products/ProductPrices.tsx index 9612278e07..0152cc9ddd 100644 --- a/clients/apps/web/src/components/Products/ProductPrices.tsx +++ b/clients/apps/web/src/components/Products/ProductPrices.tsx @@ -4,7 +4,7 @@ import { ProductPrice, ProductPriceType, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import ProductPriceLabel from './ProductPriceLabel' interface ProductPrices { diff --git a/clients/apps/web/src/components/Products/ProductSelect.tsx b/clients/apps/web/src/components/Products/ProductSelect.tsx index eaf5c55a13..295930b60f 100644 --- a/clients/apps/web/src/components/Products/ProductSelect.tsx +++ b/clients/apps/web/src/components/Products/ProductSelect.tsx @@ -5,7 +5,7 @@ import { Product, ProductPriceType, ProductsApiListRequest, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { Command, diff --git a/clients/apps/web/src/components/Products/ProductThumbnail.tsx b/clients/apps/web/src/components/Products/ProductThumbnail.tsx index ba82d6f72f..0293392439 100644 --- a/clients/apps/web/src/components/Products/ProductThumbnail.tsx +++ b/clients/apps/web/src/components/Products/ProductThumbnail.tsx @@ -1,8 +1,14 @@ -import { TextureOutlined } from "@mui/icons-material" -import { Product } from "@polar-sh/sdk" -import { twMerge } from "tailwind-merge" +import { TextureOutlined } from '@mui/icons-material' +import { Product } from '@polar-sh/api' +import { twMerge } from 'tailwind-merge' -export const ProductThumbnail = ({ size = 'small', product }: { size?: 'small' | 'medium', product: Product }) => { +export const ProductThumbnail = ({ + size = 'small', + product, +}: { + size?: 'small' | 'medium' + product: Product +}) => { let coverUrl = null if (product.medias.length > 0) { coverUrl = product.medias[0].public_url @@ -11,13 +17,18 @@ export const ProductThumbnail = ({ size = 'small', product }: { size?: 'small' | const sizeClassName = size === 'small' ? 'h-10 rounded-md' : 'h-24 rounded-xl' return ( -
+
{coverUrl ? ( // eslint-disable-next-line @next/next/no-img-element {product.name} ) : ( { className="flex w-full cursor-pointer flex-col gap-y-4" onClick={() => onClick(client)} > -
+
= ({ -
+
{subscriptionStatusDisplayNames[status]}
diff --git a/clients/apps/web/src/components/Subscriptions/SubscriptionTierCard.tsx b/clients/apps/web/src/components/Subscriptions/SubscriptionTierCard.tsx index 19e3b7a6d2..4818369cb0 100644 --- a/clients/apps/web/src/components/Subscriptions/SubscriptionTierCard.tsx +++ b/clients/apps/web/src/components/Subscriptions/SubscriptionTierCard.tsx @@ -6,7 +6,7 @@ import { useRecurringProductPrice, } from '@/hooks/products' import { markdownOptionsJustText } from '@/utils/markdown' -import { ProductStorefront, SubscriptionRecurringInterval } from '@polar-sh/sdk' +import { ProductStorefront, SubscriptionRecurringInterval } from '@polar-sh/api' import Markdown from 'markdown-to-jsx' import { Card, diff --git a/clients/apps/web/src/components/Subscriptions/SubscriptionTierRecurringIntervalSwitch.tsx b/clients/apps/web/src/components/Subscriptions/SubscriptionTierRecurringIntervalSwitch.tsx index 433bffa580..96b6800e74 100644 --- a/clients/apps/web/src/components/Subscriptions/SubscriptionTierRecurringIntervalSwitch.tsx +++ b/clients/apps/web/src/components/Subscriptions/SubscriptionTierRecurringIntervalSwitch.tsx @@ -1,4 +1,4 @@ -import { SubscriptionRecurringInterval } from '@polar-sh/sdk' +import { SubscriptionRecurringInterval } from '@polar-sh/api' import { Tabs, TabsList, TabsTrigger } from 'polarkit/components/ui/atoms/tabs' import React, { useCallback } from 'react' diff --git a/clients/apps/web/src/components/Subscriptions/SubscriptionTiersSelect.tsx b/clients/apps/web/src/components/Subscriptions/SubscriptionTiersSelect.tsx index bda916b4fe..88b4fa23fe 100644 --- a/clients/apps/web/src/components/Subscriptions/SubscriptionTiersSelect.tsx +++ b/clients/apps/web/src/components/Subscriptions/SubscriptionTiersSelect.tsx @@ -1,4 +1,4 @@ -import { Product } from '@polar-sh/sdk' +import { Product } from '@polar-sh/api' import { Select, SelectContent, diff --git a/clients/apps/web/src/components/Subscriptions/utils.tsx b/clients/apps/web/src/components/Subscriptions/utils.tsx index ecd160525d..02e7107ff0 100644 --- a/clients/apps/web/src/components/Subscriptions/utils.tsx +++ b/clients/apps/web/src/components/Subscriptions/utils.tsx @@ -1,12 +1,12 @@ import { - CustomerSubscription, + CustomerSubscription, ProductPriceRecurring, ProductPriceType, ProductStorefront, Subscription, SubscriptionRecurringInterval, SubscriptionStatus, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useMemo } from 'react' import { twMerge } from 'tailwind-merge' @@ -38,33 +38,33 @@ export const hasRecurringInterval = export const SubscriptionStatusLabel = ({ className, - subscription -}: { className?: string, subscription: Subscription | CustomerSubscription }) => { - + subscription, +}: { + className?: string + subscription: Subscription | CustomerSubscription +}) => { const label = useMemo(() => { + switch (subscription.status) { + case 'active': + return subscription.ends_at ? 'To be cancelled' : 'Active' + default: + return subscription.status.split('_').join(' ') + } + }, [subscription]) - switch (subscription.status) { - case 'active': - return subscription.ends_at ? 'To be cancelled' : 'Active' - default: - return subscription.status.split('_').join(' ') - } -}, [subscription]) - - - -const statusColor = useMemo(() => { + const statusColor = useMemo(() => { switch (subscription.status) { case 'active': - return subscription.cancel_at_period_end ? 'border-yellow-500' : 'border-emerald-500' + return subscription.cancel_at_period_end + ? 'border-yellow-500' + : 'border-emerald-500' default: return 'border-red-500' } }, [subscription]) - return ( -
+
{label}
diff --git a/clients/apps/web/src/components/Transactions/AccountBalance.tsx b/clients/apps/web/src/components/Transactions/AccountBalance.tsx index 51d4cdc17c..7a9d3ee136 100644 --- a/clients/apps/web/src/components/Transactions/AccountBalance.tsx +++ b/clients/apps/web/src/components/Transactions/AccountBalance.tsx @@ -1,6 +1,6 @@ import { useTransactionsSummary } from '@/hooks/queries' import { Skeleton } from '@mui/material' -import { Account, Status } from '@polar-sh/sdk' +import { Account, Status } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { ShadowBoxOnMd } from 'polarkit/components/ui/atoms/shadowbox' import { diff --git a/clients/apps/web/src/components/Transactions/AccountBanner.tsx b/clients/apps/web/src/components/Transactions/AccountBanner.tsx index 0e563d102b..a36c67d955 100644 --- a/clients/apps/web/src/components/Transactions/AccountBanner.tsx +++ b/clients/apps/web/src/components/Transactions/AccountBanner.tsx @@ -7,7 +7,7 @@ import { Organization, Status, UserRead, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import Button from 'polarkit/components/ui/atoms/button' import { Banner } from 'polarkit/components/ui/molecules' diff --git a/clients/apps/web/src/components/Transactions/PayoutTransactionsList.tsx b/clients/apps/web/src/components/Transactions/PayoutTransactionsList.tsx index 8e0f23fe78..830e2956d3 100644 --- a/clients/apps/web/src/components/Transactions/PayoutTransactionsList.tsx +++ b/clients/apps/web/src/components/Transactions/PayoutTransactionsList.tsx @@ -5,7 +5,7 @@ import { DataTableSortingState, } from '@/utils/datatable' import { DownloadOutlined } from '@mui/icons-material' -import { Transaction, TransactionEmbedded } from '@polar-sh/sdk' +import { Transaction, TransactionEmbedded } from '@polar-sh/api' import Link from 'next/link' import { DataTableColumnDef, diff --git a/clients/apps/web/src/components/Transactions/TransactionsList.stories.tsx b/clients/apps/web/src/components/Transactions/TransactionsList.stories.tsx index e47adc3935..3eb2a911cb 100644 --- a/clients/apps/web/src/components/Transactions/TransactionsList.stories.tsx +++ b/clients/apps/web/src/components/Transactions/TransactionsList.stories.tsx @@ -9,7 +9,7 @@ import { TransactionPledge, TransactionProduct, TransactionRepository, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import type { Meta, StoryObj } from '@storybook/react' import TransactionsList from './TransactionsList' diff --git a/clients/apps/web/src/components/Transactions/TransactionsList.tsx b/clients/apps/web/src/components/Transactions/TransactionsList.tsx index 565d5ebf9e..469cdd8cf0 100644 --- a/clients/apps/web/src/components/Transactions/TransactionsList.tsx +++ b/clients/apps/web/src/components/Transactions/TransactionsList.tsx @@ -12,7 +12,7 @@ import { Transaction, TransactionEmbedded, TransactionType, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import Link from 'next/link' import { FormattedDateTime } from 'polarkit/components/ui/atoms' import Avatar from 'polarkit/components/ui/atoms/avatar' diff --git a/clients/apps/web/src/components/Transactions/WithdrawModal.tsx b/clients/apps/web/src/components/Transactions/WithdrawModal.tsx index c7aaceffa4..ebac26b23a 100644 --- a/clients/apps/web/src/components/Transactions/WithdrawModal.tsx +++ b/clients/apps/web/src/components/Transactions/WithdrawModal.tsx @@ -1,6 +1,6 @@ import { usePayoutEstimate } from '@/hooks/queries' import { api } from '@/utils/api' -import { Account, ResponseError } from '@polar-sh/sdk' +import { Account, ResponseError } from '@polar-sh/api' import Button from 'polarkit/components/ui/atoms/button' import { formatCurrencyAndAmount } from 'polarkit/lib/money' import React, { useCallback, useEffect, useState } from 'react' diff --git a/clients/apps/web/src/components/Widgets/AccountWidget.tsx b/clients/apps/web/src/components/Widgets/AccountWidget.tsx index 90a50111f6..3cc5abcbb7 100644 --- a/clients/apps/web/src/components/Widgets/AccountWidget.tsx +++ b/clients/apps/web/src/components/Widgets/AccountWidget.tsx @@ -1,6 +1,6 @@ import { useOrganizationAccount, useTransactionsSummary } from '@/hooks/queries' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' -import { Status } from '@polar-sh/sdk' +import { Status } from '@polar-sh/api' import { getCentsInDollarString } from '@polarkit/lib/money' import Link from 'next/link' import Button from 'polarkit/components/ui/atoms/button' diff --git a/clients/apps/web/src/components/Widgets/OrdersWidget.tsx b/clients/apps/web/src/components/Widgets/OrdersWidget.tsx index f1892b2bb1..84aff8edcf 100644 --- a/clients/apps/web/src/components/Widgets/OrdersWidget.tsx +++ b/clients/apps/web/src/components/Widgets/OrdersWidget.tsx @@ -1,7 +1,7 @@ import { useOrders } from '@/hooks/queries/orders' import { MaintainerOrganizationContext } from '@/providers/maintainerOrganization' import { ShoppingCartOutlined } from '@mui/icons-material' -import { Order } from '@polar-sh/sdk' +import { Order } from '@polar-sh/api' import { getCentsInDollarString } from '@polarkit/lib/money' import Link from 'next/link' import Avatar from 'polarkit/components/ui/atoms/avatar' @@ -78,9 +78,7 @@ export const OrdersWidget = ({ className }: OrdersWidgetProps) => { ] return ( -
+
{(orders.data?.items.length ?? 0) > 0 ? (
{orders.data?.items diff --git a/clients/apps/web/src/hooks/auth.ts b/clients/apps/web/src/hooks/auth.ts index d7f5e8891f..399eeae121 100644 --- a/clients/apps/web/src/hooks/auth.ts +++ b/clients/apps/web/src/hooks/auth.ts @@ -1,7 +1,7 @@ import { usePostHog } from '@/hooks/posthog' import { AuthContext } from '@/providers/auth' import { api } from '@/utils/api' -import { Organization, UserRead } from '@polar-sh/sdk' +import { Organization, UserRead } from '@polar-sh/api' import * as Sentry from '@sentry/nextjs' import { useContext, useEffect } from 'react' diff --git a/clients/apps/web/src/hooks/docs.ts b/clients/apps/web/src/hooks/docs.ts index b77b8760b6..f8694b3c7c 100644 --- a/clients/apps/web/src/hooks/docs.ts +++ b/clients/apps/web/src/hooks/docs.ts @@ -1,6 +1,6 @@ import { AuthContext } from '@/providers/auth' import { api } from '@/utils/api' -import { UserRead } from '@polar-sh/sdk' +import { UserRead } from '@polar-sh/api' import { useCallback, useContext, useEffect, useState } from 'react' export const useClientSideLoadedUser = (): { diff --git a/clients/apps/web/src/hooks/emailUpdate.ts b/clients/apps/web/src/hooks/emailUpdate.ts index 13e0810cc6..89357dc896 100644 --- a/clients/apps/web/src/hooks/emailUpdate.ts +++ b/clients/apps/web/src/hooks/emailUpdate.ts @@ -1,9 +1,9 @@ 'use client' -import { api } from "@/utils/api" -import { EmailUpdateRequest } from "@polar-sh/sdk" -import { useRouter } from "next/navigation" -import { useCallback } from "react" +import { api } from '@/utils/api' +import { EmailUpdateRequest } from '@polar-sh/api' +import { useRouter } from 'next/navigation' +import { useCallback } from 'react' export const useSendEmailUpdate = () => { const router = useRouter() diff --git a/clients/apps/web/src/hooks/github.ts b/clients/apps/web/src/hooks/github.ts index f6893c878a..483d8217ad 100644 --- a/clients/apps/web/src/hooks/github.ts +++ b/clients/apps/web/src/hooks/github.ts @@ -1,7 +1,7 @@ import { useStore } from '@/store' import { getGitHubAuthorizeURL } from '@/utils/auth' import { CONFIG } from '@/utils/config' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import { usePathname } from 'next/navigation' import { useCallback, useEffect } from 'react' import { useGitHubAccount } from './oauth-accounts' diff --git a/clients/apps/web/src/hooks/magicLink.ts b/clients/apps/web/src/hooks/magicLink.ts index ac65fc1d40..18a519fbe3 100644 --- a/clients/apps/web/src/hooks/magicLink.ts +++ b/clients/apps/web/src/hooks/magicLink.ts @@ -1,14 +1,18 @@ 'use client' import { api } from '@/utils/api' -import { UserSignupAttribution, MagicLinkRequest } from '@polar-sh/sdk' +import { MagicLinkRequest, UserSignupAttribution } from '@polar-sh/api' import { useRouter } from 'next/navigation' import { useCallback } from 'react' export const useSendMagicLink = () => { const router = useRouter() const func = useCallback( - async (email: string, return_to?: string, signup?: UserSignupAttribution) => { + async ( + email: string, + return_to?: string, + signup?: UserSignupAttribution, + ) => { const body: MagicLinkRequest = { email, return_to, diff --git a/clients/apps/web/src/hooks/oauth-accounts.ts b/clients/apps/web/src/hooks/oauth-accounts.ts index bdba3fe039..64c50855b7 100644 --- a/clients/apps/web/src/hooks/oauth-accounts.ts +++ b/clients/apps/web/src/hooks/oauth-accounts.ts @@ -1,4 +1,4 @@ -import { OAuthAccountRead, OAuthPlatform } from '@polar-sh/sdk' +import { OAuthAccountRead, OAuthPlatform } from '@polar-sh/api' import { useMemo } from 'react' import { useAuth } from '.' diff --git a/clients/apps/web/src/hooks/org.ts b/clients/apps/web/src/hooks/org.ts index f998baa603..df43b98bad 100644 --- a/clients/apps/web/src/hooks/org.ts +++ b/clients/apps/web/src/hooks/org.ts @@ -1,6 +1,6 @@ 'use client' -import type { Organization } from '@polar-sh/sdk' +import type { Organization } from '@polar-sh/api' import { useAuth } from './auth' import { useExternalOrganizations } from './queries/externalOrganizations' diff --git a/clients/apps/web/src/hooks/posthog.ts b/clients/apps/web/src/hooks/posthog.ts index 1206f7f904..8304b03414 100644 --- a/clients/apps/web/src/hooks/posthog.ts +++ b/clients/apps/web/src/hooks/posthog.ts @@ -1,7 +1,7 @@ 'use client' import { CONFIG } from '@/utils/config' -import { UserRead } from '@polar-sh/sdk' +import { UserRead } from '@polar-sh/api' import { PostHog, Properties } from 'posthog-js' import { usePostHog as useOfficialPostHog } from 'posthog-js/react' diff --git a/clients/apps/web/src/hooks/products.ts b/clients/apps/web/src/hooks/products.ts index 18212d0e47..aeaf14c8d2 100644 --- a/clients/apps/web/src/hooks/products.ts +++ b/clients/apps/web/src/hooks/products.ts @@ -8,7 +8,7 @@ import { ProductPriceType, ProductStorefront, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { Dispatch, SetStateAction, useMemo, useState } from 'react' import { useProducts } from './queries' diff --git a/clients/apps/web/src/hooks/queries/accounts.ts b/clients/apps/web/src/hooks/queries/accounts.ts index 2615dd3b94..be6b16cf1f 100644 --- a/clients/apps/web/src/hooks/queries/accounts.ts +++ b/clients/apps/web/src/hooks/queries/accounts.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { ListResourceAccount } from '@polar-sh/sdk' +import { ListResourceAccount } from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/backoffice.ts b/clients/apps/web/src/hooks/queries/backoffice.ts index 2743fb544f..0e949a22a5 100644 --- a/clients/apps/web/src/hooks/queries/backoffice.ts +++ b/clients/apps/web/src/hooks/queries/backoffice.ts @@ -3,7 +3,7 @@ import { BackofficeBadge, BackofficePledge, BackofficeReward, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { UseMutationResult, UseQueryResult, diff --git a/clients/apps/web/src/hooks/queries/benefits.ts b/clients/apps/web/src/hooks/queries/benefits.ts index 9b0a012a9e..b8aef7b314 100644 --- a/clients/apps/web/src/hooks/queries/benefits.ts +++ b/clients/apps/web/src/hooks/queries/benefits.ts @@ -1,4 +1,4 @@ -import { BenefitCreate, BenefitTypeFilter, BenefitUpdate } from '@polar-sh/sdk' +import { BenefitCreate, BenefitTypeFilter, BenefitUpdate } from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { api, queryClient } from '@/utils/api' diff --git a/clients/apps/web/src/hooks/queries/checkout_links.ts b/clients/apps/web/src/hooks/queries/checkout_links.ts index 6617094234..a6bfec3b42 100644 --- a/clients/apps/web/src/hooks/queries/checkout_links.ts +++ b/clients/apps/web/src/hooks/queries/checkout_links.ts @@ -8,7 +8,7 @@ import { CheckoutLinksApiUpdateRequest, ListResourceCheckoutLink, OrganizationIDFilter1, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { defaultRetry } from './retry' export const useCheckoutLinks = ( diff --git a/clients/apps/web/src/hooks/queries/customFields.ts b/clients/apps/web/src/hooks/queries/customFields.ts index b778ad0460..5dcd1bf5e5 100644 --- a/clients/apps/web/src/hooks/queries/customFields.ts +++ b/clients/apps/web/src/hooks/queries/customFields.ts @@ -4,7 +4,7 @@ import { CustomFieldCreate, CustomFieldsApiListRequest, CustomFieldUpdate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/customerPortal.ts b/clients/apps/web/src/hooks/queries/customerPortal.ts index 97e3f877f9..a2575e1459 100644 --- a/clients/apps/web/src/hooks/queries/customerPortal.ts +++ b/clients/apps/web/src/hooks/queries/customerPortal.ts @@ -9,7 +9,7 @@ import { CustomerSubscriptionCancel, CustomerSubscriptionUpdate, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' @@ -157,7 +157,7 @@ export const useCustomerUpdateSubscription = (api: PolarAPI) => export const useCustomerCancelSubscription = (api: PolarAPI) => useMutation({ mutationFn: (variables: { - id: string, + id: string body: CustomerSubscriptionCancel }) => { return api.customerPortalSubscriptions.update(variables) diff --git a/clients/apps/web/src/hooks/queries/customers.ts b/clients/apps/web/src/hooks/queries/customers.ts index b4e1c9532f..86fd957e7c 100644 --- a/clients/apps/web/src/hooks/queries/customers.ts +++ b/clients/apps/web/src/hooks/queries/customers.ts @@ -1,5 +1,5 @@ import { api, queryClient } from '@/utils/api' -import { CustomersApiListRequest, CustomerUpdate } from '@polar-sh/sdk' +import { CustomersApiListRequest, CustomerUpdate } from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/dashboard.ts b/clients/apps/web/src/hooks/queries/dashboard.ts index a999bbe25e..513ad1f1ce 100644 --- a/clients/apps/web/src/hooks/queries/dashboard.ts +++ b/clients/apps/web/src/hooks/queries/dashboard.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { IssueListResponse, IssueSortBy } from '@polar-sh/sdk' +import { IssueListResponse, IssueSortBy } from '@polar-sh/api' import { InfiniteData, UseInfiniteQueryResult, diff --git a/clients/apps/web/src/hooks/queries/discord.ts b/clients/apps/web/src/hooks/queries/discord.ts index 83b99a4862..db537d9082 100644 --- a/clients/apps/web/src/hooks/queries/discord.ts +++ b/clients/apps/web/src/hooks/queries/discord.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { DiscordGuild } from '@polar-sh/sdk' +import { DiscordGuild } from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/discounts.ts b/clients/apps/web/src/hooks/queries/discounts.ts index 3757a6502c..6633c9b8db 100644 --- a/clients/apps/web/src/hooks/queries/discounts.ts +++ b/clients/apps/web/src/hooks/queries/discounts.ts @@ -4,7 +4,7 @@ import { DiscountCreate, DiscountsApiListRequest, DiscountUpdate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/dummy_products.ts b/clients/apps/web/src/hooks/queries/dummy_products.ts index f2b3827e19..4c363d46c6 100644 --- a/clients/apps/web/src/hooks/queries/dummy_products.ts +++ b/clients/apps/web/src/hooks/queries/dummy_products.ts @@ -1,6 +1,6 @@ import { queryClient } from '@/utils/api' import { org } from '@/utils/testdata' -import { Benefit, Organization } from '@polar-sh/sdk' +import { Benefit, Organization } from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/externalOrganizations.ts b/clients/apps/web/src/hooks/queries/externalOrganizations.ts index f7e7e1dfe6..9c4494b77f 100644 --- a/clients/apps/web/src/hooks/queries/externalOrganizations.ts +++ b/clients/apps/web/src/hooks/queries/externalOrganizations.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { ExternalOrganizationsApiListRequest } from '@polar-sh/sdk' +import { ExternalOrganizationsApiListRequest } from '@polar-sh/api' import { useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/files.ts b/clients/apps/web/src/hooks/queries/files.ts index 13491ced40..8184679b03 100644 --- a/clients/apps/web/src/hooks/queries/files.ts +++ b/clients/apps/web/src/hooks/queries/files.ts @@ -1,7 +1,7 @@ import { useQuery } from '@tanstack/react-query' import { api, queryClient } from '@/utils/api' -import { FileRead } from '@polar-sh/sdk' +import { FileRead } from '@polar-sh/api' import { defaultRetry } from './retry' import { useMutation } from '@tanstack/react-query' diff --git a/clients/apps/web/src/hooks/queries/funding.ts b/clients/apps/web/src/hooks/queries/funding.ts index dcf110a721..4d2e566c10 100644 --- a/clients/apps/web/src/hooks/queries/funding.ts +++ b/clients/apps/web/src/hooks/queries/funding.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { ListFundingSortBy, ListResourceIssueFunding } from '@polar-sh/sdk' +import { ListFundingSortBy, ListResourceIssueFunding } from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/github.ts b/clients/apps/web/src/hooks/queries/github.ts index 095b18aa2c..b85e8a5a1b 100644 --- a/clients/apps/web/src/hooks/queries/github.ts +++ b/clients/apps/web/src/hooks/queries/github.ts @@ -3,7 +3,7 @@ import { AppPermissionsType, OrganizationBillingPlan, ResponseError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/githubRepositoryBenefit.ts b/clients/apps/web/src/hooks/queries/githubRepositoryBenefit.ts index 2393957da9..3b678607fb 100644 --- a/clients/apps/web/src/hooks/queries/githubRepositoryBenefit.ts +++ b/clients/apps/web/src/hooks/queries/githubRepositoryBenefit.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { GitHubInvitesBenefitRepositories, ResponseError } from '@polar-sh/sdk' +import { GitHubInvitesBenefitRepositories, ResponseError } from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/index.ts b/clients/apps/web/src/hooks/queries/index.ts index 9ce2312387..44911cc008 100644 --- a/clients/apps/web/src/hooks/queries/index.ts +++ b/clients/apps/web/src/hooks/queries/index.ts @@ -3,7 +3,7 @@ import { ListResourceRepository, RepositoriesApiListRequest, ResponseError, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { UseMutationResult, UseQueryResult, diff --git a/clients/apps/web/src/hooks/queries/issue.ts b/clients/apps/web/src/hooks/queries/issue.ts index b9129edb11..500020704f 100644 --- a/clients/apps/web/src/hooks/queries/issue.ts +++ b/clients/apps/web/src/hooks/queries/issue.ts @@ -8,7 +8,7 @@ import { ListResourceIssue, ListResourcePledge, PostIssueComment, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { InfiniteData, UseMutationResult, diff --git a/clients/apps/web/src/hooks/queries/license_keys.ts b/clients/apps/web/src/hooks/queries/license_keys.ts index a5a87fefb5..ada757b2d9 100644 --- a/clients/apps/web/src/hooks/queries/license_keys.ts +++ b/clients/apps/web/src/hooks/queries/license_keys.ts @@ -4,7 +4,7 @@ import { api, queryClient } from '@/utils/api' import { LicenseKeysApiListRequest, LicenseKeysApiUpdateRequest, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { defaultRetry } from './retry' export const useLicenseKeyUpdate = (organizationId: string) => diff --git a/clients/apps/web/src/hooks/queries/meters.ts b/clients/apps/web/src/hooks/queries/meters.ts index fcec4bb943..65d7be4d9e 100644 --- a/clients/apps/web/src/hooks/queries/meters.ts +++ b/clients/apps/web/src/hooks/queries/meters.ts @@ -1,5 +1,5 @@ import { Meter, MeterEvent } from '@/app/api/meters/data' -import { Pagination } from '@polar-sh/sdk' +import { Pagination } from '@polar-sh/api' import { useQuery } from '@tanstack/react-query' export const useMeters = (organizationId?: string) => diff --git a/clients/apps/web/src/hooks/queries/metrics.ts b/clients/apps/web/src/hooks/queries/metrics.ts index aeb83a9061..e8e75a53a5 100644 --- a/clients/apps/web/src/hooks/queries/metrics.ts +++ b/clients/apps/web/src/hooks/queries/metrics.ts @@ -1,6 +1,6 @@ import { api } from '@/utils/api' import { toISODate } from '@/utils/metrics' -import { Interval, MetricPeriod, Metrics, ResponseError } from '@polar-sh/sdk' +import { Interval, MetricPeriod, Metrics, ResponseError } from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/oauth.ts b/clients/apps/web/src/hooks/queries/oauth.ts index 67d3f35f12..9c7e7671bf 100644 --- a/clients/apps/web/src/hooks/queries/oauth.ts +++ b/clients/apps/web/src/hooks/queries/oauth.ts @@ -4,7 +4,7 @@ import { OAuth2ClientConfiguration, Oauth2ClientsApiListRequest, Oauth2ClientsApiUpdateClientRequest, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' export const useOAuth2Clients = (options?: Oauth2ClientsApiListRequest) => diff --git a/clients/apps/web/src/hooks/queries/orders.ts b/clients/apps/web/src/hooks/queries/orders.ts index 02c8e59b81..82d560b2db 100644 --- a/clients/apps/web/src/hooks/queries/orders.ts +++ b/clients/apps/web/src/hooks/queries/orders.ts @@ -1,14 +1,18 @@ import { api } from '@/utils/api' -import { OrdersApiGetRequest, OrdersApiListRequest } from '@polar-sh/sdk' +import { OrdersApiGetRequest, OrdersApiListRequest } from '@polar-sh/api' import { useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' -export const useOrder = (orderId?: string, parameters?: Omit) => useQuery({ - queryKey: ['order', orderId, parameters], - queryFn: () => api.orders.get({ id: orderId ?? '', ...parameters }), - retry: defaultRetry, - enabled: !!orderId, -}) +export const useOrder = ( + orderId?: string, + parameters?: Omit, +) => + useQuery({ + queryKey: ['order', orderId, parameters], + queryFn: () => api.orders.get({ id: orderId ?? '', ...parameters }), + retry: defaultRetry, + enabled: !!orderId, + }) export const useOrders = ( organizationId?: string, diff --git a/clients/apps/web/src/hooks/queries/org.ts b/clients/apps/web/src/hooks/queries/org.ts index f8925e685e..d17a62583e 100644 --- a/clients/apps/web/src/hooks/queries/org.ts +++ b/clients/apps/web/src/hooks/queries/org.ts @@ -6,7 +6,7 @@ import { OrganizationCreate, OrganizationUpdate, OrganizationsApiListRequest, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { UseMutationResult, useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/pledges.ts b/clients/apps/web/src/hooks/queries/pledges.ts index dfe13693be..b1c3efd3b5 100644 --- a/clients/apps/web/src/hooks/queries/pledges.ts +++ b/clients/apps/web/src/hooks/queries/pledges.ts @@ -1,5 +1,5 @@ import { api, queryClient } from '@/utils/api' -import { PaymentMethod, Pledge, PledgesApiSearchRequest } from '@polar-sh/sdk' +import { PaymentMethod, Pledge, PledgesApiSearchRequest } from '@polar-sh/api' import { UseMutationResult, UseQueryResult, diff --git a/clients/apps/web/src/hooks/queries/products.ts b/clients/apps/web/src/hooks/queries/products.ts index c0470d7cc1..fd5ca6e127 100644 --- a/clients/apps/web/src/hooks/queries/products.ts +++ b/clients/apps/web/src/hooks/queries/products.ts @@ -8,7 +8,7 @@ import { ProductCreate, ProductUpdate, ProductsApiListRequest, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { keepPreviousData, useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/project.ts b/clients/apps/web/src/hooks/queries/project.ts index ddba31110e..2a06750901 100644 --- a/clients/apps/web/src/hooks/queries/project.ts +++ b/clients/apps/web/src/hooks/queries/project.ts @@ -1,14 +1,11 @@ import { api } from '@/utils/api' -import { RepositoryUpdate } from '@polar-sh/sdk' +import { RepositoryUpdate } from '@polar-sh/api' import { useMutation } from '@tanstack/react-query' import { defaultRetry } from './retry' export const useUpdateProject = () => useMutation({ - mutationFn: (variables: { - id: string - body: RepositoryUpdate - }) => { + mutationFn: (variables: { id: string; body: RepositoryUpdate }) => { return api.repositories.update(variables) }, retry: defaultRetry, diff --git a/clients/apps/web/src/hooks/queries/retry.ts b/clients/apps/web/src/hooks/queries/retry.ts index 0c35524ba5..1ea03b0a52 100644 --- a/clients/apps/web/src/hooks/queries/retry.ts +++ b/clients/apps/web/src/hooks/queries/retry.ts @@ -1,5 +1,5 @@ import { useStore } from '@/store' -import { ResponseError } from '@polar-sh/sdk' +import { ResponseError } from '@polar-sh/api' export const authenticatingRetry = ( failureCount: number, diff --git a/clients/apps/web/src/hooks/queries/rewards.ts b/clients/apps/web/src/hooks/queries/rewards.ts index 9a7ef97c99..ea407390a2 100644 --- a/clients/apps/web/src/hooks/queries/rewards.ts +++ b/clients/apps/web/src/hooks/queries/rewards.ts @@ -1,5 +1,5 @@ import { api } from '@/utils/api' -import { ListResourceReward } from '@polar-sh/sdk' +import { ListResourceReward } from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/subscriptions.ts b/clients/apps/web/src/hooks/queries/subscriptions.ts index 40230125d8..761d766731 100644 --- a/clients/apps/web/src/hooks/queries/subscriptions.ts +++ b/clients/apps/web/src/hooks/queries/subscriptions.ts @@ -1,5 +1,9 @@ -import { SubscriptionsApiListRequest, SubscriptionCancel, ListResourceSubscription } from '@polar-sh/sdk' -import { useQuery, useMutation } from '@tanstack/react-query' +import { + ListResourceSubscription, + SubscriptionCancel, + SubscriptionsApiListRequest, +} from '@polar-sh/api' +import { useMutation, useQuery } from '@tanstack/react-query' import { api, queryClient } from '@/utils/api' import { defaultRetry } from './retry' @@ -21,7 +25,7 @@ export const useListSubscriptions = ( export const useCancelSubscription = () => useMutation({ - mutationFn: (variables: { id: string, body: SubscriptionCancel }) => { + mutationFn: (variables: { id: string; body: SubscriptionCancel }) => { return api.subscriptions.update(variables) }, onSuccess: (result, _variables, _ctx) => { @@ -29,7 +33,7 @@ export const useCancelSubscription = () => { queryKey: [ 'subscriptions', - { organizationId: result.product.organization_id } + { organizationId: result.product.organization_id }, ], }, (old) => { diff --git a/clients/apps/web/src/hooks/queries/transactions.ts b/clients/apps/web/src/hooks/queries/transactions.ts index 8d20782752..4f11ba4233 100644 --- a/clients/apps/web/src/hooks/queries/transactions.ts +++ b/clients/apps/web/src/hooks/queries/transactions.ts @@ -6,7 +6,7 @@ import { TransactionSortProperty, TransactionType, TransactionsSummary, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { UseQueryResult, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/user.ts b/clients/apps/web/src/hooks/queries/user.ts index faf17b6e87..92740245f8 100644 --- a/clients/apps/web/src/hooks/queries/user.ts +++ b/clients/apps/web/src/hooks/queries/user.ts @@ -1,5 +1,5 @@ import { api, queryClient } from '@/utils/api' -import { PersonalAccessTokenCreate } from '@polar-sh/sdk' +import { PersonalAccessTokenCreate } from '@polar-sh/api' import { useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/queries/webhooks.ts b/clients/apps/web/src/hooks/queries/webhooks.ts index 40f765dbf1..934dbb0bfa 100644 --- a/clients/apps/web/src/hooks/queries/webhooks.ts +++ b/clients/apps/web/src/hooks/queries/webhooks.ts @@ -5,7 +5,7 @@ import { ResponseError, WebhookEndpointCreate, WebhookEndpointUpdate, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { UseQueryResult, useMutation, useQuery } from '@tanstack/react-query' import { defaultRetry } from './retry' diff --git a/clients/apps/web/src/hooks/sse/benefits.ts b/clients/apps/web/src/hooks/sse/benefits.ts index 5d9833cd25..3a3e2242ba 100644 --- a/clients/apps/web/src/hooks/sse/benefits.ts +++ b/clients/apps/web/src/hooks/sse/benefits.ts @@ -1,4 +1,4 @@ -import { BenefitType } from '@polar-sh/sdk' +import { BenefitType } from '@polar-sh/api' export const onBenefitGranted = async (_: { subscription_benefit_id: string diff --git a/clients/apps/web/src/hooks/stripe.ts b/clients/apps/web/src/hooks/stripe.ts index 42b961418d..df46176472 100644 --- a/clients/apps/web/src/hooks/stripe.ts +++ b/clients/apps/web/src/hooks/stripe.ts @@ -1,7 +1,7 @@ import { useToast } from '@/components/Toast/use-toast' import { useStore } from '@/store' import { api } from '@/utils/api' -import { Pledge, PledgeState } from '@polar-sh/sdk' +import { Pledge, PledgeState } from '@polar-sh/api' import { formatCurrencyAndAmount } from 'polarkit/lib/money' import { useEffect, useState } from 'react' diff --git a/clients/apps/web/src/middleware.ts b/clients/apps/web/src/middleware.ts index 3f82f885c7..6fbc266f1e 100644 --- a/clients/apps/web/src/middleware.ts +++ b/clients/apps/web/src/middleware.ts @@ -1,4 +1,4 @@ -import { ResponseError, UserRead } from '@polar-sh/sdk' +import { ResponseError, UserRead } from '@polar-sh/api' import type { NextRequest } from 'next/server' import { NextResponse } from 'next/server' import { buildServerSideAPI } from './utils/api' diff --git a/clients/apps/web/src/providers/auth.tsx b/clients/apps/web/src/providers/auth.tsx index 033f842995..174de01bf1 100644 --- a/clients/apps/web/src/providers/auth.tsx +++ b/clients/apps/web/src/providers/auth.tsx @@ -1,6 +1,6 @@ 'use client' -import { Organization, UserRead } from '@polar-sh/sdk' +import { Organization, UserRead } from '@polar-sh/api' import React from 'react' export type AuthContextValue = { diff --git a/clients/apps/web/src/providers/maintainerOrganization.tsx b/clients/apps/web/src/providers/maintainerOrganization.tsx index 89d1a06fdd..56a08ecdf9 100644 --- a/clients/apps/web/src/providers/maintainerOrganization.tsx +++ b/clients/apps/web/src/providers/maintainerOrganization.tsx @@ -1,7 +1,7 @@ 'use client' import { useProducts } from '@/hooks/queries' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' import React, { useMemo } from 'react' const stub = (): never => { diff --git a/clients/apps/web/src/store/formDraftSlice.ts b/clients/apps/web/src/store/formDraftSlice.ts index 5f6d831ec2..4eb8d09d21 100644 --- a/clients/apps/web/src/store/formDraftSlice.ts +++ b/clients/apps/web/src/store/formDraftSlice.ts @@ -1,4 +1,4 @@ -import { ProductCreate, ProductMediaFileRead } from '@polar-sh/sdk' +import { ProductCreate, ProductMediaFileRead } from '@polar-sh/api' import { StateCreator } from 'zustand' interface FormDrafts { diff --git a/clients/apps/web/src/store/userContext.ts b/clients/apps/web/src/store/userContext.ts index 4b1de1dd4c..6f8df35f43 100644 --- a/clients/apps/web/src/store/userContext.ts +++ b/clients/apps/web/src/store/userContext.ts @@ -1,4 +1,4 @@ -import { Pledge } from '@polar-sh/sdk' +import { Pledge } from '@polar-sh/api' import { StateCreator } from 'zustand' export interface OnboardingState { diff --git a/clients/apps/web/src/stories/BadgeRepositories.stories.ts b/clients/apps/web/src/stories/BadgeRepositories.stories.ts index 1dac91c2b9..28c069d2dc 100644 --- a/clients/apps/web/src/stories/BadgeRepositories.stories.ts +++ b/clients/apps/web/src/stories/BadgeRepositories.stories.ts @@ -1,5 +1,5 @@ import BadgeRepositories from '@/components/Settings/Badge/Repositories' -import { RepositoryBadgeSettingsRead } from '@polar-sh/sdk' +import { RepositoryBadgeSettingsRead } from '@polar-sh/api' import type { Meta, StoryObj } from '@storybook/react' const meta: Meta = { diff --git a/clients/apps/web/src/stories/FinancePage.stories.tsx b/clients/apps/web/src/stories/FinancePage.stories.tsx index acc072bbf6..9b4fd6b96a 100644 --- a/clients/apps/web/src/stories/FinancePage.stories.tsx +++ b/clients/apps/web/src/stories/FinancePage.stories.tsx @@ -9,7 +9,7 @@ import { PledgeType, Reward, RewardState, -} from '@polar-sh/sdk' +} from '@polar-sh/api' type Story = StoryObj diff --git a/clients/apps/web/src/stories/FinancePledgeList.stories.tsx b/clients/apps/web/src/stories/FinancePledgeList.stories.tsx index 46a62cd8c5..8d0df754f4 100644 --- a/clients/apps/web/src/stories/FinancePledgeList.stories.tsx +++ b/clients/apps/web/src/stories/FinancePledgeList.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react' import List, { Column } from '@/components/Finance/ListPledges' import { issue } from '@/utils/testdata' -import { Pledge, PledgeState, PledgeType } from '@polar-sh/sdk' +import { Pledge, PledgeState, PledgeType } from '@polar-sh/api' type Story = StoryObj diff --git a/clients/apps/web/src/stories/FinanceRewardsList.stories.tsx b/clients/apps/web/src/stories/FinanceRewardsList.stories.tsx index ca8c6fcc68..805b28a77b 100644 --- a/clients/apps/web/src/stories/FinanceRewardsList.stories.tsx +++ b/clients/apps/web/src/stories/FinanceRewardsList.stories.tsx @@ -8,7 +8,7 @@ import { PledgeType, Reward, RewardState, -} from '@polar-sh/sdk' +} from '@polar-sh/api' type Story = StoryObj diff --git a/clients/apps/web/src/stories/OpenGraphImageFunding.stories.tsx b/clients/apps/web/src/stories/OpenGraphImageFunding.stories.tsx index 3556f389f6..4721290f68 100644 --- a/clients/apps/web/src/stories/OpenGraphImageFunding.stories.tsx +++ b/clients/apps/web/src/stories/OpenGraphImageFunding.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react' import OpenGraphImageFunding from '@/components/Organization/OpenGraphImageFunding' import { issue, org } from '@/utils/testdata' -import { Reactions } from '@polar-sh/sdk' +import { Reactions } from '@polar-sh/api' const meta: Meta = { title: 'Organisms/OpenGraphImageFunding', diff --git a/clients/apps/web/src/utils/account.ts b/clients/apps/web/src/utils/account.ts index e7386e3c5a..262bd73e64 100644 --- a/clients/apps/web/src/utils/account.ts +++ b/clients/apps/web/src/utils/account.ts @@ -1,6 +1,6 @@ import OpenCollective from '@/components/Icons/OpenCollective' import Stripe from '@/components/Icons/Stripe' -import { AccountType, Status } from '@polar-sh/sdk' +import { AccountType, Status } from '@polar-sh/api' export const ALL_ACCOUNT_TYPES: AccountType[] = Object.values(AccountType) diff --git a/clients/apps/web/src/utils/api/errors.ts b/clients/apps/web/src/utils/api/errors.ts index 47579d8744..5475770ad4 100644 --- a/clients/apps/web/src/utils/api/errors.ts +++ b/clients/apps/web/src/utils/api/errors.ts @@ -1,4 +1,4 @@ -import { ResponseError, ValidationError } from '@polar-sh/sdk' +import { ResponseError, ValidationError } from '@polar-sh/api' import { FieldPath, FieldValues, UseFormSetError } from 'react-hook-form' type ValidationErrorsMap = Record diff --git a/clients/apps/web/src/utils/api/index.ts b/clients/apps/web/src/utils/api/index.ts index af8d4948de..9a1b588b3c 100644 --- a/clients/apps/web/src/utils/api/index.ts +++ b/clients/apps/web/src/utils/api/index.ts @@ -1,4 +1,4 @@ -import { Configuration, PolarAPI } from '@polar-sh/sdk' +import { Configuration, PolarAPI } from '@polar-sh/api' export { QueryClient, QueryClientProvider } from '@tanstack/react-query' export { queryClient } from './query' diff --git a/clients/apps/web/src/utils/api/serverside.ts b/clients/apps/web/src/utils/api/serverside.ts index 7377fbcc42..3d87f8d586 100644 --- a/clients/apps/web/src/utils/api/serverside.ts +++ b/clients/apps/web/src/utils/api/serverside.ts @@ -1,4 +1,4 @@ -import { PolarAPI } from '@polar-sh/sdk' +import { PolarAPI } from '@polar-sh/api' import { cookies, headers } from 'next/headers' import { cache } from 'react' import { buildServerSideAPI } from '.' diff --git a/clients/apps/web/src/utils/auth.ts b/clients/apps/web/src/utils/auth.ts index c8b8fc1582..f1baaddc48 100644 --- a/clients/apps/web/src/utils/auth.ts +++ b/clients/apps/web/src/utils/auth.ts @@ -6,7 +6,7 @@ import { IntegrationsGithubRepositoryBenefitApiIntegrationsGithubRepositoryBenefitUserAuthorizeRequest, IntegrationsGoogleApiIntegrationsGoogleAuthorizeRequest, MagicLinkApiMagicLinkAuthenticateRequest, -} from '@polar-sh/sdk' +} from '@polar-sh/api' export const getGitHubAuthorizeURL = ( params: IntegrationsGithubApiIntegrationsGithubAuthorizeRequest, diff --git a/clients/apps/web/src/utils/checkout.ts b/clients/apps/web/src/utils/checkout.ts index 37c3718168..7d597e2c01 100644 --- a/clients/apps/web/src/utils/checkout.ts +++ b/clients/apps/web/src/utils/checkout.ts @@ -1,4 +1,4 @@ -import { CheckoutPublic, PolarAPI, ResponseError } from '@polar-sh/sdk' +import { CheckoutPublic, PolarAPI, ResponseError } from '@polar-sh/api' import { notFound } from 'next/navigation' import { cache } from 'react' diff --git a/clients/apps/web/src/utils/customerPortal.ts b/clients/apps/web/src/utils/customerPortal.ts index 2869a6b69b..58c13affd8 100644 --- a/clients/apps/web/src/utils/customerPortal.ts +++ b/clients/apps/web/src/utils/customerPortal.ts @@ -1,4 +1,4 @@ -import { Organization, PolarAPI, ResponseError } from '@polar-sh/sdk' +import { Organization, PolarAPI, ResponseError } from '@polar-sh/api' import { notFound } from 'next/navigation' import { cache } from 'react' diff --git a/clients/apps/web/src/utils/discount.ts b/clients/apps/web/src/utils/discount.ts index 16f9121eeb..c0d4eb0a6c 100644 --- a/clients/apps/web/src/utils/discount.ts +++ b/clients/apps/web/src/utils/discount.ts @@ -5,7 +5,7 @@ import { CheckoutDiscountPercentageOnceForeverDuration, CheckoutDiscountPercentageRepeatDuration, DiscountType, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { formatCurrencyAndAmount } from '@polarkit/lib/money' const isDiscountFixed = ( diff --git a/clients/apps/web/src/utils/externalOrganization.ts b/clients/apps/web/src/utils/externalOrganization.ts index 9b1dee2d61..78e33e4c16 100644 --- a/clients/apps/web/src/utils/externalOrganization.ts +++ b/clients/apps/web/src/utils/externalOrganization.ts @@ -2,7 +2,7 @@ import { ExternalOrganization, InitOverrideFunction, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' export const getExternalOrganizationByName = async ( api: PolarAPI, diff --git a/clients/apps/web/src/utils/github.ts b/clients/apps/web/src/utils/github.ts index fc72409925..a1ebd1128e 100644 --- a/clients/apps/web/src/utils/github.ts +++ b/clients/apps/web/src/utils/github.ts @@ -1,4 +1,4 @@ -import { Issue } from '@polar-sh/sdk' +import { Issue } from '@polar-sh/api' export const githubIssueLink = (issue: Issue): string => { return `https://github.com/${issue.repository.organization.name}/${issue.repository.name}/issues/${issue.number}` diff --git a/clients/apps/web/src/utils/issue.ts b/clients/apps/web/src/utils/issue.ts index 70fa69cdc6..862dad18b2 100644 --- a/clients/apps/web/src/utils/issue.ts +++ b/clients/apps/web/src/utils/issue.ts @@ -4,7 +4,7 @@ import { IssuesApiListRequest, Organization, PolarAPI, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { getStorefront } from './storefront' const getIssueBy = async ( diff --git a/clients/apps/web/src/utils/metrics.ts b/clients/apps/web/src/utils/metrics.ts index d5d5b10fea..94ee3fa1f7 100644 --- a/clients/apps/web/src/utils/metrics.ts +++ b/clients/apps/web/src/utils/metrics.ts @@ -1,4 +1,4 @@ -import { Interval, Metric, MetricType } from '@polar-sh/sdk' +import { Interval, Metric, MetricType } from '@polar-sh/api' import { format, parse } from 'date-fns' import { formatCurrencyAndAmount } from 'polarkit/lib/money' diff --git a/clients/apps/web/src/utils/nav.ts b/clients/apps/web/src/utils/nav.ts index 32ec9ad428..9cbd4355b4 100644 --- a/clients/apps/web/src/utils/nav.ts +++ b/clients/apps/web/src/utils/nav.ts @@ -1,5 +1,5 @@ import { CONFIG } from '@/utils/config' -import { Organization } from '@polar-sh/sdk' +import { Organization } from '@polar-sh/api' export const organizationPageLink = ( org: Organization, diff --git a/clients/apps/web/src/utils/organization.ts b/clients/apps/web/src/utils/organization.ts index 06764ae539..6bfb05bda5 100644 --- a/clients/apps/web/src/utils/organization.ts +++ b/clients/apps/web/src/utils/organization.ts @@ -1,4 +1,4 @@ -import { Organization, PolarAPI } from '@polar-sh/sdk' +import { Organization, PolarAPI } from '@polar-sh/api' import { notFound } from 'next/navigation' import { cache } from 'react' diff --git a/clients/apps/web/src/utils/product.ts b/clients/apps/web/src/utils/product.ts index 54eb32be10..465ebdc4d4 100644 --- a/clients/apps/web/src/utils/product.ts +++ b/clients/apps/web/src/utils/product.ts @@ -5,7 +5,7 @@ import { ProductStorefront, ResponseError, SubscriptionRecurringInterval, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { notFound } from 'next/navigation' import { cache } from 'react' diff --git a/clients/apps/web/src/utils/repository.ts b/clients/apps/web/src/utils/repository.ts index de2a2f2ca0..3a7522194b 100644 --- a/clients/apps/web/src/utils/repository.ts +++ b/clients/apps/web/src/utils/repository.ts @@ -4,7 +4,7 @@ import { PolarAPI, RepositoriesApiListRequest, Repository, -} from '@polar-sh/sdk' +} from '@polar-sh/api' import { getStorefront } from './storefront' const getRepositoryBy = async ( diff --git a/clients/apps/web/src/utils/storefront.ts b/clients/apps/web/src/utils/storefront.ts index d9b1812651..65258f93d8 100644 --- a/clients/apps/web/src/utils/storefront.ts +++ b/clients/apps/web/src/utils/storefront.ts @@ -1,4 +1,4 @@ -import { PolarAPI, ResponseError, Storefront } from '@polar-sh/sdk' +import { PolarAPI, ResponseError, Storefront } from '@polar-sh/api' import { notFound } from 'next/navigation' import { cache } from 'react' diff --git a/clients/apps/web/src/utils/testdata.ts b/clients/apps/web/src/utils/testdata.ts index 11e933f103..811d555143 100644 --- a/clients/apps/web/src/utils/testdata.ts +++ b/clients/apps/web/src/utils/testdata.ts @@ -28,7 +28,7 @@ import { RewardPaidNotificationPayload, State, UserRead, -} from '@polar-sh/sdk' +} from '@polar-sh/api' export function addDays(date: Date, days: number) { var result = new Date(date) diff --git a/clients/apps/web/src/utils/user.ts b/clients/apps/web/src/utils/user.ts index f14acbd8ef..eec4932062 100644 --- a/clients/apps/web/src/utils/user.ts +++ b/clients/apps/web/src/utils/user.ts @@ -1,4 +1,4 @@ -import { Organization, PolarAPI, ResponseError, UserRead } from '@polar-sh/sdk' +import { Organization, PolarAPI, ResponseError, UserRead } from '@polar-sh/api' import { headers } from 'next/headers' import { cache } from 'react' diff --git a/clients/packages/sdk/.gitignore b/clients/packages/api/.gitignore similarity index 100% rename from clients/packages/sdk/.gitignore rename to clients/packages/api/.gitignore diff --git a/clients/packages/sdk/CHANGELOG.md b/clients/packages/api/CHANGELOG.md similarity index 94% rename from clients/packages/sdk/CHANGELOG.md rename to clients/packages/api/CHANGELOG.md index 783c388784..3015122e5b 100644 --- a/clients/packages/sdk/CHANGELOG.md +++ b/clients/packages/api/CHANGELOG.md @@ -1,4 +1,4 @@ -# @polar-sh/sdk +# @polar-sh/api ## 0.5.1 diff --git a/clients/packages/sdk/generate b/clients/packages/api/generate similarity index 100% rename from clients/packages/sdk/generate rename to clients/packages/api/generate diff --git a/clients/packages/sdk/openapi/README.md b/clients/packages/api/openapi/README.md similarity index 100% rename from clients/packages/sdk/openapi/README.md rename to clients/packages/api/openapi/README.md diff --git a/clients/packages/sdk/openapi_templates/apis.mustache b/clients/packages/api/openapi_templates/apis.mustache similarity index 100% rename from clients/packages/sdk/openapi_templates/apis.mustache rename to clients/packages/api/openapi_templates/apis.mustache diff --git a/clients/packages/sdk/openapi_templates/modelAnyOfInterfaces.mustache b/clients/packages/api/openapi_templates/modelAnyOfInterfaces.mustache similarity index 100% rename from clients/packages/sdk/openapi_templates/modelAnyOfInterfaces.mustache rename to clients/packages/api/openapi_templates/modelAnyOfInterfaces.mustache diff --git a/clients/packages/sdk/openapi_templates/models.index.mustache b/clients/packages/api/openapi_templates/models.index.mustache similarity index 100% rename from clients/packages/sdk/openapi_templates/models.index.mustache rename to clients/packages/api/openapi_templates/models.index.mustache diff --git a/clients/packages/sdk/openapi_templates/paramName.mustache b/clients/packages/api/openapi_templates/paramName.mustache similarity index 100% rename from clients/packages/sdk/openapi_templates/paramName.mustache rename to clients/packages/api/openapi_templates/paramName.mustache diff --git a/clients/packages/sdk/package.json b/clients/packages/api/package.json similarity index 95% rename from clients/packages/sdk/package.json rename to clients/packages/api/package.json index fd18d7bff3..77e1aae065 100644 --- a/clients/packages/sdk/package.json +++ b/clients/packages/api/package.json @@ -1,5 +1,5 @@ { - "name": "@polar-sh/sdk", + "name": "@polar-sh/api", "version": "0.5.2", "type": "module", "main": "./dist/index.js", @@ -25,4 +25,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/clients/packages/sdk/scripts/generate-schema.js b/clients/packages/api/scripts/generate-schema.js similarity index 100% rename from clients/packages/sdk/scripts/generate-schema.js rename to clients/packages/api/scripts/generate-schema.js diff --git a/clients/packages/sdk/src/client/.openapi-generator-ignore b/clients/packages/api/src/client/.openapi-generator-ignore similarity index 100% rename from clients/packages/sdk/src/client/.openapi-generator-ignore rename to clients/packages/api/src/client/.openapi-generator-ignore diff --git a/clients/packages/sdk/src/client/.openapi-generator/FILES b/clients/packages/api/src/client/.openapi-generator/FILES similarity index 100% rename from clients/packages/sdk/src/client/.openapi-generator/FILES rename to clients/packages/api/src/client/.openapi-generator/FILES diff --git a/clients/packages/sdk/src/client/.openapi-generator/VERSION b/clients/packages/api/src/client/.openapi-generator/VERSION similarity index 100% rename from clients/packages/sdk/src/client/.openapi-generator/VERSION rename to clients/packages/api/src/client/.openapi-generator/VERSION diff --git a/clients/packages/sdk/src/client/PolarAPI.ts b/clients/packages/api/src/client/PolarAPI.ts similarity index 100% rename from clients/packages/sdk/src/client/PolarAPI.ts rename to clients/packages/api/src/client/PolarAPI.ts diff --git a/clients/packages/sdk/src/client/apis/AccountsApi.ts b/clients/packages/api/src/client/apis/AccountsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/AccountsApi.ts rename to clients/packages/api/src/client/apis/AccountsApi.ts diff --git a/clients/packages/sdk/src/client/apis/AdvertisementsApi.ts b/clients/packages/api/src/client/apis/AdvertisementsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/AdvertisementsApi.ts rename to clients/packages/api/src/client/apis/AdvertisementsApi.ts diff --git a/clients/packages/sdk/src/client/apis/AuthApi.ts b/clients/packages/api/src/client/apis/AuthApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/AuthApi.ts rename to clients/packages/api/src/client/apis/AuthApi.ts diff --git a/clients/packages/sdk/src/client/apis/BackofficeApi.ts b/clients/packages/api/src/client/apis/BackofficeApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/BackofficeApi.ts rename to clients/packages/api/src/client/apis/BackofficeApi.ts diff --git a/clients/packages/sdk/src/client/apis/BenefitsApi.ts b/clients/packages/api/src/client/apis/BenefitsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/BenefitsApi.ts rename to clients/packages/api/src/client/apis/BenefitsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CheckoutLinksApi.ts b/clients/packages/api/src/client/apis/CheckoutLinksApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CheckoutLinksApi.ts rename to clients/packages/api/src/client/apis/CheckoutLinksApi.ts diff --git a/clients/packages/sdk/src/client/apis/CheckoutsApi.ts b/clients/packages/api/src/client/apis/CheckoutsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CheckoutsApi.ts rename to clients/packages/api/src/client/apis/CheckoutsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CheckoutsCustomApi.ts b/clients/packages/api/src/client/apis/CheckoutsCustomApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CheckoutsCustomApi.ts rename to clients/packages/api/src/client/apis/CheckoutsCustomApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomFieldsApi.ts b/clients/packages/api/src/client/apis/CustomFieldsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomFieldsApi.ts rename to clients/packages/api/src/client/apis/CustomFieldsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalBenefitGrantsApi.ts b/clients/packages/api/src/client/apis/CustomerPortalBenefitGrantsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalBenefitGrantsApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalBenefitGrantsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalCustomerSessionApi.ts b/clients/packages/api/src/client/apis/CustomerPortalCustomerSessionApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalCustomerSessionApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalCustomerSessionApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalCustomersApi.ts b/clients/packages/api/src/client/apis/CustomerPortalCustomersApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalCustomersApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalCustomersApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalDownloadablesApi.ts b/clients/packages/api/src/client/apis/CustomerPortalDownloadablesApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalDownloadablesApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalDownloadablesApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalLicenseKeysApi.ts b/clients/packages/api/src/client/apis/CustomerPortalLicenseKeysApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalLicenseKeysApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalLicenseKeysApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalOauthAccountsApi.ts b/clients/packages/api/src/client/apis/CustomerPortalOauthAccountsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalOauthAccountsApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalOauthAccountsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalOrdersApi.ts b/clients/packages/api/src/client/apis/CustomerPortalOrdersApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalOrdersApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalOrdersApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalOrganizationsApi.ts b/clients/packages/api/src/client/apis/CustomerPortalOrganizationsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalOrganizationsApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalOrganizationsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerPortalSubscriptionsApi.ts b/clients/packages/api/src/client/apis/CustomerPortalSubscriptionsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerPortalSubscriptionsApi.ts rename to clients/packages/api/src/client/apis/CustomerPortalSubscriptionsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomerSessionsApi.ts b/clients/packages/api/src/client/apis/CustomerSessionsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomerSessionsApi.ts rename to clients/packages/api/src/client/apis/CustomerSessionsApi.ts diff --git a/clients/packages/sdk/src/client/apis/CustomersApi.ts b/clients/packages/api/src/client/apis/CustomersApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/CustomersApi.ts rename to clients/packages/api/src/client/apis/CustomersApi.ts diff --git a/clients/packages/sdk/src/client/apis/DashboardApi.ts b/clients/packages/api/src/client/apis/DashboardApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/DashboardApi.ts rename to clients/packages/api/src/client/apis/DashboardApi.ts diff --git a/clients/packages/sdk/src/client/apis/DiscountsApi.ts b/clients/packages/api/src/client/apis/DiscountsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/DiscountsApi.ts rename to clients/packages/api/src/client/apis/DiscountsApi.ts diff --git a/clients/packages/sdk/src/client/apis/EmailUpdateApi.ts b/clients/packages/api/src/client/apis/EmailUpdateApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/EmailUpdateApi.ts rename to clients/packages/api/src/client/apis/EmailUpdateApi.ts diff --git a/clients/packages/sdk/src/client/apis/EmbedsApi.ts b/clients/packages/api/src/client/apis/EmbedsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/EmbedsApi.ts rename to clients/packages/api/src/client/apis/EmbedsApi.ts diff --git a/clients/packages/sdk/src/client/apis/ExternalOrganizationsApi.ts b/clients/packages/api/src/client/apis/ExternalOrganizationsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/ExternalOrganizationsApi.ts rename to clients/packages/api/src/client/apis/ExternalOrganizationsApi.ts diff --git a/clients/packages/sdk/src/client/apis/FilesApi.ts b/clients/packages/api/src/client/apis/FilesApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/FilesApi.ts rename to clients/packages/api/src/client/apis/FilesApi.ts diff --git a/clients/packages/sdk/src/client/apis/FundingApi.ts b/clients/packages/api/src/client/apis/FundingApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/FundingApi.ts rename to clients/packages/api/src/client/apis/FundingApi.ts diff --git a/clients/packages/sdk/src/client/apis/IntegrationsDiscordApi.ts b/clients/packages/api/src/client/apis/IntegrationsDiscordApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/IntegrationsDiscordApi.ts rename to clients/packages/api/src/client/apis/IntegrationsDiscordApi.ts diff --git a/clients/packages/sdk/src/client/apis/IntegrationsGithubApi.ts b/clients/packages/api/src/client/apis/IntegrationsGithubApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/IntegrationsGithubApi.ts rename to clients/packages/api/src/client/apis/IntegrationsGithubApi.ts diff --git a/clients/packages/sdk/src/client/apis/IntegrationsGithubRepositoryBenefitApi.ts b/clients/packages/api/src/client/apis/IntegrationsGithubRepositoryBenefitApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/IntegrationsGithubRepositoryBenefitApi.ts rename to clients/packages/api/src/client/apis/IntegrationsGithubRepositoryBenefitApi.ts diff --git a/clients/packages/sdk/src/client/apis/IntegrationsGoogleApi.ts b/clients/packages/api/src/client/apis/IntegrationsGoogleApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/IntegrationsGoogleApi.ts rename to clients/packages/api/src/client/apis/IntegrationsGoogleApi.ts diff --git a/clients/packages/sdk/src/client/apis/IssuesApi.ts b/clients/packages/api/src/client/apis/IssuesApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/IssuesApi.ts rename to clients/packages/api/src/client/apis/IssuesApi.ts diff --git a/clients/packages/sdk/src/client/apis/LicenseKeysApi.ts b/clients/packages/api/src/client/apis/LicenseKeysApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/LicenseKeysApi.ts rename to clients/packages/api/src/client/apis/LicenseKeysApi.ts diff --git a/clients/packages/sdk/src/client/apis/MagicLinkApi.ts b/clients/packages/api/src/client/apis/MagicLinkApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/MagicLinkApi.ts rename to clients/packages/api/src/client/apis/MagicLinkApi.ts diff --git a/clients/packages/sdk/src/client/apis/MetricsApi.ts b/clients/packages/api/src/client/apis/MetricsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/MetricsApi.ts rename to clients/packages/api/src/client/apis/MetricsApi.ts diff --git a/clients/packages/sdk/src/client/apis/NotificationsApi.ts b/clients/packages/api/src/client/apis/NotificationsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/NotificationsApi.ts rename to clients/packages/api/src/client/apis/NotificationsApi.ts diff --git a/clients/packages/sdk/src/client/apis/Oauth2Api.ts b/clients/packages/api/src/client/apis/Oauth2Api.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/Oauth2Api.ts rename to clients/packages/api/src/client/apis/Oauth2Api.ts diff --git a/clients/packages/sdk/src/client/apis/Oauth2ClientsApi.ts b/clients/packages/api/src/client/apis/Oauth2ClientsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/Oauth2ClientsApi.ts rename to clients/packages/api/src/client/apis/Oauth2ClientsApi.ts diff --git a/clients/packages/sdk/src/client/apis/OrdersApi.ts b/clients/packages/api/src/client/apis/OrdersApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/OrdersApi.ts rename to clients/packages/api/src/client/apis/OrdersApi.ts diff --git a/clients/packages/sdk/src/client/apis/OrganizationsApi.ts b/clients/packages/api/src/client/apis/OrganizationsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/OrganizationsApi.ts rename to clients/packages/api/src/client/apis/OrganizationsApi.ts diff --git a/clients/packages/sdk/src/client/apis/PaymentMethodsApi.ts b/clients/packages/api/src/client/apis/PaymentMethodsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/PaymentMethodsApi.ts rename to clients/packages/api/src/client/apis/PaymentMethodsApi.ts diff --git a/clients/packages/sdk/src/client/apis/PersonalAccessTokenApi.ts b/clients/packages/api/src/client/apis/PersonalAccessTokenApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/PersonalAccessTokenApi.ts rename to clients/packages/api/src/client/apis/PersonalAccessTokenApi.ts diff --git a/clients/packages/sdk/src/client/apis/PledgesApi.ts b/clients/packages/api/src/client/apis/PledgesApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/PledgesApi.ts rename to clients/packages/api/src/client/apis/PledgesApi.ts diff --git a/clients/packages/sdk/src/client/apis/ProductsApi.ts b/clients/packages/api/src/client/apis/ProductsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/ProductsApi.ts rename to clients/packages/api/src/client/apis/ProductsApi.ts diff --git a/clients/packages/sdk/src/client/apis/PullRequestsApi.ts b/clients/packages/api/src/client/apis/PullRequestsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/PullRequestsApi.ts rename to clients/packages/api/src/client/apis/PullRequestsApi.ts diff --git a/clients/packages/sdk/src/client/apis/RepositoriesApi.ts b/clients/packages/api/src/client/apis/RepositoriesApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/RepositoriesApi.ts rename to clients/packages/api/src/client/apis/RepositoriesApi.ts diff --git a/clients/packages/sdk/src/client/apis/RewardsApi.ts b/clients/packages/api/src/client/apis/RewardsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/RewardsApi.ts rename to clients/packages/api/src/client/apis/RewardsApi.ts diff --git a/clients/packages/sdk/src/client/apis/StorefrontsApi.ts b/clients/packages/api/src/client/apis/StorefrontsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/StorefrontsApi.ts rename to clients/packages/api/src/client/apis/StorefrontsApi.ts diff --git a/clients/packages/sdk/src/client/apis/SubscriptionsApi.ts b/clients/packages/api/src/client/apis/SubscriptionsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/SubscriptionsApi.ts rename to clients/packages/api/src/client/apis/SubscriptionsApi.ts diff --git a/clients/packages/sdk/src/client/apis/TransactionsApi.ts b/clients/packages/api/src/client/apis/TransactionsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/TransactionsApi.ts rename to clients/packages/api/src/client/apis/TransactionsApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersAdvertisementsApi.ts b/clients/packages/api/src/client/apis/UsersAdvertisementsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersAdvertisementsApi.ts rename to clients/packages/api/src/client/apis/UsersAdvertisementsApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersApi.ts b/clients/packages/api/src/client/apis/UsersApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersApi.ts rename to clients/packages/api/src/client/apis/UsersApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersBenefitsApi.ts b/clients/packages/api/src/client/apis/UsersBenefitsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersBenefitsApi.ts rename to clients/packages/api/src/client/apis/UsersBenefitsApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersDownloadablesApi.ts b/clients/packages/api/src/client/apis/UsersDownloadablesApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersDownloadablesApi.ts rename to clients/packages/api/src/client/apis/UsersDownloadablesApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersLicenseKeysApi.ts b/clients/packages/api/src/client/apis/UsersLicenseKeysApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersLicenseKeysApi.ts rename to clients/packages/api/src/client/apis/UsersLicenseKeysApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersOrdersApi.ts b/clients/packages/api/src/client/apis/UsersOrdersApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersOrdersApi.ts rename to clients/packages/api/src/client/apis/UsersOrdersApi.ts diff --git a/clients/packages/sdk/src/client/apis/UsersSubscriptionsApi.ts b/clients/packages/api/src/client/apis/UsersSubscriptionsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/UsersSubscriptionsApi.ts rename to clients/packages/api/src/client/apis/UsersSubscriptionsApi.ts diff --git a/clients/packages/sdk/src/client/apis/WebhookNotificationsApi.ts b/clients/packages/api/src/client/apis/WebhookNotificationsApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/WebhookNotificationsApi.ts rename to clients/packages/api/src/client/apis/WebhookNotificationsApi.ts diff --git a/clients/packages/sdk/src/client/apis/WebhooksApi.ts b/clients/packages/api/src/client/apis/WebhooksApi.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/WebhooksApi.ts rename to clients/packages/api/src/client/apis/WebhooksApi.ts diff --git a/clients/packages/sdk/src/client/apis/index.ts b/clients/packages/api/src/client/apis/index.ts similarity index 100% rename from clients/packages/sdk/src/client/apis/index.ts rename to clients/packages/api/src/client/apis/index.ts diff --git a/clients/packages/sdk/src/client/index.ts b/clients/packages/api/src/client/index.ts similarity index 100% rename from clients/packages/sdk/src/client/index.ts rename to clients/packages/api/src/client/index.ts diff --git a/clients/packages/sdk/src/client/models/index.ts b/clients/packages/api/src/client/models/index.ts similarity index 100% rename from clients/packages/sdk/src/client/models/index.ts rename to clients/packages/api/src/client/models/index.ts diff --git a/clients/packages/sdk/src/client/runtime.ts b/clients/packages/api/src/client/runtime.ts similarity index 100% rename from clients/packages/sdk/src/client/runtime.ts rename to clients/packages/api/src/client/runtime.ts diff --git a/clients/packages/sdk/src/index.ts b/clients/packages/api/src/index.ts similarity index 100% rename from clients/packages/sdk/src/index.ts rename to clients/packages/api/src/index.ts diff --git a/clients/packages/sdk/tsconfig.json b/clients/packages/api/tsconfig.json similarity index 100% rename from clients/packages/sdk/tsconfig.json rename to clients/packages/api/tsconfig.json diff --git a/clients/packages/polarkit/package.json b/clients/packages/polarkit/package.json index 254d780e43..de2163615a 100644 --- a/clients/packages/polarkit/package.json +++ b/clients/packages/polarkit/package.json @@ -54,7 +54,7 @@ "@hookform/resolvers": "^3.10.0", "@mui/icons-material": "^6.1.8", "@mui/material": "^6.1.8", - "@polar-sh/sdk": "workspace:*", + "@polar-sh/api": "workspace:*", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-alert-dialog": "^1.1.2", "@radix-ui/react-checkbox": "^1.0.4", @@ -98,4 +98,4 @@ "tsconfig": "workspace:*", "typescript": "5.3.3" } -} +} \ No newline at end of file diff --git a/clients/packages/sdk/README.md b/clients/packages/sdk/README.md deleted file mode 100644 index 570ad39842..0000000000 --- a/clients/packages/sdk/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Polar SDK - -The Polar SDK is a JavaScript library with capabilities to interact with the Polar API. - -The SDK is compatible with both browser & server-side runtimes. The API client is automatically generated from our OpenAPI implementation, making it up-to-date with the server-side API at any time. - -[Read more about our OpenAPI Schema & documentation](https://docs.polar.sh/api-reference) - -## Usage - -The SDK is available from NPM. - -`npm install @polar-sh/sdk` - -Once installed, you may import the SDK like you usually would: - -```typescript -import { Configuration, PolarAPI } from '@polar-sh/sdk' - -const api = new PolarAPI() - -const authedApi = new PolarAPI( - new Configuration({ - accessToken: '', - }), -) -``` - -### Access Tokens - -You can acquire an access token through your [Settings page](https://polar.sh/settings). This can be used to authenticate yourself with the API for create/update/delete actions. - -## Examples - -### Issues looking for funding - -You can easily retrieve issues looking for funding using the Funding-service. - -```typescript -import { - Configuration, - ListFundingSortBy, - Platforms, - PolarAPI, -} from '@polar-sh/sdk' - -const api = new PolarAPI(new Configuration()) - -const issuesFunding = await api.funding.search({ - platform: Platforms.GITHUB, - organizationName: '', - badged: true, - closed: false, - sorting: [ - ListFundingSortBy.MOST_FUNDED, - ListFundingSortBy.MOST_ENGAGEMENT, - ListFundingSortBy.NEWEST, - ], - limit: 20, -}) -``` - -### Issue data from GitHub Issue - -Retrieve Polar data about a given GitHub issue. - -```typescript -import { Configuration, PolarAPI } from '@polar-sh/sdk' - -const api = new PolarAPI(new Configuration()) - -const params = { - organization: 'polarsource', - repo: 'polar', - number: 900, -} - -const issue = await api.issues.lookup({ - externalUrl: `https://github.com/${params.organization}/${params.repo}/issues/${params.number}`, -}) -``` - -### Add Polar badge to a GitHub issue - -Adds a Polar badge to a given GitHub issue. - -```typescript -import { Configuration, PolarAPI } from '@polar-sh/sdk' - -const api = new PolarAPI( - new Configuration({ - accessToken: '', - }), -) - -await api.issues.addPolarBadge({ - id: '', -}) -``` diff --git a/clients/pnpm-lock.yaml b/clients/pnpm-lock.yaml index 4d3b83fede..f893463b95 100644 --- a/clients/pnpm-lock.yaml +++ b/clients/pnpm-lock.yaml @@ -83,15 +83,15 @@ importers: '@observablehq/plot': specifier: ^0.6.16 version: 0.6.16 + '@polar-sh/api': + specifier: workspace:* + version: link:../../packages/api '@polar-sh/checkout': specifier: workspace:^ version: link:../../packages/checkout '@polar-sh/mdx': specifier: workspace:* version: link:../../packages/mdx - '@polar-sh/sdk': - specifier: workspace:* - version: link:../../packages/sdk '@radix-ui/react-dropdown-menu': specifier: ^2.1.2 version: 2.1.2(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -436,6 +436,18 @@ importers: specifier: ^14.1.1 version: 14.1.1 + packages/api: + devDependencies: + tsconfig: + specifier: workspace:* + version: link:../tsconfig + tsup: + specifier: ^8.3.5 + version: 8.3.5(jiti@1.21.7)(postcss@8.4.49)(typescript@5.3.3)(yaml@2.6.0) + typescript: + specifier: 5.3.3 + version: 5.3.3 + packages/checkout: devDependencies: terser: @@ -498,9 +510,9 @@ importers: '@mui/material': specifier: ^6.1.8 version: 6.2.1(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react@18.3.1))(@types/react@18.3.18)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@polar-sh/sdk': + '@polar-sh/api': specifier: workspace:* - version: link:../sdk + version: link:../api '@radix-ui/react-accordion': specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -623,18 +635,6 @@ importers: specifier: 5.3.3 version: 5.3.3 - packages/sdk: - devDependencies: - tsconfig: - specifier: workspace:* - version: link:../tsconfig - tsup: - specifier: ^8.3.5 - version: 8.3.5(jiti@1.21.7)(postcss@8.4.49)(typescript@5.3.3)(yaml@2.6.0) - typescript: - specifier: 5.3.3 - version: 5.3.3 - packages/tsconfig: {} packages: @@ -5673,15 +5673,6 @@ packages: supports-color: optional: true - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -7324,10 +7315,6 @@ packages: lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} - lilconfig@3.1.1: - resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} - engines: {node: '>=14'} - lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -7779,9 +7766,6 @@ packages: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -10169,7 +10153,7 @@ snapshots: dependencies: '@babel/helper-validator-identifier': 7.25.9 js-tokens: 4.0.0 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/compat-data@7.23.5': {} @@ -10188,7 +10172,7 @@ snapshots: '@babel/traverse': 7.24.0 '@babel/types': 7.24.0 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.7 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -11167,7 +11151,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.24.0 '@babel/types': 7.24.0 - debug: 4.3.4 + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -13596,7 +13580,7 @@ snapshots: '@rollup/pluginutils@5.1.0(rollup@3.29.5)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: @@ -14425,7 +14409,7 @@ snapshots: '@types/acorn@4.0.6': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/aria-query@5.0.4': {} @@ -14588,16 +14572,16 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 8.56.5 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/eslint@8.56.5': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 '@types/estree-jsx@1.0.5': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/estree@1.0.5': {} @@ -16117,10 +16101,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4: - dependencies: - ms: 2.1.2 - debug@4.3.7: dependencies: ms: 2.1.3 @@ -16781,7 +16761,7 @@ snapshots: estree-util-attach-comments@3.0.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-util-build-jsx@3.0.1: dependencies: @@ -16811,7 +16791,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: {} @@ -17277,7 +17257,7 @@ snapshots: hast-util-to-estree@3.1.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.4 comma-separated-tokens: 2.0.3 @@ -17312,7 +17292,7 @@ snapshots: hast-util-to-jsx-runtime@2.3.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/hast': 3.0.4 '@types/unist': 3.0.2 comma-separated-tokens: 2.0.3 @@ -17641,11 +17621,11 @@ snapshots: is-reference@1.2.1: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-reference@3.0.2: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-regex@1.1.4: dependencies: @@ -18259,8 +18239,6 @@ snapshots: dependencies: immediate: 3.0.6 - lilconfig@3.1.1: {} - lilconfig@3.1.3: {} linebreak@1.1.0: @@ -18672,7 +18650,7 @@ snapshots: micromark-extension-mdx-expression@3.0.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 micromark-factory-mdx-expression: 2.0.1 micromark-factory-space: 2.0.0 @@ -18684,7 +18662,7 @@ snapshots: micromark-extension-mdx-jsx@3.0.0: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 estree-util-is-identifier-name: 3.0.0 micromark-factory-mdx-expression: 2.0.1 @@ -18700,7 +18678,7 @@ snapshots: micromark-extension-mdxjs-esm@3.0.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 micromark-util-character: 2.1.0 @@ -18736,7 +18714,7 @@ snapshots: micromark-factory-mdx-expression@2.0.1: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 devlop: 1.1.0 micromark-util-character: 2.1.0 micromark-util-events-to-acorn: 2.0.2 @@ -18800,7 +18778,7 @@ snapshots: micromark-util-events-to-acorn@2.0.2: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/unist': 3.0.2 devlop: 1.1.0 estree-util-visit: 2.0.0 @@ -18838,7 +18816,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.4 + debug: 4.3.7 decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -18945,8 +18923,6 @@ snapshots: mrmime@2.0.0: {} - ms@2.1.2: {} - ms@2.1.3: {} mz@2.7.0: @@ -19377,7 +19353,7 @@ snapshots: periscopic@3.1.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 3.0.3 is-reference: 3.0.2 @@ -19461,7 +19437,7 @@ snapshots: postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.4.49)(yaml@2.6.0): dependencies: - lilconfig: 3.1.1 + lilconfig: 3.1.3 optionalDependencies: jiti: 1.21.7 postcss: 8.4.49 @@ -19524,7 +19500,7 @@ snapshots: postcss@8.4.31: dependencies: nanoid: 3.3.7 - picocolors: 1.1.0 + picocolors: 1.1.1 source-map-js: 1.2.1 postcss@8.4.49: @@ -21141,19 +21117,19 @@ snapshots: dependencies: browserslist: 4.23.0 escalade: 3.1.2 - picocolors: 1.1.0 + picocolors: 1.1.1 update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: browserslist: 4.24.0 escalade: 3.2.0 - picocolors: 1.1.0 + picocolors: 1.1.1 update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: browserslist: 4.24.2 escalade: 3.2.0 - picocolors: 1.1.0 + picocolors: 1.1.1 uri-js@4.4.1: dependencies: @@ -21306,7 +21282,7 @@ snapshots: webpack@5.91.0(esbuild@0.19.12): dependencies: '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/wasm-edit': 1.12.1 '@webassemblyjs/wasm-parser': 1.12.1