Skip to content

Commit

Permalink
Move RelatedObject definition to ThinEvent.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe committed Sep 27, 2024
1 parent 747b535 commit 9b2b087
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 40 deletions.
40 changes: 24 additions & 16 deletions types/ThinEvent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,37 @@

declare module 'stripe' {
namespace Stripe {
namespace Event {
interface RelatedObject {
/**
* Object containing the reference to API resource relevant to the event.
*/
related_object: {
/**
* Unique identifier for the object relevant to the event.
*/
id: string;

/**
* Type of the object relevant to the event.
*/
type: string;

/**
* URL to retrieve the resource.
*/
url: string;
};
}
}
/**
* The Event object as recieved from StripeClient.parseThinEvent.
*/
interface ThinEvent extends V2.EventBase {
/**
* Object containing the reference to API resource relevant to the event.
*/
related_object: {
/**
* Unique identifier for the object relevant to the event.
*/
id: string;

/**
* Type of the object relevant to the event.
*/
type: string;

/**
* URL to retrieve the resource.
*/
url: string;
};
related_object: Event.RelatedObject;
}
}
}
24 changes: 1 addition & 23 deletions types/V2/Events.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is a manually maintained file
// File generated from our OpenAPI spec

declare module 'stripe' {
namespace Stripe {
Expand Down Expand Up @@ -29,28 +29,6 @@ declare module 'stripe' {
idempotency_key: string;
}
}

interface RelatedObject {
/**
* Object containing the reference to API resource relevant to the event.
*/
related_object: {
/**
* Unique identifier for the object relevant to the event.
*/
id: string;

/**
* Type of the object relevant to the event.
*/
type: string;

/**
* URL to retrieve the resource.
*/
url: string;
};
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
///<reference path='./EventTypes.d.ts' />
///<reference path='./UpcomingInvoices.d.ts' />
///<reference path='./Deprecations.d.ts' />
///<reference path='./V2/Events.d.ts' />
///<reference path='./ThinEvent.d.ts' />
///<reference path='./crypto/crypto.d.ts' />
// Imports: The beginning of the section generated from our OpenAPI spec
Expand Down Expand Up @@ -276,6 +275,7 @@
///<reference path='./V2/Billing/MeterEventAdjustments.d.ts' />
///<reference path='./V2/Billing/MeterEventSessions.d.ts' />
///<reference path='./V2/Billing/MeterEvents.d.ts' />
///<reference path='./V2/Events.d.ts' />
///<reference path='./WebhookEndpoints.d.ts' />
// Imports: The end of the section generated from our OpenAPI spec

Expand Down

0 comments on commit 9b2b087

Please sign in to comment.