Commit Graph

3892 Commits

Author SHA1 Message Date
Shahed Nasser
c47b7aacbd docs: updated the add fulfillment provider docs (#4986)
* docs: updated the add fulfillment provider docs

* fix eslint errors

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-08 15:12:00 +02:00
github-actions[bot]
493a62775d chore(docs): Generated Docs Announcement Bar (automated) (#4989)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-08 14:58:30 +02:00
github-actions[bot]
2338dd111f chore(docs): Generated API Reference (#4988)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2023-09-08 15:48:22 +03:00
Oli Juhl
c2423cf715 docs: Add 1.2.0 upgrade guide for Product Module (#4981)
* docs: Add 1.2.0 upgrade guide for Product Module

* Update docs/content/upgrade-guides/modules/product/1-2-0.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Update docs/content/upgrade-guides/modules/product/1-2-0.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Address pr comments

* address pr comments

* fix lint issue

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-08 14:38:16 +02:00
olivermrbl
40d9c9479c chore: Release 2023-09-08 14:27:56 +02:00
github-actions[bot]
98b91d1137 chore: Version Packages (#4891)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-08 14:09:39 +02:00
Oli Juhl
d3d8f0bf58 chore(admin, medusa-payment-stripe): Fix deps (#4987) 2023-09-08 13:55:03 +02:00
Shahed Nasser
240b038006 feat(create-medusa-app): add install Next.js storefront option (#4968)
* feat(create-medusa-app): add install Next.js storefront option

* added config for yes option

* added more instructions to exit message

* handle duplicate directories and next errors

* use next.js branch

* add line break in storefront question

* pass next.js directory name as env variable

* change question message

* address PR feedback

* fix(medusa-cli): remove .git directory in `new` command

* fix deleting a directory error
2023-09-08 12:17:48 +02:00
olivermrbl
aecae5705d chore(changesets): Change minor bump to patch 2023-09-07 20:17:46 +02:00
mortenengel
11fb523051 feat(medusa, admin-ui): Improve gift card application (#4944)
Fix for the problems identified in issue #4892 

Bugfix: admin-ui order summary no longer uses gift card total from order when displaying how much has been withdrawn from each giftcard.

Bugfix(?): no longer keep applying gift cards (at 0 value) when sufficient balance has been reached

Feature: multiple giftcards are now applied in ordered fashion. First by end_date (supports null), then by remaining balance. In order to ensure that customers ends up with as long lasting and few remaining gift cards as possible after the transaction.
2023-09-07 16:56:36 +00:00
olivermrbl
9f16c90f99 chore(changesets): Change minor bump to patch 2023-09-07 17:33:09 +02:00
Josip Matić
5890d3b313 fix(medusa-plugin-brightpearl): Inventory sync for OOS items in brightpearl (#4966) 2023-09-07 11:29:48 +00:00
Josip Matić
c7b149a7bc feat(medusa-fulfillment-webshipper): Create webshipper return order (#4846)
Adds option to create a webshipper return order if return_portal is defined through webshipper options. Return order allows additional features in webshipper, such as marking the return as "Arrived" or "Processed" which enables us to create a webhook and automatically mark return as received in medusa.

Note:
Return portal is a "required" relationship in webshipper when doing a return order POST request, hence it should be defined in options prior to using this feature.

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-07 10:21:03 +00:00
olivermrbl
09d97fd05e chore(changesets): Add changeset minor-bumping @medusajs/product 2023-09-07 10:41:20 +02:00
Riqwan Thamir
c3dba06948 fix(modules-sdk, orchestration): add missing dependencies + fix default handling in medusa-app & remote query (#4930) 2023-09-07 07:53:46 +00:00
Adrien de Peretti
86f4ca369f fix(orchestration): Fix remote joiner filtering fields (#4970)
* fix(orchestration): Fix remote joiner filtering fields

* cleanup test
2023-09-07 09:10:16 +02:00
Riqwan Thamir
66bd9a835c feat(products,types,pricing): allow scoping products by collection_id + pricing by currency_code (#4965)
* chore: allow scoping products by collection_id

* chore: scope money amounts by currency code + change category_ids to category_id

* chore: add an extra product to test without collection

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-07 09:06:50 +02:00
Adrien de Peretti
b71776738c feat(medusa): Event bus db failure handling (#4963)
* feat(medusa): Event bus db failure handling

* naming

* Create olive-years-heal.md
2023-09-06 17:07:29 +02:00
Shahed Nasser
9781089ca3 chore(oas): Update OAS for upload endpoints (#4953)
* chore(oas): Update OAS for upload endpoints

* added changeset

* address pr feedback
2023-09-06 17:39:19 +03:00
ghiottimartin
46e224dcb4 docs: add paypal hook endpoint (#4956)
* docs: add paypal hook endpoint

* fix: text position

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-06 17:08:27 +03:00
Kasper Fabricius Kristensen
545022145b fix(admin): Export RouteProps and SettingProps (#4950)
* fix: export SettingProps and RouteProps from admin package

* add changeset
2023-09-05 19:22:52 +02:00
Josip Matić
bb5ea9d5ca fix(medusa): Double tax issue on return refund amount (#4899)
Closes #4686 

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-05 08:14:45 +00:00
Nicklas Gellner
1e3c93a319 docs: fix typo in recipes (#4947)
Typo
2023-09-05 10:32:32 +03:00
Carlos R. L. Rodrigues
a4906d0ac0 chore(medusa,orchestration,link-modules,modules-sdk): internal services as modules (#4925) 2023-09-04 11:36:05 -03:00
Habibullah Turkmen
85fa90d9c6 docs: updated file-service s3 guide configurations (#4921)
* docs: updated file-service s3 guide

* update

* Update www/docs/content/plugins/file-service/s3.mdx

feedback

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* line length fixed

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-04 10:54:33 +03:00
Oli Juhl
17d91c276a feat(medusa): Add AbstractFulfillmentService (#4922)
* feat(medusa): Add abstract fulfillment service

* add data types

* add loaders

* Create nine-glasses-allow.md

* address pr comments
2023-09-03 20:05:36 +02:00
zulianrizki
c348263fdb fix(medusa-payment-stripe): api endpoint for getStripePayments (#4928)
fixes https://github.com/medusajs/medusa/issues/4927

Co-authored-by: zulian-coconutlab <73976574+zulian-coconutlab@users.noreply.github.com>
2023-09-01 10:38:03 +00:00
Shahed Nasser
ddc882faac docs: added multi-region recipe (#4926)
* docs: added a multi-region recipe

* added other category to plugins list

* fix eslint errors

* fix broken link

* add link

* fix sidebar link
2023-08-31 20:38:06 +03:00
Shahed Nasser
f9c064f98d docs: added a note about product module in Next.js (#4924) 2023-08-31 16:29:33 +03:00
Riqwan Thamir
fcb6b4f510 feat(pricing, utils, types): adds money amount to pricing module (#4909)
What:

- Adds money amount service / repo / model
- Adds money amount to entry service
- Adds tests for services
- Refreshes schema
- Update joiner config to include money amounts


RESOLVES CORE-1478
RESOLVES CORE-1479

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2023-08-31 13:03:10 +00:00
Shahed Nasser
0627d06f72 docs: updated digitalocean deployment guide (#4923)
* docs: updated digitalocean deployment guide

* remove build from script

* fix text
2023-08-31 15:44:54 +03:00
Frane Polić
4bf8acbdd4 fix(medusa): csv parser check match prop on column (#4913)
**What**
- if there is the `match` column with regex defined in the schema don't look up column definition by name
2023-08-31 09:38:52 +00:00
github-actions[bot]
d57895bff1 chore(docs): Removed Docs Announcement Bar (automated) (#4919)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-31 10:42:14 +03:00
Riqwan Thamir
87bade096e fix(utils, product, pricing, link-modules): add missing dependencies for utils + fix migration path issue (#4915)
* fix: add missing dependencies for utils

* chore: migration path is set from the calling package

* chore: update changeset
2023-08-31 09:16:02 +02:00
Carlos R. L. Rodrigues
4d16acf5f0 feat(link-modules,modules-sdk, utils, types, products) - Remote Link and Link modules (#4695)
What:
- Definition of all Modules links
- `link-modules` package to manage the creation of all pre-defined link or custom ones

```typescript
import { initialize as iniInventory } from "@medusajs/inventory";
import { initialize as iniProduct } from "@medusajs/product";

import {
  initialize as iniLinks,
  runMigrations as migrateLinks
} from "@medusajs/link-modules";

await Promise.all([iniInventory(), iniProduct()]);


await migrateLinks(); // create tables based on previous loaded modules

await iniLinks(); // load link based on previous loaded modules

await iniLinks(undefined, [
  {
    serviceName: "product_custom_translation_service_link",
    isLink: true,
    databaseConfig: {
      tableName: "product_transalations",
    },
    alias: [
      {
        name: "translations",
      },
    ],
    primaryKeys: ["id", "product_id", "translation_id"],
    relationships: [
      {
        serviceName: Modules.PRODUCT,
        primaryKey: "id",
        foreignKey: "product_id",
        alias: "product",
      },
      {
        serviceName: "custom_translation_service",
        primaryKey: "id",
        foreignKey: "translation_id",
        alias: "transalation",
        deleteCascade: true,
      },
    ],
    extends: [
      {
        serviceName: Modules.PRODUCT,
        relationship: {
          serviceName: "product_custom_translation_service_link",
          primaryKey: "product_id",
          foreignKey: "id",
          alias: "translations",
          isList: true,
        },
      },
      {
        serviceName: "custom_translation_service",
        relationship: {
          serviceName: "product_custom_translation_service_link",
          primaryKey: "product_id",
          foreignKey: "id",
          alias: "product_link",
        },
      },
    ],
  },
]); // custom links
```

Remote Link

```typescript
import { RemoteLink, Modules } from "@medusajs/modules-sdk";

// [...] initialize modules and links

const remoteLink = new RemoteLink();

// upsert the relationship
await remoteLink.create({ // one (object) or many (array)
  [Modules.PRODUCT]: {
    variant_id: "var_abc",
  },
  [Modules.INVENTORY]: {
    inventory_item_id: "iitem_abc",
  },
  data: { // optional additional fields
    required_quantity: 5
  }
});

// dismiss (doesn't cascade)
await remoteLink.dismiss({ // one (object) or many (array)
  [Modules.PRODUCT]: {
    variant_id: "var_abc",
  },
  [Modules.INVENTORY]: {
    inventory_item_id: "iitem_abc",
  },
});

// delete
await remoteLink.delete({
  // every key is a module
  [Modules.PRODUCT]: {
    // every key is a linkable field
    variant_id: "var_abc", // single or multiple values
  },
});

// restore
await remoteLink.restore({
  // every key is a module
  [Modules.PRODUCT]: {
    // every key is a linkable field
    variant_id: "var_abc", // single or multiple values
  },
});

```

Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com>
2023-08-30 14:31:32 +00:00
Shahed Nasser
bc4c9e0d32 docs: update admin CLI configurations (#4910)
* docs: update admin configurations

* fix in dev command name
2023-08-30 17:12:16 +03:00
Shahed Nasser
b05bae1471 docs: update Create Fulfillment Provider guide (#4911) 2023-08-30 16:03:56 +03:00
Andreas Deininger
a0bbc1893b chore: fix typos (#4877)
* Chore: Fix typos

* Add generated resources

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-30 13:27:46 +03:00
Shahed Nasser
359bd290ba docs: added expected columns for imports (#4908)
* docs: added expected columns for imports

* linked from user guide to new sections
2023-08-30 12:00:43 +03:00
Riqwan Thamir
460161a69f feat(pricing, types, utils, medusa-sdk): Pricing Module Setup + Currency (#4860)
What:

- Setups the skeleton for pricing module
- Creates service/model/repository for currency model
- Setups types
- Setups DB
- Moved some utils to a common place

RESOLVES CORE-1477
RESOLVES CORE-1476
2023-08-29 21:58:34 +00:00
Rares Stefan
470379e631 fix(medusa, admin-ui): Add deleted_at to Return Reason unique constraint (#4834)
* Update return reason create to upsert

* Create strange-wombats-invite.md

* Revert upsert, make value index only apply on non-deleted entities
2023-08-29 19:26:58 +02:00
Lacey Pevey
046b0dcfa5 chore(medusa-file-s3): Add cache-control option + update to sdk v3 (#4884)
* add cache-control option, fix delete function, update to sdk v3

* Create cool-pears-trade.md

* reformat throw line, remove dev comment

* remove console.log debugging statement

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-29 19:25:17 +02:00
Shahed Nasser
33ffdaf42d docs: added B2B recipe (#4901)
* added b2b recipe

* added redirect rule

* fix build errors

* fix broken links
2023-08-29 19:50:14 +03:00
Shahed Nasser
e086e3efbd docs: fix customer_id name in create endpoints docs (#4900) 2023-08-29 17:42:05 +03:00
Shahed Nasser
f75d9806f9 docs: added rbac recipe (#4895)
* docs: added rbac recipe

* fix eslint errors

* fixed indentation causing build error

* fix build warning

* small fixes

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-29 15:11:52 +03:00
Micky Jittjana
4d439bed38 fix(medusa): Make event enqueuer reconnect the database when it lost the connection (#4855)
* Try to periodically reconnect database from enqueuer

* Create great-months-train.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2023-08-29 13:03:11 +02:00
Oli Juhl
4897040c92 fix(ci): Increase memory allocation for plugin tests (#4898) 2023-08-29 11:58:17 +02:00
Carlos R. L. Rodrigues
d9c5e165cd chore: pipeline node version (#4896) 2023-08-28 19:41:47 +00:00
Frane Polić
b7de679e9b feat(admin-ui): batch job completed notification (#4886) 2023-08-28 20:21:42 +02:00
Frane Polić
758f035c2f fix(admin-ui): delete customer group (#4893) 2023-08-28 19:05:31 +02:00