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