@medusajs/types 2.7.1-snapshot-20250414093455 → 2.7.1-snapshot-20250414113614
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ export interface AdminOptions {
|
|
13
13
|
* in both development and production environments. The default value is `false`.
|
14
14
|
*
|
15
15
|
* @example
|
16
|
-
* ```js title="medusa-config.
|
16
|
+
* ```js title="medusa-config.js"
|
17
17
|
* module.exports = defineConfig({
|
18
18
|
* admin: {
|
19
19
|
* disable: process.env.ADMIN_DISABLED === "true" ||
|
@@ -34,7 +34,7 @@ export interface AdminOptions {
|
|
34
34
|
* - `/`
|
35
35
|
*
|
36
36
|
* @example
|
37
|
-
* ```
|
37
|
+
* ```js title="medusa-config.js"
|
38
38
|
* module.exports = defineConfig({
|
39
39
|
* admin: {
|
40
40
|
* path: process.env.ADMIN_PATH || `/app`,
|
@@ -48,7 +48,7 @@ export interface AdminOptions {
|
|
48
48
|
* The URL of your Medusa application. Defaults to the browser origin. This is useful to set when running the admin on a separate domain.
|
49
49
|
*
|
50
50
|
* @example
|
51
|
-
* ```js title="medusa-config.
|
51
|
+
* ```js title="medusa-config.js"
|
52
52
|
* module.exports = defineConfig({
|
53
53
|
* admin: {
|
54
54
|
* backendUrl: process.env.MEDUSA_BACKEND_URL ||
|
@@ -64,7 +64,7 @@ export interface AdminOptions {
|
|
64
64
|
* to provide to customers to complete any processes
|
65
65
|
*
|
66
66
|
* @example
|
67
|
-
* ```js title="medusa-config.
|
67
|
+
* ```js title="medusa-config.js"
|
68
68
|
* module.exports = defineConfig({
|
69
69
|
* admin: {
|
70
70
|
* storefrontUrl: process.env.MEDUSA_STOREFRONT_URL ||
|
@@ -75,11 +75,6 @@ export interface AdminOptions {
|
|
75
75
|
* ```
|
76
76
|
*/
|
77
77
|
storefrontUrl?: string;
|
78
|
-
/**
|
79
|
-
* The directory where the admin build is output. This is where the build process places the generated files.
|
80
|
-
* The default value is `./build`.
|
81
|
-
*/
|
82
|
-
outDir?: string;
|
83
78
|
/**
|
84
79
|
* Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration
|
85
80
|
* and returns the modified configuration. The default value is `undefined`.
|
@@ -93,7 +88,7 @@ export interface AdminOptions {
|
|
93
88
|
*
|
94
89
|
* Options to pass to `express-session`.
|
95
90
|
*/
|
96
|
-
|
91
|
+
type SessionOptions = {
|
97
92
|
/**
|
98
93
|
* The name of the session ID cookie to set in the response (and read from in the request). The default value is `connect.sid`.
|
99
94
|
* Refer to [express-session’s documentation](https://www.npmjs.com/package/express-session#name) for more details.
|
@@ -124,33 +119,6 @@ export type SessionOptions = {
|
|
124
119
|
* Refer to [express-session’s documentation](https://www.npmjs.com/package/express-session#cookiemaxage) for details.
|
125
120
|
*/
|
126
121
|
ttl?: number;
|
127
|
-
/**
|
128
|
-
* Specify the options for storing session data to dynamoDB. Make
|
129
|
-
* sure to install the following dependencies and set the following
|
130
|
-
* variables too.
|
131
|
-
*
|
132
|
-
* - @aws-sdk/client-dynamodb@^3.218.0
|
133
|
-
* - connect-dynamodb@^3.0.5
|
134
|
-
*
|
135
|
-
* Environment variables to set
|
136
|
-
* - AWS_REGION=<value>
|
137
|
-
* - ENDPOINT=<value>
|
138
|
-
* - AWS_ACCESS_KEY_ID=<value>
|
139
|
-
* - AWS_SECRET_ACCESS_KEY=<value>
|
140
|
-
*/
|
141
|
-
dynamodbOptions?: {
|
142
|
-
clientOptions?: {
|
143
|
-
endpoint?: string;
|
144
|
-
};
|
145
|
-
table?: string;
|
146
|
-
readCapacityUnits?: number;
|
147
|
-
writeCapacityUnits?: number;
|
148
|
-
specialKeys?: {
|
149
|
-
name: string;
|
150
|
-
type: string;
|
151
|
-
}[];
|
152
|
-
skipThrowMissingSpecialKeys?: boolean;
|
153
|
-
};
|
154
122
|
};
|
155
123
|
/**
|
156
124
|
* @interface
|
@@ -191,7 +159,7 @@ export type ProjectConfigOptions = {
|
|
191
159
|
* [PostgreSQL's documentation](https://www.postgresql.org/docs/current/sql-createdatabase.html).
|
192
160
|
*
|
193
161
|
* @example
|
194
|
-
* ```js title="medusa-config.
|
162
|
+
* ```js title="medusa-config.js"
|
195
163
|
* module.exports = defineConfig({
|
196
164
|
* projectConfig: {
|
197
165
|
* databaseName: process.env.DATABASE_NAME ||
|
@@ -227,9 +195,9 @@ export type ProjectConfigOptions = {
|
|
227
195
|
* DATABASE_URL=postgres://postgres@localhost/medusa-store
|
228
196
|
* ```
|
229
197
|
*
|
230
|
-
* Then, use the value in `medusa-config.
|
198
|
+
* Then, use the value in `medusa-config.js`:
|
231
199
|
*
|
232
|
-
* ```js title="medusa-config.
|
200
|
+
* ```js title="medusa-config.js"
|
233
201
|
* module.exports = defineConfig({
|
234
202
|
* projectConfig: {
|
235
203
|
* databaseUrl: process.env.DATABASE_URL,
|
@@ -243,7 +211,7 @@ export type ProjectConfigOptions = {
|
|
243
211
|
/**
|
244
212
|
* The database schema to connect to. This is not required to provide if you’re using the default schema, which is `public`.
|
245
213
|
*
|
246
|
-
* ```js title="medusa-config.
|
214
|
+
* ```js title="medusa-config.js"
|
247
215
|
* module.exports = defineConfig({
|
248
216
|
* projectConfig: {
|
249
217
|
* databaseSchema: process.env.DATABASE_SCHEMA ||
|
@@ -259,7 +227,7 @@ export type ProjectConfigOptions = {
|
|
259
227
|
* This configuration specifies whether database messages should be logged.
|
260
228
|
*
|
261
229
|
* @example
|
262
|
-
* ```js title="medusa-config.
|
230
|
+
* ```js title="medusa-config.js"
|
263
231
|
* module.exports = defineConfig({
|
264
232
|
* projectConfig: {
|
265
233
|
* databaseLogging: false
|
@@ -284,7 +252,7 @@ export type ProjectConfigOptions = {
|
|
284
252
|
* :::
|
285
253
|
*
|
286
254
|
* @example
|
287
|
-
* ```js title="medusa-config.
|
255
|
+
* ```js title="medusa-config.js"
|
288
256
|
* module.exports = defineConfig({
|
289
257
|
* projectConfig: {
|
290
258
|
* databaseDriverOptions: process.env.NODE_ENV !== "development" ?
|
@@ -321,7 +289,7 @@ export type ProjectConfigOptions = {
|
|
321
289
|
* For a local Redis installation, the connection URL should be `redis://localhost:6379` unless you’ve made any changes to the Redis configuration during installation.
|
322
290
|
*
|
323
291
|
* @example
|
324
|
-
* ```js title="medusa-config.
|
292
|
+
* ```js title="medusa-config.js"
|
325
293
|
* module.exports = defineConfig({
|
326
294
|
* projectConfig: {
|
327
295
|
* redisUrl: process.env.REDIS_URL ||
|
@@ -339,7 +307,7 @@ export type ProjectConfigOptions = {
|
|
339
307
|
* If this configuration option is provided, it is prepended to `sess:`.
|
340
308
|
*
|
341
309
|
* @example
|
342
|
-
* ```js title="medusa-config.
|
310
|
+
* ```js title="medusa-config.js"
|
343
311
|
* module.exports = defineConfig({
|
344
312
|
* projectConfig: {
|
345
313
|
* redisPrefix: process.env.REDIS_URL || "medusa:",
|
@@ -355,7 +323,7 @@ export type ProjectConfigOptions = {
|
|
355
323
|
* for the list of available options.
|
356
324
|
*
|
357
325
|
* @example
|
358
|
-
* ```js title="medusa-config.
|
326
|
+
* ```js title="medusa-config.js"
|
359
327
|
* module.exports = defineConfig({
|
360
328
|
* projectConfig: {
|
361
329
|
* redisOptions: {
|
@@ -373,7 +341,7 @@ export type ProjectConfigOptions = {
|
|
373
341
|
* This configuration defines additional options to pass to [express-session](https://www.npmjs.com/package/express-session), which is used to store the Medusa server's session.
|
374
342
|
*
|
375
343
|
* @example
|
376
|
-
* ```js title="medusa-config.
|
344
|
+
* ```js title="medusa-config.js"
|
377
345
|
* module.exports = defineConfig({
|
378
346
|
* projectConfig: {
|
379
347
|
* sessionOptions: {
|
@@ -390,7 +358,7 @@ export type ProjectConfigOptions = {
|
|
390
358
|
* Configure the number of staged jobs that are polled from the database. Default is `1000`.
|
391
359
|
*
|
392
360
|
* @example
|
393
|
-
* ```js title="medusa-config.
|
361
|
+
* ```js title="medusa-config.js"
|
394
362
|
* module.exports = defineConfig({
|
395
363
|
* projectConfig: {
|
396
364
|
* jobsBatchSize: 100
|
@@ -427,7 +395,7 @@ export type ProjectConfigOptions = {
|
|
427
395
|
* 2. Another having the `workerMode` configuration set to `worker`.
|
428
396
|
*
|
429
397
|
* @example
|
430
|
-
* ```js title="medusa-config.
|
398
|
+
* ```js title="medusa-config.js"
|
431
399
|
* module.exports = defineConfig({
|
432
400
|
* projectConfig: {
|
433
401
|
* workerMode: process.env.WORKER_MODE || "shared"
|
@@ -442,7 +410,7 @@ export type ProjectConfigOptions = {
|
|
442
410
|
* This property configures the application's http-specific settings.
|
443
411
|
*
|
444
412
|
* @example
|
445
|
-
* ```js title="medusa-config.
|
413
|
+
* ```js title="medusa-config.js"
|
446
414
|
* module.exports = defineConfig({
|
447
415
|
* projectConfig: {
|
448
416
|
* http: {
|
@@ -465,7 +433,7 @@ export type ProjectConfigOptions = {
|
|
465
433
|
* error is thrown and the application crashes.
|
466
434
|
*
|
467
435
|
* @example
|
468
|
-
* ```js title="medusa-config.
|
436
|
+
* ```js title="medusa-config.js"
|
469
437
|
* module.exports = defineConfig({
|
470
438
|
* projectConfig: {
|
471
439
|
* http: {
|
@@ -484,7 +452,7 @@ export type ProjectConfigOptions = {
|
|
484
452
|
* If not provided, the default value is `24h`.
|
485
453
|
*
|
486
454
|
* @example
|
487
|
-
* ```js title="medusa-config.
|
455
|
+
* ```js title="medusa-config.js"
|
488
456
|
* module.exports = defineConfig({
|
489
457
|
* projectConfig: {
|
490
458
|
* http: {
|
@@ -504,7 +472,7 @@ export type ProjectConfigOptions = {
|
|
504
472
|
* the application crashes.
|
505
473
|
*
|
506
474
|
* @example
|
507
|
-
* ```js title="medusa-config.
|
475
|
+
* ```js title="medusa-config.js"
|
508
476
|
* module.exports = defineConfig({
|
509
477
|
* projectConfig: {
|
510
478
|
* http: {
|
@@ -541,9 +509,9 @@ export type ProjectConfigOptions = {
|
|
541
509
|
* AUTH_CORS=/http:\/\/.+/
|
542
510
|
* ```
|
543
511
|
*
|
544
|
-
* Then, set the configuration in `medusa-config.
|
512
|
+
* Then, set the configuration in `medusa-config.js`:
|
545
513
|
*
|
546
|
-
* ```js title="medusa-config.
|
514
|
+
* ```js title="medusa-config.js"
|
547
515
|
* module.exports = defineConfig({
|
548
516
|
* projectConfig: {
|
549
517
|
* http: {
|
@@ -555,9 +523,9 @@ export type ProjectConfigOptions = {
|
|
555
523
|
* })
|
556
524
|
* ```
|
557
525
|
*
|
558
|
-
* If you’re adding the value directly within `medusa-config.
|
526
|
+
* If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
559
527
|
*
|
560
|
-
* ```js title="medusa-config.
|
528
|
+
* ```js title="medusa-config.js"
|
561
529
|
* module.exports = defineConfig({
|
562
530
|
* projectConfig: {
|
563
531
|
* http: {
|
@@ -579,7 +547,7 @@ export type ProjectConfigOptions = {
|
|
579
547
|
* Learn more in the [API Reference](https://docs.medusajs.com/api/store#http-compression).
|
580
548
|
*
|
581
549
|
* @example
|
582
|
-
* ```js title="medusa-config.
|
550
|
+
* ```js title="medusa-config.js"
|
583
551
|
* module.exports = defineConfig({
|
584
552
|
* projectConfig: {
|
585
553
|
* http: {
|
@@ -621,9 +589,9 @@ export type ProjectConfigOptions = {
|
|
621
589
|
* STORE_CORS=/http:\/\/.+/
|
622
590
|
* ```
|
623
591
|
*
|
624
|
-
* Then, set the configuration in `medusa-config.
|
592
|
+
* Then, set the configuration in `medusa-config.js`:
|
625
593
|
*
|
626
|
-
* ```js title="medusa-config.
|
594
|
+
* ```js title="medusa-config.js"
|
627
595
|
* module.exports = defineConfig({
|
628
596
|
* projectConfig: {
|
629
597
|
* http: {
|
@@ -635,9 +603,9 @@ export type ProjectConfigOptions = {
|
|
635
603
|
* })
|
636
604
|
* ```
|
637
605
|
*
|
638
|
-
* If you’re adding the value directly within `medusa-config.
|
606
|
+
* If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
639
607
|
*
|
640
|
-
* ```js title="medusa-config.
|
608
|
+
* ```js title="medusa-config.js"
|
641
609
|
* module.exports = defineConfig({
|
642
610
|
* projectConfig: {
|
643
611
|
* http: {
|
@@ -674,9 +642,9 @@ export type ProjectConfigOptions = {
|
|
674
642
|
* ADMIN_CORS=/http:\/\/.+/
|
675
643
|
* ```
|
676
644
|
*
|
677
|
-
* Then, set the configuration in `medusa-config.
|
645
|
+
* Then, set the configuration in `medusa-config.js`:
|
678
646
|
*
|
679
|
-
* ```js title="medusa-config.
|
647
|
+
* ```js title="medusa-config.js"
|
680
648
|
* module.exports = defineConfig({
|
681
649
|
* projectConfig: {
|
682
650
|
* http: {
|
@@ -688,9 +656,9 @@ export type ProjectConfigOptions = {
|
|
688
656
|
* })
|
689
657
|
* ```
|
690
658
|
*
|
691
|
-
* If you’re adding the value directly within `medusa-config.
|
659
|
+
* If you’re adding the value directly within `medusa-config.js`, make sure to add an extra escaping `/` for every backslash in the pattern. For example:
|
692
660
|
*
|
693
|
-
* ```js title="medusa-config.
|
661
|
+
* ```js title="medusa-config.js"
|
694
662
|
* module.exports = defineConfig({
|
695
663
|
* projectConfig: {
|
696
664
|
* http: {
|
@@ -712,9 +680,9 @@ export type ProjectConfigOptions = {
|
|
712
680
|
* @example
|
713
681
|
* Some example values of common use cases:
|
714
682
|
*
|
715
|
-
* Then, set the configuration in `medusa-config.
|
683
|
+
* Then, set the configuration in `medusa-config.js`:
|
716
684
|
*
|
717
|
-
* ```js title="medusa-config.
|
685
|
+
* ```js title="medusa-config.js"
|
718
686
|
* module.exports = defineConfig({
|
719
687
|
* projectConfig: {
|
720
688
|
* http: {
|
@@ -736,7 +704,7 @@ export type ProjectConfigOptions = {
|
|
736
704
|
*
|
737
705
|
* @example
|
738
706
|
*
|
739
|
-
* ```js title="medusa-config.
|
707
|
+
* ```js title="medusa-config.js"
|
740
708
|
* module.exports = defineConfig({
|
741
709
|
* projectConfig: {
|
742
710
|
* http: {
|
@@ -754,27 +722,20 @@ export type ProjectConfigOptions = {
|
|
754
722
|
/**
|
755
723
|
* @interface
|
756
724
|
*
|
757
|
-
* The configurations for your Medusa application are
|
758
|
-
*
|
759
|
-
* :::note
|
760
|
-
*
|
761
|
-
* Some Medusa configurations are set through environment variables, which you can find in [this documentation](https://docs.medusajs.com/learn/fundamentals/environment-variables#predefined-medusa-environment-variables).
|
762
|
-
*
|
763
|
-
* :::
|
725
|
+
* The configurations for your Medusa application are in `medusa-config.js` located in the root of your Medusa project. The configurations include configurations for database, modules, and more.
|
764
726
|
*
|
765
|
-
* `medusa-config.
|
727
|
+
* `medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/utils`.
|
766
728
|
*
|
767
729
|
* `defineConfig` accepts as a parameter an object with the following properties:
|
768
730
|
*
|
769
731
|
* - {@link ConfigModule.projectConfig | projectConfig} (required): An object that holds general configurations related to the Medusa application, such as database or CORS configurations.
|
770
|
-
* - {@link ConfigModule.plugins | plugins}: An array of strings or objects that hold the configurations of the plugins installed in the Medusa application.
|
771
732
|
* - {@link ConfigModule.admin | admin}: An object that holds admin-related configurations.
|
772
733
|
* - {@link ConfigModule.modules | modules}: An object that configures the Medusa application's modules.
|
773
734
|
* - {@link ConfigModule.featureFlags | featureFlags}: An object that enables or disables features guarded by a feature flag.
|
774
735
|
*
|
775
736
|
* For example:
|
776
737
|
*
|
777
|
-
* ```
|
738
|
+
* ```js title="medusa-config.js"
|
778
739
|
* module.exports = defineConfig({
|
779
740
|
* projectConfig: {
|
780
741
|
* // ...
|
@@ -795,7 +756,7 @@ export type ProjectConfigOptions = {
|
|
795
756
|
*
|
796
757
|
* ## Environment Variables
|
797
758
|
*
|
798
|
-
* It's highly recommended to store the values of configurations in environment variables, then reference them within `medusa-config.
|
759
|
+
* It's highly recommended to store the values of configurations in environment variables, then reference them within `medusa-config.js`.
|
799
760
|
*
|
800
761
|
* During development, you can set your environment variables in the `.env` file at the root of your Medusa application project. In production,
|
801
762
|
* setting the environment variables depends on the hosting provider.
|
@@ -811,7 +772,7 @@ export type ConfigModule = {
|
|
811
772
|
* This property holds configurations for the Medusa Admin dashboard.
|
812
773
|
*
|
813
774
|
* @example
|
814
|
-
* ```
|
775
|
+
* ```js title="medusa-config.js"
|
815
776
|
* module.exports = defineConfig({
|
816
777
|
* admin: {
|
817
778
|
* backendUrl: process.env.MEDUSA_BACKEND_URL ||
|
@@ -823,22 +784,20 @@ export type ConfigModule = {
|
|
823
784
|
*/
|
824
785
|
admin: AdminOptions;
|
825
786
|
/**
|
826
|
-
* On your Medusa
|
827
|
-
*
|
787
|
+
* On your Medusa backend, you can use [Plugins](https://docs.medusajs.com/development/plugins/overview) to add custom features or integrate third-party services.
|
788
|
+
* For example, installing a plugin to use Stripe as a payment processor.
|
828
789
|
*
|
829
|
-
* Aside from installing the plugin with NPM, you need to pass the plugin you installed into the `plugins` array defined in `medusa-config.
|
790
|
+
* Aside from installing the plugin with NPM, you need to pass the plugin you installed into the `plugins` array defined in `medusa-config.js`.
|
830
791
|
*
|
831
792
|
* The items in the array can either be:
|
832
793
|
*
|
833
|
-
* - A string, which is the name of the plugin
|
794
|
+
* - A string, which is the name of the plugin to add. You can pass a plugin as a string if it doesn’t require any configurations.
|
834
795
|
* - An object having the following properties:
|
835
|
-
* - `resolve`: The name of the plugin
|
836
|
-
* - `options`: An object that includes options
|
837
|
-
*
|
838
|
-
* Learn how to create a plugin in [this documentation](https://docs.medusajs.com/learn/fundamentals/plugins/create).
|
796
|
+
* - `resolve`: The name of the plugin.
|
797
|
+
* - `options`: An object that includes the plugin’s options. These options vary for each plugin, and you should refer to the plugin’s documentation for available options.
|
839
798
|
*
|
840
799
|
* @example
|
841
|
-
* ```
|
800
|
+
* ```js title="medusa-config.js"
|
842
801
|
* module.exports = {
|
843
802
|
* plugins: [
|
844
803
|
* `medusa-my-plugin-1`,
|
@@ -854,16 +813,14 @@ export type ConfigModule = {
|
|
854
813
|
* // ...
|
855
814
|
* }
|
856
815
|
* ```
|
816
|
+
*
|
817
|
+
* @ignore
|
818
|
+
*
|
819
|
+
* @privateRemarks
|
820
|
+
* Added the `@\ignore` tag for now so it's not generated in the main docs until we figure out what to do with plugins
|
857
821
|
*/
|
858
822
|
plugins: ({
|
859
|
-
/**
|
860
|
-
* The name of the plugin's package as specified in the plugin's `package.json` file.
|
861
|
-
*/
|
862
823
|
resolve: string;
|
863
|
-
/**
|
864
|
-
* An object that includes options to be passed to the modules within the plugin.
|
865
|
-
* Learn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/modules/options).
|
866
|
-
*/
|
867
824
|
options: Record<string, unknown>;
|
868
825
|
} | string)[];
|
869
826
|
/**
|
@@ -876,19 +833,21 @@ export type ConfigModule = {
|
|
876
833
|
*
|
877
834
|
* :::
|
878
835
|
*
|
879
|
-
* `modules`
|
836
|
+
* The keys of the `modules` configuration object refer to the module's registration name. Its value can be one of the following:
|
880
837
|
*
|
881
|
-
* 1.
|
882
|
-
* 2.
|
838
|
+
* 1. A boolean value indicating whether the module type is enabled. This is only supported for Medusa's commerce and architectural modules;
|
839
|
+
* 2. Or an object having the following properties:
|
840
|
+
* 1. `resolve`: a string indicating the path to the module relative to `src`, or the module's NPM package name. For example, `./modules/my-module`.
|
841
|
+
* 2. `options`: (optional) an object indicating the options to pass to the module.
|
883
842
|
*
|
884
843
|
* @example
|
885
|
-
* ```
|
844
|
+
* ```js title="medusa-config.js"
|
886
845
|
* module.exports = defineConfig({
|
887
|
-
* modules:
|
888
|
-
* {
|
846
|
+
* modules: {
|
847
|
+
* helloModuleService: {
|
889
848
|
* resolve: "./modules/hello"
|
890
849
|
* }
|
891
|
-
*
|
850
|
+
* }
|
892
851
|
* // ...
|
893
852
|
* })
|
894
853
|
* ```
|
@@ -898,14 +857,14 @@ export type ConfigModule = {
|
|
898
857
|
* Some features in the Medusa application are guarded by a feature flag. This ensures constant shipping of new features while maintaining the engine’s stability.
|
899
858
|
*
|
900
859
|
* You can enable a feature in your application by enabling its feature flag. Feature flags are enabled through either environment
|
901
|
-
* variables or through this configuration property exported in `medusa-config.
|
860
|
+
* variables or through this configuration property exported in `medusa-config.js`.
|
902
861
|
*
|
903
862
|
* The `featureFlags`'s value is an object. Its properties are the names of the feature flags, and their value is a boolean indicating whether the feature flag is enabled.
|
904
863
|
*
|
905
864
|
* You can find available feature flags and their key name [here](https://github.com/medusajs/medusa/tree/develop/packages/medusa/src/loaders/feature-flags).
|
906
865
|
*
|
907
866
|
* @example
|
908
|
-
* ```
|
867
|
+
* ```js title="medusa-config.js"
|
909
868
|
* module.exports = defineConfig({
|
910
869
|
* featureFlags: {
|
911
870
|
* analytics: true,
|
@@ -951,7 +910,7 @@ export type InputConfigModules = Partial<InternalModuleDeclarationOverride | Ext
|
|
951
910
|
* The configuration accepted by the "defineConfig" helper
|
952
911
|
*/
|
953
912
|
export type InputConfig = Partial<Omit<ConfigModule, "admin" | "modules"> & {
|
954
|
-
admin
|
913
|
+
admin: Partial<ConfigModule["admin"]>;
|
955
914
|
modules: InputConfigModules
|
956
915
|
/**
|
957
916
|
* @deprecated use the array instead
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config-module.d.ts","sourceRoot":"","sources":["../../src/common/config-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"config-module.d.ts","sourceRoot":"","sources":["../../src/common/config-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EA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