From 9b2b0879e932f642718bfb72c9e7a828643e02b4 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Fri, 27 Sep 2024 00:30:43 -0700 Subject: [PATCH] Move RelatedObject definition to ThinEvent.d.ts --- types/ThinEvent.d.ts | 40 ++++++++++++++++++++++++---------------- types/V2/Events.d.ts | 24 +----------------------- types/index.d.ts | 2 +- 3 files changed, 26 insertions(+), 40 deletions(-) diff --git a/types/ThinEvent.d.ts b/types/ThinEvent.d.ts index 7d2d2403a6..d1feb07c34 100644 --- a/types/ThinEvent.d.ts +++ b/types/ThinEvent.d.ts @@ -2,6 +2,29 @@ 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. */ @@ -9,22 +32,7 @@ declare module 'stripe' { /** * 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; } } } diff --git a/types/V2/Events.d.ts b/types/V2/Events.d.ts index 6fad22afc0..4a42091348 100644 --- a/types/V2/Events.d.ts +++ b/types/V2/Events.d.ts @@ -1,4 +1,4 @@ -// This is a manually maintained file +// File generated from our OpenAPI spec declare module 'stripe' { namespace Stripe { @@ -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; - }; - } } /** diff --git a/types/index.d.ts b/types/index.d.ts index d452ee29ef..5809b1d390 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -8,7 +8,6 @@ /// /// /// -/// /// /// // Imports: The beginning of the section generated from our OpenAPI spec @@ -276,6 +275,7 @@ /// /// /// +/// /// // Imports: The end of the section generated from our OpenAPI spec