@medusajs/region 0.1.2-snapshot-20240701122250 → 0.1.2-snapshot-20240704061641
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +280 -3
- package/dist/index.js +3 -3
- package/dist/joiner-config.d.ts +0 -2
- package/dist/joiner-config.js +1 -2
- package/dist/models/country.d.ts +60 -33
- package/dist/models/country.js +1 -2
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +2 -2
- package/dist/models/region.d.ts +33 -27
- package/dist/models/region.js +2 -3
- package/dist/services/region-module.d.ts +5 -3
- package/dist/services/region-module.js +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,280 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
1
|
+
import { RegionModuleService } from "./services";
|
2
|
+
import { Modules } from "@medusajs/utils";
|
3
|
+
declare const _default: import("@medusajs/types").ModuleExports<typeof RegionModuleService> & {
|
4
|
+
links: import("@medusajs/utils/dist/modules-sdk/types/links-config").InfersLinksConfig<Modules.REGION, {
|
5
|
+
Region: import("@medusajs/utils").DmlEntity<{
|
6
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
7
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
8
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
9
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
10
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
11
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
12
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
13
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
14
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
15
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
16
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<any & {
|
17
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
18
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
19
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
20
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
21
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
22
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
23
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<any & {
|
24
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
25
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
26
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
27
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
28
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
29
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
30
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
31
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
32
|
+
} & {
|
33
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
34
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
35
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
36
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
37
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
38
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<any & {
|
39
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
40
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
41
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
42
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
43
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
44
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
45
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<any & {
|
46
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
47
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
48
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
49
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
50
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
51
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
52
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
53
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
54
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
55
|
+
readonly name: "Country";
|
56
|
+
readonly tableName: "region_country";
|
57
|
+
}>>;
|
58
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
59
|
+
} & {
|
60
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
61
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
62
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
63
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
64
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
65
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
66
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
67
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
68
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
69
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
70
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
71
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
72
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
73
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
74
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
75
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
76
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
77
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
78
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
79
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
80
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
81
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
82
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
83
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
84
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
85
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
86
|
+
} & {
|
87
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
88
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
89
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
90
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
91
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
92
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
93
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
94
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
95
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
96
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
97
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
98
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
99
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
100
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
101
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
102
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
103
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
104
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
105
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
106
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
107
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
108
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
109
|
+
readonly name: "Country";
|
110
|
+
readonly tableName: "region_country";
|
111
|
+
}>>;
|
112
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
113
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">;
|
114
|
+
Country: import("@medusajs/utils").DmlEntity<{
|
115
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
116
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
117
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
118
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
119
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
120
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
121
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
122
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
123
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
124
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
125
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
126
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
127
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
128
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
129
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
130
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
131
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
132
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
133
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
134
|
+
readonly name: "Country";
|
135
|
+
readonly tableName: "region_country";
|
136
|
+
}>>;
|
137
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
138
|
+
} & {
|
139
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
140
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
141
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
142
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
143
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
144
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
145
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
146
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
147
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
148
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
149
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
150
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
151
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
152
|
+
readonly name: "Country";
|
153
|
+
readonly tableName: "region_country";
|
154
|
+
}>>;
|
155
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
156
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
157
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
158
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
159
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
160
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
161
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
162
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
163
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
164
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
165
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
166
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
167
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
168
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
169
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
170
|
+
readonly name: "Country";
|
171
|
+
readonly tableName: "region_country";
|
172
|
+
}>>;
|
173
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
174
|
+
} & {
|
175
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
176
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
177
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
178
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
179
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
180
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
181
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
182
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
183
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
184
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
185
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
186
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
187
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
188
|
+
readonly name: "Country";
|
189
|
+
readonly tableName: "region_country";
|
190
|
+
}>>;
|
191
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
192
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
193
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
194
|
+
} & {
|
195
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
196
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
197
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
198
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
199
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
200
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
201
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
202
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
203
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
204
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
205
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
206
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
207
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
208
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
209
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
210
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
211
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
212
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
213
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
214
|
+
readonly name: "Country";
|
215
|
+
readonly tableName: "region_country";
|
216
|
+
}>>;
|
217
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
218
|
+
} & {
|
219
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
220
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
221
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
222
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
223
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
224
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
225
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
226
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
227
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
228
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
229
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
230
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
231
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
232
|
+
readonly name: "Country";
|
233
|
+
readonly tableName: "region_country";
|
234
|
+
}>>;
|
235
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
236
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
237
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
238
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
239
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
240
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
241
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
242
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
243
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
244
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
245
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
246
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
247
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
248
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
249
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
250
|
+
readonly name: "Country";
|
251
|
+
readonly tableName: "region_country";
|
252
|
+
}>>;
|
253
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
254
|
+
} & {
|
255
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
256
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
257
|
+
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
258
|
+
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
259
|
+
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
260
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
261
|
+
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
262
|
+
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
263
|
+
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
264
|
+
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
265
|
+
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
266
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
267
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
268
|
+
readonly name: "Country";
|
269
|
+
readonly tableName: "region_country";
|
270
|
+
}>>;
|
271
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
272
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
273
|
+
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
274
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
275
|
+
readonly name: "Country";
|
276
|
+
readonly tableName: "region_country";
|
277
|
+
}>;
|
278
|
+
}>;
|
279
|
+
};
|
280
|
+
export default _default;
|
package/dist/index.js
CHANGED
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const services_1 = require("./services");
|
7
7
|
const defaults_1 = __importDefault(require("./loaders/defaults"));
|
8
|
-
const
|
8
|
+
const utils_1 = require("@medusajs/utils");
|
9
|
+
exports.default = (0, utils_1.Module)(utils_1.Modules.REGION, {
|
9
10
|
service: services_1.RegionModuleService,
|
10
11
|
loaders: [defaults_1.default],
|
11
|
-
};
|
12
|
-
exports.default = moduleDefinition;
|
12
|
+
});
|
package/dist/joiner-config.d.ts
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
import { MapToConfig } from "@medusajs/utils";
|
2
1
|
export declare const joinerConfig: Omit<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys"> & Required<Pick<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys">>;
|
3
|
-
export declare const entityNameToLinkableKeysMap: MapToConfig;
|
package/dist/joiner-config.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.joinerConfig = void 0;
|
4
4
|
const utils_1 = require("@medusajs/utils");
|
5
5
|
exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.REGION);
|
6
|
-
exports.entityNameToLinkableKeysMap = (0, utils_1.buildEntitiesNameToLinkableKeysMap)(exports.joinerConfig.linkableKeys);
|
package/dist/models/country.d.ts
CHANGED
@@ -1,138 +1,165 @@
|
|
1
|
-
declare const
|
2
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
1
|
+
declare const _default: import("@medusajs/utils").DmlEntity<{
|
2
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
3
3
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
4
4
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
5
5
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
6
6
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
7
7
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
8
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
8
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
9
9
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
10
10
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
11
11
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
12
12
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
13
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
13
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
14
14
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
15
15
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
16
16
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
17
17
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
18
18
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
19
19
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
20
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
20
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
21
|
+
readonly name: "Country";
|
22
|
+
readonly tableName: "region_country";
|
23
|
+
}>>;
|
21
24
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
22
25
|
} & {
|
23
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
26
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
24
27
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
25
28
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
26
29
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
27
30
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
28
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
31
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
29
32
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
30
33
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
31
34
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
32
35
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
33
36
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
34
37
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
35
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
38
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
39
|
+
readonly name: "Country";
|
40
|
+
readonly tableName: "region_country";
|
41
|
+
}>>;
|
36
42
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
37
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
38
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
43
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
44
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
39
45
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
40
46
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
41
47
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
42
48
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
43
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
49
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
44
50
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
45
51
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
46
52
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
47
53
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
48
54
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
49
55
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
50
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
56
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
57
|
+
readonly name: "Country";
|
58
|
+
readonly tableName: "region_country";
|
59
|
+
}>>;
|
51
60
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
52
61
|
} & {
|
53
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
62
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
54
63
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
55
64
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
56
65
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
57
66
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<any & {
|
58
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
67
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
59
68
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
60
69
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
61
70
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
62
71
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
63
72
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
64
73
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
65
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
74
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
75
|
+
readonly name: "Country";
|
76
|
+
readonly tableName: "region_country";
|
77
|
+
}>>;
|
66
78
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
67
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>>>;
|
79
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
68
80
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
69
81
|
} & {
|
70
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
82
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
71
83
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
72
84
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
73
85
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
74
86
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
75
87
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
76
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
88
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
77
89
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
78
90
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
79
91
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
80
92
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
81
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
93
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
82
94
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
83
95
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
84
96
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
85
97
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
86
98
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
87
99
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
88
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
100
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
101
|
+
readonly name: "Country";
|
102
|
+
readonly tableName: "region_country";
|
103
|
+
}>>;
|
89
104
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
90
105
|
} & {
|
91
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
106
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
92
107
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
93
108
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
94
109
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
95
110
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
96
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
111
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
97
112
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
98
113
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
99
114
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
100
115
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
101
116
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
102
117
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
103
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
118
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
119
|
+
readonly name: "Country";
|
120
|
+
readonly tableName: "region_country";
|
121
|
+
}>>;
|
104
122
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
105
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
106
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
123
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
124
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
107
125
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
108
126
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
109
127
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
110
128
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
111
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
129
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
112
130
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
113
131
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
114
132
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
115
133
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
116
134
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
117
135
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
118
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
136
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
137
|
+
readonly name: "Country";
|
138
|
+
readonly tableName: "region_country";
|
139
|
+
}>>;
|
119
140
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
120
141
|
} & {
|
121
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
142
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
122
143
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
123
144
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
124
145
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
125
146
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
126
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
147
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
127
148
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
128
149
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
129
150
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
130
151
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
131
152
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<any, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<any>>;
|
132
153
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
133
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
154
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
155
|
+
readonly name: "Country";
|
156
|
+
readonly tableName: "region_country";
|
157
|
+
}>>;
|
134
158
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
135
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>>>;
|
159
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
136
160
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
137
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
138
|
-
|
161
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
162
|
+
readonly name: "Country";
|
163
|
+
readonly tableName: "region_country";
|
164
|
+
}>;
|
165
|
+
export default _default;
|
package/dist/models/country.js
CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const utils_1 = require("@medusajs/utils");
|
7
7
|
const region_1 = __importDefault(require("./region"));
|
8
|
-
|
8
|
+
exports.default = utils_1.model
|
9
9
|
.define({ name: "Country", tableName: "region_country" }, {
|
10
10
|
iso_2: utils_1.model.text().searchable().primaryKey(),
|
11
11
|
iso_3: utils_1.model.text(),
|
@@ -25,4 +25,3 @@ const Country = utils_1.model
|
|
25
25
|
unique: true,
|
26
26
|
},
|
27
27
|
]);
|
28
|
-
exports.default = Country;
|
package/dist/models/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { default as
|
1
|
+
export { default as Country } from "./country";
|
2
2
|
export { default as Region } from "./region";
|
package/dist/models/index.js
CHANGED
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.Region = exports.
|
6
|
+
exports.Region = exports.Country = void 0;
|
7
7
|
var country_1 = require("./country");
|
8
|
-
Object.defineProperty(exports, "
|
8
|
+
Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return __importDefault(country_1).default; } });
|
9
9
|
var region_1 = require("./region");
|
10
10
|
Object.defineProperty(exports, "Region", { enumerable: true, get: function () { return __importDefault(region_1).default; } });
|
package/dist/models/region.d.ts
CHANGED
@@ -1,104 +1,110 @@
|
|
1
|
-
declare const
|
2
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
1
|
+
declare const _default: import("@medusajs/utils").DmlEntity<{
|
2
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
3
3
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
4
4
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
5
5
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
6
6
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
7
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
7
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
8
8
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
9
9
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
10
10
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
11
11
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
12
12
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<any & {
|
13
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
13
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
14
14
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
15
15
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
16
16
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
17
17
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
18
18
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
19
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<any & {
|
20
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
19
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<any & {
|
20
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
21
21
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
22
22
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
23
23
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
24
24
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
25
25
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
26
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>>>;
|
26
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
27
27
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
28
28
|
} & {
|
29
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
29
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
30
30
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
31
31
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
32
32
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
33
33
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
34
34
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<any & {
|
35
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
35
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
36
36
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
37
37
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
38
38
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
39
39
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
40
40
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
41
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<any & {
|
42
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
41
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<any & {
|
42
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
43
43
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
44
44
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
45
45
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
46
46
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
47
47
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
48
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>>>;
|
48
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
49
49
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
50
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
50
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
51
|
+
readonly name: "Country";
|
52
|
+
readonly tableName: "region_country";
|
53
|
+
}>>;
|
51
54
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
52
55
|
} & {
|
53
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
56
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
54
57
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
55
58
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
56
59
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
57
60
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<() => import("@medusajs/utils").DmlEntity<{
|
58
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
61
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
59
62
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
60
63
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
61
64
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
62
65
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
63
66
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
64
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
67
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
65
68
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
66
69
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
67
70
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
68
71
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
69
72
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
70
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
71
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
73
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
74
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
72
75
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
73
76
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
74
77
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
75
78
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
76
79
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
77
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>>>;
|
80
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
78
81
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
79
82
|
} & {
|
80
|
-
iso_2: import("@medusajs/utils/dist/dml/properties/text").TextProperty
|
83
|
+
iso_2: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/text").TextProperty>;
|
81
84
|
iso_3: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
82
85
|
num_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
83
86
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
84
87
|
display_name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
85
88
|
region: import("@medusajs/utils/dist/dml/relations/nullable").NullableModifier<() => import("@medusajs/utils").DmlEntity<{
|
86
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
89
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
87
90
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
88
91
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
89
92
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
90
93
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
91
94
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
92
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
93
|
-
id: import("@medusajs/utils/dist/dml/properties/id").IdProperty
|
95
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">, import("@medusajs/utils/dist/dml/relations/belongs-to").BelongsTo<() => import("@medusajs/utils").DmlEntity<{
|
96
|
+
id: import("@medusajs/utils/dist/dml/properties/primary-key").PrimaryKeyModifier<string, import("@medusajs/utils/dist/dml/properties/id").IdProperty>;
|
94
97
|
name: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
95
98
|
currency_code: import("@medusajs/utils/dist/dml/properties/text").TextProperty;
|
96
99
|
automatic_taxes: import("@medusajs/utils/dist/dml/properties/boolean").BooleanProperty;
|
97
100
|
countries: import("@medusajs/utils/dist/dml/relations/has-many").HasMany<any>;
|
98
101
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
99
|
-
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>>>;
|
102
|
+
} & any & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">>>;
|
100
103
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
101
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults
|
104
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, {
|
105
|
+
readonly name: "Country";
|
106
|
+
readonly tableName: "region_country";
|
107
|
+
}>>;
|
102
108
|
metadata: import("@medusajs/utils/dist/dml/properties/nullable").NullableModifier<Record<string, unknown>, import("@medusajs/utils/dist/dml/properties/json").JSONProperty>;
|
103
|
-
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults>;
|
104
|
-
export default
|
109
|
+
} & {} & import("@medusajs/utils/dist/dml/helpers/entity-builder/create-default-properties").DMLSchemaDefaults, "region">;
|
110
|
+
export default _default;
|
package/dist/models/region.js
CHANGED
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const utils_1 = require("@medusajs/utils");
|
7
7
|
const country_1 = __importDefault(require("./country"));
|
8
|
-
|
9
|
-
id: utils_1.model.id({ prefix: "reg" }),
|
8
|
+
exports.default = utils_1.model.define("region", {
|
9
|
+
id: utils_1.model.id({ prefix: "reg" }).primaryKey(),
|
10
10
|
name: utils_1.model.text().searchable(),
|
11
11
|
currency_code: utils_1.model.text().searchable(),
|
12
12
|
automatic_taxes: utils_1.model.boolean().default(true),
|
13
13
|
countries: utils_1.model.hasMany(() => country_1.default),
|
14
14
|
metadata: utils_1.model.json().nullable(),
|
15
15
|
});
|
16
|
-
exports.default = Region;
|
@@ -1,17 +1,19 @@
|
|
1
|
-
import { Context, CreateRegionDTO, DAL, FilterableRegionProps,
|
2
|
-
import {
|
1
|
+
import { Context, CreateRegionDTO, DAL, FilterableRegionProps, InferEntityType, InternalModuleDeclaration, IRegionModuleService, ModuleJoinerConfig, ModulesSdkTypes, RegionCountryDTO, RegionDTO, SoftDeleteReturn, UpdateRegionDTO, UpsertRegionDTO } from "@medusajs/types";
|
2
|
+
import { Country, Region } from "../models";
|
3
3
|
import { UpdateRegionInput } from "../types";
|
4
4
|
type InjectedDependencies = {
|
5
5
|
baseRepository: DAL.RepositoryService;
|
6
6
|
regionService: ModulesSdkTypes.IMedusaInternalService<any>;
|
7
7
|
countryService: ModulesSdkTypes.IMedusaInternalService<any>;
|
8
8
|
};
|
9
|
-
declare const RegionModuleService_base:
|
9
|
+
declare const RegionModuleService_base: import("@medusajs/utils/dist/modules-sdk/types/medusa-service").MedusaServiceReturnType<{
|
10
10
|
Region: {
|
11
11
|
dto: RegionDTO;
|
12
|
+
model: typeof Region;
|
12
13
|
};
|
13
14
|
Country: {
|
14
15
|
dto: RegionCountryDTO;
|
16
|
+
model: typeof Country;
|
15
17
|
};
|
16
18
|
}>;
|
17
19
|
export default class RegionModuleService extends RegionModuleService_base implements IRegionModuleService {
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const utils_1 = require("@medusajs/utils");
|
16
16
|
const _models_1 = require("../models");
|
17
17
|
const joiner_config_1 = require("../joiner-config");
|
18
|
-
class RegionModuleService extends (0, utils_1.MedusaService)({ Region: _models_1.Region, Country: _models_1.
|
18
|
+
class RegionModuleService extends (0, utils_1.MedusaService)({ Region: _models_1.Region, Country: _models_1.Country }) {
|
19
19
|
constructor({ baseRepository, regionService, countryService }, moduleDeclaration) {
|
20
20
|
// @ts-ignore
|
21
21
|
super(...arguments);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/region",
|
3
|
-
"version": "0.1.2-snapshot-
|
3
|
+
"version": "0.1.2-snapshot-20240704061641",
|
4
4
|
"description": "Medusa Region module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
|
-
"@medusajs/types": "1.12.0-snapshot-
|
37
|
+
"@medusajs/types": "1.12.0-snapshot-20240704061641",
|
38
38
|
"@mikro-orm/cli": "5.9.7",
|
39
39
|
"cross-env": "^5.2.1",
|
40
40
|
"jest": "^29.7.0",
|
@@ -45,8 +45,8 @@
|
|
45
45
|
"typescript": "^5.1.6"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@medusajs/modules-sdk": "1.13.0-snapshot-
|
49
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
48
|
+
"@medusajs/modules-sdk": "1.13.0-snapshot-20240704061641",
|
49
|
+
"@medusajs/utils": "1.12.0-snapshot-20240704061641",
|
50
50
|
"@mikro-orm/core": "5.9.7",
|
51
51
|
"@mikro-orm/migrations": "5.9.7",
|
52
52
|
"@mikro-orm/postgresql": "5.9.7",
|