@medusajs/link-modules 0.2.12-preview-20240522030550 → 0.2.12-preview-20240522090522
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,63 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CustomerAuth = void 0;
|
4
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
+
const utils_1 = require("@medusajs/utils");
|
6
|
+
exports.CustomerAuth = {
|
7
|
+
serviceName: utils_1.LINKS.CustomerAuth,
|
8
|
+
isLink: true,
|
9
|
+
databaseConfig: {
|
10
|
+
tableName: "customer_auth_identity",
|
11
|
+
idPrefix: "cusauth",
|
12
|
+
},
|
13
|
+
alias: [
|
14
|
+
{
|
15
|
+
name: "customer_auth_identity",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
name: "customer_auth_identities",
|
19
|
+
},
|
20
|
+
],
|
21
|
+
primaryKeys: ["id", "customer_id", "auth_identity_id"],
|
22
|
+
relationships: [
|
23
|
+
{
|
24
|
+
serviceName: modules_sdk_1.Modules.CUSTOMER,
|
25
|
+
primaryKey: "id",
|
26
|
+
foreignKey: "customer_id",
|
27
|
+
alias: "customer",
|
28
|
+
},
|
29
|
+
{
|
30
|
+
serviceName: modules_sdk_1.Modules.AUTH,
|
31
|
+
isInternalService: true,
|
32
|
+
primaryKey: "id",
|
33
|
+
foreignKey: "auth_identity_id",
|
34
|
+
alias: "auth",
|
35
|
+
},
|
36
|
+
],
|
37
|
+
extends: [
|
38
|
+
{
|
39
|
+
serviceName: modules_sdk_1.Modules.CUSTOMER,
|
40
|
+
fieldAlias: {
|
41
|
+
auth_identity: "auth_link.auth_identity",
|
42
|
+
},
|
43
|
+
relationship: {
|
44
|
+
serviceName: utils_1.LINKS.CustomerAuth,
|
45
|
+
primaryKey: "customer_id",
|
46
|
+
foreignKey: "id",
|
47
|
+
alias: "auth_link",
|
48
|
+
},
|
49
|
+
},
|
50
|
+
{
|
51
|
+
serviceName: modules_sdk_1.Modules.AUTH,
|
52
|
+
fieldAlias: {
|
53
|
+
customer: "customer_link.customer",
|
54
|
+
},
|
55
|
+
relationship: {
|
56
|
+
serviceName: utils_1.LINKS.CustomerAuth,
|
57
|
+
primaryKey: "auth_identity_id",
|
58
|
+
foreignKey: "id",
|
59
|
+
alias: "customer_link",
|
60
|
+
},
|
61
|
+
},
|
62
|
+
],
|
63
|
+
};
|
@@ -30,3 +30,5 @@ __exportStar(require("./region-payment-provider"), exports);
|
|
30
30
|
__exportStar(require("./sales-channel-location"), exports);
|
31
31
|
__exportStar(require("./shipping-option-price-set"), exports);
|
32
32
|
__exportStar(require("./order-fulfillment"), exports);
|
33
|
+
__exportStar(require("./user-auth"), exports);
|
34
|
+
__exportStar(require("./customer-auth"), exports);
|
@@ -0,0 +1,63 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UserAuth = void 0;
|
4
|
+
const modules_sdk_1 = require("@medusajs/modules-sdk");
|
5
|
+
const utils_1 = require("@medusajs/utils");
|
6
|
+
exports.UserAuth = {
|
7
|
+
serviceName: utils_1.LINKS.UserAuth,
|
8
|
+
isLink: true,
|
9
|
+
databaseConfig: {
|
10
|
+
tableName: "user_auth_identity",
|
11
|
+
idPrefix: "usrauth",
|
12
|
+
},
|
13
|
+
alias: [
|
14
|
+
{
|
15
|
+
name: "user_auth_identity",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
name: "user_auth_identities",
|
19
|
+
},
|
20
|
+
],
|
21
|
+
primaryKeys: ["id", "user_id", "auth_identity_id"],
|
22
|
+
relationships: [
|
23
|
+
{
|
24
|
+
serviceName: modules_sdk_1.Modules.USER,
|
25
|
+
primaryKey: "id",
|
26
|
+
foreignKey: "user_id",
|
27
|
+
alias: "user",
|
28
|
+
},
|
29
|
+
{
|
30
|
+
serviceName: modules_sdk_1.Modules.AUTH,
|
31
|
+
isInternalService: true,
|
32
|
+
primaryKey: "id",
|
33
|
+
foreignKey: "auth_identity_id",
|
34
|
+
alias: "auth",
|
35
|
+
},
|
36
|
+
],
|
37
|
+
extends: [
|
38
|
+
{
|
39
|
+
serviceName: modules_sdk_1.Modules.USER,
|
40
|
+
fieldAlias: {
|
41
|
+
auth_identity: "auth_link.auth_identity",
|
42
|
+
},
|
43
|
+
relationship: {
|
44
|
+
serviceName: utils_1.LINKS.UserAuth,
|
45
|
+
primaryKey: "user_id",
|
46
|
+
foreignKey: "id",
|
47
|
+
alias: "auth_link",
|
48
|
+
},
|
49
|
+
},
|
50
|
+
{
|
51
|
+
serviceName: modules_sdk_1.Modules.AUTH,
|
52
|
+
fieldAlias: {
|
53
|
+
user: "user_link.user",
|
54
|
+
},
|
55
|
+
relationship: {
|
56
|
+
serviceName: utils_1.LINKS.UserAuth,
|
57
|
+
primaryKey: "auth_identity_id",
|
58
|
+
foreignKey: "id",
|
59
|
+
alias: "user_link",
|
60
|
+
},
|
61
|
+
},
|
62
|
+
],
|
63
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/link-modules",
|
3
|
-
"version": "0.2.12-preview-
|
3
|
+
"version": "0.2.12-preview-20240522090522",
|
4
4
|
"description": "Medusa Default Link Modules Package and Definitions",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -39,9 +39,9 @@
|
|
39
39
|
"typescript": "^5.1.6"
|
40
40
|
},
|
41
41
|
"dependencies": {
|
42
|
-
"@medusajs/modules-sdk": "1.13.0-preview-
|
43
|
-
"@medusajs/types": "1.12.0-preview-
|
44
|
-
"@medusajs/utils": "1.12.0-preview-
|
42
|
+
"@medusajs/modules-sdk": "1.13.0-preview-20240522090522",
|
43
|
+
"@medusajs/types": "1.12.0-preview-20240522090522",
|
44
|
+
"@medusajs/utils": "1.12.0-preview-20240522090522",
|
45
45
|
"@mikro-orm/core": "5.9.7",
|
46
46
|
"@mikro-orm/postgresql": "5.9.7",
|
47
47
|
"awilix": "^8.0.0"
|