docs: generated references after collapse types improvement (#11889)

This commit is contained in:
Shahed Nasser
2025-03-18 16:48:43 +02:00
committed by GitHub
parent d0ca0f5ce0
commit ac24749bd3
774 changed files with 1612 additions and 1628 deletions
@@ -22,4 +22,4 @@ sdk.admin.payment.capture("paycol_123", {})
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The payment's details.","expandable":false,"children":[{"name":"AdminPaymentResponse","type":"[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment","type":"[AdminPayment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPayment/page.mdx)","description":"The payment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunds","type":"[AdminRefund](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefund/page.mdx)[]","description":"The associated refunds.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_collection","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)","description":"The payment collection this payment belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_session","type":"[AdminPaymentSession](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentSession/page.mdx)","description":"The associated payment session.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`number`","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"When the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"When the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`number`","description":"The sum of the associated captures' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`number`","description":"The sum of the associated refunds' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captures","type":"[BaseCapture](../../../../../types/interfaces/types.BaseCapture/page.mdx)[]","description":"The associated captures.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capture"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The payment's details.","expandable":false,"children":[{"name":"payment","type":"[AdminPayment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPayment/page.mdx)","description":"The payment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunds","type":"[AdminRefund](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefund/page.mdx)[]","description":"The associated refunds.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_collection","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)","description":"The payment collection this payment belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_session","type":"[AdminPaymentSession](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentSession/page.mdx)","description":"The associated payment session.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`number`","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"When the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"When the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`number`","description":"The sum of the associated captures' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`number`","description":"The sum of the associated refunds' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captures","type":"[BaseCapture](../../../../../types/interfaces/types.BaseCapture/page.mdx)[]","description":"The associated captures.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capture"/>
@@ -50,4 +50,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPaymentsResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of payments.","expandable":false,"children":[{"name":"AdminPaymentsResponse","type":"[AdminPaymentsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPaymentsResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPaymentsResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of payments.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
@@ -50,4 +50,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentProviderListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPaymentProviderListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of payment providers.","expandable":false,"children":[{"name":"AdminPaymentProviderListResponse","type":"[AdminPaymentProviderListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPaymentProviderListResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listPaymentProviders"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentProviderListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPaymentProviderListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of payment providers.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listPaymentProviders"/>
@@ -22,4 +22,4 @@ sdk.admin.payment.refund("paycol_123", {})
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The payment's details.","expandable":false,"children":[{"name":"AdminPaymentResponse","type":"[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment","type":"[AdminPayment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPayment/page.mdx)","description":"The payment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunds","type":"[AdminRefund](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefund/page.mdx)[]","description":"The associated refunds.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_collection","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)","description":"The payment collection this payment belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_session","type":"[AdminPaymentSession](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentSession/page.mdx)","description":"The associated payment session.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`number`","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"When the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"When the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`number`","description":"The sum of the associated captures' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`number`","description":"The sum of the associated refunds' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captures","type":"[BaseCapture](../../../../../types/interfaces/types.BaseCapture/page.mdx)[]","description":"The associated captures.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refund"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The payment's details.","expandable":false,"children":[{"name":"payment","type":"[AdminPayment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPayment/page.mdx)","description":"The payment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunds","type":"[AdminRefund](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefund/page.mdx)[]","description":"The associated refunds.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_collection","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)","description":"The payment collection this payment belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_session","type":"[AdminPaymentSession](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentSession/page.mdx)","description":"The associated payment session.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`number`","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"When the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"When the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`number`","description":"The sum of the associated captures' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`number`","description":"The sum of the associated refunds' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captures","type":"[BaseCapture](../../../../../types/interfaces/types.BaseCapture/page.mdx)[]","description":"The associated captures.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refund"/>
@@ -36,4 +36,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The payment's details.","expandable":false,"children":[{"name":"AdminPaymentResponse","type":"[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment","type":"[AdminPayment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPayment/page.mdx)","description":"The payment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunds","type":"[AdminRefund](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefund/page.mdx)[]","description":"The associated refunds.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_collection","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)","description":"The payment collection this payment belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_session","type":"[AdminPaymentSession](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentSession/page.mdx)","description":"The associated payment session.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`number`","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"When the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"When the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`number`","description":"The sum of the associated captures' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`number`","description":"The sum of the associated refunds' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captures","type":"[BaseCapture](../../../../../types/interfaces/types.BaseCapture/page.mdx)[]","description":"The associated captures.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPaymentResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The payment's details.","expandable":false,"children":[{"name":"payment","type":"[AdminPayment](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPayment/page.mdx)","description":"The payment's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refunds","type":"[AdminRefund](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefund/page.mdx)[]","description":"The associated refunds.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payment_collection","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)","description":"The payment collection this payment belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_session","type":"[AdminPaymentSession](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentSession/page.mdx)","description":"The associated payment session.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_amount","type":"`number`","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_at","type":"`string` \\| `Date`","description":"When the payment was captured.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"When the payment was canceled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"`number`","description":"The sum of the associated captures' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"`number`","description":"The sum of the associated refunds' amounts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captures","type":"[BaseCapture](../../../../../types/interfaces/types.BaseCapture/page.mdx)[]","description":"The associated captures.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
@@ -141,7 +141,7 @@ Since the response is dynamically determined, we cannot know if it is JSON or no
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;T&#62;","optional":false,"defaultValue":"","description":"Promise&#60;T&#62;","expandable":false,"children":[{"name":"T","type":"T","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetch"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;T&#62;","optional":false,"defaultValue":"","description":"Promise&#60;T&#62;","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetch"/>
`fetchStream` is a helper method to deal with server-sent events. It returns an object with a stream and an abort function.
It follows a very similar interface to `fetch`, with the return value being an async generator.
@@ -154,7 +154,7 @@ The caller is responsible for handling `disconnect` events and aborting the stre
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[FetchStreamResponse](../../../interfaces/js_sdk.admin.FetchStreamResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"FetchStreamResponse","expandable":false,"children":[{"name":"FetchStreamResponse","type":"[FetchStreamResponse](../../../interfaces/js_sdk.admin.FetchStreamResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stream","type":"`null` \\| AsyncGenerator&#60;[ServerSentEventMessage](../../../interfaces/js_sdk.admin.ServerSentEventMessage/page.mdx), void, unknown&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"comment","type":"`string`","description":"Ignored by the client.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"event","type":"`string`","description":"A string identifying the type of event described.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`string`","description":"The data field for the message. Split by new lines.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `number`","description":"The event ID to set the EventSource object's last event ID value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retry","type":"`number`","description":"The reconnection time.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"abort","type":"() => `void`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetchStream"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[FetchStreamResponse](../../../interfaces/js_sdk.admin.FetchStreamResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"FetchStreamResponse","expandable":false,"children":[{"name":"stream","type":"`null` \\| AsyncGenerator&#60;[ServerSentEventMessage](../../../interfaces/js_sdk.admin.ServerSentEventMessage/page.mdx), void, unknown&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"comment","type":"`string`","description":"Ignored by the client.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"event","type":"`string`","description":"A string identifying the type of event described.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`string`","description":"The data field for the message. Split by new lines.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `number`","description":"The event ID to set the EventSource object's last event ID value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retry","type":"`number`","description":"The reconnection time.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"abort","type":"() => `void`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetchStream"/>
## Parameters