@paddle/paddle-node-sdk 0.2.6 → 0.2.7

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
@@ -8,6 +8,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
8
 
9
9
  Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-node-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.
10
10
 
11
+ ## 0.2.7 - 2024-01-04
12
+
13
+ ### Fixed
14
+
15
+ - Marked all properties in `ListNotificationQueryParameters` as optional.
16
+ - Removed additional `?` from URLS in List Reports and List Notifications functions.
17
+ - Fixed incorrect enum in Adjustment `type`
18
+
19
+ ---
20
+
11
21
  ## 0.2.6 - 2023-12-22
12
22
 
13
23
  ### Added
@@ -4,5 +4,4 @@ export declare class AdjustmentTotalsBreakdown {
4
4
  readonly refund: string;
5
5
  readonly chargeback: string;
6
6
  constructor(adjustmentTotalsBreakdown: IAdjustmentTotalsBreakdown);
7
- toJson(): IAdjustmentTotalsBreakdown;
8
7
  }
@@ -7,12 +7,5 @@ class AdjustmentTotalsBreakdown {
7
7
  this.refund = adjustmentTotalsBreakdown.refund;
8
8
  this.chargeback = adjustmentTotalsBreakdown.chargeback;
9
9
  }
10
- toJson() {
11
- return {
12
- credit: this.credit,
13
- refund: this.refund,
14
- chargeback: this.chargeback,
15
- };
16
- }
17
10
  }
18
11
  exports.AdjustmentTotalsBreakdown = AdjustmentTotalsBreakdown;
@@ -1,10 +1,10 @@
1
1
  import { type ITransactionAdjustmentItemResponse } from '../../types';
2
- import { TransactionProration, AdjustmentItemTotals } from '../index';
3
- import { type PaymentType } from '../../enums';
2
+ import { AdjustmentItemTotals, TransactionProration } from '../index';
3
+ import { type AdjustmentType } from '../../enums';
4
4
  export declare class TransactionAdjustmentItem {
5
5
  readonly id: string | null;
6
6
  readonly itemId: string;
7
- readonly type: PaymentType;
7
+ readonly type: AdjustmentType;
8
8
  readonly amount: string | null;
9
9
  readonly proration: TransactionProration | null;
10
10
  readonly totals: AdjustmentItemTotals | null;
@@ -36,7 +36,7 @@ __exportStar(require("./operations"), exports);
36
36
  class NotificationsResource extends base_1.BaseResource {
37
37
  list(queryParams) {
38
38
  const queryParameters = new base_1.QueryParameters(queryParams);
39
- return new entities_1.NotificationCollection(this.client, NotificationPaths.list + '?' + queryParameters.toQueryString());
39
+ return new entities_1.NotificationCollection(this.client, NotificationPaths.list + queryParameters.toQueryString());
40
40
  }
41
41
  get(notificationId) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
@@ -63,7 +63,7 @@ class NotificationsResource extends base_1.BaseResource {
63
63
  const urlWithPathParams = new base_1.PathParameters(NotificationPaths.getLogs, {
64
64
  notification_id: notificationId,
65
65
  }).deriveUrl();
66
- return new entities_1.NotificationLogCollection(this.client, urlWithPathParams + '?' + queryParameters.toQueryString());
66
+ return new entities_1.NotificationLogCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
67
67
  }
68
68
  }
69
69
  exports.NotificationsResource = NotificationsResource;
@@ -1,12 +1,12 @@
1
1
  import { type NotificationStatus } from '../../../enums';
2
2
  export interface ListNotificationQueryParameters {
3
- after: string;
4
- notificationSettingId: string[];
5
- orderBy: string;
6
- perPage: number;
7
- search: string;
8
- status: NotificationStatus[];
9
- filter: string;
10
- to: string;
11
- from: string;
3
+ after?: string;
4
+ notificationSettingId?: string[];
5
+ orderBy?: string;
6
+ perPage?: number;
7
+ search?: string;
8
+ status?: NotificationStatus[];
9
+ filter?: string;
10
+ to?: string;
11
+ from?: string;
12
12
  }
@@ -36,7 +36,7 @@ __exportStar(require("./operations"), exports);
36
36
  class ReportsResource extends base_1.BaseResource {
37
37
  list(queryParams) {
38
38
  const queryParameters = new base_1.QueryParameters(queryParams);
39
- return new entities_1.ReportCollection(this.client, ReportPaths.list + '?' + queryParameters.toQueryString());
39
+ return new entities_1.ReportCollection(this.client, ReportPaths.list + queryParameters.toQueryString());
40
40
  }
41
41
  create(createReportParameters) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,9 +1,9 @@
1
- import { type ITransactionProrationResponse, type IAdjustmentItemTotals } from '../index';
2
- import { type PaymentType } from '../../enums';
1
+ import { type IAdjustmentItemTotals, type ITransactionProrationResponse } from '../index';
2
+ import { type AdjustmentType } from '../../enums';
3
3
  export interface ITransactionAdjustmentItemResponse {
4
4
  id?: string | null;
5
5
  item_id: string;
6
- type: PaymentType;
6
+ type: AdjustmentType;
7
7
  amount?: string | null;
8
8
  proration?: ITransactionProrationResponse | null;
9
9
  totals?: IAdjustmentItemTotals | null;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.2.6";
1
+ export declare const SDK_VERSION = "0.2.7";
package/dist/version.js CHANGED
@@ -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 = '0.2.6';
4
+ exports.SDK_VERSION = '0.2.7';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddle/paddle-node-sdk",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "A NodeJS SDK for Paddle Billing API",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",