feat: add hasMany flag to enforce in app link uniqueness (#12039)

* feat: add createMultiple flag to enforce inApp link uniqueness

* changes

* mocks

* default

* many to many

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
This commit is contained in:
Harminder Virk
2025-04-02 14:16:51 +05:30
committed by GitHub
parent f441362f4a
commit d3e725a907
25 changed files with 316 additions and 70 deletions
@@ -25,6 +25,7 @@ export const CartPromotion: ModuleJoinerConfig = {
args: {
methodSuffix: "Carts",
},
hasMany: true,
},
{
serviceName: Modules.PROMOTION,
@@ -35,6 +36,7 @@ export const CartPromotion: ModuleJoinerConfig = {
args: {
methodSuffix: "Promotions",
},
hasMany: true,
},
],
extends: [
@@ -35,6 +35,7 @@ export const CustomerAccountHolder: ModuleJoinerConfig = {
args: {
methodSuffix: "AccountHolders",
},
hasMany: true,
},
],
extends: [
@@ -23,6 +23,7 @@ export const LocationFulfillmentProvider: ModuleJoinerConfig = {
foreignKey: "stock_location_id",
alias: "location",
args: { methodSuffix: "StockLocations" },
hasMany: true,
},
{
serviceName: Modules.FULFILLMENT,
@@ -31,6 +32,7 @@ export const LocationFulfillmentProvider: ModuleJoinerConfig = {
foreignKey: "fulfillment_provider_id",
alias: "fulfillment_provider",
args: { methodSuffix: "FulfillmentProviders" },
hasMany: true,
},
],
extends: [
@@ -36,6 +36,7 @@ export const LocationFulfillmentSet: ModuleJoinerConfig = {
methodSuffix: "FulfillmentSets",
},
deleteCascade: true,
hasMany: true,
},
],
extends: [
@@ -38,6 +38,7 @@ export const OrderClaimPaymentCollection: ModuleJoinerConfig = {
args: {
methodSuffix: "PaymentCollections",
},
hasMany: true,
},
],
extends: [
@@ -38,6 +38,7 @@ export const OrderExchangePaymentCollection: ModuleJoinerConfig = {
args: {
methodSuffix: "PaymentCollections",
},
hasMany: true,
},
],
extends: [
@@ -35,6 +35,7 @@ export const OrderFulfillment: ModuleJoinerConfig = {
args: {
methodSuffix: "Fulfillments",
},
hasMany: true,
},
],
extends: [
@@ -36,6 +36,7 @@ export const OrderPaymentCollection: ModuleJoinerConfig = {
methodSuffix: "PaymentCollections",
},
deleteCascade: true,
hasMany: true,
},
],
extends: [
@@ -25,6 +25,7 @@ export const OrderPromotion: ModuleJoinerConfig = {
args: {
methodSuffix: "Orders",
},
hasMany: true,
},
{
serviceName: Modules.PROMOTION,
@@ -35,6 +36,7 @@ export const OrderPromotion: ModuleJoinerConfig = {
args: {
methodSuffix: "Promotions",
},
hasMany: true,
},
],
extends: [
@@ -35,6 +35,7 @@ export const ReturnFulfillment: ModuleJoinerConfig = {
args: {
methodSuffix: "Fulfillments",
},
hasMany: true,
},
],
extends: [
@@ -27,6 +27,7 @@ export const ProductSalesChannel: ModuleJoinerConfig = {
args: {
methodSuffix: "Products",
},
hasMany: true,
},
{
serviceName: Modules.SALES_CHANNEL,
@@ -37,6 +38,7 @@ export const ProductSalesChannel: ModuleJoinerConfig = {
args: {
methodSuffix: "SalesChannels",
},
hasMany: true,
},
],
extends: [
@@ -27,6 +27,7 @@ export const ProductShippingProfile: ModuleJoinerConfig = {
args: {
methodSuffix: "Products",
},
hasMany: true,
},
{
serviceName: Modules.FULFILLMENT,
@@ -34,6 +34,7 @@ export const ProductVariantInventoryItem: ModuleJoinerConfig = {
args: {
methodSuffix: "ProductVariants",
},
hasMany: true,
},
{
serviceName: Modules.INVENTORY,
@@ -44,6 +45,7 @@ export const ProductVariantInventoryItem: ModuleJoinerConfig = {
args: {
methodSuffix: "InventoryItems",
},
hasMany: true,
},
],
extends: [
@@ -27,6 +27,7 @@ export const PublishableApiKeySalesChannel: ModuleJoinerConfig = {
args: {
methodSuffix: "ApiKeys",
},
hasMany: true,
},
{
serviceName: Modules.SALES_CHANNEL,
@@ -37,6 +38,7 @@ export const PublishableApiKeySalesChannel: ModuleJoinerConfig = {
args: {
methodSuffix: "SalesChannels",
},
hasMany: true,
},
],
extends: [
@@ -25,6 +25,7 @@ export const RegionPaymentProvider: ModuleJoinerConfig = {
args: {
methodSuffix: "Regions",
},
hasMany: true,
},
{
serviceName: Modules.PAYMENT,
@@ -33,6 +34,7 @@ export const RegionPaymentProvider: ModuleJoinerConfig = {
foreignKey: "payment_provider_id",
alias: "payment_provider",
args: { methodSuffix: "PaymentProviders" },
hasMany: true,
},
],
extends: [
@@ -25,6 +25,7 @@ export const SalesChannelLocation: ModuleJoinerConfig = {
args: {
methodSuffix: "SalesChannels",
},
hasMany: true,
},
{
serviceName: Modules.STOCK_LOCATION,
@@ -35,6 +36,7 @@ export const SalesChannelLocation: ModuleJoinerConfig = {
args: {
methodSuffix: "StockLocations",
},
hasMany: true,
},
],
extends: [