mirror of
https://github.com/LukeHagar/polar.git
synced 2025-12-06 12:47:46 +00:00
update and pin polar dependencies
This commit is contained in:
@@ -93,8 +93,8 @@
|
||||
"types": "./dist/commonjs/client/index.d.ts",
|
||||
"module": "./dist/esm/client/index.js",
|
||||
"dependencies": {
|
||||
"@polar-sh/checkout": "^0.1.10",
|
||||
"@polar-sh/sdk": "^0.32.3",
|
||||
"@polar-sh/checkout": "0.1.10",
|
||||
"@polar-sh/sdk": "0.32.11",
|
||||
"buffer": "^6.0.3",
|
||||
"convex-helpers": "^0.1.63",
|
||||
"remeda": "^2.20.2",
|
||||
|
||||
@@ -129,7 +129,7 @@ export class Polar<
|
||||
embedOrigin: origin,
|
||||
successUrl,
|
||||
...(productIds.length === 1
|
||||
? { productId: productIds[0] }
|
||||
? { products: productIds }
|
||||
: { products: productIds }),
|
||||
});
|
||||
}
|
||||
@@ -225,8 +225,8 @@ export class Polar<
|
||||
await this.sdk.subscriptions.update({
|
||||
id: subscription.id,
|
||||
subscriptionUpdate: {
|
||||
cancelAtPeriodEnd: revokeImmediately ? null : true,
|
||||
revoke: revokeImmediately ? true : null,
|
||||
cancelAtPeriodEnd: revokeImmediately ? undefined : true,
|
||||
revoke: revokeImmediately ? true : undefined,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export default defineSchema(
|
||||
startedAt: v.union(v.string(), v.null()),
|
||||
endedAt: v.union(v.string(), v.null()),
|
||||
productId: v.string(),
|
||||
priceId: v.string(),
|
||||
priceId: v.optional(v.string()),
|
||||
checkoutId: v.union(v.string(), v.null()),
|
||||
metadata: v.record(v.string(), v.any()),
|
||||
customerCancellationReason: v.optional(v.union(v.string(), v.null())),
|
||||
|
||||
@@ -80,7 +80,6 @@ export const convertToDatabaseSubscription = (
|
||||
createdAt: subscription.createdAt.toISOString(),
|
||||
modifiedAt: subscription.modifiedAt?.toISOString() ?? null,
|
||||
productId: subscription.productId,
|
||||
priceId: subscription.priceId,
|
||||
checkoutId: subscription.checkoutId,
|
||||
amount: subscription.amount,
|
||||
currency: subscription.currency,
|
||||
|
||||
Reference in New Issue
Block a user