@origincloud/iam 0.32.0 → 0.33.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/v1beta1/user.d.ts +29 -3
- package/dist/v1beta1/user.d.ts.map +1 -1
- package/dist/v1beta1/user.js +23 -3
- package/dist/v1beta1/user.js.map +1 -1
- package/package.json +3 -3
- package/src/v1beta1/user.ts +41 -3
package/dist/v1beta1/user.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ import { type CallOptions, type Client, type Service } from "@origincloud/core";
|
|
|
2
2
|
/**
|
|
3
3
|
* Calls UserService.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Users. Each user can read only their own profile, by the name `users/me`
|
|
6
|
+
* or by their own id; the role bindings they hold are listed by
|
|
7
|
+
* ListRoleBindings with the parent `organizations/-`. Anyone who may grant
|
|
8
|
+
* roles in an organization can look a user up by email address, to name
|
|
9
|
+
* them in a role binding.
|
|
8
10
|
*/
|
|
9
11
|
export declare class UserClient {
|
|
10
12
|
/**
|
|
@@ -20,6 +22,17 @@ export declare class UserClient {
|
|
|
20
22
|
* profile.
|
|
21
23
|
*/
|
|
22
24
|
getUser(request: GetUserRequest, options?: CallOptions): Promise<User>;
|
|
25
|
+
/**
|
|
26
|
+
* Looks up the user whose account has verified an email address, and
|
|
27
|
+
* answers them with their `name`: their full name is
|
|
28
|
+
* `//iam.origincloudapis.eu/` followed by it, which is how a role
|
|
29
|
+
* binding names them as a member. Needs `iam.role.assign` on
|
|
30
|
+
* `organization`, the permission a binding of the user needs anyway.
|
|
31
|
+
* Refused with `NOT_FOUND` when no enabled account has verified the
|
|
32
|
+
* address, and with `CONFLICT` when more than one has. The answer leaves
|
|
33
|
+
* `givenName` and `familyName` empty: only the user reads those.
|
|
34
|
+
*/
|
|
35
|
+
lookupUser(request: LookupUserRequest, options?: CallOptions): Promise<User>;
|
|
23
36
|
}
|
|
24
37
|
/** A person who signs in to the platform. */
|
|
25
38
|
export interface User {
|
|
@@ -47,4 +60,17 @@ export interface GetUserRequest {
|
|
|
47
60
|
/** The user to return: `users/me`, or the caller's own `users/{user}`. */
|
|
48
61
|
name?: string;
|
|
49
62
|
}
|
|
63
|
+
/** The request for LookupUser. */
|
|
64
|
+
export interface LookupUserRequest {
|
|
65
|
+
/**
|
|
66
|
+
* The email address the user's account has verified, matched exactly,
|
|
67
|
+
* case aside.
|
|
68
|
+
*/
|
|
69
|
+
email?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The organization the caller looks the user up for, where it needs
|
|
72
|
+
* `iam.role.assign`: `organizations/{organization}`, or its full name.
|
|
73
|
+
*/
|
|
74
|
+
organization?: string;
|
|
75
|
+
}
|
|
50
76
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/v1beta1/user.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AAElG
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/v1beta1/user.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AAElG;;;;;;;;GAQG;AACH,qBAAa,UAAU;IACrB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,qEAAqE;gBACzD,MAAM,EAAE,MAAM;IAI1B;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAe5E;;;;;;;;;OASG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAWnF;AAED,6CAA6C;AAC7C,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,+BAA+B;AAC/B,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,kCAAkC;AAClC,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/dist/v1beta1/user.js
CHANGED
|
@@ -4,9 +4,11 @@ import { pathValue, query } from "@origincloud/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Calls UserService.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Users. Each user can read only their own profile, by the name `users/me`
|
|
8
|
+
* or by their own id; the role bindings they hold are listed by
|
|
9
|
+
* ListRoleBindings with the parent `organizations/-`. Anyone who may grant
|
|
10
|
+
* roles in an organization can look a user up by email address, to name
|
|
11
|
+
* them in a role binding.
|
|
10
12
|
*/
|
|
11
13
|
export class UserClient {
|
|
12
14
|
/**
|
|
@@ -35,5 +37,23 @@ export class UserClient {
|
|
|
35
37
|
idempotent: true,
|
|
36
38
|
}, options);
|
|
37
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Looks up the user whose account has verified an email address, and
|
|
42
|
+
* answers them with their `name`: their full name is
|
|
43
|
+
* `//iam.origincloudapis.eu/` followed by it, which is how a role
|
|
44
|
+
* binding names them as a member. Needs `iam.role.assign` on
|
|
45
|
+
* `organization`, the permission a binding of the user needs anyway.
|
|
46
|
+
* Refused with `NOT_FOUND` when no enabled account has verified the
|
|
47
|
+
* address, and with `CONFLICT` when more than one has. The answer leaves
|
|
48
|
+
* `givenName` and `familyName` empty: only the user reads those.
|
|
49
|
+
*/
|
|
50
|
+
async lookupUser(request, options) {
|
|
51
|
+
return this.service.call({
|
|
52
|
+
method: "GET",
|
|
53
|
+
path: `/v1beta1/users:lookup`,
|
|
54
|
+
query: query(request, []),
|
|
55
|
+
idempotent: true,
|
|
56
|
+
}, options);
|
|
57
|
+
}
|
|
38
58
|
}
|
|
39
59
|
//# sourceMappingURL=user.js.map
|
package/dist/v1beta1/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/v1beta1/user.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,6CAA6C;AAE7C,OAAO,EAA+C,SAAS,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAElG
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/v1beta1/user.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,6CAA6C;AAE7C,OAAO,EAA+C,SAAS,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAElG;;;;;;;;GAQG;AACH,MAAM,OAAO,UAAU;IACrB;;;OAGG;IACM,OAAO,CAAU;IAE1B,qEAAqE;IACrE,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,OAAuB,EAAE,OAAqB;QAC1D,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;QAC5C,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;YAAE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY,EAAE,EAAE;YACtB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YAC/B,UAAU,EAAE,IAAI;SACjB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,UAAU,CAAC,OAA0B,EAAE,OAAqB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACzB,UAAU,EAAE,IAAI;SACjB,EACD,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origincloud/iam",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Origin Cloud's IAM service: users, service accounts, roles, role bindings, permissions and the audit log.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/origincloudhq/sdk-typescript#readme",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"!dist/**/*.tsbuildinfo"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@origincloud/core": "^0.
|
|
37
|
+
"@origincloud/core": "^0.33.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@origincloud/core": "^0.
|
|
40
|
+
"@origincloud/core": "^0.33.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/v1beta1/user.ts
CHANGED
|
@@ -6,9 +6,11 @@ import { type CallOptions, type Client, type Service, pathValue, query } from "@
|
|
|
6
6
|
/**
|
|
7
7
|
* Calls UserService.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Users. Each user can read only their own profile, by the name `users/me`
|
|
10
|
+
* or by their own id; the role bindings they hold are listed by
|
|
11
|
+
* ListRoleBindings with the parent `organizations/-`. Anyone who may grant
|
|
12
|
+
* roles in an organization can look a user up by email address, to name
|
|
13
|
+
* them in a role binding.
|
|
12
14
|
*/
|
|
13
15
|
export class UserClient {
|
|
14
16
|
/**
|
|
@@ -41,6 +43,28 @@ export class UserClient {
|
|
|
41
43
|
options,
|
|
42
44
|
);
|
|
43
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Looks up the user whose account has verified an email address, and
|
|
49
|
+
* answers them with their `name`: their full name is
|
|
50
|
+
* `//iam.origincloudapis.eu/` followed by it, which is how a role
|
|
51
|
+
* binding names them as a member. Needs `iam.role.assign` on
|
|
52
|
+
* `organization`, the permission a binding of the user needs anyway.
|
|
53
|
+
* Refused with `NOT_FOUND` when no enabled account has verified the
|
|
54
|
+
* address, and with `CONFLICT` when more than one has. The answer leaves
|
|
55
|
+
* `givenName` and `familyName` empty: only the user reads those.
|
|
56
|
+
*/
|
|
57
|
+
async lookupUser(request: LookupUserRequest, options?: CallOptions): Promise<User> {
|
|
58
|
+
return this.service.call<User>(
|
|
59
|
+
{
|
|
60
|
+
method: "GET",
|
|
61
|
+
path: `/v1beta1/users:lookup`,
|
|
62
|
+
query: query(request, []),
|
|
63
|
+
idempotent: true,
|
|
64
|
+
},
|
|
65
|
+
options,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
44
68
|
}
|
|
45
69
|
|
|
46
70
|
/** A person who signs in to the platform. */
|
|
@@ -70,3 +94,17 @@ export interface GetUserRequest {
|
|
|
70
94
|
/** The user to return: `users/me`, or the caller's own `users/{user}`. */
|
|
71
95
|
name?: string;
|
|
72
96
|
}
|
|
97
|
+
|
|
98
|
+
/** The request for LookupUser. */
|
|
99
|
+
export interface LookupUserRequest {
|
|
100
|
+
/**
|
|
101
|
+
* The email address the user's account has verified, matched exactly,
|
|
102
|
+
* case aside.
|
|
103
|
+
*/
|
|
104
|
+
email?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The organization the caller looks the user up for, where it needs
|
|
107
|
+
* `iam.role.assign`: `organizations/{organization}`, or its full name.
|
|
108
|
+
*/
|
|
109
|
+
organization?: string;
|
|
110
|
+
}
|