docs: fix types for provider docs not generated correctly (#11598)
This commit is contained in:
1 parent
8edc23748a
commit
731f118987
58 files changed
+64935
-52316
No files matched your search
+8
-8
@@ -234,11 +234,11 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../auth/interfaces/auth.AuthenticationInput/page.mdx)","description":"The details of the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"`AuthIdentityProviderService`","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authenticate"/>
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../types/interfaces/types.AuthenticationInput/page.mdx)","description":"The details of the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../../../types/interfaces/types.AuthIdentityProviderService/page.mdx)","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authenticate"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The authentication response.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authenticate"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The authentication response.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authenticate"/>
|
||||
|
||||
### register
|
||||
|
||||
@@ -303,11 +303,11 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../auth/interfaces/auth.AuthenticationInput/page.mdx)","description":"The details of the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"`AuthIdentityProviderService`","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="register"/>
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../types/interfaces/types.AuthenticationInput/page.mdx)","description":"The details of the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../../../types/interfaces/types.AuthIdentityProviderService/page.mdx)","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="register"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The created authentication identity if no errors occur.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="register"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The created authentication identity if no errors occur.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="register"/>
|
||||
|
||||
### update
|
||||
|
||||
@@ -350,11 +350,11 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data relevant to identify the auth identity and what to update in it. For example,\nthe `emailpass` provider expects in this object an `email` and `password` properties.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentityProviderService","type":"`AuthIdentityProviderService`","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data relevant to identify the auth identity and what to update in it. For example,\nthe `emailpass` provider expects in this object an `email` and `password` properties.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../../../types/interfaces/types.AuthIdentityProviderService/page.mdx)","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The updated authentication identity if no errors occur.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The updated authentication identity if no errors occur.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
|
||||
### validateCallback
|
||||
|
||||
@@ -439,11 +439,11 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../auth/interfaces/auth.AuthenticationInput/page.mdx)","description":"The details of the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"`AuthIdentityProviderService`","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateCallback"/>
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../../../types/interfaces/types.AuthenticationInput/page.mdx)","description":"The details of the authentication request.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../../../types/interfaces/types.AuthIdentityProviderService/page.mdx)","description":"The service used to retrieve or\ncreate an auth identity. It has two methods: `create` to create an auth identity,\nand `retrieve` to retrieve an auth identity. When you authenticate the user, you can create an auth identity\nusing this service.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateCallback"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The authentication response.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../auth/interfaces/auth.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateCallback"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The authentication response.","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../../../types/interfaces/types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateCallback"/>
|
||||
|
||||
---
|
||||
|
||||
|
||||
+5
-5
@@ -146,7 +146,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<FulfillmentOption[]>","optional":false,"defaultValue":"","description":"The list of fulfillment options. Each object in the array should have an `id` property unique to an item, and a `name` property\nthat's used to display the option in the admin.","expandable":false,"children":[{"name":"FulfillmentOption[]","type":"`FulfillmentOption`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FulfillmentOption","type":"`FulfillmentOption`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentOptions"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[FulfillmentOption](../../../types/types/types.FulfillmentOption/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of fulfillment options. Each object in the array should have an `id` property unique to an item, and a `name` property\nthat's used to display the option in the admin.","expandable":false,"children":[{"name":"FulfillmentOption[]","type":"[FulfillmentOption](../../../types/types/types.FulfillmentOption/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FulfillmentOption","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentOptions"/>
|
||||
|
||||
### validateFulfillmentData
|
||||
|
||||
@@ -181,7 +181,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionData","type":"`Record<string, unknown>`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[ValidateFulfillmentDataContext](../../../fulfillment/types/fulfillment.ValidateFulfillmentDataContext/page.mdx)","description":"Context details, such as context of the cart or customer.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"id\"`]","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"shipping_address\"`]","description":"The cart's shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"items\"`] & `object`","description":"The cart's items","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant","type":"`object`","description":"The item's variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`object`","description":"The item's product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"from_location","type":"[StockLocationDTO](../../../fulfillment/types/fulfillment.StockLocationDTO/page.mdx)","description":"Details about the location that items are being shipped from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../../fulfillment/types/fulfillment.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
|
||||
<TypeList types={[{"name":"optionData","type":"`Record<string, unknown>`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[ValidateFulfillmentDataContext](../../../types/types/types.ValidateFulfillmentDataContext/page.mdx)","description":"Context details, such as context of the cart or customer.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"id\"`]","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"shipping_address\"`]","description":"The cart's shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"items\"`] & `object`","description":"The cart's items","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant","type":"`object`","description":"The item's variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`object`","description":"The item's product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"from_location","type":"[StockLocationDTO](../../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)","description":"Details about the location that items are being shipped from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../../types/StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -284,7 +284,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CalculatedShippingOptionPrice](../../../fulfillment/types/fulfillment.CalculatedShippingOptionPrice/page.mdx)>","optional":false,"defaultValue":"","description":"The calculated price's details.","expandable":false,"children":[{"name":"CalculatedShippingOptionPrice","type":"[CalculatedShippingOptionPrice](../../../fulfillment/types/fulfillment.CalculatedShippingOptionPrice/page.mdx)","optional":false,"defaultValue":"","description":"A calculated shipping option price.","expandable":false,"children":[{"name":"calculated_amount","type":"`number`","description":"The calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_tax_inclusive","type":"`boolean`","description":"Whether the calculated price includes taxes. If enabled, Medusa will\ninfer the taxes from the calculated price. If false, Medusa will\nadd taxes to the calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="calculatePrice"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CalculatedShippingOptionPrice](../../../types/types/types.CalculatedShippingOptionPrice/page.mdx)>","optional":false,"defaultValue":"","description":"The calculated price's details.","expandable":false,"children":[{"name":"CalculatedShippingOptionPrice","type":"[CalculatedShippingOptionPrice](../../../types/types/types.CalculatedShippingOptionPrice/page.mdx)","optional":false,"defaultValue":"","description":"A calculated shipping option price.","expandable":false,"children":[{"name":"calculated_amount","type":"`number`","description":"The calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_tax_inclusive","type":"`boolean`","description":"Whether the calculated price includes taxes. If enabled, Medusa will\ninfer the taxes from the calculated price. If false, Medusa will\nadd taxes to the calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="calculatePrice"/>
|
||||
|
||||
### createFulfillment
|
||||
|
||||
@@ -332,7 +332,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<CreateFulfillmentResult>","optional":false,"defaultValue":"","description":"An object whose `data` property is stored in the fulfillment's `data` property.","expandable":false,"children":[{"name":"CreateFulfillmentResult","type":"`CreateFulfillmentResult`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CreateFulfillmentResult](../../../types/types/types.CreateFulfillmentResult/page.mdx)>","optional":false,"defaultValue":"","description":"An object whose `data` property is stored in the fulfillment's `data` property.","expandable":false,"children":[{"name":"CreateFulfillmentResult","type":"[CreateFulfillmentResult](../../../types/types/types.CreateFulfillmentResult/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Additional fulfillment data from provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label's URL.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillment"/>
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
@@ -428,7 +428,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<CreateFulfillmentResult>","optional":false,"defaultValue":"","description":"An object containing `data` which is stored in the fulfillment's `data` property and `labels` array which is used to create FulfillmentLabels.","expandable":false,"children":[{"name":"CreateFulfillmentResult","type":"`CreateFulfillmentResult`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CreateFulfillmentResult](../../../types/types/types.CreateFulfillmentResult/page.mdx)>","optional":false,"defaultValue":"","description":"An object containing `data` which is stored in the fulfillment's `data` property and `labels` array which is used to create FulfillmentLabels.","expandable":false,"children":[{"name":"CreateFulfillmentResult","type":"[CreateFulfillmentResult](../../../types/types/types.CreateFulfillmentResult/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Additional fulfillment data from provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label's URL.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillment"/>
|
||||
|
||||
### getReturnDocuments
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ import { TypeList } from "docs-ui"
|
||||
- [AdminUpsertGeoZone](../../types/interfaces/types.AdminUpsertGeoZone/page.mdx)
|
||||
- [AdminUpsertStockLocationAddress](../../types/interfaces/types.AdminUpsertStockLocationAddress/page.mdx)
|
||||
- [AdminWorkflowExecutionExecution](../../types/interfaces/types.AdminWorkflowExecutionExecution/page.mdx)
|
||||
- [AuthenticationInput](../../types/interfaces/types.AuthenticationInput/page.mdx)
|
||||
- [AuthenticationResponse](../../types/interfaces/types.AuthenticationResponse/page.mdx)
|
||||
- [AuthIdentityProviderService](../../types/interfaces/types.AuthIdentityProviderService/page.mdx)
|
||||
- [AuthorizePaymentInput](../../types/interfaces/types.AuthorizePaymentInput/page.mdx)
|
||||
- [AuthorizePaymentOutput](../../types/interfaces/types.AuthorizePaymentOutput/page.mdx)
|
||||
- [BaseAdjustmentLine](../../types/interfaces/types.BaseAdjustmentLine/page.mdx)
|
||||
- [BaseApplicationMethod](../../types/interfaces/types.BaseApplicationMethod/page.mdx)
|
||||
- [BaseCalculatedPriceSet](../../types/interfaces/types.BaseCalculatedPriceSet/page.mdx)
|
||||
@@ -134,10 +139,16 @@ import { TypeList } from "docs-ui"
|
||||
- [BaseUpdateCustomerAddress](../../types/interfaces/types.BaseUpdateCustomerAddress/page.mdx)
|
||||
- [BatchPriceListPricesWorkflowDTO](../../types/interfaces/types.BatchPriceListPricesWorkflowDTO/page.mdx)
|
||||
- [BatchPriceListPricesWorkflowResult](../../types/interfaces/types.BatchPriceListPricesWorkflowResult/page.mdx)
|
||||
- [CancelPaymentInput](../../types/interfaces/types.CancelPaymentInput/page.mdx)
|
||||
- [CancelPaymentOutput](../../types/interfaces/types.CancelPaymentOutput/page.mdx)
|
||||
- [CapturePaymentInput](../../types/interfaces/types.CapturePaymentInput/page.mdx)
|
||||
- [CapturePaymentOutput](../../types/interfaces/types.CapturePaymentOutput/page.mdx)
|
||||
- [CartWorkflowDTO](../../types/interfaces/types.CartWorkflowDTO/page.mdx)
|
||||
- [CompleteCartWorkflowInputDTO](../../types/interfaces/types.CompleteCartWorkflowInputDTO/page.mdx)
|
||||
- [ConfirmVariantInventoryWorkflowInputDTO](../../types/interfaces/types.ConfirmVariantInventoryWorkflowInputDTO/page.mdx)
|
||||
- [Context](../../types/interfaces/types.Context/page.mdx)
|
||||
- [CreateAccountHolderInput](../../types/interfaces/types.CreateAccountHolderInput/page.mdx)
|
||||
- [CreateAccountHolderOutput](../../types/interfaces/types.CreateAccountHolderOutput/page.mdx)
|
||||
- [CreateCartAddressDTO](../../types/interfaces/types.CreateCartAddressDTO/page.mdx)
|
||||
- [CreateCartCreateLineItemDTO](../../types/interfaces/types.CreateCartCreateLineItemDTO/page.mdx)
|
||||
- [CreateCartWorkflowInputDTO](../../types/interfaces/types.CreateCartWorkflowInputDTO/page.mdx)
|
||||
@@ -153,42 +164,68 @@ import { TypeList } from "docs-ui"
|
||||
- [CreateServiceZone](../../types/interfaces/types.CreateServiceZone/page.mdx)
|
||||
- [CreateShippingProfile](../../types/interfaces/types.CreateShippingProfile/page.mdx)
|
||||
- [CustomerGroupInCustomerFilters](../../types/interfaces/types.CustomerGroupInCustomerFilters/page.mdx)
|
||||
- [DeleteAccountHolderInput](../../types/interfaces/types.DeleteAccountHolderInput/page.mdx)
|
||||
- [DeleteAccountHolderOutput](../../types/interfaces/types.DeleteAccountHolderOutput/page.mdx)
|
||||
- [DeleteFileType](../../types/interfaces/types.DeleteFileType/page.mdx)
|
||||
- [DeletePaymentInput](../../types/interfaces/types.DeletePaymentInput/page.mdx)
|
||||
- [DeletePaymentOutput](../../types/interfaces/types.DeletePaymentOutput/page.mdx)
|
||||
- [DetailWidgetProps](../../types/interfaces/types.DetailWidgetProps/page.mdx)
|
||||
- [ExistingItem](../../types/interfaces/types.ExistingItem/page.mdx)
|
||||
- [FileServiceGetUploadStreamResult](../../types/interfaces/types.FileServiceGetUploadStreamResult/page.mdx)
|
||||
- [FileServiceUploadResult](../../types/interfaces/types.FileServiceUploadResult/page.mdx)
|
||||
- [FixtureEntryPoints](../../types/interfaces/types.FixtureEntryPoints/page.mdx)
|
||||
- [FixtureEntryPoints](../../types/interfaces/types.FixtureEntryPoints/page.mdx)
|
||||
- [GetPaymentStatusInput](../../types/interfaces/types.GetPaymentStatusInput/page.mdx)
|
||||
- [GetPaymentStatusOutput](../../types/interfaces/types.GetPaymentStatusOutput/page.mdx)
|
||||
- [GetUploadedFileType](../../types/interfaces/types.GetUploadedFileType/page.mdx)
|
||||
- [IAuthProvider](../../types/interfaces/types.IAuthProvider/page.mdx)
|
||||
- [IBigNumber](../../types/interfaces/types.IBigNumber/page.mdx)
|
||||
- [IFulfillmentProvider](../../types/interfaces/types.IFulfillmentProvider/page.mdx)
|
||||
- [ILinkMigrationsPlanner](../../types/interfaces/types.ILinkMigrationsPlanner/page.mdx)
|
||||
- [ILinkModule](../../types/interfaces/types.ILinkModule/page.mdx)
|
||||
- [ILockingModule](../../types/interfaces/types.ILockingModule/page.mdx)
|
||||
- [ILockingProvider](../../types/interfaces/types.ILockingProvider/page.mdx)
|
||||
- [IMessageAggregator](../../types/interfaces/types.IMessageAggregator/page.mdx)
|
||||
- [InitiatePaymentInput](../../types/interfaces/types.InitiatePaymentInput/page.mdx)
|
||||
- [InitiatePaymentOutput](../../types/interfaces/types.InitiatePaymentOutput/page.mdx)
|
||||
- [InputPrice](../../types/interfaces/types.InputPrice/page.mdx)
|
||||
- [IPaymentProvider](../../types/interfaces/types.IPaymentProvider/page.mdx)
|
||||
- [ITaxProvider](../../types/interfaces/types.ITaxProvider/page.mdx)
|
||||
- [JoinerArgument](../../types/interfaces/types.JoinerArgument/page.mdx)
|
||||
- [JoinerDirective](../../types/interfaces/types.JoinerDirective/page.mdx)
|
||||
- [JoinerServiceConfig](../../types/interfaces/types.JoinerServiceConfig/page.mdx)
|
||||
- [JoinerServiceConfigAlias](../../types/interfaces/types.JoinerServiceConfigAlias/page.mdx)
|
||||
- [ListPaymentMethodsInput](../../types/interfaces/types.ListPaymentMethodsInput/page.mdx)
|
||||
- [ListPaymentMethodsOutput](../../types/interfaces/types.ListPaymentMethodsOutput/page.mdx)
|
||||
- [ListShippingOptionsForCartWorkflowInputDTO](../../types/interfaces/types.ListShippingOptionsForCartWorkflowInputDTO/page.mdx)
|
||||
- [MessageAggregatorFormat](../../types/interfaces/types.MessageAggregatorFormat/page.mdx)
|
||||
- [NewItem](../../types/interfaces/types.NewItem/page.mdx)
|
||||
- [OrderWorkflowDTO](../../types/interfaces/types.OrderWorkflowDTO/page.mdx)
|
||||
- [PaymentProviderContext](../../types/interfaces/types.PaymentProviderContext/page.mdx)
|
||||
- [PaymentProviderOutput](../../types/interfaces/types.PaymentProviderOutput/page.mdx)
|
||||
- [PricedShippingOptionDTO](../../types/interfaces/types.PricedShippingOptionDTO/page.mdx)
|
||||
- [ProductCategoryTransformOptions](../../types/interfaces/types.ProductCategoryTransformOptions/page.mdx)
|
||||
- [ReceiveReturnItem](../../types/interfaces/types.ReceiveReturnItem/page.mdx)
|
||||
- [RefundPaymentInput](../../types/interfaces/types.RefundPaymentInput/page.mdx)
|
||||
- [RefundPaymentOutput](../../types/interfaces/types.RefundPaymentOutput/page.mdx)
|
||||
- [RefundReason](../../types/interfaces/types.RefundReason/page.mdx)
|
||||
- [RemoteExpandProperty](../../types/interfaces/types.RemoteExpandProperty/page.mdx)
|
||||
- [RemoteJoinerOptions](../../types/interfaces/types.RemoteJoinerOptions/page.mdx)
|
||||
- [RemoteJoinerQuery](../../types/interfaces/types.RemoteJoinerQuery/page.mdx)
|
||||
- [RemoteNestedExpands](../../types/interfaces/types.RemoteNestedExpands/page.mdx)
|
||||
- [RetrievePaymentInput](../../types/interfaces/types.RetrievePaymentInput/page.mdx)
|
||||
- [RetrievePaymentOutput](../../types/interfaces/types.RetrievePaymentOutput/page.mdx)
|
||||
- [SavePaymentMethodInput](../../types/interfaces/types.SavePaymentMethodInput/page.mdx)
|
||||
- [SavePaymentMethodOutput](../../types/interfaces/types.SavePaymentMethodOutput/page.mdx)
|
||||
- [SessionOptions](../../types/interfaces/types.SessionOptions/page.mdx)
|
||||
- [StoreCreateReturnItem](../../types/interfaces/types.StoreCreateReturnItem/page.mdx)
|
||||
- [StoreCreateReturnShipping](../../types/interfaces/types.StoreCreateReturnShipping/page.mdx)
|
||||
- [UpdateAccountHolderInput](../../types/interfaces/types.UpdateAccountHolderInput/page.mdx)
|
||||
- [UpdateAccountHolderOutput](../../types/interfaces/types.UpdateAccountHolderOutput/page.mdx)
|
||||
- [UpdateCartWorkflowInputDTO](../../types/interfaces/types.UpdateCartWorkflowInputDTO/page.mdx)
|
||||
- [UpdateLineItemInCartWorkflowInputDTO](../../types/interfaces/types.UpdateLineItemInCartWorkflowInputDTO/page.mdx)
|
||||
- [UpdatePaymentInput](../../types/interfaces/types.UpdatePaymentInput/page.mdx)
|
||||
- [UpdatePaymentOutput](../../types/interfaces/types.UpdatePaymentOutput/page.mdx)
|
||||
- [UpdatePriceListPricesWorkflowDTO](../../types/interfaces/types.UpdatePriceListPricesWorkflowDTO/page.mdx)
|
||||
- [UpdatePriceListPriceWorkflowDTO](../../types/interfaces/types.UpdatePriceListPriceWorkflowDTO/page.mdx)
|
||||
- [UpdatePriceListPriceWorkflowStepDTO](../../types/interfaces/types.UpdatePriceListPriceWorkflowStepDTO/page.mdx)
|
||||
@@ -197,6 +234,8 @@ import { TypeList } from "docs-ui"
|
||||
- [UpdateServiceZone](../../types/interfaces/types.UpdateServiceZone/page.mdx)
|
||||
- [UpdateShippingProfile](../../types/interfaces/types.UpdateShippingProfile/page.mdx)
|
||||
- [UploadStreamDescriptorType](../../types/interfaces/types.UploadStreamDescriptorType/page.mdx)
|
||||
- [WebhookActionData](../../types/interfaces/types.WebhookActionData/page.mdx)
|
||||
- [WebhookActionResult](../../types/interfaces/types.WebhookActionResult/page.mdx)
|
||||
|
||||
## Namespaces
|
||||
|
||||
@@ -234,6 +273,7 @@ import { TypeList } from "docs-ui"
|
||||
- [BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)
|
||||
- [BigNumberRawValue](../../types/types/types.BigNumberRawValue/page.mdx)
|
||||
- [BigNumberValue](../../types/types/types.BigNumberValue/page.mdx)
|
||||
- [CalculatedShippingOptionPrice](../../types/types/types.CalculatedShippingOptionPrice/page.mdx)
|
||||
- [CamelCapitalizer](../../types/types/types.CamelCapitalizer/page.mdx)
|
||||
- [CamelCaseParser](../../types/types/types.CamelCaseParser/page.mdx)
|
||||
- [CartLikeWithTotals](../../types/types/types.CartLikeWithTotals/page.mdx)
|
||||
@@ -243,6 +283,7 @@ import { TypeList } from "docs-ui"
|
||||
- [CreateFlatRateShippingOptionInput](../../types/types/types.CreateFlatRateShippingOptionInput/page.mdx)
|
||||
- [CreateFlatRateShippingOptionPriceRecord](../../types/types/types.CreateFlatRateShippingOptionPriceRecord/page.mdx)
|
||||
- [CreateFlatShippingOptionInputBase](../../types/types/types.CreateFlatShippingOptionInputBase/page.mdx)
|
||||
- [CreateFulfillmentResult](../../types/types/types.CreateFulfillmentResult/page.mdx)
|
||||
- [CreateProductVariantWorkflowInputDTO](../../types/types/types.CreateProductVariantWorkflowInputDTO/page.mdx)
|
||||
- [CreateProductWorkflowInputDTO](../../types/types/types.CreateProductWorkflowInputDTO/page.mdx)
|
||||
- [Depth](../../types/types/types.Depth/page.mdx)
|
||||
@@ -262,6 +303,7 @@ import { TypeList } from "docs-ui"
|
||||
- [FilterValue](../../types/types/types.FilterValue/page.mdx)
|
||||
- [FilterValue2](../../types/types/types.FilterValue2/page.mdx)
|
||||
- [FlowRunOptions](../../types/types/types.FlowRunOptions/page.mdx)
|
||||
- [FulfillmentOption](../../types/types/types.FulfillmentOption/page.mdx)
|
||||
- [FulfillmentStatus](../../types/types/types.FulfillmentStatus/page.mdx)
|
||||
- [IncludesSeparator](../../types/types/types.IncludesSeparator/page.mdx)
|
||||
- [IndexOperatorMap](../../types/types/types.IndexOperatorMap/page.mdx)
|
||||
@@ -271,6 +313,7 @@ import { TypeList } from "docs-ui"
|
||||
- [IsOneWord](../../types/types/types.IsOneWord/page.mdx)
|
||||
- [IsPascalCase](../../types/types/types.IsPascalCase/page.mdx)
|
||||
- [IsStringLiteral](../../types/types/types.IsStringLiteral/page.mdx)
|
||||
- [ItemTaxCalculationLine](../../types/types/types.ItemTaxCalculationLine/page.mdx)
|
||||
- [Join](../../types/types/types.Join/page.mdx)
|
||||
- [JoinerRelationship](../../types/types/types.JoinerRelationship/page.mdx)
|
||||
- [LinkCartPaymentCollection](../../types/types/types.LinkCartPaymentCollection/page.mdx)
|
||||
@@ -302,6 +345,11 @@ import { TypeList } from "docs-ui"
|
||||
- [Order](../../types/types/types.Order/page.mdx)
|
||||
- [PascalCapitalizer](../../types/types/types.PascalCapitalizer/page.mdx)
|
||||
- [PascalCaseParser](../../types/types/types.PascalCaseParser/page.mdx)
|
||||
- [PaymentAccountHolderDTO](../../types/types/types.PaymentAccountHolderDTO/page.mdx)
|
||||
- [PaymentActions](../../types/types/types.PaymentActions/page.mdx)
|
||||
- [PaymentAddressDTO](../../types/types/types.PaymentAddressDTO/page.mdx)
|
||||
- [PaymentCustomerDTO](../../types/types/types.PaymentCustomerDTO/page.mdx)
|
||||
- [PaymentProviderInput](../../types/types/types.PaymentProviderInput/page.mdx)
|
||||
- [PaymentStatus](../../types/types/types.PaymentStatus/page.mdx)
|
||||
- [PlannerActionLinkDescriptor](../../types/types/types.PlannerActionLinkDescriptor/page.mdx)
|
||||
- [PluralizationSpecialRules](../../types/types/types.PluralizationSpecialRules/page.mdx)
|
||||
@@ -326,6 +374,7 @@ import { TypeList } from "docs-ui"
|
||||
- [Scalars](../../types/types/types.Scalars/page.mdx)
|
||||
- [Separator](../../types/types/types.Separator/page.mdx)
|
||||
- [SeparatorCaseParser](../../types/types/types.SeparatorCaseParser/page.mdx)
|
||||
- [ShippingTaxCalculationLine](../../types/types/types.ShippingTaxCalculationLine/page.mdx)
|
||||
- [SimpleProduct](../../types/types/types.SimpleProduct/page.mdx)
|
||||
- [SplitAnyCase](../../types/types/types.SplitAnyCase/page.mdx)
|
||||
- [TypeOnly](../../types/types/types.TypeOnly/page.mdx)
|
||||
@@ -337,4 +386,5 @@ import { TypeList } from "docs-ui"
|
||||
- [UpdateProductVariantWorkflowInputDTO](../../types/types/types.UpdateProductVariantWorkflowInputDTO/page.mdx)
|
||||
- [UpdateProductWorkflowInputDTO](../../types/types/types.UpdateProductWorkflowInputDTO/page.mdx)
|
||||
- [UpdatePromotionRulesWorkflowDTO](../../types/types/types.UpdatePromotionRulesWorkflowDTO/page.mdx)
|
||||
- [ValidateFulfillmentDataContext](../../types/types/types.ValidateFulfillmentDataContext/page.mdx)
|
||||
- [WordInCamelCase](../../types/types/types.WordInCamelCase/page.mdx)
|
||||
+19
-19
@@ -189,11 +189,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`PaymentProviderInput`","description":"The input to capture the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[CapturePaymentInput](../../../types/interfaces/types.CapturePaymentInput/page.mdx)","description":"The input to capture the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<PaymentProviderOutput>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`PaymentProviderOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PaymentProviderOutput](../../../types/interfaces/types.PaymentProviderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`object`","description":"The response of operations on a payment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePayment"/>
|
||||
|
||||
### authorizePayment
|
||||
|
||||
@@ -238,11 +238,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`PaymentProviderInput`","description":"The input to authorize the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[PaymentProviderInput](../../../types/types/types.PaymentProviderInput/page.mdx)","description":"The input to authorize the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<AuthorizePaymentOutput>","optional":false,"defaultValue":"","description":"The status of the authorization, along with the `data` field about the payment. Throws in case of an error.","expandable":false,"children":[{"name":"AuthorizePaymentOutput","type":"`AuthorizePaymentOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthorizePaymentOutput](../../../types/interfaces/types.AuthorizePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The status of the authorization, along with the `data` field about the payment. Throws in case of an error.","expandable":false,"children":[{"name":"AuthorizePaymentOutput","type":"`object`","description":"The successful result of authorizing a payment session using a payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePayment"/>
|
||||
|
||||
### cancelPayment
|
||||
|
||||
@@ -276,11 +276,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`PaymentProviderInput`","description":"The input to cancel the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[PaymentProviderInput](../../../types/types/types.PaymentProviderInput/page.mdx)","description":"The input to cancel the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<PaymentProviderOutput>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property, if any. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`PaymentProviderOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PaymentProviderOutput](../../../types/interfaces/types.PaymentProviderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property, if any. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`object`","description":"The response of operations on a payment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPayment"/>
|
||||
|
||||
### initiatePayment
|
||||
|
||||
@@ -325,11 +325,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`InitiatePaymentInput`","description":"The input to create the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiatePayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[InitiatePaymentInput](../../../types/interfaces/types.InitiatePaymentInput/page.mdx)","description":"The input to create the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The amount to be authorized.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiatePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<InitiatePaymentOutput>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property. Throws in case of an error.","expandable":false,"children":[{"name":"InitiatePaymentOutput","type":"`InitiatePaymentOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiatePayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[InitiatePaymentOutput](../../../types/interfaces/types.InitiatePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property. Throws in case of an error.","expandable":false,"children":[{"name":"InitiatePaymentOutput","type":"`object`","description":"The successful result of initiating a payment session using a third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiatePayment"/>
|
||||
|
||||
### deletePayment
|
||||
|
||||
@@ -366,11 +366,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`PaymentProviderInput`","description":"The input to delete the payment session. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[PaymentProviderInput](../../../types/types/types.PaymentProviderInput/page.mdx)","description":"The input to delete the payment session. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<PaymentProviderOutput>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property, if any. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`PaymentProviderOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PaymentProviderOutput](../../../types/interfaces/types.PaymentProviderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property, if any. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`object`","description":"The response of operations on a payment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePayment"/>
|
||||
|
||||
### getPaymentStatus
|
||||
|
||||
@@ -415,11 +415,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`PaymentProviderInput`","description":"The input to get the payment status. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getPaymentStatus"/>
|
||||
<TypeList types={[{"name":"input","type":"[PaymentProviderInput](../../../types/types/types.PaymentProviderInput/page.mdx)","description":"The input to get the payment status. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getPaymentStatus"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<GetPaymentStatusOutput>","optional":false,"defaultValue":"","description":"The payment session's status. It can also return additional `data` from the payment provider.","expandable":false,"children":[{"name":"GetPaymentStatusOutput","type":"`GetPaymentStatusOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getPaymentStatus"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[GetPaymentStatusOutput](../../../types/interfaces/types.GetPaymentStatusOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The payment session's status. It can also return additional `data` from the payment provider.","expandable":false,"children":[{"name":"GetPaymentStatusOutput","type":"`object`","description":"The result of getting the payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getPaymentStatus"/>
|
||||
|
||||
### refundPayment
|
||||
|
||||
@@ -456,11 +456,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`RefundPaymentInput`","description":"The input to refund the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[RefundPaymentInput](../../../types/interfaces/types.RefundPaymentInput/page.mdx)","description":"The input to refund the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The amount to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<PaymentProviderOutput>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property, or an error object.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`PaymentProviderOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PaymentProviderOutput](../../../types/interfaces/types.PaymentProviderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property, or an error object.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`object`","description":"The response of operations on a payment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPayment"/>
|
||||
|
||||
### retrievePayment
|
||||
|
||||
@@ -492,11 +492,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`PaymentProviderInput`","description":"The input to retrieve the payment. The `data` field should contain the data from the payment provider when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrievePayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[PaymentProviderInput](../../../types/types/types.PaymentProviderInput/page.mdx)","description":"The input to retrieve the payment. The `data` field should contain the data from the payment provider when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrievePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<PaymentProviderOutput>","optional":false,"defaultValue":"","description":"The payment's data as found in the the payment provider.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`PaymentProviderOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrievePayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PaymentProviderOutput](../../../types/interfaces/types.PaymentProviderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The payment's data as found in the the payment provider.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`object`","description":"The response of operations on a payment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrievePayment"/>
|
||||
|
||||
### updatePayment
|
||||
|
||||
@@ -539,11 +539,11 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"input","type":"`UpdatePaymentInput`","description":"The input to update the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePayment"/>
|
||||
<TypeList types={[{"name":"input","type":"[UpdatePaymentInput](../../../types/interfaces/types.UpdatePaymentInput/page.mdx)","description":"The input to update the payment. The `data` field should contain the data from the payment provider. when the payment was created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The payment session's amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../types/interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<PaymentProviderOutput>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`PaymentProviderOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePayment"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PaymentProviderOutput](../../../types/interfaces/types.PaymentProviderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The new data to store in the payment's `data` property. Throws in case of an error.","expandable":false,"children":[{"name":"PaymentProviderOutput","type":"`object`","description":"The response of operations on a payment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePayment"/>
|
||||
|
||||
### getWebhookActionAndData
|
||||
|
||||
@@ -620,7 +620,7 @@ class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[WebhookActionResult](../../../payment/interfaces/payment.WebhookActionResult/page.mdx)>","optional":false,"defaultValue":"","description":"The webhook result. If the `action`'s value is `captured`, the payment is captured within Medusa as well.\nIf the `action`'s value is `authorized`, the associated payment session is authorized within Medusa.","expandable":false,"children":[{"name":"WebhookActionResult","type":"`object`","description":"The actions that the payment provider informs the Payment Module to perform.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getWebhookActionAndData"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[WebhookActionResult](../../../types/interfaces/types.WebhookActionResult/page.mdx)>","optional":false,"defaultValue":"","description":"The webhook result. If the `action`'s value is `captured`, the payment is captured within Medusa as well.\nIf the `action`'s value is `authorized`, the associated payment session is authorized within Medusa.","expandable":false,"children":[{"name":"WebhookActionResult","type":"`object`","description":"The actions that the payment provider informs the Payment Module to perform.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getWebhookActionAndData"/>
|
||||
|
||||
---
|
||||
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# CalculateShippingOptionsPricesWorkflowOutput
|
||||
|
||||
**CalculateShippingOptionsPricesWorkflowOutput**: [CalculatedShippingOptionPrice](../../../../../fulfillment/types/fulfillment.CalculatedShippingOptionPrice/page.mdx)[]
|
||||
**CalculateShippingOptionsPricesWorkflowOutput**: [CalculatedShippingOptionPrice](../../../../types/types.CalculatedShippingOptionPrice/page.mdx)[]
|
||||
|
||||
The calculated shipping option prices.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthIdentityProviderService
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="AuthIdentityProviderService"/>
|
||||
@@ -0,0 +1,10 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthenticationInput
|
||||
|
||||
The data passed to the auth provider when authenticating a user
|
||||
or validating a callback.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="AuthenticationInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthenticationResponse
|
||||
|
||||
The details of the authentication response.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the provider identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity_id","type":"`string`","description":"The user's identifier. For example, when using the `emailpass`\nprovider, the `entity_id` would be the user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity_id","type":"`string`","description":"The ID of the auth identity linked to the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"auth_identity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The auth identity linked to the provider identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the provider in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"user_metadata","type":"`Record<string, unknown>`","description":"Holds custom data related to the user in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="AuthenticationResponse"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthorizePaymentInput
|
||||
|
||||
The data to authorize a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="AuthorizePaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# AuthorizePaymentOutput
|
||||
|
||||
The successful result of authorizing a payment session using a payment provider.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"status","type":"[PaymentSessionStatus](../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment, which will be stored in the payment session's `status` field.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="AuthorizePaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CancelPaymentInput
|
||||
|
||||
The data to cancel a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CancelPaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CancelPaymentOutput
|
||||
|
||||
The result of canceling the payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CancelPaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CapturePaymentInput
|
||||
|
||||
The data to capture a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CapturePaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CapturePaymentOutput
|
||||
|
||||
The result of capturing the payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CapturePaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateAccountHolderInput
|
||||
|
||||
The data to create an account holder.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"context","type":"Omit<[PaymentProviderContext](../types.PaymentProviderContext/page.mdx), \"customer\"> & `object`","description":"The context of creating the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The account holder's associated customer details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateAccountHolderInput"/>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateAccountHolderOutput
|
||||
|
||||
The result of creating an account holder in the third-party payment provider. The `data`
|
||||
property is stored as-is in Medusa's account holder's `data` property.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the account holder in the payment provider.\nThis is stored in Medusa's account holder in the `external_id` property.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateAccountHolderOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# DeleteAccountHolderInput
|
||||
|
||||
The data to delete an account holder.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"context","type":"Omit<[PaymentProviderContext](../types.PaymentProviderContext/page.mdx), \"account_holder\"> & `object`","description":"The context of deleting the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"Partial<[AccountHolderDTO](../../../payment/interfaces/payment.AccountHolderDTO/page.mdx)>","description":"The account holder's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the account holder.","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":"external_id","type":"`string`","description":"The external ID of the account holder in the payment provider system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data of the account holder, as returned by the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`null` \\| `string` \\| `Date`","description":"When the account holder was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`null` \\| `string` \\| `Date`","description":"When the account holder was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DeleteAccountHolderInput"/>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# DeleteAccountHolderOutput
|
||||
|
||||
The result of deleting an account holder in the third-party payment provider.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DeleteAccountHolderOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# DeletePaymentInput
|
||||
|
||||
The data to delete a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DeletePaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# DeletePaymentOutput
|
||||
|
||||
The result of deleting a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DeletePaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# GetPaymentStatusInput
|
||||
|
||||
The data to get the payment status.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="GetPaymentStatusInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# GetPaymentStatusOutput
|
||||
|
||||
The result of getting the payment status.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"status","type":"[PaymentSessionStatus](../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment, which will be stored in the payment session's `status` field.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="GetPaymentStatusOutput"/>
|
||||
@@ -0,0 +1,45 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# IAuthProvider
|
||||
|
||||
## Overview
|
||||
|
||||
Authentication provider interface for the auth module.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"update","type":"(`data`: `Record<string, unknown>`, `authIdentityProviderService`: [AuthIdentityProviderService](../types.AuthIdentityProviderService/page.mdx)) => Promise<[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="IAuthProvider"/>
|
||||
|
||||
___
|
||||
|
||||
## Methods
|
||||
|
||||
### authenticate
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../types.AuthenticationInput/page.mdx)","description":"The data passed to the auth provider when authenticating a user\nor validating a callback.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../types.AuthIdentityProviderService/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authenticate"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authenticate"/>
|
||||
|
||||
### register
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../types.AuthenticationInput/page.mdx)","description":"The data passed to the auth provider when authenticating a user\nor validating a callback.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../types.AuthIdentityProviderService/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="register"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="register"/>
|
||||
|
||||
### validateCallback
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthenticationInput](../types.AuthenticationInput/page.mdx)","description":"The data passed to the auth provider when authenticating a user\nor validating a callback.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"url","type":"`string`","description":"URL of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"`Record<string, string>`","description":"Headers of incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`Record<string, string>`","description":"Query params of the incoming authentication request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, string>`","description":"Body of the incoming authentication request.\n\nOne of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.\nThe field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.\nIf not passed, the provider will fallback to the callback\\_url provided in the provider options.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"protocol","type":"`string`","description":"Protocol of the incoming authentication request (For example, `https`).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authIdentityProviderService","type":"[AuthIdentityProviderService](../types.AuthIdentityProviderService/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"retrieve","type":"(`selector`: ``{ entity_id: string }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"create","type":"(`data`: ``{ entity_id: string ; provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"(`entity_id`: `string`, `data`: ``{ provider_metadata?: Record<string, unknown> ; user_metadata?: Record<string, unknown> }``) => Promise<[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"setState","type":"(`key`: `string`, `value`: `Record<string, unknown>`) => Promise<void>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getState","type":"(`key`: `string`) => Promise<null \\| Record<string, unknown>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateCallback"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthenticationResponse","type":"[AuthenticationResponse](../types.AuthenticationResponse/page.mdx)","optional":false,"defaultValue":"","description":"The details of the authentication response.","expandable":false,"children":[{"name":"success","type":"`boolean`","description":"Whether the authentication was successful.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"authIdentity","type":"[AuthIdentityDTO](../../../auth/interfaces/auth.AuthIdentityDTO/page.mdx)","description":"The authenticated user's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the auth identity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_identities","type":"[ProviderIdentityDTO](../../../auth/interfaces/auth.ProviderIdentityDTO/page.mdx)[]","description":"The list of provider identities linked to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"app_metadata","type":"`Record<string, unknown>`","description":"Holds information related to the actor IDs tied to the auth identity.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`string`","description":"If an error occurs during the authentication process,\nwhether within the Auth Module or a third-party provider,\nthe error message is set in this field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location","type":"`string`","description":"The URL to redirect to for further authentication action\nwith a third-party provider. This takes precedence before\nthe `success` field.\n\nSo, after checking that authentication is successful,\nyou should check whether this field is defined and, if so, redirect to the\nspecified location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateCallback"/>
|
||||
@@ -0,0 +1,153 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# IFulfillmentProvider
|
||||
|
||||
## Methods
|
||||
|
||||
### getIdentifier
|
||||
|
||||
Return a unique identifier to retrieve the fulfillment plugin provider
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"Return a unique identifier to retrieve the fulfillment plugin provider","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getIdentifier"/>
|
||||
|
||||
### getFulfillmentOptions
|
||||
|
||||
Return the available fulfillment options for the given data.
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[FulfillmentOption](../../types/types.FulfillmentOption/page.mdx)[]>","optional":false,"defaultValue":"","description":"Return the available fulfillment options for the given data.","expandable":false,"children":[{"name":"FulfillmentOption[]","type":"[FulfillmentOption](../../types/types.FulfillmentOption/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FulfillmentOption","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentOptions"/>
|
||||
|
||||
### validateFulfillmentData
|
||||
|
||||
Validate the given fulfillment data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionData","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[ValidateFulfillmentDataContext](../../types/types.ValidateFulfillmentDataContext/page.mdx)","description":"The context for validating fulfillment data.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"id\"`]","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"shipping_address\"`]","description":"The cart's shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"items\"`] & `object`","description":"The cart's items","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant","type":"`object`","description":"The item's variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`object`","description":"The item's product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"from_location","type":"[StockLocationDTO](../../StockLocationTypes/types/types.StockLocationTypes.StockLocationDTO/page.mdx)","description":"Details about the location that items are being shipped from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The associated address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[FulfillmentSetDTO](../../../fulfillment/interfaces/fulfillment.FulfillmentSetDTO/page.mdx)[]","description":"Fulfillment sets for the location","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"The deletion date of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StockLocationAddressDTO](../../StockLocationTypes/types/types.StockLocationTypes.StockLocationAddressDTO/page.mdx)","description":"The address of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"Validate the given fulfillment data.","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
|
||||
|
||||
### validateOption
|
||||
|
||||
Validate the given option.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateOption"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<boolean>","optional":false,"defaultValue":"","description":"Validate the given option.","expandable":false,"children":[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateOption"/>
|
||||
|
||||
### canCalculate
|
||||
|
||||
Check if the provider can calculate the fulfillment price.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateShippingOptionDTO](../../../fulfillment/interfaces/fulfillment.CreateShippingOptionDTO/page.mdx)","description":"The shipping option to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"Omit<[CreateShippingOptionTypeDTO](../../../fulfillment/interfaces/fulfillment.CreateShippingOptionTypeDTO/page.mdx), \"shipping_option_id\">","description":"The shipping option type associated with the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand its associated fulfillments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateShippingOptionRuleDTO](../../../fulfillment/interfaces/fulfillment.CreateShippingOptionRuleDTO/page.mdx), \"shipping_option_id\">[]","description":"The shipping option rules associated with the shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The attribute of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[RuleOperatorType](../../../fulfillment/types/fulfillment.RuleOperatorType/page.mdx)","description":"The operator of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"The value(s) of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="canCalculate"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<boolean>","optional":false,"defaultValue":"","description":"Check if the provider can calculate the fulfillment price.","expandable":false,"children":[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="canCalculate"/>
|
||||
|
||||
### calculatePrice
|
||||
|
||||
Calculate the price for the given fulfillment option.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"optionData","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[CartPropsForFulfillment](../../../fulfillment/types/fulfillment.CartPropsForFulfillment/page.mdx) & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"id\"`]","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"shipping_address\"`]","description":"The cart's shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[CartDTO](../../../fulfillment/interfaces/fulfillment.CartDTO/page.mdx)[`\"items\"`] & `object`","description":"The cart's items","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant","type":"`object`","description":"The item's variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`object`","description":"The item's product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="calculatePrice"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CalculatedShippingOptionPrice](../../types/types.CalculatedShippingOptionPrice/page.mdx)>","optional":false,"defaultValue":"","description":"Calculate the price for the given fulfillment option.","expandable":false,"children":[{"name":"CalculatedShippingOptionPrice","type":"[CalculatedShippingOptionPrice](../../types/types.CalculatedShippingOptionPrice/page.mdx)","optional":false,"defaultValue":"","description":"A calculated shipping option price.","expandable":false,"children":[{"name":"calculated_amount","type":"`number`","description":"The calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_tax_inclusive","type":"`boolean`","description":"Whether the calculated price includes taxes. If enabled, Medusa will\ninfer the taxes from the calculated price. If false, Medusa will\nadd taxes to the calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="calculatePrice"/>
|
||||
|
||||
### createFulfillment
|
||||
|
||||
Create a fulfillment for the given data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"Partial<Omit<[FulfillmentItemDTO](../../../fulfillment/interfaces/fulfillment.FulfillmentItemDTO/page.mdx), \"fulfillment\">>[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`undefined` \\| Partial<FulfillmentOrderDTO>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"Partial<Omit<[FulfillmentDTO](../../../fulfillment/interfaces/fulfillment.FulfillmentDTO/page.mdx), \"provider_id\" \\| \"items\" \\| \"data\">>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"packed_at","type":"`null` \\| `Date`","description":"The date the fulfillment was packed.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipped_at","type":"`null` \\| `Date`","description":"The date the fulfillment was shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"delivered_at","type":"`null` \\| `Date`","description":"The date the fulfillment was delivered.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"The date the fulfillment was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`null` \\| `string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option","type":"`null` \\| [ShippingOptionDTO](../../../fulfillment/interfaces/fulfillment.ShippingOptionDTO/page.mdx)","description":"The associated shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The associated service zone's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The associated shipping profile's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The associated fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The associated shipping option type's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data necessary for the associated fulfillment provider to process the shipping option\nand, later, its associated fulfillments.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[ServiceZoneDTO](../../../fulfillment/interfaces/fulfillment.ServiceZoneDTO/page.mdx)","description":"The associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[ShippingProfileDTO](../../../fulfillment/interfaces/fulfillment.ShippingProfileDTO/page.mdx)","description":"The associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_provider","type":"[FulfillmentProviderDTO](../../../fulfillment/interfaces/fulfillment.FulfillmentProviderDTO/page.mdx)","description":"The associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ShippingOptionTypeDTO](../../../fulfillment/interfaces/fulfillment.Line truncated
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CreateFulfillmentResult](../../types/types.CreateFulfillmentResult/page.mdx)>","optional":false,"defaultValue":"","description":"Create a fulfillment for the given data.","expandable":false,"children":[{"name":"CreateFulfillmentResult","type":"[CreateFulfillmentResult](../../types/types.CreateFulfillmentResult/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Additional fulfillment data from provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label's URL.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillment"/>
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
Cancel the given fulfillment.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"fulfillment","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelFulfillment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"Cancel the given fulfillment.","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelFulfillment"/>
|
||||
|
||||
### getFulfillmentDocuments
|
||||
|
||||
Get the documents for the given fulfillment data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"Get the documents for the given fulfillment data.","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentDocuments"/>
|
||||
|
||||
### createReturnFulfillment
|
||||
|
||||
Create a return for the given data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"fromData","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CreateFulfillmentResult](../../types/types.CreateFulfillmentResult/page.mdx)>","optional":false,"defaultValue":"","description":"Create a return for the given data.","expandable":false,"children":[{"name":"CreateFulfillmentResult","type":"[CreateFulfillmentResult](../../types/types.CreateFulfillmentResult/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Additional fulfillment data from provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label's URL.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillment"/>
|
||||
|
||||
### retrieveDocuments
|
||||
|
||||
Get the documents for the given return data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"fulfillmentData","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documentType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"Get the documents for the given return data.","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveDocuments"/>
|
||||
|
||||
### getReturnDocuments
|
||||
|
||||
Get the documents for the given return data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getReturnDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"Get the documents for the given return data.","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getReturnDocuments"/>
|
||||
|
||||
### getShipmentDocuments
|
||||
|
||||
Get the documents for the given shipment data.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getShipmentDocuments"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<any>","optional":false,"defaultValue":"","description":"Get the documents for the given shipment data.","expandable":false,"children":[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getShipmentDocuments"/>
|
||||
@@ -0,0 +1,372 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# IPaymentProvider
|
||||
|
||||
## Methods
|
||||
|
||||
### initiatePayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[InitiatePaymentInput](../types.InitiatePaymentInput/page.mdx)","description":"The data used initiate a payment in a provider when a payment\nsession is created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../types/types.BigNumberInput/page.mdx)","description":"The amount to be authorized.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiatePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[InitiatePaymentOutput](../types.InitiatePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"InitiatePaymentOutput","type":"[InitiatePaymentOutput](../types.InitiatePaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The successful result of initiating a payment session using a third-party payment provider.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session in the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiatePayment"/>
|
||||
|
||||
### updatePayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdatePaymentInput](../types.UpdatePaymentInput/page.mdx)","description":"The attributes to update a payment related to a payment session in a provider.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../types/types.BigNumberInput/page.mdx)","description":"The payment session's amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[UpdatePaymentOutput](../types.UpdatePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdatePaymentOutput","type":"[UpdatePaymentOutput](../types.UpdatePaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of updating a payment.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePayment"/>
|
||||
|
||||
### deletePayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[DeletePaymentInput](../types.DeletePaymentInput/page.mdx)","description":"The data to delete a payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[DeletePaymentOutput](../types.DeletePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"DeletePaymentOutput","type":"[DeletePaymentOutput](../types.DeletePaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of deleting a payment.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePayment"/>
|
||||
|
||||
### authorizePayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[AuthorizePaymentInput](../types.AuthorizePaymentInput/page.mdx)","description":"The data to authorize a payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AuthorizePaymentOutput](../types.AuthorizePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"AuthorizePaymentOutput","type":"[AuthorizePaymentOutput](../types.AuthorizePaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The successful result of authorizing a payment session using a payment provider.","expandable":false,"children":[{"name":"status","type":"[PaymentSessionStatus](../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment, which will be stored in the payment session's `status` field.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePayment"/>
|
||||
|
||||
### capturePayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CapturePaymentInput](../types.CapturePaymentInput/page.mdx)","description":"The data to capture a payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CapturePaymentOutput](../types.CapturePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CapturePaymentOutput","type":"[CapturePaymentOutput](../types.CapturePaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of capturing the payment.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePayment"/>
|
||||
|
||||
### refundPayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[RefundPaymentInput](../types.RefundPaymentInput/page.mdx)","description":"The data to refund a payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../types/types.BigNumberInput/page.mdx)","description":"The amount to refund.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[RefundPaymentOutput](../types.RefundPaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundPaymentOutput","type":"[RefundPaymentOutput](../types.RefundPaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of refunding the payment.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPayment"/>
|
||||
|
||||
### retrievePayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[RetrievePaymentInput](../types.RetrievePaymentInput/page.mdx)","description":"The data to retrieve a payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrievePayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[RetrievePaymentOutput](../types.RetrievePaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RetrievePaymentOutput","type":"[RetrievePaymentOutput](../types.RetrievePaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of retrieving the payment.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrievePayment"/>
|
||||
|
||||
### cancelPayment
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CancelPaymentInput](../types.CancelPaymentInput/page.mdx)","description":"The data to cancel a payment.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPayment"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CancelPaymentOutput](../types.CancelPaymentOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CancelPaymentOutput","type":"[CancelPaymentOutput](../types.CancelPaymentOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of canceling the payment.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPayment"/>
|
||||
|
||||
### createAccountHolder
|
||||
|
||||
This method is used when creating an account holder in Medusa, allowing you to create
|
||||
the equivalent account in the third-party service. An account holder is useful to
|
||||
later save payment methods, such as credit cards, for a customer in the
|
||||
third-party payment provider using the [savePaymentMethod](page.mdx#savepaymentmethod) method.
|
||||
|
||||
The returned data will be stored in the account holder created in Medusa. For example,
|
||||
the returned `id` property will be stored in the account holder's `external_id` property.
|
||||
|
||||
Medusa creates an account holder when a payment session initialized for a registered customer.
|
||||
|
||||
:::note
|
||||
|
||||
This is only available after Medusa `v2.5.0`.
|
||||
|
||||
:::
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
Options
|
||||
> {
|
||||
async createAccountHolder({ context, data }: CreateAccountHolderInput) {
|
||||
const { account_holder, customer } = context
|
||||
|
||||
if (account_holder?.data?.id) {
|
||||
return { id: account_holder.data.id as string }
|
||||
}
|
||||
|
||||
if (!customer) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
"Missing customer data."
|
||||
)
|
||||
}
|
||||
|
||||
// assuming you have a client that creates the account holder
|
||||
const providerAccountHolder = await this.client.createAccountHolder({
|
||||
email: customer.email,
|
||||
...data
|
||||
})
|
||||
|
||||
return {
|
||||
id: providerAccountHolder.id,
|
||||
data: providerAccountHolder as unknown as Record<string, unknown>
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreateAccountHolderInput](../types.CreateAccountHolderInput/page.mdx)","description":"Input data including the details of the account holder to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"context","type":"Omit<[PaymentProviderContext](../types.PaymentProviderContext/page.mdx), \"customer\"> & `object`","description":"The context of creating the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The account holder's associated customer details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createAccountHolder"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[CreateAccountHolderOutput](../types.CreateAccountHolderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The result of creating the account holder. If an error occurs, throw it.","expandable":false,"children":[{"name":"CreateAccountHolderOutput","type":"[CreateAccountHolderOutput](../types.CreateAccountHolderOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of creating an account holder in the third-party payment provider. The \n\n`data`\n\n\nproperty is stored as-is in Medusa's account holder's \n\n`data`\n\n property.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the account holder in the payment provider.\nThis is stored in Medusa's account holder in the `external_id` property.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createAccountHolder"/>
|
||||
|
||||
### updateAccountHolder
|
||||
|
||||
This method is used when updating an account holder in Medusa, allowing you to update
|
||||
the equivalent account in the third-party service.
|
||||
|
||||
The returned data will be stored in the account holder created in Medusa. For example,
|
||||
the returned `id` property will be stored in the account holder's `external_id` property.
|
||||
|
||||
:::note
|
||||
|
||||
This is only available after Medusa `v2.5.1`.
|
||||
|
||||
:::
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
Options
|
||||
> {
|
||||
async updateAccountHolder({ context, data }: UpdateAccountHolderInput) {
|
||||
const { account_holder, customer } = context
|
||||
|
||||
if (!account_holder?.data?.id) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
"Missing account holder ID."
|
||||
)
|
||||
}
|
||||
|
||||
// assuming you have a client that updates the account holder
|
||||
const providerAccountHolder = await this.client.updateAccountHolder({
|
||||
id: account_holder.data.id,
|
||||
...data
|
||||
})
|
||||
|
||||
return {
|
||||
id: providerAccountHolder.id,
|
||||
data: providerAccountHolder as unknown as Record<string, unknown>
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateAccountHolderInput](../types.UpdateAccountHolderInput/page.mdx)","description":"Input data including the details of the account holder to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx) & `object`","description":"The context of updating the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateAccountHolder"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[UpdateAccountHolderOutput](../types.UpdateAccountHolderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The result of updating the account holder. If an error occurs, throw it.","expandable":false,"children":[{"name":"UpdateAccountHolderOutput","type":"[UpdateAccountHolderOutput](../types.UpdateAccountHolderOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of updating an account holder in the third-party payment provider. The \n\n`data`\n\n\nproperty is stored as-is in Medusa's account holder's \n\n`data`\n\n property.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateAccountHolder"/>
|
||||
|
||||
### deleteAccountHolder
|
||||
|
||||
This method is used when an account holder is deleted in Medusa, allowing you
|
||||
to also delete the equivalent account holder in the third-party service.
|
||||
|
||||
:::note
|
||||
|
||||
This is only available after Medusa `v2.5.0`.
|
||||
|
||||
:::
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
Options
|
||||
> {
|
||||
async deleteAccountHolder({ context }: DeleteAccountHolderInput) {
|
||||
const { account_holder } = context
|
||||
const accountHolderId = account_holder?.data?.id as string | undefined
|
||||
if (!accountHolderId) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
"Missing account holder ID."
|
||||
)
|
||||
}
|
||||
|
||||
// assuming you have a client that deletes the account holder
|
||||
await this.client.deleteAccountHolder({
|
||||
id: accountHolderId
|
||||
})
|
||||
|
||||
return {}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[DeleteAccountHolderInput](../types.DeleteAccountHolderInput/page.mdx)","description":"Input data including the details of the account holder to delete.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"context","type":"Omit<[PaymentProviderContext](../types.PaymentProviderContext/page.mdx), \"account_holder\"> & `object`","description":"The context of deleting the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"Partial<[AccountHolderDTO](../../../payment/interfaces/payment.AccountHolderDTO/page.mdx)>","description":"The account holder's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteAccountHolder"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[DeleteAccountHolderOutput](../types.DeleteAccountHolderOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The result of deleting the account holder. If an error occurs, throw it.","expandable":false,"children":[{"name":"DeleteAccountHolderOutput","type":"[DeleteAccountHolderOutput](../types.DeleteAccountHolderOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of deleting an account holder in the third-party payment provider.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteAccountHolder"/>
|
||||
|
||||
### listPaymentMethods
|
||||
|
||||
This method is used to retrieve the list of saved payment methods for an account holder
|
||||
in the third-party payment provider. A payment provider that supports saving payment methods
|
||||
must implement this method.
|
||||
|
||||
:::note
|
||||
|
||||
This is only available after Medusa `v2.5.0`.
|
||||
|
||||
:::
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
Options
|
||||
> {
|
||||
async listPaymentMethods({ context }: ListPaymentMethodsInput) {
|
||||
const { account_holder } = context
|
||||
const accountHolderId = account_holder?.data?.id as string | undefined
|
||||
|
||||
if (!accountHolderId) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
"Missing account holder ID."
|
||||
)
|
||||
}
|
||||
|
||||
// assuming you have a client that lists the payment methods
|
||||
const paymentMethods = await this.client.listPaymentMethods({
|
||||
customer_id: accountHolderId
|
||||
})
|
||||
|
||||
return paymentMethods.map((pm) => ({
|
||||
id: pm.id,
|
||||
data: pm as unknown as Record<string, unknown>
|
||||
}))
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[ListPaymentMethodsInput](../types.ListPaymentMethodsInput/page.mdx)","description":"Input data including the details of the account holder to list payment methods for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listPaymentMethods"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[ListPaymentMethodsOutput](../types.ListPaymentMethodsOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The list of payment methods saved for the account holder. If an error occurs, throw it.","expandable":false,"children":[{"name":"ListPaymentMethodsOutput","type":"[ListPaymentMethodsOutput](../types.ListPaymentMethodsOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of listing payment methods for an account holder in the third-party payment provider.","expandable":false,"children":[{"name":"ListPaymentMethodsOutput","type":"`object`","description":"The result of listing payment methods for an account holder in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listPaymentMethods"/>
|
||||
|
||||
### savePaymentMethod
|
||||
|
||||
This method is used to save a customer's payment method, such as a credit card, in the
|
||||
third-party payment provider. A payment provider that supports saving payment methods
|
||||
must implement this method.
|
||||
|
||||
:::note
|
||||
|
||||
This is only available after Medusa `v2.5.0`.
|
||||
|
||||
:::
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { MedusaError } from "@medusajs/framework/utils"
|
||||
|
||||
class MyPaymentProviderService extends AbstractPaymentProvider<
|
||||
Options
|
||||
> {
|
||||
async savePaymentMethod({ context, data }: SavePaymentMethodInput) { *
|
||||
const accountHolderId = context?.account_holder?.data?.id as
|
||||
| string
|
||||
| undefined
|
||||
|
||||
if (!accountHolderId) {
|
||||
throw new MedusaError(
|
||||
MedusaError.Types.INVALID_DATA,
|
||||
"Missing account holder ID."
|
||||
)
|
||||
}
|
||||
|
||||
// assuming you have a client that saves the payment method
|
||||
const paymentMethod = await this.client.savePaymentMethod({
|
||||
customer_id: accountHolderId,
|
||||
...data
|
||||
})
|
||||
|
||||
return {
|
||||
id: paymentMethod.id,
|
||||
data: paymentMethod as unknown as Record<string, unknown>
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[SavePaymentMethodInput](../types.SavePaymentMethodInput/page.mdx)","description":"The details of the payment method to save.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="savePaymentMethod"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[SavePaymentMethodOutput](../types.SavePaymentMethodOutput/page.mdx)>","optional":false,"defaultValue":"","description":"The result of saving the payment method. If an error occurs, throw it.","expandable":false,"children":[{"name":"SavePaymentMethodOutput","type":"[SavePaymentMethodOutput](../types.SavePaymentMethodOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of saving a payment method.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment method in the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="savePaymentMethod"/>
|
||||
|
||||
### getPaymentStatus
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[GetPaymentStatusInput](../types.GetPaymentStatusInput/page.mdx)","description":"The data to get the payment status.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getPaymentStatus"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[GetPaymentStatusOutput](../types.GetPaymentStatusOutput/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"GetPaymentStatusOutput","type":"[GetPaymentStatusOutput](../types.GetPaymentStatusOutput/page.mdx)","optional":false,"defaultValue":"","description":"The result of getting the payment status.","expandable":false,"children":[{"name":"status","type":"[PaymentSessionStatus](../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment, which will be stored in the payment session's `status` field.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getPaymentStatus"/>
|
||||
|
||||
### getWebhookActionAndData
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getWebhookActionAndData"/>
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[WebhookActionResult](../types.WebhookActionResult/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"WebhookActionResult","type":"[WebhookActionResult](../types.WebhookActionResult/page.mdx)","optional":false,"defaultValue":"","description":"The actions that the payment provider informs the Payment Module to perform.","expandable":false,"children":[{"name":"action","type":"[PaymentActions](../../types/types.PaymentActions/page.mdx)","description":"Normalized events from payment provider to internal payment module events.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[WebhookActionData](../types.WebhookActionData/page.mdx)","description":"The webhook action's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"session_id","type":"`string`","description":"The associated payment session's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/types.BigNumberValue/page.mdx)","description":"The amount to be captured or authorized (based on the action's type.)","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getWebhookActionAndData"/>
|
||||
@@ -0,0 +1,132 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# ITaxProvider
|
||||
|
||||
## Overview
|
||||
|
||||
A tax provider is used to retrieve the tax lines in a provided context. The Tax Module provides a default `system` provider. You can create your own tax provider,
|
||||
either in a plugin, in a provider module, or directly in your Medusa application's codebase, then use it in any tax region.
|
||||
|
||||
---
|
||||
|
||||
## How to Create a Tax Provider
|
||||
|
||||
A tax provider class is defined in a TypeScript or JavaScript file. The class must implement the
|
||||
`ITaxProvider` interface imported from `@medusajs/framework/types`.
|
||||
|
||||
The file can be defined in a plugin, a provider module, or under the `src/services` directory of your Medusa application. You can later pass the package's name or the
|
||||
path to the file in the `providers` option of the Tax Module.
|
||||
|
||||
For example:
|
||||
|
||||
```ts title="src/services/my-tax.ts"
|
||||
import { ITaxProvider } from "@medusajs/framework/types"
|
||||
|
||||
export default class MyTaxProvider implements ITaxProvider {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Identifier Property
|
||||
|
||||
The `identifier` property in a tax provider is used when the tax provider is registered in the dependency container or added to the database. A tax provider is represented in the database by the `TaxProvider` data model.
|
||||
|
||||
For example:
|
||||
|
||||
```ts title="src/services/my-tax.ts"
|
||||
export default class MyTaxProvider implements ITaxProvider {
|
||||
static identifier = "my-tax"
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Constructor
|
||||
|
||||
You can use the `constructor` of your tax provider to access the resources registered in the dependency container.
|
||||
|
||||
You can also use the constructor to initialize your integration with the third-party provider. For example, if you use a client to connect to the third-party provider’s APIs, you can initialize it in the constructor and use it in other methods in the service.
|
||||
|
||||
Additionally, if you’re creating your tax provider as a plugin or a provider module to be installed in any Medusa application and you want to access its options, you can access them in the constructor.
|
||||
|
||||
For example:
|
||||
|
||||
```ts
|
||||
export default class MyTaxProvider implements ITaxProvider {
|
||||
// ...
|
||||
constructor(container, options) {
|
||||
// you can access options here
|
||||
|
||||
// you can also initialize a client that
|
||||
// communicates with a third-party service.
|
||||
this.client = new Client(options)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Methods
|
||||
|
||||
### getTaxLines
|
||||
|
||||
This method is used to retrieve the tax lines of items and shipping methods. It's used
|
||||
when the `getTaxLines` method of the Tax Module's main service is called.
|
||||
|
||||
This method is useful during checkout or when calculating the totals of orders or exchanges.
|
||||
|
||||
#### Example
|
||||
|
||||
An example of how this method is implemented in the `system` provider:
|
||||
|
||||
```ts
|
||||
// ...
|
||||
|
||||
export default class SystemTaxService implements ITaxProvider {
|
||||
// ...
|
||||
|
||||
async getTaxLines(
|
||||
itemLines: TaxTypes.ItemTaxCalculationLine[],
|
||||
shippingLines: TaxTypes.ShippingTaxCalculationLine[],
|
||||
_: TaxTypes.TaxCalculationContext
|
||||
): Promise<(TaxTypes.ItemTaxLineDTO | TaxTypes.ShippingTaxLineDTO)[]> {
|
||||
let taxLines: (TaxTypes.ItemTaxLineDTO | TaxTypes.ShippingTaxLineDTO)[] =
|
||||
itemLines.flatMap((l) => {
|
||||
return l.rates.map((r) => ({
|
||||
rate_id: r.id,
|
||||
rate: r.rate || 0,
|
||||
name: r.name,
|
||||
code: r.code,
|
||||
line_item_id: l.line_item.id,
|
||||
provider_id: this.getIdentifier(),
|
||||
}))
|
||||
})
|
||||
|
||||
taxLines = taxLines.concat(
|
||||
shippingLines.flatMap((l) => {
|
||||
return l.rates.map((r) => ({
|
||||
rate_id: r.id,
|
||||
rate: r.rate || 0,
|
||||
name: r.name,
|
||||
code: r.code,
|
||||
shipping_line_id: l.shipping_line.id,
|
||||
provider_id: this.getIdentifier(),
|
||||
}))
|
||||
})
|
||||
)
|
||||
|
||||
return taxLines
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
<TypeList types={[{"name":"itemLines","type":"[ItemTaxCalculationLine](../../types/types.ItemTaxCalculationLine/page.mdx)[]","description":"The line item lines to calculate taxes for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"line_item","type":"[TaxableItemDTO](../../../tax/interfaces/tax.TaxableItemDTO/page.mdx)","description":"The line item to calculate taxes for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the taxable item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The ID of the type of the item's product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../tax/types/tax.BigNumberInput/page.mdx)","description":"The quantity of the taxable item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../tax/types/tax.BigNumberInput/page.mdx)","description":"The unit price of the taxable item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the taxable item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rates","type":"[TaxRateDTO](../../../tax/interfaces/tax.TaxRateDTO/page.mdx)[]","description":"The rates applicable on the item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"shippingLines","type":"[ShippingTaxCalculationLine](../../types/types.ShippingTaxCalculationLine/page.mdx)[]","description":"The shipping method lines to calculate taxes for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_line","type":"[TaxableShippingDTO](../../../tax/interfaces/tax.TaxableShippingDTO/page.mdx)","description":"The shipping method to calculate taxes for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the taxable shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../tax/types/tax.BigNumberInput/page.mdx)","description":"The unit price of the taxable shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","descripLine truncated
|
||||
|
||||
#### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<([ItemTaxLineDTO](../../../tax/interfaces/tax.ItemTaxLineDTO/page.mdx) \\| [ShippingTaxLineDTO](../../../tax/interfaces/tax.ShippingTaxLineDTO/page.mdx))[]>","optional":false,"defaultValue":"","description":"The list of calculated line item and shipping tax lines.\nIf an item in the array has the `shipping_line_id` property, then it's a shipping tax line. Otherwise, if it has\nthe `line_item_id` property, then it's a line item tax line.","expandable":false,"children":[{"name":"(ItemTaxLineDTO \\| ShippingTaxLineDTO)[]","type":"([ItemTaxLineDTO](../../../tax/interfaces/tax.ItemTaxLineDTO/page.mdx) \\| [ShippingTaxLineDTO](../../../tax/interfaces/tax.ShippingTaxLineDTO/page.mdx))[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ItemTaxLineDTO \\| ShippingTaxLineDTO","type":"[ItemTaxLineDTO](../../../tax/interfaces/tax.ItemTaxLineDTO/page.mdx) \\| [ShippingTaxLineDTO](../../../tax/interfaces/tax.ShippingTaxLineDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getTaxLines"/>
|
||||
@@ -0,0 +1,10 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# InitiatePaymentInput
|
||||
|
||||
The data used initiate a payment in a provider when a payment
|
||||
session is created.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"amount","type":"[BigNumberInput](../../types/types.BigNumberInput/page.mdx)","description":"The amount to be authorized.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="InitiatePaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# InitiatePaymentOutput
|
||||
|
||||
The successful result of initiating a payment session using a third-party payment provider.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the payment session in the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="InitiatePaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# ListPaymentMethodsInput
|
||||
|
||||
The data to list payment methods.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="ListPaymentMethodsInput"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# ListPaymentMethodsOutput
|
||||
|
||||
The result of listing payment methods for an account holder in the third-party payment provider.
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentProviderContext
|
||||
|
||||
Context data provided to the payment provider
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="PaymentProviderContext"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentProviderOutput
|
||||
|
||||
The response of operations on a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="PaymentProviderOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# RefundPaymentInput
|
||||
|
||||
The data to refund a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"amount","type":"[BigNumberInput](../../types/types.BigNumberInput/page.mdx)","description":"The amount to refund.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RefundPaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# RefundPaymentOutput
|
||||
|
||||
The result of refunding the payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RefundPaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# RetrievePaymentInput
|
||||
|
||||
The data to retrieve a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RetrievePaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# RetrievePaymentOutput
|
||||
|
||||
The result of retrieving the payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RetrievePaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# SavePaymentMethodInput
|
||||
|
||||
The data to save a payment method.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SavePaymentMethodInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# SavePaymentMethodOutput
|
||||
|
||||
The result of saving a payment method.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the payment method in the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SavePaymentMethodOutput"/>
|
||||
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdateAccountHolderInput
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx) & `object`","description":"The context of updating the account holder.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateAccountHolderInput"/>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdateAccountHolderOutput
|
||||
|
||||
The result of updating an account holder in the third-party payment provider. The `data`
|
||||
property is stored as-is in Medusa's account holder's `data` property.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateAccountHolderOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdatePaymentInput
|
||||
|
||||
The attributes to update a payment related to a payment session in a provider.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"amount","type":"[BigNumberInput](../../types/types.BigNumberInput/page.mdx)","description":"The payment session's amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../../types/types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../../types/types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../../types/types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdatePaymentInput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdatePaymentOutput
|
||||
|
||||
The result of updating a payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The unstructured data returned from the payment provider. The content will vary between providers.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdatePaymentOutput"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# WebhookActionData
|
||||
|
||||
The details of an action to be performed as a result of a received webhook event.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"session_id","type":"`string`","description":"The associated payment session's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/types.BigNumberValue/page.mdx)","description":"The amount to be captured or authorized (based on the action's type.)","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="WebhookActionData"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# WebhookActionResult
|
||||
|
||||
The actions that the payment provider informs the Payment Module to perform.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"action","type":"[PaymentActions](../../types/types.PaymentActions/page.mdx)","description":"Normalized events from payment provider to internal payment module events.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[WebhookActionData](../types.WebhookActionData/page.mdx)","description":"The webhook action's details.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"session_id","type":"`string`","description":"The associated payment session's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/types.BigNumberValue/page.mdx)","description":"The amount to be captured or authorized (based on the action's type.)","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="WebhookActionResult"/>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CalculatedShippingOptionPrice
|
||||
|
||||
**CalculatedShippingOptionPrice**: `Object`
|
||||
|
||||
A calculated shipping option price.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"calculated_amount","type":"`number`","description":"The calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_tax_inclusive","type":"`boolean`","description":"Whether the calculated price includes taxes. If enabled, Medusa will\ninfer the taxes from the calculated price. If false, Medusa will\nadd taxes to the calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CalculatedShippingOptionPrice"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# CreateFulfillmentResult
|
||||
|
||||
**CreateFulfillmentResult**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Additional fulfillment data from provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"labels","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"tracking_number","type":"`string`","description":"The tracking number of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tracking_url","type":"`string`","description":"The tracking URL of the fulfillment label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label_url","type":"`string`","description":"The label's URL.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateFulfillmentResult"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# FulfillmentOption
|
||||
|
||||
**FulfillmentOption**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The option's ID. This ID can be an ID in the third-party system relevant\nfor later processing of fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether the option can be used to return items.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FulfillmentOption"/>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# ItemTaxCalculationLine
|
||||
|
||||
**ItemTaxCalculationLine**: `Object`
|
||||
|
||||
A line item and the tax rates configured to apply to the
|
||||
product contained in the line item.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"line_item","type":"[TaxableItemDTO](../../../tax/interfaces/tax.TaxableItemDTO/page.mdx)","description":"The line item to calculate taxes for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the taxable item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string`","description":"The associated product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_type_id","type":"`string`","description":"The ID of the type of the item's product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../tax/types/tax.BigNumberInput/page.mdx)","description":"The quantity of the taxable item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../tax/types/tax.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"unit_price","type":"[BigNumberInput](../../../tax/types/tax.BigNumberInput/page.mdx)","description":"The unit price of the taxable item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../tax/types/tax.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the taxable item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rates","type":"[TaxRateDTO](../../../tax/interfaces/tax.TaxRateDTO/page.mdx)[]","description":"The rates applicable on the item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="ItemTaxCalculationLine"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentAccountHolderDTO
|
||||
|
||||
**PaymentAccountHolderDTO**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="PaymentAccountHolderDTO"/>
|
||||
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentActions
|
||||
|
||||
**PaymentActions**: `"authorized"` \| `"captured"` \| `"failed"` \| `"pending"` \| `"requires_more"` \| `"canceled"` \| `"not_supported"`
|
||||
|
||||
Normalized events from payment provider to internal payment module events.
|
||||
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentAddressDTO
|
||||
|
||||
**PaymentAddressDTO**: Partial<[AddressDTO](../types.AddressDTO/page.mdx)>
|
||||
|
||||
The address of the payment.
|
||||
@@ -0,0 +1,11 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentCustomerDTO
|
||||
|
||||
**PaymentCustomerDTO**: `Object`
|
||||
|
||||
The customer associated with the payment.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="PaymentCustomerDTO"/>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# PaymentProviderInput
|
||||
|
||||
**PaymentProviderInput**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"Data is a combination of the input from the user and what is stored in the database for the associated model.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../interfaces/types.PaymentProviderContext/page.mdx)","description":"The context for this payment operation. The data is guaranteed to be validated and not directly provided by the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"account_holder","type":"[PaymentAccountHolderDTO](../types.PaymentAccountHolderDTO/page.mdx)","description":"The account holder information, if available for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"Account holder's details as stored in the third-party payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"customer","type":"[PaymentCustomerDTO](../types.PaymentCustomerDTO/page.mdx)","description":"The customer information from Medusa.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer in Medusa.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string` \\| `null`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string` \\| `null`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string` \\| `null`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"billing_address","type":"[PaymentAddressDTO](../types.PaymentAddressDTO/page.mdx) \\| `null`","description":"The customer's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"idempotency_key","type":"`string`","description":"Idempotency key for the request, if the payment provider supports it. It will be ignored otherwise.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="PaymentProviderInput"/>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# ShippingTaxCalculationLine
|
||||
|
||||
**ShippingTaxCalculationLine**: `Object`
|
||||
|
||||
A shipping method and the tax rates configured to apply to the
|
||||
shipping method.
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"shipping_line","type":"[TaxableShippingDTO](../../../tax/interfaces/tax.TaxableShippingDTO/page.mdx)","description":"The shipping method to calculate taxes for.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the taxable shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_id","type":"`string`","description":"The associated shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"[BigNumberInput](../../../tax/types/tax.BigNumberInput/page.mdx)","description":"The unit price of the taxable shipping.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../tax/types/tax.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the taxable shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rates","type":"[TaxRateDTO](../../../tax/interfaces/tax.TaxRateDTO/page.mdx)[]","description":"The rates applicable on the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the Tax Rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the associated tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate should be combined with parent rates.\n\nLearn more [here](https://docs.medusajs.com/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default rate for the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The deletion date of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate. For example, the ID of the user that created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="ShippingTaxCalculationLine"/>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# ValidateFulfillmentDataContext
|
||||
|
||||
**ValidateFulfillmentDataContext**: [CartPropsForFulfillment](../../../fulfillment/types/fulfillment.CartPropsForFulfillment/page.mdx) & `object`
|
||||
|
||||
The context for validating fulfillment data.
|
||||
Reference in new issue
Block a user