@contember/engine-tenant-api 1.4.0-rc.4 → 1.4.0-rc.5
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.
- package/dist/src/model/authorization/PermissionActions.d.ts +5 -0
- package/dist/src/model/authorization/PermissionActions.d.ts.map +1 -1
- package/dist/src/model/authorization/PermissionActions.js +1 -0
- package/dist/src/model/authorization/PermissionActions.js.map +1 -1
- package/dist/src/model/service/PersonManager.d.ts +3 -4
- package/dist/src/model/service/PersonManager.d.ts.map +1 -1
- package/dist/src/model/service/PersonManager.js +1 -1
- package/dist/src/model/service/PersonManager.js.map +1 -1
- package/dist/src/resolvers/ResolverFactory.d.ts.map +1 -1
- package/dist/src/resolvers/ResolverFactory.js +1 -0
- package/dist/src/resolvers/ResolverFactory.js.map +1 -1
- package/dist/src/resolvers/mutation/person/ChangeProfileMutationResolver.d.ts +3 -2
- package/dist/src/resolvers/mutation/person/ChangeProfileMutationResolver.d.ts.map +1 -1
- package/dist/src/resolvers/mutation/person/ChangeProfileMutationResolver.js +23 -1
- package/dist/src/resolvers/mutation/person/ChangeProfileMutationResolver.js.map +1 -1
- package/dist/src/schema/index.d.ts +35 -0
- package/dist/src/schema/index.d.ts.map +1 -1
- package/dist/src/schema/tenant.graphql.d.ts.map +1 -1
- package/dist/src/schema/tenant.graphql.js +22 -1
- package/dist/src/schema/tenant.graphql.js.map +1 -1
- package/dist/src/tsconfig.tsbuildinfo +1 -1
- package/dist/tests/cases/integration/mocked/changeProfileMutation.test.d.ts +2 -0
- package/dist/tests/cases/integration/mocked/changeProfileMutation.test.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/changeProfileMutation.test.js +36 -0
- package/dist/tests/cases/integration/mocked/changeProfileMutation.test.js.map +1 -0
- package/dist/tests/cases/integration/mocked/gql/changeProfile.d.ts +7 -0
- package/dist/tests/cases/integration/mocked/gql/changeProfile.d.ts.map +1 -0
- package/dist/tests/cases/integration/mocked/gql/changeProfile.js +17 -0
- package/dist/tests/cases/integration/mocked/gql/changeProfile.js.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/src/model/authorization/PermissionActions.ts +1 -0
- package/src/model/service/PersonManager.ts +3 -4
- package/src/resolvers/ResolverFactory.ts +1 -0
- package/src/resolvers/mutation/person/ChangeProfileMutationResolver.ts +42 -4
- package/src/schema/index.ts +45 -0
- package/src/schema/tenant.graphql.ts +22 -1
- package/tests/cases/integration/mocked/changeProfileMutation.test.ts +37 -0
- package/tests/cases/integration/mocked/gql/changeProfile.ts +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changeProfileMutation.test.d.ts","sourceRoot":"","sources":["../../../../../tests/cases/integration/mocked/changeProfileMutation.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testTenant_1 = require("../../../src/testTenant");
|
|
4
|
+
const testUuid_1 = require("../../../src/testUuid");
|
|
5
|
+
const vitest_1 = require("vitest");
|
|
6
|
+
const changeProfile_1 = require("./gql/changeProfile");
|
|
7
|
+
const updatePesonNameSql_1 = require("./sql/updatePesonNameSql");
|
|
8
|
+
const testTenantDb_1 = require("../../../src/testTenantDb");
|
|
9
|
+
const getPersonByEmailSql_1 = require("./sql/getPersonByEmailSql");
|
|
10
|
+
const getPersonByIdSql_1 = require("./sql/getPersonByIdSql");
|
|
11
|
+
(0, vitest_1.test)('changes my name and email', async () => {
|
|
12
|
+
const personId = (0, testUuid_1.testUuid)(1);
|
|
13
|
+
const identityId = testTenantDb_1.authenticatedIdentityId;
|
|
14
|
+
const email = 'jane@doe.com';
|
|
15
|
+
const name = 'Jane Doe';
|
|
16
|
+
await (0, testTenant_1.executeTenantTest)({
|
|
17
|
+
query: (0, changeProfile_1.changeProfileMutation)({ personId, email, name }),
|
|
18
|
+
executes: [
|
|
19
|
+
(0, getPersonByIdSql_1.getPersonByIdSql)({
|
|
20
|
+
personId,
|
|
21
|
+
response: { personId, email: 'john.doe@example.com', name: 'John Doe', roles: [], password: '123456', identityId },
|
|
22
|
+
}),
|
|
23
|
+
(0, getPersonByEmailSql_1.getPersonByEmailSql)({ email, response: null }),
|
|
24
|
+
(0, updatePesonNameSql_1.updatePersonProfileNameAndEmailSql)({ personId, email, name }),
|
|
25
|
+
],
|
|
26
|
+
return: {
|
|
27
|
+
data: {
|
|
28
|
+
changeProfile: {
|
|
29
|
+
ok: true,
|
|
30
|
+
error: null,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=changeProfileMutation.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changeProfileMutation.test.js","sourceRoot":"","sources":["../../../../../tests/cases/integration/mocked/changeProfileMutation.test.ts"],"names":[],"mappings":";;AAAA,wDAA2D;AAC3D,oDAAgD;AAChD,mCAA6B;AAC7B,uDAA2D;AAC3D,iEAA6E;AAC7E,4DAAmE;AAEnE,mEAA+D;AAC/D,6DAAyD;AAEzD,IAAA,aAAI,EAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;IAE5C,MAAM,QAAQ,GAAG,IAAA,mBAAQ,EAAC,CAAC,CAAC,CAAA;IAC5B,MAAM,UAAU,GAAG,sCAAuB,CAAA;IAC1C,MAAM,KAAK,GAAG,cAAc,CAAA;IAC5B,MAAM,IAAI,GAAG,UAAU,CAAA;IACvB,MAAM,IAAA,8BAAiB,EAAC;QACvB,KAAK,EAAE,IAAA,qCAAqB,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACvD,QAAQ,EAAE;YACT,IAAA,mCAAgB,EAAC;gBAChB,QAAQ;gBACR,QAAQ,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,sBAAsB,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE;aAClH,CAAC;YACF,IAAA,yCAAmB,EAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC9C,IAAA,uDAAkC,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC7D;QACD,MAAM,EAAE;YACP,IAAI,EAAE;gBACL,aAAa,EAAE;oBACd,EAAE,EAAE,IAAI;oBACR,KAAK,EAAE,IAAI;iBACX;aACD;SACD;KACD,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changeProfile.d.ts","sourceRoot":"","sources":["../../../../../../tests/cases/integration/mocked/gql/changeProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAG1C,eAAO,MAAM,qBAAqB,cAAe;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,gBAUrG,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.changeProfileMutation = void 0;
|
|
4
|
+
const tags_1 = require("../../../../src/tags");
|
|
5
|
+
const changeProfileMutation = (variables) => ({
|
|
6
|
+
query: (0, tags_1.GQL) `mutation($personId: String!, $email: String, $name: String) {
|
|
7
|
+
changeProfile(personId: $personId, email: $email, name: $name) {
|
|
8
|
+
ok
|
|
9
|
+
error {
|
|
10
|
+
code
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}`,
|
|
14
|
+
variables,
|
|
15
|
+
});
|
|
16
|
+
exports.changeProfileMutation = changeProfileMutation;
|
|
17
|
+
//# sourceMappingURL=changeProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changeProfile.js","sourceRoot":"","sources":["../../../../../../tests/cases/integration/mocked/gql/changeProfile.ts"],"names":[],"mappings":";;;AACA,+CAA0C;AAEnC,MAAM,qBAAqB,GAAG,CAAC,SAA8D,EAAoB,EAAE,CAAC,CAAC;IAC3H,KAAK,EAAE,IAAA,UAAG,EAAA;;;;;;;UAOD;IACT,SAAS;CACT,CAAC,CAAA;AAVW,QAAA,qBAAqB,yBAUhC"}
|