@dx-do/client 6.3.0 → 6.3.1
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/index.cjs.js +132 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +133 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/src/lib/model/oi/users.d.ts +94 -0
- package/dist/src/lib/model/oi/users.d.ts.map +1 -1
- package/dist/src/lib/services/authorization.service.d.ts +18 -1
- package/dist/src/lib/services/authorization.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
1
2
|
export declare namespace OIUsers {
|
|
2
3
|
interface OIUser {
|
|
3
4
|
id: string;
|
|
@@ -7,4 +8,97 @@ export declare namespace OIUsers {
|
|
|
7
8
|
troubleShooters: OIUser[];
|
|
8
9
|
}
|
|
9
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The `ess/users/v2/list` user-account listing.
|
|
13
|
+
*
|
|
14
|
+
* Hand-modelled from observed responses (no published schema): every field is
|
|
15
|
+
* inferred from live data across multiple tenants. `looseObject` is used
|
|
16
|
+
* throughout so undocumented server fields are tolerated rather than dropped or
|
|
17
|
+
* rejected, and single-observation fields (e.g. {@link UserSchema.shape.authMethod})
|
|
18
|
+
* are kept as plain strings rather than locked enums.
|
|
19
|
+
*/
|
|
20
|
+
export declare namespace OIUsersV2 {
|
|
21
|
+
/** One email address attached to a user. */
|
|
22
|
+
const EmailIdSchema: z.ZodObject<{
|
|
23
|
+
emailAddr: z.ZodString;
|
|
24
|
+
qualifier: z.ZodString;
|
|
25
|
+
}, z.core.$loose>;
|
|
26
|
+
type EmailId = z.infer<typeof EmailIdSchema>;
|
|
27
|
+
/** The user's assigned role. */
|
|
28
|
+
const RoleSchema: z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
privileges: z.ZodArray<z.ZodUnknown>;
|
|
31
|
+
level: z.ZodNumber;
|
|
32
|
+
}, z.core.$loose>;
|
|
33
|
+
type Role = z.infer<typeof RoleSchema>;
|
|
34
|
+
/** A single user account. */
|
|
35
|
+
const UserSchema: z.ZodObject<{
|
|
36
|
+
userRefID: z.ZodNumber;
|
|
37
|
+
userId: z.ZodString;
|
|
38
|
+
cohort: z.ZodString;
|
|
39
|
+
firstName: z.ZodString;
|
|
40
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
41
|
+
statusEnum: z.ZodEnum<{
|
|
42
|
+
ACTIVE: "ACTIVE";
|
|
43
|
+
INACTIVE: "INACTIVE";
|
|
44
|
+
}>;
|
|
45
|
+
emailIds: z.ZodArray<z.ZodObject<{
|
|
46
|
+
emailAddr: z.ZodString;
|
|
47
|
+
qualifier: z.ZodString;
|
|
48
|
+
}, z.core.$loose>>;
|
|
49
|
+
hasImage: z.ZodBoolean;
|
|
50
|
+
authMethod: z.ZodString;
|
|
51
|
+
dateCreated: z.ZodString;
|
|
52
|
+
dateModified: z.ZodString;
|
|
53
|
+
startLockTime: z.ZodOptional<z.ZodString>;
|
|
54
|
+
internalAttrs: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
tenant: z.ZodString;
|
|
56
|
+
lockStatus: z.ZodBoolean;
|
|
57
|
+
role: z.ZodObject<{
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
privileges: z.ZodArray<z.ZodUnknown>;
|
|
60
|
+
level: z.ZodNumber;
|
|
61
|
+
}, z.core.$loose>;
|
|
62
|
+
hasAllDataAccess: z.ZodBoolean;
|
|
63
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
64
|
+
deleted: z.ZodBoolean;
|
|
65
|
+
}, z.core.$loose>;
|
|
66
|
+
type User = z.infer<typeof UserSchema>;
|
|
67
|
+
/** The list envelope: a page of users plus the server-side total. */
|
|
68
|
+
const UserListResponseSchema: z.ZodObject<{
|
|
69
|
+
countTotal: z.ZodNumber;
|
|
70
|
+
users: z.ZodArray<z.ZodObject<{
|
|
71
|
+
userRefID: z.ZodNumber;
|
|
72
|
+
userId: z.ZodString;
|
|
73
|
+
cohort: z.ZodString;
|
|
74
|
+
firstName: z.ZodString;
|
|
75
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
76
|
+
statusEnum: z.ZodEnum<{
|
|
77
|
+
ACTIVE: "ACTIVE";
|
|
78
|
+
INACTIVE: "INACTIVE";
|
|
79
|
+
}>;
|
|
80
|
+
emailIds: z.ZodArray<z.ZodObject<{
|
|
81
|
+
emailAddr: z.ZodString;
|
|
82
|
+
qualifier: z.ZodString;
|
|
83
|
+
}, z.core.$loose>>;
|
|
84
|
+
hasImage: z.ZodBoolean;
|
|
85
|
+
authMethod: z.ZodString;
|
|
86
|
+
dateCreated: z.ZodString;
|
|
87
|
+
dateModified: z.ZodString;
|
|
88
|
+
startLockTime: z.ZodOptional<z.ZodString>;
|
|
89
|
+
internalAttrs: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
tenant: z.ZodString;
|
|
91
|
+
lockStatus: z.ZodBoolean;
|
|
92
|
+
role: z.ZodObject<{
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
privileges: z.ZodArray<z.ZodUnknown>;
|
|
95
|
+
level: z.ZodNumber;
|
|
96
|
+
}, z.core.$loose>;
|
|
97
|
+
hasAllDataAccess: z.ZodBoolean;
|
|
98
|
+
userType: z.ZodOptional<z.ZodString>;
|
|
99
|
+
deleted: z.ZodBoolean;
|
|
100
|
+
}, z.core.$loose>>;
|
|
101
|
+
}, z.core.$loose>;
|
|
102
|
+
type UserListResponse = z.infer<typeof UserListResponseSchema>;
|
|
103
|
+
}
|
|
10
104
|
//# sourceMappingURL=users.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/oi/users.ts"],"names":[],"mappings":"AAAA,yBAAiB,OAAO,CAAC;IAErB,UAAiB,MAAM;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACjB;IAED,UAAiB,eAAe;QAC5B,eAAe,EAAE,MAAM,EAAE,CAAA;KAC5B;CAGJ"}
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../../src/lib/model/oi/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,yBAAiB,OAAO,CAAC;IAErB,UAAiB,MAAM;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACjB;IAED,UAAiB,eAAe;QAC5B,eAAe,EAAE,MAAM,EAAE,CAAA;KAC5B;CAGJ;AAED;;;;;;;;GAQG;AACH,yBAAiB,SAAS,CAAC;IACzB,4CAA4C;IACrC,MAAM,aAAa;;;qBAKxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAEpD,gCAAgC;IACzB,MAAM,UAAU;;;;qBAQrB,CAAC;IACH,KAAY,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;IAE9C,6BAA6B;IACtB,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqDrB,CAAC;IACH,KAAY,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;IAE9C,qEAAqE;IAC9D,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKjC,CAAC;IACH,KAAY,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;CACvE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DxSaasService } from './dx-saas.service';
|
|
2
2
|
import { GroupsResponse } from '../model/security/ACAGroup';
|
|
3
3
|
import { ACAUserResponse } from '../model/security/ACAUser';
|
|
4
|
-
import { OIUsers } from '../model/oi/users';
|
|
4
|
+
import { OIUsers, OIUsersV2 } from '../model/oi/users';
|
|
5
5
|
import { Logging } from '@dx-do/util';
|
|
6
6
|
/**
|
|
7
7
|
* Service for authorization/ACA and users: list groups, find user by name,
|
|
@@ -21,5 +21,22 @@ export declare class AuthorizationService {
|
|
|
21
21
|
findUser(userName: string, maxResults?: number): Promise<ACAUserResponse>;
|
|
22
22
|
/** Returns all OI users for the tenant. */
|
|
23
23
|
getUsers(): Promise<OIUsers.OIUsersResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Lists users via the ESS users v2 endpoint.
|
|
26
|
+
*
|
|
27
|
+
* The path's trailing segment is the cohort id in upper-cased, dashed GUID
|
|
28
|
+
* form (e.g. `6E82C5F4-8F16-4CD9-8BF0-6263F83054D5`). `oiGet` already injects
|
|
29
|
+
* the lowercase, dash-less cohort id as the base path segment, so we rebuild
|
|
30
|
+
* the GUID form here independently of how the config stores it.
|
|
31
|
+
*
|
|
32
|
+
* The response type is hand-modelled from observed data ({@link OIUsersV2});
|
|
33
|
+
* validation is defensive (`safeParse` + `log.warn`), so a server-side shape
|
|
34
|
+
* change logs a warning but still returns the raw payload to the caller.
|
|
35
|
+
*
|
|
36
|
+
* @remarks Response is validated, not thrown — see {@link OIUsersV2}.
|
|
37
|
+
*/
|
|
38
|
+
getUsersV2(startIndex?: number, endIndex?: number): Promise<OIUsersV2.UserListResponse>;
|
|
39
|
+
/** Reformats a cohort id to upper-cased, dashed GUID form (`8-4-4-4-12`). */
|
|
40
|
+
private toGuidCohortId;
|
|
24
41
|
}
|
|
25
42
|
//# sourceMappingURL=authorization.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/authorization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"authorization.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/authorization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC;;;GAGG;AACH,qBAAa,oBAAoB;IAM7B,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,GAAG;IANb;;;OAGG;gBAEO,aAAa,EAAE,aAAa,EAC5B,GAAG,GAAE,OAAO,CAAC,SAAuC;IAG9D,0DAA0D;IAC1D,SAAS,CAAC,UAAU,SAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAOpD,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAWtE,2CAA2C;IAC3C,QAAQ;IAIR;;;;;;;;;;;;;OAaG;IACG,UAAU,CACd,UAAU,SAAI,EACd,QAAQ,SAAM,GACb,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC;IA2BtC,6EAA6E;IAC7E,OAAO,CAAC,cAAc;CAYvB"}
|