Skip to content

Commit 49d1750

Browse files
committed
update and pin polar dependencies
1 parent 3bbe315 commit 49d1750

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
"types": "./dist/commonjs/client/index.d.ts",
9494
"module": "./dist/esm/client/index.js",
9595
"dependencies": {
96-
"@polar-sh/checkout": "^0.1.10",
97-
"@polar-sh/sdk": "^0.32.3",
96+
"@polar-sh/checkout": "0.1.10",
97+
"@polar-sh/sdk": "0.32.11",
9898
"buffer": "^6.0.3",
9999
"convex-helpers": "^0.1.63",
100100
"remeda": "^2.20.2",

src/client/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class Polar<
129129
embedOrigin: origin,
130130
successUrl,
131131
...(productIds.length === 1
132-
? { productId: productIds[0] }
132+
? { products: productIds }
133133
: { products: productIds }),
134134
});
135135
}
@@ -225,8 +225,8 @@ export class Polar<
225225
await this.sdk.subscriptions.update({
226226
id: subscription.id,
227227
subscriptionUpdate: {
228-
cancelAtPeriodEnd: revokeImmediately ? null : true,
229-
revoke: revokeImmediately ? true : null,
228+
cancelAtPeriodEnd: revokeImmediately ? undefined : true,
229+
revoke: revokeImmediately ? true : undefined,
230230
},
231231
});
232232
}

src/component/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default defineSchema(
8282
startedAt: v.union(v.string(), v.null()),
8383
endedAt: v.union(v.string(), v.null()),
8484
productId: v.string(),
85-
priceId: v.string(),
85+
priceId: v.optional(v.string()),
8686
checkoutId: v.union(v.string(), v.null()),
8787
metadata: v.record(v.string(), v.any()),
8888
customerCancellationReason: v.optional(v.union(v.string(), v.null())),

src/component/util.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export const convertToDatabaseSubscription = (
8080
createdAt: subscription.createdAt.toISOString(),
8181
modifiedAt: subscription.modifiedAt?.toISOString() ?? null,
8282
productId: subscription.productId,
83-
priceId: subscription.priceId,
8483
checkoutId: subscription.checkoutId,
8584
amount: subscription.amount,
8685
currency: subscription.currency,

0 commit comments

Comments
 (0)