@paddle/paddle-node-sdk 2.2.1 → 2.2.2

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/CHANGELOG.md CHANGED
@@ -12,6 +12,12 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a
12
12
 
13
13
  This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards.
14
14
 
15
+ ## 2.2.2 - 2024-12-16
16
+
17
+ ### Fixed
18
+
19
+ - `discount.startsAt` for Subscriptions can now be `null`
20
+
15
21
  ## 2.2.1 - 2024-12-16
16
22
 
17
23
  ### Fixed
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubscriptionDiscount = void 0;
4
4
  class SubscriptionDiscount {
5
5
  constructor(subscriptionDiscount) {
6
- var _a;
6
+ var _a, _b;
7
7
  this.id = subscriptionDiscount.id;
8
- this.startsAt = subscriptionDiscount.starts_at;
9
- this.endsAt = (_a = subscriptionDiscount.ends_at) !== null && _a !== void 0 ? _a : null;
8
+ this.startsAt = (_a = subscriptionDiscount.starts_at) !== null && _a !== void 0 ? _a : null;
9
+ this.endsAt = (_b = subscriptionDiscount.ends_at) !== null && _b !== void 0 ? _b : null;
10
10
  }
11
11
  }
12
12
  exports.SubscriptionDiscount = SubscriptionDiscount;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '2.2.1';
4
+ exports.SDK_VERSION = '2.2.2';
@@ -1,8 +1,8 @@
1
1
  export class SubscriptionDiscount {
2
2
  constructor(subscriptionDiscount) {
3
- var _a;
3
+ var _a, _b;
4
4
  this.id = subscriptionDiscount.id;
5
- this.startsAt = subscriptionDiscount.starts_at;
6
- this.endsAt = (_a = subscriptionDiscount.ends_at) !== null && _a !== void 0 ? _a : null;
5
+ this.startsAt = (_a = subscriptionDiscount.starts_at) !== null && _a !== void 0 ? _a : null;
6
+ this.endsAt = (_b = subscriptionDiscount.ends_at) !== null && _b !== void 0 ? _b : null;
7
7
  }
8
8
  }
@@ -1 +1 @@
1
- export const SDK_VERSION = '2.2.1';
1
+ export const SDK_VERSION = '2.2.2';
@@ -1,7 +1,7 @@
1
1
  import { type ISubscriptionDiscountResponse } from '../../types/index.js';
2
2
  export declare class SubscriptionDiscount {
3
3
  readonly id: string;
4
- readonly startsAt: string;
4
+ readonly startsAt: string | null;
5
5
  readonly endsAt: string | null;
6
6
  constructor(subscriptionDiscount: ISubscriptionDiscountResponse);
7
7
  }
@@ -1,5 +1,5 @@
1
1
  export interface ISubscriptionDiscountResponse {
2
2
  id: string;
3
- starts_at: string;
3
+ starts_at: string | null;
4
4
  ends_at?: string | null;
5
5
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.2.1";
1
+ export declare const SDK_VERSION = "2.2.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddle/paddle-node-sdk",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
5
5
  "main": "dist/cjs/index.cjs.node.js",
6
6
  "module": "dist/esm/index.esm.node.js",