@fraym/auth 0.6.1 → 0.7.0
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/management/client.js +2 -2
- package/dist/management/createUser.d.ts +2 -2
- package/dist/management/deleteRole.d.ts +2 -2
- package/dist/management/deleteUser.d.ts +2 -2
- package/dist/management/getRoles.d.ts +2 -2
- package/dist/management/getUsers.d.ts +2 -2
- package/dist/management/updateUser.d.ts +2 -2
- package/dist/management/upsertRole.d.ts +2 -2
- package/package.json +16 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.newManagementClient = void 0;
|
|
4
|
-
const
|
|
4
|
+
const management_1 = require("@fraym/proto/freym/auth/management");
|
|
5
5
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
6
6
|
const config_1 = require("../config/config");
|
|
7
7
|
const createUser_1 = require("./createUser");
|
|
@@ -13,7 +13,7 @@ const updateUser_1 = require("./updateUser");
|
|
|
13
13
|
const upsertRole_1 = require("./upsertRole");
|
|
14
14
|
const newManagementClient = async (config) => {
|
|
15
15
|
const currentConfig = (0, config_1.useConfigDefaults)(config);
|
|
16
|
-
const serviceClient = new
|
|
16
|
+
const serviceClient = new management_1.ServiceClient(currentConfig.serverAddress, grpc_js_1.credentials.createInsecure(), {
|
|
17
17
|
"grpc.keepalive_time_ms": currentConfig.keepaliveInterval,
|
|
18
18
|
"grpc.keepalive_timeout_ms": currentConfig.keepaliveTimeout,
|
|
19
19
|
"grpc.keepalive_permit_without_calls": 1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
2
|
export interface CreateUserResponse {
|
|
3
3
|
id: string;
|
|
4
4
|
setInitialPasswordToken: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const createNewUser: (tenantId: string, login: string, email: string, displayName: string, password: string, assignedRoleIds: string[], active: boolean, blockedUntil: Date, serviceClient:
|
|
6
|
+
export declare const createNewUser: (tenantId: string, login: string, email: string, displayName: string, password: string, assignedRoleIds: string[], active: boolean, blockedUntil: Date, serviceClient: ServiceClient) => Promise<CreateUserResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const deleteExistingRole: (tenantId: string, id: string, serviceClient:
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
|
+
export declare const deleteExistingRole: (tenantId: string, id: string, serviceClient: ServiceClient) => Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const deleteExistingUser: (tenantId: string, id: string, serviceClient:
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
|
+
export declare const deleteExistingUser: (tenantId: string, id: string, serviceClient: ServiceClient) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
2
|
export interface Role {
|
|
3
3
|
id: string;
|
|
4
4
|
allowedScopes: RoleScope[];
|
|
@@ -7,4 +7,4 @@ export interface RoleScope {
|
|
|
7
7
|
clientId: string;
|
|
8
8
|
scopeName: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const getAllRoles: (tenantId: string, serviceClient:
|
|
10
|
+
export declare const getAllRoles: (tenantId: string, serviceClient: ServiceClient) => Promise<Role[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
2
|
export interface User {
|
|
3
3
|
id: string;
|
|
4
4
|
login: string;
|
|
@@ -10,4 +10,4 @@ export interface User {
|
|
|
10
10
|
lastAttempt: number;
|
|
11
11
|
blockedUntil: number;
|
|
12
12
|
}
|
|
13
|
-
export declare const getAllUsers: (tenantId: string, serviceClient:
|
|
13
|
+
export declare const getAllUsers: (tenantId: string, serviceClient: ServiceClient) => Promise<User[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const updateExistingUser: (tenantId: string, id: string, login: string, email: string, displayName: string, password: string, assignedRoleIds: string[], active: boolean, blockedUntil: Date, serviceClient:
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
|
+
export declare const updateExistingUser: (tenantId: string, id: string, login: string, email: string, displayName: string, password: string, assignedRoleIds: string[], active: boolean, blockedUntil: Date, serviceClient: ServiceClient) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ServiceClient } from "@fraym/proto/freym/auth/management";
|
|
2
2
|
export interface UpsertRoleScope {
|
|
3
3
|
scopeName: string;
|
|
4
4
|
clientId?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const createOrUpdateRole: (tenantId: string, id: string, allowedScopes: UpsertRoleScope[], serviceClient:
|
|
6
|
+
export declare const createOrUpdateRole: (tenantId: string, id: string, allowedScopes: UpsertRoleScope[], serviceClient: ServiceClient) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fraym/auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/fraym/auth-nodejs",
|
|
6
6
|
"repository": {
|
|
@@ -21,25 +21,28 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist/**/*"
|
|
23
23
|
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=16"
|
|
26
|
+
},
|
|
24
27
|
"main": "dist/index.js",
|
|
25
28
|
"types": "dist/index.d.ts",
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"@fraym/
|
|
28
|
-
"@graphql-tools/graphql-file-loader": "^7.5.
|
|
29
|
-
"@graphql-tools/load": "^7.8.
|
|
30
|
-
"@grpc/grpc-js": "^1.
|
|
31
|
-
"dotenv": "^16.
|
|
32
|
-
"graphql": "^16.
|
|
33
|
-
"jose": "^4.
|
|
34
|
-
"yargs": "^17.
|
|
30
|
+
"@fraym/proto": "^0.2.0",
|
|
31
|
+
"@graphql-tools/graphql-file-loader": "^7.5.17",
|
|
32
|
+
"@graphql-tools/load": "^7.8.14",
|
|
33
|
+
"@grpc/grpc-js": "^1.9.3",
|
|
34
|
+
"dotenv": "^16.3.1",
|
|
35
|
+
"graphql": "^16.8.0",
|
|
36
|
+
"jose": "^4.14.6",
|
|
37
|
+
"yargs": "^17.7.2"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@becklyn/prettier": "^1.0.2",
|
|
38
41
|
"@types/uuid": "^8.3.4",
|
|
39
|
-
"@types/yargs": "^17.0.
|
|
40
|
-
"prettier": "^2.
|
|
41
|
-
"typescript": "^4.
|
|
42
|
-
"uuid": "^9.0.
|
|
42
|
+
"@types/yargs": "^17.0.24",
|
|
43
|
+
"prettier": "^2.8.8",
|
|
44
|
+
"typescript": "^4.9.5",
|
|
45
|
+
"uuid": "^9.0.1"
|
|
43
46
|
},
|
|
44
47
|
"prettier": "@becklyn/prettier"
|
|
45
48
|
}
|