@paddle/paddle-node-sdk 2.3.2 → 2.5.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 (38) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/entities/transaction/transaction.js +1 -0
  3. package/dist/cjs/notifications/entities/transaction/transaction-notification.js +1 -0
  4. package/dist/cjs/notifications/events/transaction/index.js +1 -0
  5. package/dist/cjs/notifications/events/transaction/transaction-revised-event.js +14 -0
  6. package/dist/cjs/notifications/helpers/types.js +1 -0
  7. package/dist/cjs/notifications/helpers/webhooks.js +3 -1
  8. package/dist/cjs/resources/transactions/index.js +11 -0
  9. package/dist/cjs/resources/transactions/operations/index.js +1 -0
  10. package/dist/cjs/resources/transactions/operations/revise-transaction-request-body.js +2 -0
  11. package/dist/cjs/version.js +1 -1
  12. package/dist/esm/entities/transaction/transaction.js +1 -0
  13. package/dist/esm/notifications/entities/transaction/transaction-notification.js +1 -0
  14. package/dist/esm/notifications/events/transaction/index.js +1 -0
  15. package/dist/esm/notifications/events/transaction/transaction-revised-event.js +10 -0
  16. package/dist/esm/notifications/helpers/types.js +1 -0
  17. package/dist/esm/notifications/helpers/webhooks.js +4 -2
  18. package/dist/esm/resources/transactions/index.js +11 -0
  19. package/dist/esm/resources/transactions/operations/index.js +1 -0
  20. package/dist/esm/resources/transactions/operations/revise-transaction-request-body.js +1 -0
  21. package/dist/esm/version.js +1 -1
  22. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  23. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  24. package/dist/tsconfig.types.tsbuildinfo +1 -1
  25. package/dist/types/entities/transaction/transaction.d.ts +1 -0
  26. package/dist/types/notifications/entities/transaction/transaction-notification.d.ts +1 -0
  27. package/dist/types/notifications/events/transaction/index.d.ts +1 -0
  28. package/dist/types/notifications/events/transaction/transaction-revised-event.d.ts +10 -0
  29. package/dist/types/notifications/helpers/types.d.ts +4 -3
  30. package/dist/types/notifications/types/transaction/transaction-notification-response.d.ts +1 -0
  31. package/dist/types/resources/transactions/index.d.ts +2 -1
  32. package/dist/types/resources/transactions/operations/index.d.ts +1 -0
  33. package/dist/types/resources/transactions/operations/revise-transaction-request-body.d.ts +15 -0
  34. package/dist/types/types/events/events-response.d.ts +4 -1
  35. package/dist/types/types/shared/simulation-payload.d.ts +2 -1
  36. package/dist/types/types/transaction/transaction-response.d.ts +1 -0
  37. package/dist/types/version.d.ts +1 -1
  38. package/package.json +1 -1
@@ -27,4 +27,5 @@ export interface ITransactionNotificationResponse {
27
27
  created_at: string;
28
28
  updated_at: string;
29
29
  billed_at?: string | null;
30
+ revised_at?: string | null;
30
31
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseResource } from '../../internal/base/index.js';
2
- import { type CreateTransactionQueryParameters, type CreateTransactionRequestBody, type GetTransactionInvoicePdfQueryParameters, type GetTransactionQueryParameters, type ListTransactionQueryParameters, type TransactionPreviewRequestBody, type UpdateTransactionQueryParameters, type UpdateTransactionRequestBody } from './operations/index.js';
2
+ import { type CreateTransactionQueryParameters, type CreateTransactionRequestBody, type GetTransactionInvoicePdfQueryParameters, type GetTransactionQueryParameters, type ListTransactionQueryParameters, type ReviseTransactionRequestBody, type TransactionPreviewRequestBody, type UpdateTransactionQueryParameters, type UpdateTransactionRequestBody } from './operations/index.js';
3
3
  import { Transaction, TransactionCollection, TransactionInvoicePDF, TransactionPreview } from '../../entities/index.js';
