feat(types): promotion module uses big number (#6522)
what: - promotion modules (application method and campaign budget) uses big number fields instead of numeric fields - refreshes the migrations to include new fields for big numbers - adds a promotion_ prefix to promotion models - uses `take: null` within the module to prevent the default pagination on performing actions within the module
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { initDb, useDb } from "../../../../environment-helpers/use-db"
|
||||
|
||||
import { CampaignBudgetType } from "@medusajs/utils"
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { createAdminUser } from "../../../helpers/create-admin-user"
|
||||
import { getContainer } from "../../../../environment-helpers/use-container"
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { CampaignBudgetType } from "@medusajs/utils"
|
||||
import path from "path"
|
||||
import { startBootstrapApp } from "../../../../environment-helpers/bootstrap-app"
|
||||
import { useApi } from "../../../../environment-helpers/use-api"
|
||||
import { getContainer } from "../../../../environment-helpers/use-container"
|
||||
import { createAdminUser } from "../../../helpers/create-admin-user"
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
@@ -101,6 +101,14 @@ describe("GET /admin/campaigns", () => {
|
||||
type: "spend",
|
||||
limit: 1000,
|
||||
used: 0,
|
||||
raw_limit: {
|
||||
precision: 20,
|
||||
value: "1000",
|
||||
},
|
||||
raw_used: {
|
||||
precision: 20,
|
||||
value: "0",
|
||||
},
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
deleted_at: null,
|
||||
@@ -123,6 +131,14 @@ describe("GET /admin/campaigns", () => {
|
||||
type: "usage",
|
||||
limit: 1000,
|
||||
used: 0,
|
||||
raw_limit: {
|
||||
precision: 20,
|
||||
value: "1000",
|
||||
},
|
||||
raw_used: {
|
||||
precision: 20,
|
||||
value: "0",
|
||||
},
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
deleted_at: null,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { initDb, useDb } from "../../../../environment-helpers/use-db"
|
||||
|
||||
import { CampaignBudgetType } from "@medusajs/utils"
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { createAdminUser } from "../../../helpers/create-admin-user"
|
||||
import { getContainer } from "../../../../environment-helpers/use-container"
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { CampaignBudgetType } from "@medusajs/utils"
|
||||
import path from "path"
|
||||
import { startBootstrapApp } from "../../../../environment-helpers/bootstrap-app"
|
||||
import { useApi } from "../../../../environment-helpers/use-api"
|
||||
import { getContainer } from "../../../../environment-helpers/use-container"
|
||||
import { createAdminUser } from "../../../helpers/create-admin-user"
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
@@ -102,6 +102,14 @@ describe("GET /admin/campaigns", () => {
|
||||
campaign: expect.any(Object),
|
||||
type: "spend",
|
||||
limit: 1000,
|
||||
raw_limit: {
|
||||
precision: 20,
|
||||
value: "1000",
|
||||
},
|
||||
raw_used: {
|
||||
precision: 20,
|
||||
value: "0",
|
||||
},
|
||||
used: 0,
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
|
||||
Reference in New Issue
Block a user