@paddle/paddle-node-sdk 1.0.1 → 1.1.0

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +27 -1
  3. package/dist/entities/address/address.d.ts +1 -0
  4. package/dist/entities/address/address.js +1 -0
  5. package/dist/entities/business/business.d.ts +1 -0
  6. package/dist/entities/business/business.js +1 -0
  7. package/dist/entities/price/price.d.ts +2 -0
  8. package/dist/entities/price/price.js +2 -0
  9. package/dist/entities/product/product.d.ts +1 -0
  10. package/dist/entities/product/product.js +1 -0
  11. package/dist/enums/report/report-filter-name.d.ts +1 -1
  12. package/dist/enums/report/report-type.d.ts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +2 -1
  15. package/dist/internal/index.d.ts +1 -0
  16. package/dist/internal/index.js +3 -0
  17. package/dist/internal/types/config.d.ts +1 -1
  18. package/dist/notifications/entities/address/address-notification.d.ts +1 -0
  19. package/dist/notifications/entities/address/address-notification.js +2 -0
  20. package/dist/notifications/entities/business/business-notification.d.ts +1 -0
  21. package/dist/notifications/entities/business/business-notification.js +2 -0
  22. package/dist/notifications/entities/price/price-notification.d.ts +2 -0
  23. package/dist/notifications/entities/price/price-notification.js +3 -0
  24. package/dist/notifications/entities/product/product-notification.d.ts +1 -0
  25. package/dist/notifications/entities/product/product-notification.js +2 -1
  26. package/dist/notifications/types/address/address-notification-response.d.ts +1 -0
  27. package/dist/notifications/types/business/business-notification-response.d.ts +1 -0
  28. package/dist/notifications/types/price/price-notification-response.d.ts +2 -0
  29. package/dist/notifications/types/shared/shared-product-notification-response.d.ts +1 -0
  30. package/dist/types/address/address-response.d.ts +1 -0
  31. package/dist/types/business/business-response.d.ts +1 -0
  32. package/dist/types/price/price-response.d.ts +5 -3
  33. package/dist/types/product/product-response.d.ts +4 -3
  34. package/dist/types/shared/index.d.ts +0 -2
  35. package/dist/types/shared/index.js +0 -2
  36. package/dist/types/shared/transaction-line-item-preview-response.d.ts +2 -2
  37. package/dist/types/transaction/transaction-item-response.d.ts +2 -2
  38. package/dist/types/transaction/transaction-line-item-response.d.ts +2 -2
  39. package/dist/version.d.ts +1 -1
  40. package/dist/version.js +1 -1
  41. package/package.json +1 -1
  42. package/dist/types/shared/shared-price-response.d.ts +0 -18
  43. package/dist/types/shared/shared-price-response.js +0 -2
  44. package/dist/types/shared/shared-product-response.d.ts +0 -14
  45. package/dist/types/shared/shared-product-response.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,40 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  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.
8
8
 
