@paykit-sdk/polar 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -180,7 +180,6 @@ POLAR_WEBHOOK_SECRET=your-webhook-secret
180
180
  ## Support
181
181
 
182
182
  - [Polar Documentation](https://docs.polar.sh/)
183
- - [PayKit Issues](https://github.com/devodii/paykit/issues)
184
183
 
185
184
  ## License
186
185
 
package/dist/index.js CHANGED
@@ -60,7 +60,8 @@ var toPaykitSubscription = (subscription) => {
60
60
  customer_id: subscription.customerId,
61
61
  status: toPaykitSubscriptionStatus(subscription.status),
62
62
  current_period_start: new Date(subscription.currentPeriodStart),
63
- current_period_end: new Date(subscription.currentPeriodEnd)
63
+ current_period_end: new Date(subscription.currentPeriodEnd),
64
+ metadata: (0, import_core.stringifyObjectValues)({ ...subscription.metadata ?? {}, customFieldData: subscription.customFieldData })
64
65
  };
65
66
  };
66
67
  var toPaykitInvoice = (invoice) => {
@@ -138,7 +139,6 @@ var PolarProvider = class {
138
139
  },
139
140
  {}
140
141
  );
141
- console.log({ headers, webhookHeaders, webhookSecret, body });
142
142
  const { data, type } = (0, import_webhooks.validateEvent)(body, webhookHeaders, webhookSecret);
143
143
  const id = webhookHeaders["webhook-id"];
144
144
  const timestamp = webhookHeaders["webhook-timestamp"];
package/dist/index.mjs CHANGED
@@ -38,7 +38,8 @@ var toPaykitSubscription = (subscription) => {
38
38
  customer_id: subscription.customerId,
39
39
  status: toPaykitSubscriptionStatus(subscription.status),
40
40
  current_period_start: new Date(subscription.currentPeriodStart),
41
- current_period_end: new Date(subscription.currentPeriodEnd)
41
+ current_period_end: new Date(subscription.currentPeriodEnd),
42
+ metadata: stringifyObjectValues({ ...subscription.metadata ?? {}, customFieldData: subscription.customFieldData })
42
43
  };
43
44
  };
44
45
  var toPaykitInvoice = (invoice) => {
@@ -116,7 +117,6 @@ var PolarProvider = class {
116
117
  },
117
118
  {}
118
119
  );
119
- console.log({ headers, webhookHeaders, webhookSecret, body });
120
120
  const { data, type } = validateEvent(body, webhookHeaders, webhookSecret);
121
121
  const id = webhookHeaders["webhook-id"];
122
122
  const timestamp = webhookHeaders["webhook-timestamp"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paykit-sdk/polar",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Polar provider for PayKit",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -24,7 +24,7 @@
24
24
  "@polar-sh/sdk": "^0.33.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@paykit-sdk/core": "^1.1.2"
27
+ "@paykit-sdk/core": "^1.1.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@paykit-sdk/core": "workspace:*",