docs: add section on testing providers (#9453)

This commit is contained in:
Shahed Nasser
2024-10-04 10:29:45 +03:00
committed by GitHub
parent aec99b49cc
commit bc8de8e5b1
16 changed files with 597 additions and 391 deletions
+5 -5
View File
@@ -619,7 +619,7 @@ export const generatedEditDates = {
"references/types/NotificationTypes/interfaces/types.NotificationTypes.Attachment/page.mdx": "2024-08-29T00:11:17.880Z",
"references/modules/fulfillment_models/page.mdx": "2024-08-29T00:11:41.369Z",
"references/modules/order_models/page.mdx": "2024-08-29T00:11:42.665Z",
"references/notification/classes/notification.AbstractNotificationProviderService/page.mdx": "2024-10-03T00:12:16.803Z",
"references/notification/classes/notification.AbstractNotificationProviderService/page.mdx": "2024-10-03T14:53:20.991Z",
"references/order/interfaces/order.IOrderModuleService/page.mdx": "2024-09-17T00:11:25.807Z",
"references/order_models/classes/order_models.OrderItem/page.mdx": "2024-09-17T00:11:25.047Z",
"references/order_models/classes/order_models.OrderSummary/page.mdx": "2024-09-17T00:11:25.087Z",
@@ -919,7 +919,7 @@ export const generatedEditDates = {
"references/auth/IAuthModuleService/methods/auth.IAuthModuleService.authenticate/page.mdx": "2024-09-05T00:11:18.402Z",
"references/auth/IAuthModuleService/methods/auth.IAuthModuleService.validateCallback/page.mdx": "2024-09-05T00:11:18.406Z",
"references/auth/interfaces/auth.AuthenticationResponse/page.mdx": "2024-09-06T11:11:37.674Z",
"references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx": "2024-10-03T00:11:54.195Z",
"references/auth_provider/classes/auth_provider.AbstractAuthModuleProvider/page.mdx": "2024-10-03T14:53:07.421Z",
"references/core_flows/Invite/Workflows_Invite/functions/core_flows.Invite.Workflows_Invite.refreshInviteTokensWorkflow/page.mdx": "2024-10-02T00:12:01.537Z",
"references/types/CommonTypes/types/types.CommonTypes.BatchMethodResponse/page.mdx": "2024-09-05T00:11:16.710Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnShipping/page.mdx": "2024-09-05T00:11:17.518Z",
@@ -1249,7 +1249,7 @@ export const generatedEditDates = {
"references/dml/entity/classes/dml.entity.DmlEntity/page.mdx": "2024-09-17T00:11:23.507Z",
"references/dml/entity_builder/EntityBuilder/methods/dml.entity_builder.EntityBuilder.define/page.mdx": "2024-10-03T00:12:15.442Z",
"references/dml/entity_builder/types/dml.entity_builder.ManyToManyOptions/page.mdx": "2024-09-17T00:11:23.499Z",
"references/file/classes/file.AbstractFileProviderService/page.mdx": "2024-10-03T00:12:15.492Z",
"references/file/classes/file.AbstractFileProviderService/page.mdx": "2024-10-03T14:53:20.249Z",
"references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.createFulfillmentSets/page.mdx": "2024-09-17T00:11:23.903Z",
"references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.createGeoZones/page.mdx": "2024-09-17T00:11:23.975Z",
"references/fulfillment/IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.createServiceZones/page.mdx": "2024-09-17T00:11:23.935Z",
@@ -1311,7 +1311,7 @@ export const generatedEditDates = {
"references/fulfillment/interfaces/fulfillment.OrderLineItemDTO/page.mdx": "2024-09-17T00:11:24.259Z",
"references/fulfillment/interfaces/fulfillment.OrderLineItemTaxLineDTO/page.mdx": "2024-09-17T00:11:24.231Z",
"references/fulfillment/types/fulfillment.JoinerRelationship/page.mdx": "2024-09-17T00:11:24.183Z",
"references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx": "2024-10-03T00:12:15.598Z",
"references/fulfillment_provider/classes/fulfillment_provider.AbstractFulfillmentProviderService/page.mdx": "2024-10-03T14:53:20.307Z",
"references/inventory_next/IInventoryService/methods/inventory_next.IInventoryService.adjustInventory/page.mdx": "2024-09-17T00:11:24.695Z",
"references/inventory_next/IInventoryService/methods/inventory_next.IInventoryService.confirmInventory/page.mdx": "2024-09-17T00:11:24.699Z",
"references/inventory_next/IInventoryService/methods/inventory_next.IInventoryService.createInventoryItems/page.mdx": "2024-09-17T00:11:24.639Z",
@@ -1451,7 +1451,7 @@ export const generatedEditDates = {
"references/payment/interfaces/payment.JoinerServiceConfig/page.mdx": "2024-09-17T00:11:26.727Z",
"references/payment/interfaces/payment.JoinerServiceConfigAlias/page.mdx": "2024-09-17T00:11:26.723Z",
"references/payment/types/payment.JoinerRelationship/page.mdx": "2024-09-17T00:11:26.723Z",
"references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx": "2024-10-03T00:12:18.526Z",
"references/payment_provider/classes/payment_provider.AbstractPaymentProvider/page.mdx": "2024-10-03T14:53:21.960Z",
"references/pricing/IPricingModuleService/methods/pricing.IPricingModuleService.addPriceListPrices/page.mdx": "2024-09-17T00:11:27.255Z",
"references/pricing/IPricingModuleService/methods/pricing.IPricingModuleService.addPrices/page.mdx": "2024-09-17T00:11:27.199Z",
"references/pricing/IPricingModuleService/methods/pricing.IPricingModuleService.calculatePrices/page.mdx": "2024-09-17T00:11:27.171Z",
@@ -234,7 +234,7 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
await authIdentityService.retrieve({
entity_id: data.body.email, // email or some ID
})
return {
success: false,
error: "Identity with email already exists",
@@ -248,13 +248,13 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
// can include password or any other relevant information
}
})
return {
success: true,
authIdentity: createdAuthIdentity,
}
}
return { success: false, error: error.message }
}
}
@@ -299,7 +299,7 @@ class MyAuthProviderService extends AbstractAuthModuleProvider {
user: data.user // example
}
)
return { success: true, authIdentity }
} catch (error) {
return { success: false, error: error.message }
@@ -452,3 +452,23 @@ module.exports = defineConfig({
}
})
```
---
## 5. Test it Out
To test out your authentication provider, use any of the [Authentication Routes](https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route), using your provider's ID as a path parameter.
For example, to get a registration token for an admin user, send a `POST` request to `/auth/user/my-auth/register` replacing `my-auth` with your authentication provider's ID:
```bash
curl -X POST http://localhost:9000/auth/user/my-auth/register
-H 'Content-Type: application/json' --data-raw '{
"email": "Whitney_Schultz@gmail.com",
"password": "supersecret"
}'
```
Change the request body to pass the data required for your authentication provider to register the user.
If registration is successful, the response will have a `token` property.
@@ -230,3 +230,9 @@ module.exports = defineConfig({
}
})
```
---
## 5. Test it Out
To test out your file provider, use the Medusa Admin or the [Upload API route](https://docs.medusajs.com/v2/api/admin#uploads_postuploads) to upload a file.
@@ -124,14 +124,14 @@ system.
class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
// ...
async validateFulfillmentData(
optionData: any,
data: any,
optionData: any,
data: any,
context: any
): Promise<any> {
// assuming your client retrieves an ID from the
// third-party service
const externalId = await this.client.getId()
return {
...data,
externalId
@@ -176,7 +176,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
### canCalculate
This method indicates whether a shippin option's price is calculated during
This method indicates whether a shippin option's price is calculated during
checkout or is fixed.
#### Example
@@ -214,7 +214,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
// assuming the client can calculate the price using
// the third-party service
const price = await this.client.calculate(data)
return price
}
}
@@ -230,7 +230,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
### createFulfillment
This method is used when a fulfillment is created. If the method returns in the object a
This method is used when a fulfillment is created. If the method returns in the object a
`data` property, it's stored in the fulfillment's `data` property.
The `data` property is useful when handling the fulfillment later,
@@ -244,9 +244,9 @@ You can also use this method to perform an action with the third-party fulfillme
class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
// ...
async createFulfillment(
data: any,
items: any,
order: any,
data: any,
items: any,
order: any,
fulfillment: any
): Promise<any> {
// assuming the client creates a fulfillment
@@ -255,7 +255,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
fulfillment,
items
)
return {
data: {
...data,
@@ -327,7 +327,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
### createReturnFulfillment
This method is used when a fulfillment is created for a return. If the method returns in the object a
This method is used when a fulfillment is created for a return. If the method returns in the object a
`data` property, it's stored in the fulfillment's `data` property.
The `data` property is useful when handling the fulfillment later,
@@ -346,7 +346,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
const externalData = await this.client.createReturn(
fulfillment
)
return {
data: {
...fulfillment.data,
@@ -425,7 +425,7 @@ This method retrieves the documents of a fulfillment of a certain type.
class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
// ...
async retrieveDocuments(
fulfillmentData: any,
fulfillmentData: any,
documentType: any
): Promise<void> {
// assuming the client retrieves documents
@@ -493,3 +493,14 @@ module.exports = defineConfig({
}
})
```
---
## 5. Test it Out
Before you use your fulfillment provider, in the Medusa Admin:
1. Add the fulfillment provider to a location.
2. Add in the location a delivery shipping option that uses the provider.
Then, place an order, choosing the shipping option you created during checkout, and create a fulfillment in the Medusa Admin. The fulfillment is created using your provider.
@@ -184,3 +184,61 @@ module.exports = defineConfig({
}
})
```
Make sure to specify the correct channels for your provider in the `channels` option.
---
## 5. Test it Out
### Create Subscriber
To test out the provider, create a subscriber at `src/subscribers/user-created.ts` with the following content:
```ts title="src/subscribers/user-created.ts"
import { Modules } from "@medusajs/framework/utils"
import {
SubscriberArgs,
type SubscriberConfig,
} from "@medusajs/medusa"
export default async function userCreatedHandler({
event: { data },
container,
}: SubscriberArgs<{ id: string }>) {
const notificationModuleService = container.resolve(
Modules.NOTIFICATION
)
const userModule = container.resolve(
Modules.USER
)
const user = await userModule.retrieveUser(data.id)
await notificationModuleService.createNotifications({
to: user.email,
channel: "email",
template: "new-user"
})
}
export const config: SubscriberConfig = {
event: "user.created",
}
```
In the subscriber, you resolve the Notification and User modules. Then, you use the User Module's main service to retrieve the user's details.
Finally, you use the Notification Module's main service to send a notification to the user's email through the `email` channel (assuming that's your provider's channel).
Make sure to replace the value of `template` to the ID of the template in your provider.
### Create User
Use the following command to create a user:
```bash
npx medusa user -e admin@test.com -p supersecret
```
After the user is created, the subscriber is executed, sending the notification using your provider.
@@ -721,3 +721,17 @@ module.exports = defineConfig({
}
})
```
---
## 5. Test it Out
Before you use your payment provider, enable it in a region using the Medusa Admin.
Then, go through checkout to place an order. Your payment provider is used to authorize the payment.
---
## Useful Guides
- [Storefront Guide: how to implement UI for your payment provider during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment)
@@ -1,12 +1,12 @@
{
"id": 34231,
"id": 0,
"name": "auth-provider",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 34232,
"id": 1,
"name": "AbstractAuthModuleProvider",
"variant": "declaration",
"kind": 128,
@@ -59,7 +59,7 @@
},
"children": [
{
"id": 34235,
"id": 4,
"name": "validateOptions",
"variant": "declaration",
"kind": 2048,
@@ -68,7 +68,7 @@
},
"signatures": [
{
"id": 34236,
"id": 5,
"name": "validateOptions",
"variant": "signature",
"kind": 4096,
@@ -83,7 +83,7 @@
},
"parameters": [
{
"id": 34237,
"id": 6,
"name": "options",
"variant": "param",
"kind": 32768,
@@ -117,7 +117,7 @@
]
},
{
"id": 34251,
"id": 20,
"name": "authenticate",
"variant": "declaration",
"kind": 2048,
@@ -126,7 +126,7 @@
},
"signatures": [
{
"id": 34252,
"id": 21,
"name": "authenticate",
"variant": "signature",
"kind": 4096,
@@ -173,7 +173,7 @@
},
"parameters": [
{
"id": 34253,
"id": 22,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -197,7 +197,7 @@
}
},
{
"id": 34254,
"id": 23,
"name": "authIdentityProviderService",
"variant": "param",
"kind": 32768,
@@ -271,14 +271,14 @@
}
},
{
"id": 34255,
"id": 24,
"name": "register",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34256,
"id": 25,
"name": "register",
"variant": "signature",
"kind": 4096,
@@ -313,7 +313,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nimport {\n AuthIdentityProviderService,\n AuthenticationInput,\n AuthenticationResponse\n} from \"@medusajs/framework/types\"\nimport { MedusaError } from \"@medusajs/framework/utils\"\n// ...\n\nclass MyAuthProviderService extends AbstractAuthModuleProvider {\n // ...\n async register(\n data: AuthenticationInput,\n authIdentityProviderService: AuthIdentityProviderService\n ): Promise<AuthenticationResponse> {\n try {\n await authIdentityService.retrieve({\n entity_id: data.body.email, // email or some ID\n })\n \n return {\n success: false,\n error: \"Identity with email already exists\",\n }\n } catch (error) {\n if (error.type === MedusaError.Types.NOT_FOUND) {\n const createdAuthIdentity = await authIdentityProviderService.create({\n entity_id: data.body.email, // email or some ID\n provider: this.provider,\n provider_metadata: {\n // can include password or any other relevant information\n }\n })\n \n return {\n success: true,\n authIdentity: createdAuthIdentity,\n }\n }\n \n return { success: false, error: error.message }\n }\n }\n}\n```"
"text": "```ts\nimport {\n AuthIdentityProviderService,\n AuthenticationInput,\n AuthenticationResponse\n} from \"@medusajs/framework/types\"\nimport { MedusaError } from \"@medusajs/framework/utils\"\n// ...\n\nclass MyAuthProviderService extends AbstractAuthModuleProvider {\n // ...\n async register(\n data: AuthenticationInput,\n authIdentityProviderService: AuthIdentityProviderService\n ): Promise<AuthenticationResponse> {\n try {\n await authIdentityService.retrieve({\n entity_id: data.body.email, // email or some ID\n })\n\n return {\n success: false,\n error: \"Identity with email already exists\",\n }\n } catch (error) {\n if (error.type === MedusaError.Types.NOT_FOUND) {\n const createdAuthIdentity = await authIdentityProviderService.create({\n entity_id: data.body.email, // email or some ID\n provider: this.provider,\n provider_metadata: {\n // can include password or any other relevant information\n }\n })\n\n return {\n success: true,\n authIdentity: createdAuthIdentity,\n }\n }\n\n return { success: false, error: error.message }\n }\n }\n}\n```"
}
]
}
@@ -321,7 +321,7 @@
},
"parameters": [
{
"id": 34257,
"id": 26,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -345,7 +345,7 @@
}
},
{
"id": 34258,
"id": 27,
"name": "authIdentityProviderService",
"variant": "param",
"kind": 32768,
@@ -419,14 +419,14 @@
}
},
{
"id": 34259,
"id": 28,
"name": "update",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34260,
"id": 29,
"name": "update",
"variant": "signature",
"kind": 4096,
@@ -461,7 +461,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nimport {\n AuthIdentityProviderService,\n AuthenticationInput,\n AuthenticationResponse\n} from \"@medusajs/framework/types\"\nimport { MedusaError } from \"@medusajs/framework/utils\"\n// ...\n\nclass MyAuthProviderService extends AbstractAuthModuleProvider {\n // ...\n async update(\n data: Record<string, unknown>,\n authIdentityProviderService: AuthIdentityProviderService\n ): Promise<AuthenticationResponse> {\n try {\n const authIdentity = await authIdentityService.update(\n data.email, // email or some ID used to identify the auth identity\n {\n user: data.user // example\n }\n )\n \n return { success: true, authIdentity }\n } catch (error) {\n return { success: false, error: error.message }\n }\n }\n}\n```"
"text": "```ts\nimport {\n AuthIdentityProviderService,\n AuthenticationInput,\n AuthenticationResponse\n} from \"@medusajs/framework/types\"\nimport { MedusaError } from \"@medusajs/framework/utils\"\n// ...\n\nclass MyAuthProviderService extends AbstractAuthModuleProvider {\n // ...\n async update(\n data: Record<string, unknown>,\n authIdentityProviderService: AuthIdentityProviderService\n ): Promise<AuthenticationResponse> {\n try {\n const authIdentity = await authIdentityService.update(\n data.email, // email or some ID used to identify the auth identity\n {\n user: data.user // example\n }\n )\n\n return { success: true, authIdentity }\n } catch (error) {\n return { success: false, error: error.message }\n }\n }\n}\n```"
}
]
}
@@ -469,7 +469,7 @@
},
"parameters": [
{
"id": 34261,
"id": 30,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -527,7 +527,7 @@
}
},
{
"id": 34262,
"id": 31,
"name": "authIdentityProviderService",
"variant": "param",
"kind": 32768,
@@ -601,14 +601,14 @@
}
},
{
"id": 34263,
"id": 32,
"name": "validateCallback",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34264,
"id": 33,
"name": "validateCallback",
"variant": "signature",
"kind": 4096,
@@ -623,7 +623,7 @@
"kind": "inline-tag",
"tag": "@link",
"text": "authenticate",
"target": 34251,
"target": 20,
"tsLinkText": ""
},
{
@@ -678,7 +678,7 @@
},
"parameters": [
{
"id": 34265,
"id": 34,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -702,7 +702,7 @@
}
},
{
"id": 34266,
"id": 35,
"name": "authIdentityProviderService",
"variant": "param",
"kind": 32768,
@@ -780,11 +780,11 @@
{
"title": "Methods",
"children": [
34235,
34251,
34255,
34259,
34263
4,
20,
24,
28,
32
]
}
],
@@ -805,93 +805,93 @@
{
"title": "Classes",
"children": [
34232
1
]
}
],
"packageName": "@medusajs/utils",
"symbolIdMap": {
"34231": {
"0": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": ""
},
"34232": {
"1": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider"
},
"34235": {
"4": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.validateOptions"
},
"34236": {
"5": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.validateOptions"
},
"34237": {
"6": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "options"
},
"34251": {
"20": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.authenticate"
},
"34252": {
"21": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.authenticate"
},
"34253": {
"22": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "data"
},
"34254": {
"23": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "authIdentityProviderService"
},
"34255": {
"24": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.register"
},
"34256": {
"25": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.register"
},
"34257": {
"26": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "data"
},
"34258": {
"27": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "authIdentityProviderService"
},
"34259": {
"28": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.update"
},
"34260": {
"29": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.update"
},
"34261": {
"30": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "data"
},
"34262": {
"31": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "authIdentityProviderService"
},
"34263": {
"32": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.validateCallback"
},
"34264": {
"33": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "AbstractAuthModuleProvider.validateCallback"
},
"34265": {
"34": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "data"
},
"34266": {
"35": {
"sourceFileName": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts",
"qualifiedName": "authIdentityProviderService"
}
@@ -901,7 +901,7 @@
"1": "../../../../packages/core/utils/src/auth/abstract-auth-provider.ts"
},
"reflections": {
"1": 34231
"1": 0
}
}
}
@@ -1,12 +1,12 @@
{
"id": 34406,
"id": 36,
"name": "file",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 34407,
"id": 37,
"name": "AbstractFileProviderService",
"variant": "declaration",
"kind": 128,
@@ -25,7 +25,7 @@
},
"children": [
{
"id": 34409,
"id": 39,
"name": "validateOptions",
"variant": "declaration",
"kind": 2048,
@@ -34,7 +34,7 @@
},
"signatures": [
{
"id": 34410,
"id": 40,
"name": "validateOptions",
"variant": "signature",
"kind": 4096,
@@ -49,7 +49,7 @@
},
"parameters": [
{
"id": 34411,
"id": 41,
"name": "options",
"variant": "param",
"kind": 32768,
@@ -83,21 +83,21 @@
]
},
{
"id": 34412,
"id": 42,
"name": "constructor",
"variant": "declaration",
"kind": 512,
"flags": {},
"signatures": [
{
"id": 34413,
"id": 43,
"name": "new AbstractFileProviderService",
"variant": "signature",
"kind": 16384,
"flags": {},
"type": {
"type": "reference",
"target": 34407,
"target": 37,
"name": "AbstractFileProviderService",
"package": "@medusajs/utils"
}
@@ -105,14 +105,14 @@
]
},
{
"id": 34416,
"id": 46,
"name": "upload",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34417,
"id": 47,
"name": "upload",
"variant": "signature",
"kind": 4096,
@@ -147,7 +147,7 @@
},
"parameters": [
{
"id": 34418,
"id": 48,
"name": "file",
"variant": "param",
"kind": 32768,
@@ -205,14 +205,14 @@
}
},
{
"id": 34419,
"id": 49,
"name": "delete",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34420,
"id": 50,
"name": "delete",
"variant": "signature",
"kind": 4096,
@@ -247,7 +247,7 @@
},
"parameters": [
{
"id": 34421,
"id": 51,
"name": "file",
"variant": "param",
"kind": 32768,
@@ -300,14 +300,14 @@
}
},
{
"id": 34422,
"id": 52,
"name": "getPresignedDownloadUrl",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34423,
"id": 53,
"name": "getPresignedDownloadUrl",
"variant": "signature",
"kind": 4096,
@@ -342,7 +342,7 @@
},
"parameters": [
{
"id": 34424,
"id": 54,
"name": "fileData",
"variant": "param",
"kind": 32768,
@@ -399,16 +399,16 @@
{
"title": "Constructors",
"children": [
34412
42
]
},
{
"title": "Methods",
"children": [
34409,
34416,
34419,
34422
39,
46,
49,
52
]
}
],
@@ -429,65 +429,65 @@
{
"title": "Classes",
"children": [
34407
37
]
}
],
"packageName": "@medusajs/utils",
"symbolIdMap": {
"34406": {
"36": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": ""
},
"34407": {
"37": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService"
},
"34409": {
"39": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.validateOptions"
},
"34410": {
"40": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.validateOptions"
},
"34411": {
"41": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "options"
},
"34416": {
"46": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.upload"
},
"34417": {
"47": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.upload"
},
"34418": {
"48": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "file"
},
"34419": {
"49": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.delete"
},
"34420": {
"50": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.delete"
},
"34421": {
"51": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "file"
},
"34422": {
"52": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.getPresignedDownloadUrl"
},
"34423": {
"53": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "AbstractFileProviderService.getPresignedDownloadUrl"
},
"34424": {
"54": {
"sourceFileName": "../../../../packages/core/utils/src/file/abstract-file-provider.ts",
"qualifiedName": "fileData"
}
@@ -497,7 +497,7 @@
"1": "../../../../packages/core/utils/src/file/abstract-file-provider.ts"
},
"reflections": {
"1": 34406
"1": 36
}
}
}
@@ -1,12 +1,12 @@
{
"id": 34425,
"id": 55,
"name": "fulfillment-provider",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 34426,
"id": 56,
"name": "AbstractFulfillmentProviderService",
"variant": "declaration",
"kind": 128,
@@ -25,7 +25,7 @@
},
"children": [
{
"id": 34427,
"id": 57,
"name": "identifier",
"variant": "declaration",
"kind": 1024,
@@ -58,21 +58,21 @@
}
},
{
"id": 34435,
"id": 65,
"name": "constructor",
"variant": "declaration",
"kind": 512,
"flags": {},
"signatures": [
{
"id": 34436,
"id": 66,
"name": "new AbstractFulfillmentProviderService",
"variant": "signature",
"kind": 16384,
"flags": {},
"type": {
"type": "reference",
"target": 34426,
"target": 56,
"name": "AbstractFulfillmentProviderService",
"package": "@medusajs/utils"
}
@@ -80,14 +80,14 @@
]
},
{
"id": 34439,
"id": 69,
"name": "getFulfillmentOptions",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34440,
"id": 70,
"name": "getFulfillmentOptions",
"variant": "signature",
"kind": 4096,
@@ -157,14 +157,14 @@
}
},
{
"id": 34441,
"id": 71,
"name": "validateFulfillmentData",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34442,
"id": 72,
"name": "validateFulfillmentData",
"variant": "signature",
"kind": 4096,
@@ -223,7 +223,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async validateFulfillmentData(\n optionData: any, \n data: any, \n context: any\n ): Promise<any> {\n // assuming your client retrieves an ID from the\n // third-party service\n const externalId = await this.client.getId()\n \n return {\n ...data,\n externalId\n }\n }\n}\n```"
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async validateFulfillmentData(\n optionData: any,\n data: any,\n context: any\n ): Promise<any> {\n // assuming your client retrieves an ID from the\n // third-party service\n const externalId = await this.client.getId()\n\n return {\n ...data,\n externalId\n }\n }\n}\n```"
}
]
}
@@ -231,7 +231,7 @@
},
"parameters": [
{
"id": 34443,
"id": 73,
"name": "optionData",
"variant": "param",
"kind": 32768,
@@ -258,7 +258,7 @@
}
},
{
"id": 34444,
"id": 74,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -285,7 +285,7 @@
}
},
{
"id": 34445,
"id": 75,
"name": "context",
"variant": "param",
"kind": 32768,
@@ -333,14 +333,14 @@
}
},
{
"id": 34446,
"id": 76,
"name": "validateOption",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34447,
"id": 77,
"name": "validateOption",
"variant": "signature",
"kind": 4096,
@@ -399,7 +399,7 @@
},
"parameters": [
{
"id": 34448,
"id": 78,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -447,14 +447,14 @@
}
},
{
"id": 34449,
"id": 79,
"name": "canCalculate",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34450,
"id": 80,
"name": "canCalculate",
"variant": "signature",
"kind": 4096,
@@ -463,7 +463,7 @@
"summary": [
{
"kind": "text",
"text": "This method indicates whether a shippin option's price is calculated during \ncheckout or is fixed."
"text": "This method indicates whether a shippin option's price is calculated during\ncheckout or is fixed."
}
],
"blockTags": [
@@ -489,7 +489,7 @@
},
"parameters": [
{
"id": 34451,
"id": 81,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -545,14 +545,14 @@
}
},
{
"id": 34452,
"id": 82,
"name": "calculatePrice",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34453,
"id": 83,
"name": "calculatePrice",
"variant": "signature",
"kind": 4096,
@@ -567,7 +567,7 @@
"kind": "inline-tag",
"tag": "@link",
"text": "canCalculate",
"target": 34449,
"target": 79,
"tsLinkText": ""
},
{
@@ -598,7 +598,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async calculatePrice(optionData: any, data: any, cart: any): Promise<number> {\n // assuming the client can calculate the price using\n // the third-party service\n const price = await this.client.calculate(data)\n \n return price\n }\n}\n```"
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async calculatePrice(optionData: any, data: any, cart: any): Promise<number> {\n // assuming the client can calculate the price using\n // the third-party service\n const price = await this.client.calculate(data)\n\n return price\n }\n}\n```"
}
]
}
@@ -606,7 +606,7 @@
},
"parameters": [
{
"id": 34454,
"id": 84,
"name": "optionData",
"variant": "param",
"kind": 32768,
@@ -633,7 +633,7 @@
}
},
{
"id": 34455,
"id": 85,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -660,7 +660,7 @@
}
},
{
"id": 34456,
"id": 86,
"name": "cart",
"variant": "param",
"kind": 32768,
@@ -708,14 +708,14 @@
}
},
{
"id": 34457,
"id": 87,
"name": "createFulfillment",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34458,
"id": 88,
"name": "createFulfillment",
"variant": "signature",
"kind": 4096,
@@ -724,7 +724,7 @@
"summary": [
{
"kind": "text",
"text": "This method is used when a fulfillment is created. If the method returns in the object a \n"
"text": "This method is used when a fulfillment is created. If the method returns in the object a\n"
},
{
"kind": "code",
@@ -774,7 +774,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async createFulfillment(\n data: any, \n items: any, \n order: any, \n fulfillment: any\n ): Promise<any> {\n // assuming the client creates a fulfillment\n // in the third-party service\n const externalData = await this.client.create(\n fulfillment,\n items\n )\n \n return {\n data: {\n ...data,\n ...externalData\n }\n }\n }\n}\n```"
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async createFulfillment(\n data: any,\n items: any,\n order: any,\n fulfillment: any\n ): Promise<any> {\n // assuming the client creates a fulfillment\n // in the third-party service\n const externalData = await this.client.create(\n fulfillment,\n items\n )\n\n return {\n data: {\n ...data,\n ...externalData\n }\n }\n }\n}\n```"
}
]
}
@@ -782,7 +782,7 @@
},
"parameters": [
{
"id": 34459,
"id": 89,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -809,7 +809,7 @@
}
},
{
"id": 34460,
"id": 90,
"name": "items",
"variant": "param",
"kind": 32768,
@@ -828,7 +828,7 @@
}
},
{
"id": 34461,
"id": 91,
"name": "order",
"variant": "param",
"kind": 32768,
@@ -847,7 +847,7 @@
}
},
{
"id": 34462,
"id": 92,
"name": "fulfillment",
"variant": "param",
"kind": 32768,
@@ -895,14 +895,14 @@
}
},
{
"id": 34463,
"id": 93,
"name": "cancelFulfillment",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34464,
"id": 94,
"name": "cancelFulfillment",
"variant": "signature",
"kind": 4096,
@@ -928,7 +928,7 @@
},
"parameters": [
{
"id": 34465,
"id": 95,
"name": "fulfillment",
"variant": "param",
"kind": 32768,
@@ -976,14 +976,14 @@
}
},
{
"id": 34466,
"id": 96,
"name": "getFulfillmentDocuments",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34467,
"id": 97,
"name": "getFulfillmentDocuments",
"variant": "signature",
"kind": 4096,
@@ -1018,7 +1018,7 @@
},
"parameters": [
{
"id": 34468,
"id": 98,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -1077,14 +1077,14 @@
}
},
{
"id": 34469,
"id": 99,
"name": "createReturnFulfillment",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34470,
"id": 100,
"name": "createReturnFulfillment",
"variant": "signature",
"kind": 4096,
@@ -1093,7 +1093,7 @@
"summary": [
{
"kind": "text",
"text": "This method is used when a fulfillment is created for a return. If the method returns in the object a \n"
"text": "This method is used when a fulfillment is created for a return. If the method returns in the object a\n"
},
{
"kind": "code",
@@ -1143,7 +1143,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async createReturnFulfillment(fulfillment: any): Promise<any> {\n // assuming the client creates a fulfillment for a return\n // in the third-party service\n const externalData = await this.client.createReturn(\n fulfillment\n )\n \n return {\n data: {\n ...fulfillment.data,\n ...externalData\n }\n }\n }\n}\n```"
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async createReturnFulfillment(fulfillment: any): Promise<any> {\n // assuming the client creates a fulfillment for a return\n // in the third-party service\n const externalData = await this.client.createReturn(\n fulfillment\n )\n\n return {\n data: {\n ...fulfillment.data,\n ...externalData\n }\n }\n }\n}\n```"
}
]
}
@@ -1151,7 +1151,7 @@
},
"parameters": [
{
"id": 34471,
"id": 101,
"name": "fulfillment",
"variant": "param",
"kind": 32768,
@@ -1199,14 +1199,14 @@
}
},
{
"id": 34472,
"id": 102,
"name": "getReturnDocuments",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34473,
"id": 103,
"name": "getReturnDocuments",
"variant": "signature",
"kind": 4096,
@@ -1241,7 +1241,7 @@
},
"parameters": [
{
"id": 34474,
"id": 104,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -1300,14 +1300,14 @@
}
},
{
"id": 34475,
"id": 105,
"name": "getShipmentDocuments",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34476,
"id": 106,
"name": "getShipmentDocuments",
"variant": "signature",
"kind": 4096,
@@ -1342,7 +1342,7 @@
},
"parameters": [
{
"id": 34477,
"id": 107,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -1401,14 +1401,14 @@
}
},
{
"id": 34478,
"id": 108,
"name": "retrieveDocuments",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 34479,
"id": 109,
"name": "retrieveDocuments",
"variant": "signature",
"kind": 4096,
@@ -1435,7 +1435,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async retrieveDocuments(\n fulfillmentData: any, \n documentType: any\n ): Promise<void> {\n // assuming the client retrieves documents\n // from a third-party service\n return await this.client.documents(\n fulfillmentData,\n documentType\n )\n }\n}\n```"
"text": "```ts\nclass MyFulfillmentProviderService extends AbstractFulfillmentProviderService {\n // ...\n async retrieveDocuments(\n fulfillmentData: any,\n documentType: any\n ): Promise<void> {\n // assuming the client retrieves documents\n // from a third-party service\n return await this.client.documents(\n fulfillmentData,\n documentType\n )\n }\n}\n```"
}
]
}
@@ -1443,7 +1443,7 @@
},
"parameters": [
{
"id": 34480,
"id": 110,
"name": "fulfillmentData",
"variant": "param",
"kind": 32768,
@@ -1470,7 +1470,7 @@
}
},
{
"id": 34481,
"id": 111,
"name": "documentType",
"variant": "param",
"kind": 32768,
@@ -1530,30 +1530,30 @@
{
"title": "Constructors",
"children": [
34435
65
]
},
{
"title": "Properties",
"children": [
34427
57
]
},
{
"title": "Methods",
"children": [
34439,
34441,
34446,
34449,
34452,
34457,
34463,
34466,
34469,
34472,
34475,
34478
69,
71,
76,
79,
82,
87,
93,
96,
99,
102,
105,
108
]
}
],
@@ -1574,193 +1574,193 @@
{
"title": "Classes",
"children": [
34426
56
]
}
],
"packageName": "@medusajs/utils",
"symbolIdMap": {
"34425": {
"55": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": ""
},
"34426": {
"56": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService"
},
"34427": {
"57": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.identifier"
},
"34439": {
"69": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getFulfillmentOptions"
},
"34440": {
"70": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getFulfillmentOptions"
},
"34441": {
"71": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.validateFulfillmentData"
},
"34442": {
"72": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.validateFulfillmentData"
},
"34443": {
"73": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "optionData"
},
"34444": {
"74": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34445": {
"75": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "context"
},
"34446": {
"76": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.validateOption"
},
"34447": {
"77": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.validateOption"
},
"34448": {
"78": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34449": {
"79": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.canCalculate"
},
"34450": {
"80": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.canCalculate"
},
"34451": {
"81": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34452": {
"82": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.calculatePrice"
},
"34453": {
"83": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.calculatePrice"
},
"34454": {
"84": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "optionData"
},
"34455": {
"85": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34456": {
"86": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "cart"
},
"34457": {
"87": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.createFulfillment"
},
"34458": {
"88": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.createFulfillment"
},
"34459": {
"89": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34460": {
"90": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "items"
},
"34461": {
"91": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "order"
},
"34462": {
"92": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "fulfillment"
},
"34463": {
"93": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.cancelFulfillment"
},
"34464": {
"94": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.cancelFulfillment"
},
"34465": {
"95": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "fulfillment"
},
"34466": {
"96": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getFulfillmentDocuments"
},
"34467": {
"97": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getFulfillmentDocuments"
},
"34468": {
"98": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34469": {
"99": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.createReturnFulfillment"
},
"34470": {
"100": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.createReturnFulfillment"
},
"34471": {
"101": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "fulfillment"
},
"34472": {
"102": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getReturnDocuments"
},
"34473": {
"103": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getReturnDocuments"
},
"34474": {
"104": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34475": {
"105": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getShipmentDocuments"
},
"34476": {
"106": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.getShipmentDocuments"
},
"34477": {
"107": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "data"
},
"34478": {
"108": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.retrieveDocuments"
},
"34479": {
"109": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "AbstractFulfillmentProviderService.retrieveDocuments"
},
"34480": {
"110": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "fulfillmentData"
},
"34481": {
"111": {
"sourceFileName": "../../../../packages/core/utils/src/fulfillment/provider.ts",
"qualifiedName": "documentType"
}
@@ -1770,7 +1770,7 @@
"1": "../../../../packages/core/utils/src/fulfillment/provider.ts"
},
"reflections": {
"1": 34425
"1": 55
}
}
}
@@ -1,12 +1,12 @@
{
"id": 35383,
"id": 112,
"name": "notification",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 35384,
"id": 113,
"name": "AbstractNotificationProviderService",
"variant": "declaration",
"kind": 128,
@@ -25,7 +25,7 @@
},
"children": [
{
"id": 35385,
"id": 114,
"name": "validateOptions",
"variant": "declaration",
"kind": 2048,
@@ -34,7 +34,7 @@
},
"signatures": [
{
"id": 35386,
"id": 115,
"name": "validateOptions",
"variant": "signature",
"kind": 4096,
@@ -49,7 +49,7 @@
},
"parameters": [
{
"id": 35387,
"id": 116,
"name": "options",
"variant": "param",
"kind": 32768,
@@ -83,21 +83,21 @@
]
},
{
"id": 35388,
"id": 117,
"name": "constructor",
"variant": "declaration",
"kind": 512,
"flags": {},
"signatures": [
{
"id": 35389,
"id": 118,
"name": "new AbstractNotificationProviderService",
"variant": "signature",
"kind": 16384,
"flags": {},
"type": {
"type": "reference",
"target": 35384,
"target": 113,
"name": "AbstractNotificationProviderService",
"package": "@medusajs/utils"
}
@@ -105,14 +105,14 @@
]
},
{
"id": 35390,
"id": 119,
"name": "send",
"variant": "declaration",
"kind": 2048,
"flags": {},
"signatures": [
{
"id": 35391,
"id": 120,
"name": "send",
"variant": "signature",
"kind": 4096,
@@ -147,7 +147,7 @@
},
"parameters": [
{
"id": 35392,
"id": 121,
"name": "notification",
"variant": "param",
"kind": 32768,
@@ -209,14 +209,14 @@
{
"title": "Constructors",
"children": [
35388
117
]
},
{
"title": "Methods",
"children": [
35385,
35390
114,
119
]
}
],
@@ -237,41 +237,41 @@
{
"title": "Classes",
"children": [
35384
113
]
}
],
"packageName": "@medusajs/utils",
"symbolIdMap": {
"35383": {
"112": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": ""
},
"35384": {
"113": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "AbstractNotificationProviderService"
},
"35385": {
"114": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "AbstractNotificationProviderService.validateOptions"
},
"35386": {
"115": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "AbstractNotificationProviderService.validateOptions"
},
"35387": {
"116": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "options"
},
"35390": {
"119": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "AbstractNotificationProviderService.send"
},
"35391": {
"120": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "AbstractNotificationProviderService.send"
},
"35392": {
"121": {
"sourceFileName": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts",
"qualifiedName": "notification"
}
@@ -281,7 +281,7 @@
"1": "../../../../packages/core/utils/src/notification/abstract-notification-provider.ts"
},
"reflections": {
"1": 35383
"1": 112
}
}
}
@@ -1,12 +1,12 @@
{
"id": 35393,
"id": 122,
"name": "payment-provider",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 35397,
"id": 126,
"name": "AbstractPaymentProvider",
"variant": "declaration",
"kind": 128,
@@ -15,7 +15,7 @@
},
"children": [
{
"id": 35398,
"id": 127,
"name": "validateOptions",
"variant": "declaration",
"kind": 2048,
@@ -24,7 +24,7 @@
},
"signatures": [
{
"id": 35399,
"id": 128,
"name": "validateOptions",
"variant": "signature",
"kind": 4096,
@@ -39,7 +39,7 @@
},
"parameters": [
{
"id": 35400,
"id": 129,
"name": "options",
"variant": "param",
"kind": 32768,
@@ -73,7 +73,7 @@
]
},
{
"id": 35406,
"id": 135,
"name": "constructor",
"variant": "declaration",
"kind": 512,
@@ -82,7 +82,7 @@
},
"signatures": [
{
"id": 35407,
"id": 136,
"name": "new AbstractPaymentProvider",
"variant": "signature",
"kind": 16384,
@@ -116,7 +116,7 @@
},
"typeParameters": [
{
"id": 35408,
"id": 137,
"name": "TConfig",
"variant": "typeParam",
"kind": 131072,
@@ -144,7 +144,7 @@
],
"parameters": [
{
"id": 35409,
"id": 138,
"name": "container",
"variant": "param",
"kind": 32768,
@@ -168,7 +168,7 @@
}
},
{
"id": 35410,
"id": 139,
"name": "config",
"variant": "param",
"kind": 32768,
@@ -183,7 +183,7 @@
},
"type": {
"type": "reference",
"target": 35408,
"target": 137,
"name": "TConfig",
"package": "@medusajs/utils",
"qualifiedName": "AbstractPaymentProvider.TConfig",
@@ -194,11 +194,11 @@
],
"type": {
"type": "reference",
"target": 35397,
"target": 126,
"typeArguments": [
{
"type": "reference",
"target": 35408,
"target": 137,
"name": "TConfig",
"package": "@medusajs/utils",
"qualifiedName": "AbstractPaymentProvider.TConfig",
@@ -212,7 +212,7 @@
]
},
{
"id": 35411,
"id": 140,
"name": "container",
"variant": "declaration",
"kind": 1024,
@@ -239,7 +239,7 @@
}
},
{
"id": 35412,
"id": 141,
"name": "config",
"variant": "declaration",
"kind": 1024,
@@ -257,7 +257,7 @@
},
"type": {
"type": "reference",
"target": 35408,
"target": 137,
"name": "TConfig",
"package": "@medusajs/utils",
"qualifiedName": "AbstractPaymentProvider.TConfig",
@@ -266,7 +266,7 @@
"defaultValue": "..."
},
{
"id": 35405,
"id": 134,
"name": "identifier",
"variant": "declaration",
"kind": 1024,
@@ -299,7 +299,7 @@
}
},
{
"id": 35415,
"id": 144,
"name": "capturePayment",
"variant": "declaration",
"kind": 2048,
@@ -308,7 +308,7 @@
},
"signatures": [
{
"id": 35416,
"id": 145,
"name": "capturePayment",
"variant": "signature",
"kind": 4096,
@@ -323,7 +323,7 @@
"kind": "inline-tag",
"tag": "@link",
"text": "authorizePayment",
"target": 35418,
"target": 147,
"tsLinkText": ""
},
{
@@ -370,7 +370,7 @@
},
"parameters": [
{
"id": 35417,
"id": 146,
"name": "paymentData",
"variant": "param",
"kind": 32768,
@@ -470,7 +470,7 @@
}
},
{
"id": 35418,
"id": 147,
"name": "authorizePayment",
"variant": "declaration",
"kind": 2048,
@@ -479,7 +479,7 @@
},
"signatures": [
{
"id": 35419,
"id": 148,
"name": "authorizePayment",
"variant": "signature",
"kind": 4096,
@@ -494,7 +494,7 @@
"kind": "inline-tag",
"tag": "@link",
"text": "capturePayment",
"target": 35415,
"target": 144,
"tsLinkText": ""
},
{
@@ -549,7 +549,7 @@
},
"parameters": [
{
"id": 35420,
"id": 149,
"name": "paymentSessionData",
"variant": "param",
"kind": 32768,
@@ -591,7 +591,7 @@
}
},
{
"id": 35421,
"id": 150,
"name": "context",
"variant": "param",
"kind": 32768,
@@ -655,14 +655,14 @@
{
"type": "reflection",
"declaration": {
"id": 35422,
"id": 151,
"name": "__type",
"variant": "declaration",
"kind": 65536,
"flags": {},
"children": [
{
"id": 35423,
"id": 152,
"name": "status",
"variant": "declaration",
"kind": 1024,
@@ -686,7 +686,7 @@
}
},
{
"id": 35424,
"id": 153,
"name": "data",
"variant": "declaration",
"kind": 1024,
@@ -732,8 +732,8 @@
{
"title": "Properties",
"children": [
35423,
35424
152,
153
]
}
]
@@ -759,7 +759,7 @@
}
},
{
"id": 35425,
"id": 154,
"name": "cancelPayment",
"variant": "declaration",
"kind": 2048,
@@ -768,7 +768,7 @@
},
"signatures": [
{
"id": 35426,
"id": 155,
"name": "cancelPayment",
"variant": "signature",
"kind": 4096,
@@ -803,7 +803,7 @@
},
"parameters": [
{
"id": 35427,
"id": 156,
"name": "paymentData",
"variant": "param",
"kind": 32768,
@@ -903,7 +903,7 @@
}
},
{
"id": 35428,
"id": 157,
"name": "initiatePayment",
"variant": "declaration",
"kind": 2048,
@@ -912,7 +912,7 @@
},
"signatures": [
{
"id": 35429,
"id": 158,
"name": "initiatePayment",
"variant": "signature",
"kind": 4096,
@@ -963,7 +963,7 @@
},
"parameters": [
{
"id": 35430,
"id": 159,
"name": "context",
"variant": "param",
"kind": 32768,
@@ -1035,7 +1035,7 @@
}
},
{
"id": 35431,
"id": 160,
"name": "deletePayment",
"variant": "declaration",
"kind": 2048,
@@ -1044,7 +1044,7 @@
},
"signatures": [
{
"id": 35432,
"id": 161,
"name": "deletePayment",
"variant": "signature",
"kind": 4096,
@@ -1079,7 +1079,7 @@
},
"parameters": [
{
"id": 35433,
"id": 162,
"name": "paymentSessionData",
"variant": "param",
"kind": 32768,
@@ -1179,7 +1179,7 @@
}
},
{
"id": 35434,
"id": 163,
"name": "getPaymentStatus",
"variant": "declaration",
"kind": 2048,
@@ -1188,7 +1188,7 @@
},
"signatures": [
{
"id": 35435,
"id": 164,
"name": "getPaymentStatus",
"variant": "signature",
"kind": 4096,
@@ -1223,7 +1223,7 @@
},
"parameters": [
{
"id": 35436,
"id": 165,
"name": "paymentSessionData",
"variant": "param",
"kind": 32768,
@@ -1299,7 +1299,7 @@
}
},
{
"id": 35437,
"id": 166,
"name": "refundPayment",
"variant": "declaration",
"kind": 2048,
@@ -1308,7 +1308,7 @@
},
"signatures": [
{
"id": 35438,
"id": 167,
"name": "refundPayment",
"variant": "signature",
"kind": 4096,
@@ -1351,7 +1351,7 @@
},
"parameters": [
{
"id": 35439,
"id": 168,
"name": "paymentData",
"variant": "param",
"kind": 32768,
@@ -1393,7 +1393,7 @@
}
},
{
"id": 35440,
"id": 169,
"name": "refundAmount",
"variant": "param",
"kind": 32768,
@@ -1470,7 +1470,7 @@
}
},
{
"id": 35441,
"id": 170,
"name": "retrievePayment",
"variant": "declaration",
"kind": 2048,
@@ -1479,7 +1479,7 @@
},
"signatures": [
{
"id": 35442,
"id": 171,
"name": "retrievePayment",
"variant": "signature",
"kind": 4096,
@@ -1522,7 +1522,7 @@
},
"parameters": [
{
"id": 35443,
"id": 172,
"name": "paymentSessionData",
"variant": "param",
"kind": 32768,
@@ -1622,7 +1622,7 @@
}
},
{
"id": 35444,
"id": 173,
"name": "updatePayment",
"variant": "declaration",
"kind": 2048,
@@ -1631,7 +1631,7 @@
},
"signatures": [
{
"id": 35445,
"id": 174,
"name": "updatePayment",
"variant": "signature",
"kind": 4096,
@@ -1646,7 +1646,7 @@
"kind": "inline-tag",
"tag": "@link",
"text": "initiatePayment",
"target": 35428,
"target": 157,
"tsLinkText": ""
},
{
@@ -1693,7 +1693,7 @@
},
"parameters": [
{
"id": 35446,
"id": 175,
"name": "context",
"variant": "param",
"kind": 32768,
@@ -1765,7 +1765,7 @@
}
},
{
"id": 35447,
"id": 176,
"name": "getWebhookActionAndData",
"variant": "declaration",
"kind": 2048,
@@ -1774,7 +1774,7 @@
},
"signatures": [
{
"id": 35448,
"id": 177,
"name": "getWebhookActionAndData",
"variant": "signature",
"kind": 4096,
@@ -1841,7 +1841,7 @@
},
"parameters": [
{
"id": 35449,
"id": 178,
"name": "data",
"variant": "param",
"kind": 32768,
@@ -1857,14 +1857,14 @@
"type": {
"type": "reflection",
"declaration": {
"id": 35450,
"id": 179,
"name": "__type",
"variant": "declaration",
"kind": 65536,
"flags": {},
"children": [
{
"id": 35451,
"id": 180,
"name": "data",
"variant": "declaration",
"kind": 1024,
@@ -1898,7 +1898,7 @@
}
},
{
"id": 35452,
"id": 181,
"name": "rawData",
"variant": "declaration",
"kind": 1024,
@@ -1932,7 +1932,7 @@
}
},
{
"id": 35453,
"id": 182,
"name": "headers",
"variant": "declaration",
"kind": 1024,
@@ -1970,9 +1970,9 @@
{
"title": "Properties",
"children": [
35451,
35452,
35453
180,
181,
182
]
}
]
@@ -2018,37 +2018,37 @@
{
"title": "Constructors",
"children": [
35406
135
]
},
{
"title": "Properties",
"children": [
35411,
35412,
35405
140,
141,
134
]
},
{
"title": "Methods",
"children": [
35398,
35415,
35418,
35425,
35428,
35431,
35434,
35437,
35441,
35444,
35447
127,
144,
147,
154,
157,
160,
163,
166,
170,
173,
176
]
}
],
"typeParameters": [
{
"id": 35454,
"id": 183,
"name": "TConfig",
"variant": "typeParam",
"kind": 131072,
@@ -2091,221 +2091,221 @@
{
"title": "Classes",
"children": [
35397
126
]
}
],
"packageName": "@medusajs/utils",
"symbolIdMap": {
"35393": {
"122": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": ""
},
"35397": {
"126": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider"
},
"35398": {
"127": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.validateOptions"
},
"35399": {
"128": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.validateOptions"
},
"35400": {
"129": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "options"
},
"35405": {
"134": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.identifier"
},
"35406": {
"135": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.__constructor"
},
"35407": {
"136": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider"
},
"35408": {
"137": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.TConfig"
},
"35409": {
"138": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "container"
},
"35410": {
"139": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "config"
},
"35411": {
"140": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.container"
},
"35412": {
"141": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.config"
},
"35415": {
"144": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.capturePayment"
},
"35416": {
"145": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.capturePayment"
},
"35417": {
"146": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentData"
},
"35418": {
"147": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.authorizePayment"
},
"35419": {
"148": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.authorizePayment"
},
"35420": {
"149": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentSessionData"
},
"35421": {
"150": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "context"
},
"35422": {
"151": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "__type"
},
"35423": {
"152": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "__type.status"
},
"35424": {
"153": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "__type.data"
},
"35425": {
"154": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.cancelPayment"
},
"35426": {
"155": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.cancelPayment"
},
"35427": {
"156": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentData"
},
"35428": {
"157": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.initiatePayment"
},
"35429": {
"158": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.initiatePayment"
},
"35430": {
"159": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "context"
},
"35431": {
"160": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.deletePayment"
},
"35432": {
"161": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.deletePayment"
},
"35433": {
"162": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentSessionData"
},
"35434": {
"163": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.getPaymentStatus"
},
"35435": {
"164": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.getPaymentStatus"
},
"35436": {
"165": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentSessionData"
},
"35437": {
"166": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.refundPayment"
},
"35438": {
"167": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.refundPayment"
},
"35439": {
"168": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentData"
},
"35440": {
"169": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "refundAmount"
},
"35441": {
"170": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.retrievePayment"
},
"35442": {
"171": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.retrievePayment"
},
"35443": {
"172": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "paymentSessionData"
},
"35444": {
"173": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.updatePayment"
},
"35445": {
"174": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.updatePayment"
},
"35446": {
"175": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "context"
},
"35447": {
"176": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.getWebhookActionAndData"
},
"35448": {
"177": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.getWebhookActionAndData"
},
"35449": {
"178": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "data"
},
"35450": {
"179": {
"sourceFileName": "../../../../packages/core/types/src/payment/mutations.ts",
"qualifiedName": "__type"
},
"35451": {
"180": {
"sourceFileName": "../../../../packages/core/types/src/payment/mutations.ts",
"qualifiedName": "__type.data"
},
"35452": {
"181": {
"sourceFileName": "../../../../packages/core/types/src/payment/mutations.ts",
"qualifiedName": "__type.rawData"
},
"35453": {
"182": {
"sourceFileName": "../../../../packages/core/types/src/payment/mutations.ts",
"qualifiedName": "__type.headers"
},
"35454": {
"183": {
"sourceFileName": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts",
"qualifiedName": "AbstractPaymentProvider.TConfig"
}
@@ -2315,7 +2315,7 @@
"1": "../../../../packages/core/utils/src/payment/abstract-payment-provider.ts"
},
"reflections": {
"1": 35393
"1": 122
}
}
}
@@ -76,6 +76,25 @@ module.exports = defineConfig({
})
\`\`\`
`,
`## 5. Test it Out
To test out your authentication provider, use any of the [Authentication Routes](https://docs.medusajs.com/v2/resources/commerce-modules/auth/authentication-route), using your provider's ID as a path parameter.
For example, to get a registration token for an admin user, send a \`POST\` request to \`/auth/user/my-auth/register\` replacing \`my-auth\` with your authentication provider's ID:
\`\`\`bash
curl -X POST http://localhost:9000/auth/user/my-auth/register
-H 'Content-Type: application/json' \
--data-raw '{
"email": "Whitney_Schultz@gmail.com",
"password": "supersecret"
}'
\`\`\`
Change the request body to pass the data required for your authentication provider to register the user.
If registration is successful, the response will have a \`token\` property.
`,
],
},
}
@@ -81,6 +81,10 @@ module.exports = defineConfig({
}
})
\`\`\`
`,
`## 5. Test it Out
To test out your file provider, use the Medusa Admin or the [Upload API route](https://docs.medusajs.com/v2/api/admin#uploads_postuploads) to upload a file.
`,
],
},
@@ -75,6 +75,15 @@ module.exports = defineConfig({
}
})
\`\`\`
`,
`## 5. Test it Out
Before you use your fulfillment provider, in the Medusa Admin:
1. Add the fulfillment provider to a location.
2. Add in the location a delivery shipping option that uses the provider.
Then, place an order, choosing the shipping option you created during checkout, and create a fulfillment in the Medusa Admin. The fulfillment is created using your provider.
`,
],
},
@@ -86,6 +86,61 @@ module.exports = defineConfig({
}
})
\`\`\`
Make sure to specify the correct channels for your provider in the \`channels\` option.`,
`## 5. Test it Out
### Create Subscriber
To test out the provider, create a subscriber at \`src/subscribers/user-created.ts\` with the following content:
\`\`\`ts title="src/subscribers/user-created.ts"
import { Modules } from "@medusajs/framework/utils"
import {
SubscriberArgs,
type SubscriberConfig,
} from "@medusajs/medusa"
export default async function userCreatedHandler({
event: { data },
container,
}: SubscriberArgs<{ id: string }>) {
const notificationModuleService = container.resolve(
Modules.NOTIFICATION
)
const userModule = container.resolve(
Modules.USER
)
const user = await userModule.retrieveUser(data.id)
await notificationModuleService.createNotifications({
to: user.email,
channel: "email",
template: "new-user"
})
}
export const config: SubscriberConfig = {
event: "user.created",
}
\`\`\`
In the subscriber, you resolve the Notification and User modules. Then, you use the User Module's main service to retrieve the user's details.
Finally, you use the Notification Module's main service to send a notification to the user's email through the \`email\` channel (assuming that's your provider's channel).
Make sure to replace the value of \`template\` to the ID of the template in your provider.
### Create User
Use the following command to create a user:
\`\`\`bash
npx medusa user -e admin@test.com -p supersecret
\`\`\`
After the user is created, the subscriber is executed, sending the notification using your provider.
`,
],
},
@@ -85,6 +85,16 @@ module.exports = defineConfig({
}
})
\`\`\`
`,
`## 5. Test it Out
Before you use your payment provider, enable it in a region using the Medusa Admin.
Then, go through checkout to place an order. Your payment provider is used to authorize the payment.
`,
`## Useful Guides
- [Storefront Guide: how to implement UI for your payment provider during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment)
`,
],
},