9
+ ### Versioning
10
+
11
+ When we make [non-breaking changes](https://developer.paddle.com/api-reference/about/versioning?utm_source=dx&utm_medium=paddle-node-sdk#non-breaking-change) to the Paddle API, we'll only release a new major version of the Node.js SDK when it causes problems at runtime. We won't release a new version of the SDK when we weaken TypeScript types in a way that doesn't cause existing implementations to break or malfunction. For example, if we add a new field to a request or an allowed value for a field in a response, this weakens the Typescript type but does not cause existing usages to stop working.
12
+
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
+
15
+
16
+ ## 1.1.0 - 2024-03-13
17
+
18
+ ### Added
19
+
20
+ - Added `createdAt` and `updatedAt` to product and price entities, see [related changelog](https://developer.paddle.com/changelog/2024/product-price-dates?utm_source=dx&utm_medium=paddle-node-sdk).
21
+
22
+ ### Changed
23
+
24
+ - Updated [report API](https://developer.paddle.com/api-reference/reports/create-report?utm_source=dx&utm_medium=paddle-node-sdk) to support `discounts` and `product_prices` report, see [related changelog](https://developer.paddle.com/changelog/2024/product-prices-discounts-reports?utm_source=dx&utm_medium=paddle-node-sdk).
25
+
26
+ ### Removed
27
+
28
+ - Removed `ISharedProductResponse` and `ISharedPriceResponse` interfaces as they were redundant. Please use `IProductResponse` and `IPriceResponse` instead.
29
+
30
+ ---
31
+
32
+ ## 1.0.2 - 2024-03-12
33
+
34
+ ### Added
35
+
36
+ - Exported `ApiError` class for usage in `try/catch` block.
37
+
38
+ ### Changed
39
+
40
+ - Added `customerId` property to `Address` and `Business` entities, see [related changelog](https://developer.paddle.com/changelog/2024/address-business-webhooks-customer-id?utm_source=dx&utm_medium=paddle-node-sdk).
41
+
42
+ ---
9
43
 
10
44
  ## 1.0.1 - 2024-02-20
11
45
 
package/README.md CHANGED
@@ -54,6 +54,12 @@ Keep in mind that API keys are separate for your sandbox and live accounts, so y
54
54
 
55
55
  This SDK comes with TypeScript definitions for the Paddle API. We recommend that you update frequently to keep the TypeScript definitions up-to-date with the API. Use `// @ts-ignore` to prevent any type error if you don't want to update.
56
56
 
57
+ ### Versioning
58
+
59
+ When we make [non-breaking changes](https://developer.paddle.com/api-reference/about/versioning?utm_source=dx&utm_medium=paddle-node-sdk#non-breaking-change) to the Paddle API, we'll only release a new major version of the Node.js SDK when it causes problems at runtime. We won't release a new version of the SDK when we weaken TypeScript types in a way that doesn't cause existing implementations to break or malfunction. For example, if we add a new field to a request or an allowed value for a field in a response, this weakens the Typescript type but does not cause existing usages to stop working.
60
+
61
+ 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.
62
+
57
63
  ## Naming conventions
58
64
 
59
65
  Properties in the Paddle API use `snake_case`. To follow JavaScript conventions, properties in this SDK use `camelCase`. This means:
@@ -206,6 +212,26 @@ const product = await archiveProduct('id')
206
212
  console.log('Product', product)
207
213
  ```
208
214
 
215
+ ### Error Handling
216
+
217
+ If a request fails, Paddle returns an `error` object that contains the same information as [errors returned by the API](https://developer.paddle.com/api-reference/about/errors?utm_source=dx&utm_medium=paddle-node-sdk). You can use the `code` attribute to search an error in [the error reference](https://developer.paddle.com/errors/overview?utm_source=dx&utm_medium=paddle-node-sdk) and to handle the error in your app. Validation errors also return an array of `errors` that tell you which fields failed validation.
218
+
219
+ This example shows how to handle an error with the code `conflict`:
220
+
221
+ ```typescript
222
+ import { ApiError } from '@paddle/paddle-node-sdk'
223
+
224
+ try {
225
+ // Call functions from the SDK
226
+ } catch (e: any) {
227
+ // e.code will always follow the error code defined in our documentation
228
+ const paddleApiError = e as ApiError;
229
+ if (paddleApiError.code === 'conflict') {
230
+ // Handle Conflict error
231
+ }
232
+ }
233
+ ```
234
+
209
235
  ## Resources
210
236
 
211
237
  ### Webhook signature verification
@@ -265,4 +291,4 @@ The Node.js SDK has complete feature parity with the Paddle API. All operations
265
291
  ## Learn more
266
292
 
267
293
  - [Paddle API reference](https://developer.paddle.com/api-reference/overview?utm_source=dx&utm_medium=paddle-node-sdk)
268
- - [Sign up for Paddle Billing](https://login.paddle.com/signup?utm_source=dx&utm_medium=paddle-node-sdk)
294
+ - [Sign up for Paddle Billing](https://login.paddle.com/signup?utm_source=dx&utm_medium=paddle-node-sdk)
@@ -3,6 +3,7 @@ import { type CountryCode, type Status } from '../../enums';
3
3
  import { type IAddressResponse } from '../../types';
4
4
  export declare class Address {
5
5
  readonly id: string;
6
+ readonly customerId: string;
6
7
  readonly description: string | null;
7
8
  readonly firstLine: string | null;
8
9
  readonly secondLine: string | null;
@@ -5,6 +5,7 @@ const index_1 = require("../index");
5
5
  class Address {
6
6
  constructor(address) {
7
7
  this.id = address.id;
8
+ this.customerId = address.customer_id;
8
9
  this.description = address.description ? address.description : null;
9
10
  this.firstLine = address.first_line ? address.first_line : null;
10
11
  this.secondLine = address.second_line ? address.second_line : null;
@@ -3,6 +3,7 @@ import { type Status } from '../../enums';
3
3
  import { type IBusinessResponse } from '../../types';
4
4
  export declare class Business {
5
5
  readonly id: string;
6
+ readonly customerId: string;
6
7
  readonly name: string;
7
8
  readonly companyNumber: string | null;
8
9
  readonly taxIdentifier: string | null;
@@ -5,6 +5,7 @@ const index_1 = require("../index");
5
5
  class Business {
6
6
  constructor(business) {
7
7
  this.id = business.id;
8
+ this.customerId = business.customer_id;
8
9
  this.name = business.name;
9
10
  this.companyNumber = business.company_number ? business.company_number : null;
10
11
  this.taxIdentifier = business.tax_identifier ? business.tax_identifier : null;
@@ -14,6 +14,8 @@ export declare class Price {
14
14
  readonly unitPriceOverrides: UnitPriceOverride[];
15
15
  readonly quantity: PriceQuantity;
16
16
  readonly status: Status;
17
+ readonly createdAt: string;
18
+ readonly updatedAt: string;
17
19
  readonly customData: ICustomData | null;
18
20
  readonly importMeta: ImportMeta | null;
19
21
  readonly product: Product | null;
@@ -16,6 +16,8 @@ class Price {
16
16
  this.unitPriceOverrides = price.unit_price_overrides.map((unit_price_override) => new index_1.UnitPriceOverride(unit_price_override));
17
17
  this.quantity = new index_1.PriceQuantity(price.quantity);
18
18
  this.status = price.status;
19
+ this.createdAt = price.created_at;
20
+ this.updatedAt = price.updated_at;
19
21
  this.customData = price.custom_data ? price.custom_data : null;
20
22
  this.importMeta = price.import_meta ? new index_1.ImportMeta(price.import_meta) : null;
21
23
  this.product = price.product ? new index_1.Product(price.product) : null;
@@ -11,6 +11,7 @@ export declare class Product {
11
11
  readonly customData: CustomData | null;
12
12
  readonly status: Status;
13
13
  readonly createdAt: string;
14
+ readonly updatedAt: string;
14
15
  readonly importMeta: ImportMeta | null;
15
16
  readonly prices: Price[] | null;
16
17
  constructor(product: IProductResponse);
@@ -14,6 +14,7 @@ class Product {
14
14
  this.customData = product.custom_data ? product.custom_data : null;
15
15
  this.status = product.status;
16
16
  this.createdAt = product.created_at;
17
+ this.updatedAt = product.updated_at;
17
18
  this.importMeta = product.import_meta ? new index_1.ImportMeta(product.import_meta) : null;
18
19
  this.prices = product.prices ? product.prices.map((price) => new index_1.Price(price)) : null;
19
20
  }
@@ -1 +1 @@
1
- export type ReportFilterName = 'action' | 'collection_mode' | 'currency_code' | 'origin' | 'status' | 'updated_at';
1
+ export type ReportFilterName = 'action' | 'collection_mode' | 'currency_code' | 'origin' | 'status' | 'updated_at' | 'type' | 'product_status' | 'price_status' | 'product_type' | 'price_type' | 'product_updated_at' | 'price_updated_at';
@@ -1 +1 @@
1
- export type ReportType = 'adjustments' | 'adjustment_line_items' | 'transactions' | 'transaction_line_items';
1
+ export type ReportType = 'adjustments' | 'adjustment_line_items' | 'transactions' | 'transaction_line_items' | 'discounts' | 'products_prices';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Environment } from './internal';
1
+ export { Environment, ApiError, type PaddleOptions } from './internal';
2
2
  export { SDK_VERSION } from './version';
3
3
  export { Paddle } from './paddle';
4
4
  export * from './entities';
package/dist/index.js CHANGED
@@ -14,9 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Paddle = exports.SDK_VERSION = exports.Environment = void 0;
17
+ exports.Paddle = exports.SDK_VERSION = exports.ApiError = exports.Environment = void 0;
18
18
  var internal_1 = require("./internal");
19
19
  Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return internal_1.Environment; } });
20
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return internal_1.ApiError; } });
20
21
  var version_1 = require("./version");
21
22
  Object.defineProperty(exports, "SDK_VERSION", { enumerable: true, get: function () { return version_1.SDK_VERSION; } });
22
23
  var paddle_1 = require("./paddle");
@@ -1,3 +1,4 @@
1
1
  export type { ErrorResponse, ResponsePaginated, Response, ErrorDetail, ErrorField } from './types/response';
2
2
  export type { PaddleOptions } from './types/config';
3
3
  export * from './api';
4
+ export { ApiError } from './errors/generic';
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ApiError = void 0;
17
18
  __exportStar(require("./api"), exports);
19
+ var generic_1 = require("./errors/generic");
20
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return generic_1.ApiError; } });
@@ -1,4 +1,4 @@
1
- import { type Environment } from '../api/environment';
1
+ import { type Environment } from '../api';
2
2
  export interface PaddleOptions {
3
3
  environment?: Environment;
4
4
  }
@@ -3,6 +3,7 @@ import { type CustomData, ImportMeta } from '../../../entities';
3
3
  import { type IAddressNotificationResponse } from '../../types';
4
4
  export declare class AddressNotification {
5
5
  readonly id: string;
6
+ readonly customerId: string | null;
6
7
  readonly description: string | null;
7
8
  readonly firstLine: string | null;
8
9
  readonly secondLine: string | null;
@@ -4,7 +4,9 @@ exports.AddressNotification = void 0;
4
4
  const entities_1 = require("../../../entities");
5
5
  class AddressNotification {
6
6
  constructor(address) {
7
+ var _a;
7
8
  this.id = address.id;
9
+ this.customerId = (_a = address.customer_id) !== null && _a !== void 0 ? _a : null;
8
10
  this.description = address.description ? address.description : null;
9
11
  this.firstLine = address.first_line ? address.first_line : null;
10
12
  this.secondLine = address.second_line ? address.second_line : null;
@@ -4,6 +4,7 @@ import { type IBusinessNotificationResponse } from '../../types';
4
4
  import { type CustomData } from '../../../entities';
5
5
  export declare class BusinessNotification {
6
6
  readonly id: string;
7
+ readonly customerId: string | null;
7
8
  readonly name: string;
8
9
  readonly companyNumber: string | null;
9
10
  readonly taxIdentifier: string | null;
@@ -4,7 +4,9 @@ exports.BusinessNotification = void 0;
4
4
  const index_1 = require("../index");
5
5
  class BusinessNotification {
6
6
  constructor(business) {
7
+ var _a;
7
8
  this.id = business.id;
9
+ this.customerId = (_a = business.customer_id) !== null && _a !== void 0 ? _a : null;
8
10
  this.name = business.name;
9
11
  this.companyNumber = business.company_number ? business.company_number : null;
10
12
  this.taxIdentifier = business.tax_identifier ? business.tax_identifier : null;
@@ -15,6 +15,8 @@ export declare class PriceNotification {
15
15
  readonly unitPriceOverrides: UnitPriceOverrideNotification[];
16
16
  readonly quantity: PriceQuantityNotification;
17
17
  readonly status: Status;
18
+ readonly createdAt: string | null;
19
+ readonly updatedAt: string | null;
18
20
  readonly customData: ICustomData | null;
19
21
  readonly importMeta: ImportMetaNotification | null;
20
22
  constructor(price: IPriceNotificationResponse);
@@ -4,6 +4,7 @@ exports.PriceNotification = void 0;
4
4
  const index_1 = require("../index");
5
5
  class PriceNotification {
6
6
  constructor(price) {
7
+ var _a, _b;
7
8
  this.id = price.id;
8
9
  this.productId = price.product_id;
9
10
  this.description = price.description;
@@ -16,6 +17,8 @@ class PriceNotification {
16
17
  this.unitPriceOverrides = price.unit_price_overrides.map((unit_price_override) => new index_1.UnitPriceOverrideNotification(unit_price_override));
17
18
  this.quantity = new index_1.PriceQuantityNotification(price.quantity);
18
19
  this.status = price.status;
20
+ this.createdAt = (_a = price.created_at) !== null && _a !== void 0 ? _a : null;
21
+ this.updatedAt = (_b = price.updated_at) !== null && _b !== void 0 ? _b : null;
19
22
  this.customData = price.custom_data ? price.custom_data : null;
20
23
  this.importMeta = price.import_meta ? new index_1.ImportMetaNotification(price.import_meta) : null;
21
24
  }
@@ -12,6 +12,7 @@ export declare class ProductNotification {
12
12
  readonly customData: CustomData | null;
13
13
  readonly status: Status;
14
14
  readonly createdAt: string;
15
+ readonly updatedAt: string | null;
15
16
  readonly importMeta: ImportMetaNotification | null;
16
17
  constructor(product: ISharedProductNotificationResponse);
17
18
  }
@@ -4,7 +4,7 @@ exports.ProductNotification = void 0;
4
4
  const index_1 = require("../index");
5
5
  class ProductNotification {
6
6
  constructor(product) {
7
- var _a;
7
+ var _a, _b;
8
8
  this.id = product.id;
9
9
  this.name = product.name;
10
10
  this.type = (_a = product.type) !== null && _a !== void 0 ? _a : null;
@@ -14,6 +14,7 @@ class ProductNotification {
14
14
  this.customData = product.custom_data ? product.custom_data : null;
15
15
  this.status = product.status;
16
16
  this.createdAt = product.created_at;
17
+ this.updatedAt = (_b = product.updated_at) !== null && _b !== void 0 ? _b : null;
17
18
  this.importMeta = product.import_meta ? new index_1.ImportMetaNotification(product.import_meta) : null;
18
19
  }
19
20
  }
@@ -2,6 +2,7 @@ import { type CountryCode, type Status } from '../../../enums';
2
2
  import { type ICustomData, type IImportMetaResponse } from '../../../types';
3
3
  export interface IAddressNotificationResponse {
4
4
  id: string;
5
+ customer_id?: string | null;
5
6
  description?: string | null;
6
7
  first_line?: string | null;
7
8
  second_line?: string | null;
@@ -3,6 +3,7 @@ import { type Status } from '../../../enums';
3
3
  import { type ICustomData } from '../../../types';
4
4
  export interface IBusinessNotificationResponse {
5
5
  id: string;
6
+ customer_id?: string | null;
6
7
  name: string;
7
8
  company_number?: string | null;
8
9
  tax_identifier?: string | null;
@@ -14,6 +14,8 @@ export interface IPriceNotificationResponse {
14
14
  unit_price_overrides: IUnitPriceOverrideNotificationResponse[];
15
15
  quantity: IPriceQuantityNotification;
16
16
  status: Status;
17
+ created_at?: string | null;
18
+ updated_at?: string | null;
17
19
  custom_data?: ICustomData | null;
18
20
  import_meta?: IImportMetaNotificationResponse | null;
19
21
  product?: ISharedProductNotificationResponse | null;
@@ -11,5 +11,6 @@ export interface ISharedProductNotificationResponse {
11
11
  custom_data?: ICustomData | null;
12
12
  status: Status;
13
13
  created_at: string;
14
+ updated_at?: string | null;
14
15
  import_meta?: IImportMetaNotificationResponse | null;
15
16
  }
@@ -2,6 +2,7 @@ import { type ICustomData, type IImportMetaResponse } from '../index';
2
2
  import { type CountryCode, type Status } from '../../enums';
3
3
  export interface IAddressResponse {
4
4
  id: string;
5
+ customer_id: string;
5
6
  description?: string | null;
6
7
  first_line?: string | null;
7
8
  second_line?: string | null;
@@ -2,6 +2,7 @@ import { type IBusinessContacts, type ICustomData, type IImportMetaResponse } fr
2
2
  import { type Status } from '../../enums';
3
3
  export interface IBusinessResponse {
4
4
  id: string;
5
+ customer_id: string;
5
6
  name: string;
6
7
  company_number?: string | null;
7
8
  tax_identifier?: string | null;
@@ -1,5 +1,5 @@
1
- import { type ITimePeriod, type IMoneyResponse, type IUnitPriceOverrideResponse, type IPriceQuantity, type ICustomData, type ISharedProductResponse, type IImportMetaResponse } from '../index';
2
- import { type TaxMode, type Status, type CatalogType } from '../../enums';
1
+ import { type ICustomData, type IImportMetaResponse, type IMoneyResponse, type IPriceQuantity, type IProductResponse, type ITimePeriod, type IUnitPriceOverrideResponse } from '../index';
2
+ import { type CatalogType, type Status, type TaxMode } from '../../enums';
3
3
  export interface IPriceResponse {
4
4
  id: string;
5
5
  product_id: string;
@@ -13,7 +13,9 @@ export interface IPriceResponse {
13
13
  unit_price_overrides: IUnitPriceOverrideResponse[];
14
14
  quantity: IPriceQuantity;
15
15
  status: Status;
16
+ created_at: string;
17
+ updated_at: string;
16
18
  custom_data?: ICustomData | null;
17
19
  import_meta?: IImportMetaResponse | null;
18
- product?: ISharedProductResponse | null;
20
+ product?: IProductResponse | null;
19
21
  }
@@ -1,5 +1,5 @@
1
- import { type ICustomData, type IImportMetaResponse, type ISharedPriceResponse } from '../index';
2
- import { type TaxCategory, type Status, type CatalogType } from '../../enums';
1
+ import { type ICustomData, type IImportMetaResponse, type IPriceResponse } from '../index';
2
+ import { type CatalogType, type Status, type TaxCategory } from '../../enums';
3
3
  export interface IProductResponse {
4
4
  id: string;
5
5
  name: string;
@@ -10,6 +10,7 @@ export interface IProductResponse {
10
10
  custom_data?: ICustomData | null;
11
11
  status: Status;
12
12
  created_at: string;
13
+ updated_at: string;
13
14
  import_meta?: IImportMetaResponse | null;
14
- prices?: ISharedPriceResponse[] | null;
15
+ prices?: IPriceResponse[] | null;
15
16
  }
@@ -4,8 +4,6 @@ export * from './money-response';
4
4
  export * from './unit-price-override';
5
5
  export * from './unit-price-override-response';
6
6
  export * from './price-quantity';
7
- export * from './shared-price-response';
8
- export * from './shared-product-response';
9
7
  export * from './billing-details-response';
10
8
  export * from './totals';
11
9
  export * from './tax-rates-used-response';
@@ -20,8 +20,6 @@ __exportStar(require("./money-response"), exports);
20
20
  __exportStar(require("./unit-price-override"), exports);
21
21
  __exportStar(require("./unit-price-override-response"), exports);
22
22
  __exportStar(require("./price-quantity"), exports);
23
- __exportStar(require("./shared-price-response"), exports);
24
- __exportStar(require("./shared-product-response"), exports);
25
23
  __exportStar(require("./billing-details-response"), exports);
26
24
  __exportStar(require("./totals"), exports);
27
25
  __exportStar(require("./tax-rates-used-response"), exports);
@@ -1,9 +1,9 @@
1
- import { type IUnitTotals, type ITotals, type ISharedProductResponse } from '../index';
1
+ import { type IProductResponse, type ITotals, type IUnitTotals } from '../index';
2
2
  export interface ITransactionLineItemPreviewResponse {
3
3
  price_id: string;
4
4
  quantity: number;
5
5
  tax_rate: string;
6
6
  unit_totals: IUnitTotals;
7
7
  totals: ITotals;
8
- product: ISharedProductResponse;
8
+ product: IProductResponse;
9
9
  }
@@ -1,7 +1,7 @@
1
- import { type ISharedPriceResponse, type ITransactionProrationResponse } from '../index';
1
+ import { type IPriceResponse, type ITransactionProrationResponse } from '../index';
2
2
  export interface ITransactionItemResponse {
3
3
  price_id?: string | null;
4
- price?: ISharedPriceResponse | null;
4
+ price?: IPriceResponse | null;
5
5
  quantity: number;
6
6
  proration?: ITransactionProrationResponse | null;
7
7
  }
@@ -1,4 +1,4 @@
1
- import { type ITransactionProrationResponse, type IUnitTotals, type ITotals, type ISharedProductResponse } from '../index';
1
+ import { type IProductResponse, type ITotals, type ITransactionProrationResponse, type IUnitTotals } from '../index';
2
2
  export interface ITransactionLineItemResponse {
3
3
  id: string;
4
4
  price_id: string;
@@ -7,5 +7,5 @@ export interface ITransactionLineItemResponse {
7
7
  tax_rate: string;
8
8
  unit_totals?: IUnitTotals | null;
9
9
  totals?: ITotals | null;
10
- product?: ISharedProductResponse | null;
10
+ product?: IProductResponse | null;
11
11
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.1";
1
+ export declare const SDK_VERSION = "1.1.0";
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 = '1.0.1';
4
+ exports.SDK_VERSION = '1.1.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddle/paddle-node-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
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/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,18 +0,0 @@
1
- import { type ITimePeriod, type IMoneyResponse, type IUnitPriceOverrideResponse, type IPriceQuantity, type ICustomData, type IImportMetaResponse } from '../index';
2
- import { type TaxMode, type Status, type CatalogType } from '../../enums';
3
- export interface ISharedPriceResponse {
4
- id: string;
5
- product_id: string;
6
- description: string;
7
- type: CatalogType;
8
- name?: string | null;
9
- billing_cycle?: ITimePeriod | null;
10
- trial_period?: ITimePeriod | null;
11
- tax_mode: TaxMode;
12
- unit_price: IMoneyResponse;
13
- unit_price_overrides: IUnitPriceOverrideResponse[];
14
- quantity: IPriceQuantity;
15
- status: Status;
16
- custom_data?: ICustomData | null;
17
- import_meta?: IImportMetaResponse | null;
18
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
1
- import { type ICustomData, type IImportMetaResponse } from '../index';
2
- import { type TaxCategory, type Status, type CatalogType } from '../../enums';
3
- export interface ISharedProductResponse {
4
- id: string;
5
- name: string;
6
- type?: CatalogType | null;
7
- description?: string | null;
8
- tax_category: TaxCategory;
9
- image_url?: string | null;
10
- custom_data?: ICustomData | null;
11
- status: Status;
12
- created_at: string;
13
- import_meta?: IImportMetaResponse | null;
14
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });