@or-sdk/users 3.6.0 → 3.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/CHANGELOG.md +9 -0
- package/dist/types/Users.d.ts +207 -0
- package/dist/types/Users.d.ts.map +1 -1
- package/package.json +4 -4
- package/tsconfig.types.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.7.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/users@3.6.0...@or-sdk/users@3.7.0) (2026-02-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **deployer:** Add methods 'fetchFlowLogsChunk' and 'fetchAllFlowLogs' to fetch flow logs ([6b70992](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/6b70992ce3d1e4f308db69df700528f6eeffafcf))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [3.6.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/users@3.5.6...@or-sdk/users@3.6.0) (2026-02-09)
|
|
7
16
|
|
|
8
17
|
|
package/dist/types/Users.d.ts
CHANGED
|
@@ -5,30 +5,237 @@ export declare class Users extends Base {
|
|
|
5
5
|
private readonly sdkApi;
|
|
6
6
|
constructor(params: UsersConfig);
|
|
7
7
|
makeRequest<T>(params: CalApiParams): Promise<T>;
|
|
8
|
+
/**
|
|
9
|
+
* List users in account
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* await users.listUsers({
|
|
13
|
+
* from: 0,
|
|
14
|
+
* size: 1,
|
|
15
|
+
* orderDirection: 'asc',
|
|
16
|
+
* orderProperty: 'email',
|
|
17
|
+
* query: {
|
|
18
|
+
* // optional
|
|
19
|
+
* },
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
8
23
|
listUsers(params?: ListUsersParams): Promise<ListUsersResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Get account user by Id
|
|
26
|
+
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const result = await users.getUserById('<user-id>');
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
9
31
|
getUserById(userId: GetUserByIdParams['userId'], projection: GetUserByIdParams['projection']): Promise<User>;
|
|
32
|
+
/**
|
|
33
|
+
* Get multi-user profile using user token
|
|
34
|
+
*
|
|
35
|
+
* Will throw error if response from server does not comply with schema
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const profile = await instance.getCurrentMultiUserProfile();
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* To prevent validation of response use:
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const profile = await instance.getCurrentMultiUserProfile({ validate: false });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
10
45
|
getCurrentMultiUserProfile({ validate }?: ValidateParams): Promise<CurrentMultiUserProfile>;
|
|
46
|
+
/**
|
|
47
|
+
* Get account info based on given token
|
|
48
|
+
*
|
|
49
|
+
* ```typescript
|
|
50
|
+
* await users.getAccountInfo();
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
11
53
|
getAccountInfo(): Promise<AccountItem>;
|
|
54
|
+
/**
|
|
55
|
+
* List account multi-user profiles
|
|
56
|
+
*
|
|
57
|
+
* ```typescript
|
|
58
|
+
* await users.listAccountProfiles();
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
12
61
|
listAccountProfiles(): Promise<ListAccountProfilesResult>;
|
|
62
|
+
/**
|
|
63
|
+
* List profiles with ability for partial match by email, username or match by id.
|
|
64
|
+
*
|
|
65
|
+
* Super admin only.
|
|
66
|
+
*
|
|
67
|
+
* ```typescript
|
|
68
|
+
* await users.listProfiles();
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
13
71
|
listProfiles(params: ListProfilesParams): Promise<ListProfilesResult>;
|
|
72
|
+
/**
|
|
73
|
+
* List users with profile information
|
|
74
|
+
*
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const result = await users.listUsersAdvanced();
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
14
79
|
listUsersAdvanced(params: ListUsersAdvancedParams): Promise<UserAdvanced[]>;
|
|
80
|
+
/**
|
|
81
|
+
* Get profile by email
|
|
82
|
+
*
|
|
83
|
+
* Super admin only.
|
|
84
|
+
*
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const result = await users.getProfileByEmail('multi-user@example.com');
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
15
89
|
getProfileByEmail(email: string): Promise<AccountProfile>;
|
|
90
|
+
/**
|
|
91
|
+
* Get multi-user profile by Id
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const result = await users.getProfileById('<profile-id>');
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
16
96
|
getProfileById(profileId: string): Promise<Profile>;
|
|
97
|
+
/**
|
|
98
|
+
* Get profile
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const result = await users.getProfile();
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
17
103
|
getProfile(): Promise<Profile>;
|
|
104
|
+
/**
|
|
105
|
+
* Attach profile.
|
|
106
|
+
*
|
|
107
|
+
* ### Normal: Attach current user (based on token) to multi-user profile
|
|
108
|
+
*
|
|
109
|
+
* Pass only multi-user email and it will begin attachment process with email verification.
|
|
110
|
+
* ```typescript
|
|
111
|
+
* await users.attachProfile({
|
|
112
|
+
* email: 'multi-user@example.com',
|
|
113
|
+
* })
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* ### Super admin: Attach another user to multi-user profile
|
|
117
|
+
* Send userId if you want to attach another user instead of current.
|
|
118
|
+
*
|
|
119
|
+
* ```typescript
|
|
120
|
+
* await users.attachProfile({
|
|
121
|
+
* email: 'multi-user@example.com',
|
|
122
|
+
* userId: '<user-id-uuid>',
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* ### Super admin: Attach another user to multi-user profile and create new profile if it doesn't exist
|
|
127
|
+
* Send password if you want to automatically create profile.
|
|
128
|
+
*
|
|
129
|
+
* ```typescript
|
|
130
|
+
* await users.attachProfile({
|
|
131
|
+
* email: 'multi-user@example.com',
|
|
132
|
+
* userId: '<user-id-uuid>',
|
|
133
|
+
* password: 's3cure_p@ss0rd!',
|
|
134
|
+
* });
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
18
137
|
attachProfile(params: AttachParams): Promise<AttachResult>;
|
|
138
|
+
/**
|
|
139
|
+
* List profiles users.
|
|
140
|
+
* ```typescript
|
|
141
|
+
* await users.listProfileUsers();
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
19
144
|
listProfileUsers(): Promise<List<ProfileUserItem>>;
|
|
145
|
+
/**
|
|
146
|
+
* Get current user
|
|
147
|
+
* ```typescript
|
|
148
|
+
* const result = await users.getCurrentUser();
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
20
151
|
getCurrentUser(): Promise<TokenData>;
|
|
152
|
+
/**
|
|
153
|
+
* Get profile email if exists or user email
|
|
154
|
+
* ```typescript
|
|
155
|
+
* const result = await users.getUserEmail();
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
21
158
|
getUserEmail(userId?: string): Promise<{
|
|
22
159
|
email: string;
|
|
23
160
|
}>;
|
|
161
|
+
/**
|
|
162
|
+
* Delete a user from account
|
|
163
|
+
* ```typescript
|
|
164
|
+
* await users.deleteUser(userId, accountId);
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
24
167
|
deleteUser(userId: string, accountId?: string): Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Update user
|
|
170
|
+
* ```typescript
|
|
171
|
+
* await users.updateUser(userId, user, accountId);
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
25
174
|
updateUser(userId: string, user: UpdateUserParam, accountId?: string): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* Request force change password for user
|
|
177
|
+
* ```typescript
|
|
178
|
+
* await users.requestForceChangePassword(userId, multi);
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
26
181
|
requestForceChangePassword(userId: string, multi?: boolean): Promise<void>;
|
|
182
|
+
/**
|
|
183
|
+
* Disable user
|
|
184
|
+
* ```typescript
|
|
185
|
+
* await users.disableUser(userId, accountId);
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
27
188
|
disableUser(userId: string, accountId?: string): Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* Enable user
|
|
191
|
+
* ```typescript
|
|
192
|
+
* await users.enableUser(userId, accountId);
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
28
195
|
enableUser(userId: string, accountId?: string): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Initiate the creation of the multi-user
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* const { userCreated, emailSent } = await users.createUserWithMulti(userData, accountId);
|
|
202
|
+
* // userCreated === true - if user already exists
|
|
203
|
+
* // emailSent === true - if user does not exists and invitation email was sent
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
29
206
|
createUserWithMulti(userData: CreateUserWithMultData, accountId?: string): Promise<CreateUserWithMultResult>;
|
|
207
|
+
/**
|
|
208
|
+
* List accounts by profile
|
|
209
|
+
* ```typescript
|
|
210
|
+
* await users.userListProfileAccounts();
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
30
213
|
userListProfileAccounts(): Promise<ProfileAccountItem[]>;
|
|
214
|
+
/**
|
|
215
|
+
* List accounts (super admin only)
|
|
216
|
+
* ```typescript
|
|
217
|
+
* await users.listAccounts({limit, skip, query, projection});
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
31
220
|
listAccounts(params?: ListAccountsParams): Promise<ListAccountsResult>;
|
|
221
|
+
/**
|
|
222
|
+
* Upsert multi-user.
|
|
223
|
+
*
|
|
224
|
+
* If multi-user with email already exists return it, otherwise create new one with given email and password
|
|
225
|
+
*
|
|
226
|
+
* Super admin only!
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* await users.createMultiUser({
|
|
231
|
+
* email: 'user@example.com',
|
|
232
|
+
* password: 's3cure_p@ss0rd!',
|
|
233
|
+
* data: {
|
|
234
|
+
* // optional
|
|
235
|
+
* }
|
|
236
|
+
* });
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
32
239
|
upsertMultiUser(params: UpsertMultiUserParams): Promise<UpsertMultiUserResult>;
|
|
33
240
|
}
|
|
34
241
|
//# sourceMappingURL=Users.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Users.d.ts","sourceRoot":"","sources":["../../src/Users.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAY,YAAY,EAAsC,MAAM,cAAc,CAAC;AAetG,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,YAAY,EAEZ,qBAAqB,EACrB,qBAAqB,EACrB,IAAI,EACJ,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,SAAS,EACvD,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EACd,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,qBAAa,KAAM,SAAQ,IAAI;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;gBAErB,MAAM,EAAE,WAAW;IAqBxB,WAAW,CAAC,CAAC,EAAE,MAAM,E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;IACU,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3E;;;;;OAKG;IACU,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1E;;;;;;;;;OASG;IACU,mBAAmB,CAC9B,QAAQ,EAAE,sBAAsB,EAChC,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,wBAAwB,CAAC;IA4BpC;;;;;OAKG;IACU,uBAAuB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAMrE;;;;;OAKG;IACU,YAAY,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAWvF;;;;;;;;;;;;;;;;;OAiBG;IACU,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAS5F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/users",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"test:watch": "vitest --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@or-sdk/base": "^0.
|
|
24
|
-
"@or-sdk/sdk-api": "^0.
|
|
23
|
+
"@or-sdk/base": "^0.43.0",
|
|
24
|
+
"@or-sdk/sdk-api": "^0.27.0",
|
|
25
25
|
"validator": "^13.15.23",
|
|
26
26
|
"zod": "^3.24.4"
|
|
27
27
|
},
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "ce62679c119c54ef41fd0d8f7084c563c3b21b24"
|
|
38
38
|
}
|