Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
engine-strict=true
use-node-version=20.11.0
use-node-version=24.11.1
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"preid": "beta"
}
}
}
}
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@
"packages/*"
],
"devDependencies": {
"lerna": "^8.1.3",
"npm-check-updates": "^16.14.20",
"replace-in-file": "^7.1.0"
"lerna": "^9.0.1",
"npm-check-updates": "^19.1.2",
"replace-in-file": "^8.3.0"
},
"resolutions": {
"brace-expansion": ">=2.0.2",
"cross-spawn": ">=7.0.5",
"glob": ">=11.1.0",
"js-yaml": ">=4.1.1",
"tmp": ">=0.2.4",
"ejs": ">=3.1.10",
"tar": ">=6.2.1",
"undici": ">=5.28.4"
}
}
}
9 changes: 3 additions & 6 deletions packages/organization-config/biome.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": []
"ignoreUnknown": false
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"formatWithErrors": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
Expand Down
16 changes: 8 additions & 8 deletions packages/organization-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
"bench": "vitest bench",
"build": "tsup",
"jsr:publish": "npx jsr publish",
"generate:types": "node src/schema/generate.js"
"generate:types": "node src/schema/generate.js && pnpm run lint:fix"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@types/lodash": "^4.17.16",
"@types/node": "^22.15.16",
"@biomejs/biome": "^2.3.5",
"@types/lodash": "^4.17.20",
"@types/node": "^24.10.1",
"deepmerge": "^4.3.1",
"deepmerge-ts": "^7.1.5",
"json-schema-to-typescript": "^15.0.4",
"lodash": "^4.17.21",
"tsup": "^8.4.0",
"type-fest": "^4.41.0",
"typescript": "^5.8.3",
"vitest": "^3.1.3"
"tsup": "^8.5.1",
"type-fest": "^5.2.0",
"typescript": "^5.9.3",
"vitest": "^4.0.10"
},
"dependencies": {
"merge-anything": "^5.1.7"
Expand Down
2 changes: 1 addition & 1 deletion packages/organization-config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export {
type DefaultMfeConfig,
getMfeConfig,
type MfeConfigs,
type DefaultMfeConfig,
} from "./getMfeConfig"
117 changes: 98 additions & 19 deletions packages/organization-config/src/schema/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*/

export type Url = string
/**
* Don't show promo code.
*/
export type HidePromoCode = boolean
/**
* The international 2-letter country code as defined by the ISO 3166-1 standard.
*/
Expand Down Expand Up @@ -56,6 +60,10 @@ export type StateCountry3 = {
*/
label: string
}[]
/**
* Enable this option if you want to hide item codes.
*/
export type HideItemCodes = boolean

/**
* Payload to use when using the config field of the Organization on CommerceLayer.
Expand All @@ -65,6 +73,49 @@ export interface ValidConfigForOrganizationsInCommerceLayer {
default?: MfeConfig
[k: string]: MfeConfig | undefined
}
/**
* Default settings for apps.
*/
apps?: {
/**
* Customers app settings.
*/
customers?: {
/**
* Enable reset password flow for customers.
*/
enable_reset_password?: boolean
}
/**
* Orders app settings.
*/
orders?: {
/**
* Enable this option to allow external price.
*/
external_price?: boolean
}
}
/**
* Organization API behavior settings.
*/
api?: {
auth?: {
/**
* Allow JWT bearer token to see guest orders.
*/
guest_orders?: boolean
}
/**
* Stream pusher configuration.
*/
stream?: {
/**
* Where streaming is enabled: none, live, test or both.
*/
scope?: "none" | "live" | "test" | "both"
}
}
[k: string]: unknown
}
/**
Expand All @@ -88,9 +139,20 @@ export interface MfeConfig {
* Settings for the Checkout micro front end.
*/
checkout?: {
hide_item_codes?: boolean
thankyou_page?: Url
/**
* Billing details not required for processing.
*/
optional_billing_info?: boolean
hide_promo_code?: HidePromoCode
/**
* Company name not required for processing.
*/
optional_company_name?: boolean
/**
* Show notes.
*/
show_notes?: boolean
thankyou_page?: Url
billing_countries?: StateCountry
shipping_countries?: StateCountry1
default_country?: CountryCode
Expand All @@ -106,35 +168,52 @@ export interface MfeConfig {
shipping_states?: {
[k: string]: StateCountry3
}
hide_item_codes?: HideItemCodes
}
/**
* Checkout internal links settings.
*/
urls?: {
privacy?: Url
terms?: Url
}
/**
* Settings for the Cart micro front end.
* Default language setting.
*/
language?: string
/**
* Cart settings.
*/
cart?: {
hide_item_codes?: boolean
hide_item_codes?: HideItemCodes
hide_promo_code?: HidePromoCode
}
/**
* Settings for the microstore micro front end.
* Microstore settings.
*/
microstore?: {
hide_item_codes?: boolean
hide_item_codes?: HideItemCodes
}
/**
* Settings for the my-account micro front end.
* My Account settings.
*/
my_account?: {
hide_item_codes?: boolean
hide_item_codes?: HideItemCodes
/**
* Enable this option if you want to hide returns.
*/
hide_returns?: boolean
/**
* Enable this option if you want to hide subscriptions.
*/
hide_subscriptions?: boolean
/**
* Don't show the wallet.
*/
hide_wallet?: boolean
/**
* Don't show the logout.
*/
hide_logout?: boolean
}
/**
* Checkout internal links settings.
*/
urls?: {
privacy?: Url
terms?: Url
}
/**
* Default language setting.
*/
language?: string
}
Loading