4
4
  export * from './operations/index.js';
5
5
  export declare class TransactionsResource extends BaseResource {
@@ -9,4 +9,5 @@ export declare class TransactionsResource extends BaseResource {
9
9
  get(transactionId: string, queryParams?: GetTransactionQueryParameters): Promise<Transaction>;
10
10
  getInvoicePDF(transactionId: string, queryParams?: GetTransactionInvoicePdfQueryParameters): Promise<TransactionInvoicePDF>;
11
11
  preview(previewTransactionParameters: TransactionPreviewRequestBody): Promise<TransactionPreview>;
12
+ revise(transactionId: string, reviseTransaction: ReviseTransactionRequestBody): Promise<Transaction>;
12
13
  }
@@ -6,3 +6,4 @@ export * from './get-transaction-query-parameters.js';
6
6
  export * from './update-transaction-request-body.js';
7
7
  export * from './transaction-preview-request-body.js';
8
8
  export * from './get-transaction-invoice-pdf-query-parameters.js';
9
+ export * from './revise-transaction-request-body.js';
@@ -0,0 +1,15 @@
1
+ export interface ReviseTransactionRequestBody {
2
+ customer?: {
3
+ name?: string;
4
+ };
5
+ business?: {
6
+ name?: string;
7
+ taxIdentifier?: string;
8
+ };
9
+ address?: {
10
+ firstLine?: string;
11
+ secondLine?: string | null;
12
+ city?: string;
13
+ region?: string;
14
+ };
15
+ }
@@ -132,11 +132,14 @@ interface ITransactionReady extends IEventsResponse<ITransactionNotificationResp
132
132
  interface ITransactionUpdated extends IEventsResponse<ITransactionNotificationResponse> {
133
133
  event_type: EventName.TransactionUpdated;
134
134
  }
135
+ interface ITransactionRevised extends IEventsResponse<ITransactionNotificationResponse> {
136
+ event_type: EventName.TransactionRevised;
137
+ }
135
138
  interface IReportCreated extends IEventsResponse<IReportNotificationResponse> {
136
139
  event_type: EventName.ReportCreated;
137
140
  }
138
141
  interface IReportUpdated extends IEventsResponse<IReportNotificationResponse> {
139
142
  event_type: EventName.ReportUpdated;
140
143
  }
141
- export type IEvents = IAddressCreated | IAddressUpdated | IAddressImported | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | IBusinessImported | ICustomerCreated | ICustomerUpdated | ICustomerImported | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPaymentMethodDeleted | IPaymentMethodSaved | IPayoutCreated | IPayoutPaid | IPriceCreated | IPriceUpdated | IPriceImported | IProductCreated | IProductUpdated | IProductImported | ISubscriptionActivated | ISubscriptionCanceled | ISubscriptionCreated | ISubscriptionImported | ISubscriptionPastDue | ISubscriptionPaused | ISubscriptionResumed | ISubscriptionTrialing | ISubscriptionUpdated | ITransactionBilled | ITransactionCanceled | ITransactionCompleted | ITransactionCreated | ITransactionPaid | ITransactionPastDue | ITransactionPaymentFailed | ITransactionReady | ITransactionUpdated | IReportCreated | IReportUpdated;
144
+ export type IEvents = IAddressCreated | IAddressUpdated | IAddressImported | IAdjustmentCreated | IAdjustmentUpdated | IBusinessCreated | IBusinessUpdated | IBusinessImported | ICustomerCreated | ICustomerUpdated | ICustomerImported | IDiscountCreated | IDiscountUpdated | IDiscountImported | IPaymentMethodDeleted | IPaymentMethodSaved | IPayoutCreated | IPayoutPaid | IPriceCreated | IPriceUpdated | IPriceImported | IProductCreated | IProductUpdated | IProductImported | ISubscriptionActivated | ISubscriptionCanceled | ISubscriptionCreated | ISubscriptionImported | ISubscriptionPastDue | ISubscriptionPaused | ISubscriptionResumed | ISubscriptionTrialing | ISubscriptionUpdated | ITransactionBilled | ITransactionCanceled | ITransactionCompleted | ITransactionCreated | ITransactionPaid | ITransactionPastDue | ITransactionPaymentFailed | ITransactionReady | ITransactionUpdated | ITransactionRevised | IReportCreated | IReportUpdated;
142
145
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { IEventName } from '../../notifications/index.js';
2
- import { type AddressCreatedEvent, type AddressImportedEvent, type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, type BusinessCreatedEvent, type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountImportedEvent, type DiscountUpdatedEvent, type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, type ProductImportedEvent, type ProductUpdatedEvent, type ReportCreatedEvent, type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, type SubscriptionCreatedEvent, type SubscriptionImportedEvent, type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, type TransactionBilledEvent, type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionUpdatedEvent } from '../../notifications/events/index.js';
2
+ import { type AddressCreatedEvent, type AddressImportedEvent, type AddressUpdatedEvent, type AdjustmentCreatedEvent, type AdjustmentUpdatedEvent, type BusinessCreatedEvent, type BusinessImportedEvent, type BusinessUpdatedEvent, type CustomerCreatedEvent, type CustomerImportedEvent, type CustomerUpdatedEvent, type DiscountCreatedEvent, type DiscountImportedEvent, type DiscountUpdatedEvent, type PayoutCreatedEvent, type PayoutPaidEvent, type PriceCreatedEvent, type PriceImportedEvent, type PriceUpdatedEvent, type ProductCreatedEvent, type ProductImportedEvent, type ProductUpdatedEvent, type ReportCreatedEvent, type ReportUpdatedEvent, type SubscriptionActivatedEvent, type SubscriptionCanceledEvent, type SubscriptionCreatedEvent, type SubscriptionImportedEvent, type SubscriptionPastDueEvent, type SubscriptionPausedEvent, type SubscriptionResumedEvent, type SubscriptionTrialingEvent, type SubscriptionUpdatedEvent, type TransactionBilledEvent, type TransactionCanceledEvent, type TransactionCompletedEvent, type TransactionCreatedEvent, type TransactionPaidEvent, type TransactionPastDueEvent, type TransactionPaymentFailedEvent, type TransactionReadyEvent, type TransactionUpdatedEvent, type TransactionRevisedEvent } from '../../notifications/events/index.js';
3
3
  interface SimulationEventPayloadMap {
4
4
  'address.created': AddressCreatedEvent;
5
5
  'address.updated': AddressUpdatedEvent;
@@ -41,6 +41,7 @@ interface SimulationEventPayloadMap {
41
41
  'transaction.payment_failed': TransactionPaymentFailedEvent;
42
42
  'transaction.ready': TransactionReadyEvent;
43
43
  'transaction.updated': TransactionUpdatedEvent;
44
+ 'transaction.revised': TransactionRevisedEvent;
44
45
  'report.created': ReportCreatedEvent;
45
46
  'report.updated': ReportUpdatedEvent;
46
47
  subscription_creation: never;
@@ -32,6 +32,7 @@ export interface ITransactionResponse {
32
32
  created_at: string;
33
33
  updated_at: string;
34
34
  billed_at?: string | null;
35
+ revised_at?: string | null;
35
36
  address?: IAddressResponse | null;
36
37
  adjustments?: ITransactionAdjustmentResponse[] | null;
37
38
  adjustments_totals?: IAdjustmentTotalsResponse | null;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.3.2";
1
+ export declare const SDK_VERSION = "2.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paddle/paddle-node-sdk",
3
- "version": "2.3.2",
3
+ "version": "2.5.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/cjs/index.cjs.node.js",
6
6
  "module": "dist/esm/index.esm.node.js",