@code.store/arcxp-sdk-ts 4.8.0 → 4.9.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.
@@ -1,6 +1,7 @@
1
1
  import { ArcAbstractAPI, ArcAPIOptions } from '../abstract-api';
2
- import { MigrateBatchUsersPayload, MigrateBatchUsersResponse } from './types';
2
+ import { GetUserResponse, MigrateBatchUsersPayload, MigrateBatchUsersResponse } from './types';
3
3
  export declare class ArcIdentity extends ArcAbstractAPI {
4
4
  constructor(options: ArcAPIOptions);
5
5
  migrateBatch(payload: MigrateBatchUsersPayload): Promise<MigrateBatchUsersResponse>;
6
+ getUser(id: string): Promise<GetUserResponse>;
6
7
  }
@@ -10,6 +10,10 @@ class ArcIdentity extends abstract_api_1.ArcAbstractAPI {
10
10
  const { data } = await this.client.post('/migrate', payload);
11
11
  return data;
12
12
  }
13
+ async getUser(id) {
14
+ const { data } = await this.client.get(`/user?search=uuid=${id}`);
15
+ return data;
16
+ }
13
17
  }
14
18
  exports.ArcIdentity = ArcIdentity;
15
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/identity/index.ts"],"names":[],"mappings":";;;AAAA,kDAAgE;AAGhE,MAAa,WAAY,SAAQ,6BAAc;IAC7C,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAAiC;QAClD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA4B,UAAU,EAAE,OAAO,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAVD,kCAUC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/identity/index.ts"],"names":[],"mappings":";;;AAAA,kDAAgE;AAGhE,MAAa,WAAY,SAAQ,6BAAc;IAC7C,YAAY,OAAsB;QAChC,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAAiC;QAClD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA4B,UAAU,EAAE,OAAO,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhBD,kCAgBC"}
@@ -4,41 +4,8 @@ export type MigrateIdentityCustomAttributeType = {
4
4
  type: 'String' | 'Number' | 'Date' | 'Boolean';
5
5
  };
6
6
  export type MigrateUserPayload = {
7
- identities: {
8
- userName: string;
9
- credentials: string;
10
- grantType: 'password';
11
- lastLoginDate?: string;
12
- }[];
13
- profile: {
14
- firstName?: string;
15
- lastName?: string;
16
- secondLastName?: string;
17
- displayName?: string;
18
- gender?: 'MALE' | 'FEMALE';
19
- email: string;
20
- birthYear?: string;
21
- birthMonth?: string;
22
- birthDay?: string;
23
- contacts: {
24
- phone: string;
25
- type: 'WORK' | 'HOME' | 'PRIMARY' | 'OTHER';
26
- }[];
27
- addresses: {
28
- line1: string;
29
- line2?: string;
30
- locality: string;
31
- region?: string;
32
- postal?: string;
33
- country?: string;
34
- type: 'WORK' | 'HOME' | 'PRIMARY' | 'OTHER';
35
- }[];
36
- attributes: MigrateIdentityCustomAttributeType[];
37
- legacyId: string;
38
- deletionRule?: 1;
39
- emailVerified?: boolean;
40
- createdOn: string;
41
- };
7
+ identities: UserIdentity[];
8
+ profile: UserProfile;
42
9
  uuid?: string;
43
10
  };
44
11
  export type MigrateBatchUsersPayload = {
@@ -56,3 +23,307 @@ export type MigrateBatchUsersResponse = {
56
23
  errorCount: number;
57
24
  successCount: number;
58
25
  };
26
+ export type GetUserResponse = {
27
+ page: number;
28
+ size: number;
29
+ lastPage: number;
30
+ totalCount: number;
31
+ sort: string;
32
+ sortDirection: string;
33
+ result: {
34
+ uuid: string;
35
+ userState: boolean;
36
+ identities: UserIdentity[];
37
+ profile: UserProfile;
38
+ }[];
39
+ };
40
+ export interface UserIdentity {
41
+ /**
42
+ * Format: date-time
43
+ * @description Date this was created
44
+ */
45
+ createdOn?: string;
46
+ /** @description User that created this */
47
+ createdBy?: string;
48
+ /**
49
+ * Format: date-time
50
+ * @description Date this was modified
51
+ */
52
+ modifiedOn?: string;
53
+ /** @description User that modified this */
54
+ modifiedBy?: string;
55
+ /**
56
+ * Format: int64
57
+ * @description The id of this identity
58
+ * @example 1
59
+ */
60
+ id?: number;
61
+ /**
62
+ * @description The login userName for this user
63
+ * @example jdoe123
64
+ */
65
+ userName: string;
66
+ /** @description Flag indicating if a password reset is required */
67
+ passwordReset: boolean;
68
+ /**
69
+ * @description The type of identity
70
+ * @example Identity
71
+ */
72
+ type: string;
73
+ /**
74
+ * Format: date-time
75
+ * @description The date that this identity last logged on
76
+ */
77
+ lastLoginDate?: string;
78
+ /** @description Flag indicating if this identity is locked */
79
+ locked?: boolean;
80
+ /** @description Flag indicating if this identity is of oidc */
81
+ oidc?: boolean;
82
+ }
83
+ export interface UserProfile {
84
+ /**
85
+ * Format: date-time
86
+ * @description Date this was created
87
+ */
88
+ createdOn?: string;
89
+ /** @description User that created this */
90
+ createdBy?: string;
91
+ /**
92
+ * Format: date-time
93
+ * @description Date this was modified
94
+ */
95
+ modifiedOn?: string;
96
+ /** @description User that modified this */
97
+ modifiedBy?: string;
98
+ /**
99
+ * @description First Name
100
+ * @example John
101
+ */
102
+ firstName?: string;
103
+ /**
104
+ * @description Last Name
105
+ * @example Doe
106
+ */
107
+ lastName?: string;
108
+ /**
109
+ * @description Second Last Name
110
+ * @example Doey
111
+ */
112
+ secondLastName?: string;
113
+ /**
114
+ * @description Display Name
115
+ * @example john_doe
116
+ */
117
+ displayName?: string;
118
+ /**
119
+ * @description Gender
120
+ * @example MALE, FEMALE
121
+ * @enum string
122
+ */
123
+ gender?: 'MALE' | 'FEMALE' | 'NON_CONFORMING' | 'PREFER_NOT_TO_SAY';
124
+ /**
125
+ * @description Email
126
+ * @example john.doe@donotreply.com
127
+ */
128
+ email?: string;
129
+ /**
130
+ * @description Unverified Email
131
+ * @example john.doe2@donotreply.com
132
+ */
133
+ unverifiedEmail?: string;
134
+ /** @description Flag indicating if this email is verified */
135
+ emailVerified?: boolean;
136
+ /**
137
+ * @description Year of Birth (YYYY)
138
+ * @example 1999
139
+ */
140
+ birthYear?: string;
141
+ /**
142
+ * @description Month of Birth (MM)
143
+ * @example 11
144
+ */
145
+ birthMonth?: string;
146
+ /**
147
+ * @description Day of Month of Birth (DD)
148
+ * @example 15
149
+ */
150
+ birthDay?: string;
151
+ /**
152
+ * @description The legacy id of this profile
153
+ * @example FGE234UIR184
154
+ */
155
+ legacyId?: string;
156
+ /** @description List of contacts */
157
+ contacts?: UserContact[];
158
+ /** @description List of addresses */
159
+ addresses?: UserAddress[];
160
+ /** @description List of attributes to hold name, value pairs */
161
+ attributes?: UserAttribute[];
162
+ /** @description The identitities associated with this profile */
163
+ identities?: UserIdentity[];
164
+ /**
165
+ * @description The status of this profile
166
+ * @example Active/Disabled
167
+ * @enum {string}
168
+ */
169
+ status?: 'Active' | 'Disabled' | 'Anonymized' | 'PendingAnonymize';
170
+ /**
171
+ * Format: int32
172
+ * @description Profile Deletion Rule Id
173
+ * @example 1
174
+ */
175
+ deletionRule?: number;
176
+ profileNotificationEventResponse?: UserProfileNotificationEvent;
177
+ }
178
+ export interface UserAddress {
179
+ /**
180
+ * @description Address line one
181
+ * @example 123 Main St.
182
+ */
183
+ line1?: string;
184
+ line2: string;
185
+ locality: string;
186
+ region: string;
187
+ postal: string;
188
+ country: string;
189
+ /**
190
+ * @description Type of address
191
+ * @example WORK, HOME, PRIMARY, OTHER
192
+ * @enum string
193
+ */
194
+ type?: 'WORK' | 'HOME' | 'PRIMARY' | 'OTHER';
195
+ }
196
+ export interface UserAttribute {
197
+ /**
198
+ * @description Name of the attribute
199
+ * @example KEY1
200
+ */
201
+ name: string;
202
+ /**
203
+ * @description Value of the attribute
204
+ * @example VALUE 1
205
+ */
206
+ value: string;
207
+ /**
208
+ * @description Type of the attribute
209
+ * @example String, Number, Date, Boolean
210
+ * @enum {string}
211
+ */
212
+ type: 'String' | 'Number' | 'Boolean' | 'Date';
213
+ }
214
+ export interface UserContact {
215
+ /**
216
+ * @description Phone number
217
+ * @example 555-555-5555
218
+ */
219
+ phone: string;
220
+ /**
221
+ * @description Type of phone number
222
+ * @example WORK, HOME, PRIMARY, OTHER
223
+ * @enum {string}
224
+ */
225
+ type: 'WORK' | 'HOME' | 'PRIMARY' | 'OTHER';
226
+ }
227
+ export interface UserProfileNotificationEvent {
228
+ /**
229
+ * Format: date-time
230
+ * @description Date this was created
231
+ */
232
+ createdOn?: string;
233
+ /** @description User that created this */
234
+ createdBy?: string;
235
+ /**
236
+ * Format: date-time
237
+ * @description Date this was modified
238
+ */
239
+ modifiedOn?: string;
240
+ /** @description User that modified this */
241
+ modifiedBy?: string;
242
+ /**
243
+ * Format: int64
244
+ * @description The Profile Notification Event's ID.
245
+ * @example 1
246
+ */
247
+ id: number;
248
+ rule: ProfileDeletionRule;
249
+ /**
250
+ * @description UUID of Profile Deletion.
251
+ * @example abcd123
252
+ */
253
+ uuid: string;
254
+ /**
255
+ * @description Status
256
+ * @example Scheduled
257
+ * @enum {string}
258
+ */
259
+ status: 'SCHEDULED' | 'COMPLETED' | 'CANCELLED';
260
+ /**
261
+ * Format: date-time
262
+ * @description Scheduled Notification Date
263
+ */
264
+ notificationDate: string;
265
+ /**
266
+ * Format: date-time
267
+ * @description Profile Deletion Date if no action taken
268
+ */
269
+ actionDate: string;
270
+ /**
271
+ * Format: int32
272
+ * @description Number of times a notification sent
273
+ * @example 10
274
+ */
275
+ notificationSentCount: number;
276
+ }
277
+ export interface ProfileDeletionRule {
278
+ /**
279
+ * Format: date-time
280
+ * @description Date this was created
281
+ */
282
+ createdOn?: string;
283
+ /** @description User that created this */
284
+ createdBy?: string;
285
+ /**
286
+ * Format: date-time
287
+ * @description Date this was modified
288
+ */
289
+ modifiedOn?: string;
290
+ /** @description User that modified this */
291
+ modifiedBy?: string;
292
+ /**
293
+ * Format: int64
294
+ * @description The Profile Deletion Rule's ID.
295
+ * @example 1
296
+ */
297
+ id: number;
298
+ /**
299
+ * @description Name of Profile Deletion Rule.
300
+ * @example Rule-1
301
+ */
302
+ name: string;
303
+ /**
304
+ * Format: int32
305
+ * @description Elapsed Days(After) to send notification that account will be deleted if not action taken. Ex:180 days since email was not verified.
306
+ * @example 180
307
+ */
308
+ notificationTriggerDays: number;
309
+ /**
310
+ * Format: int32
311
+ * @description Days After deletion will happen after sending notification if no action is taken. Ex:60 days after notification event was sent consider deleting profile
312
+ * @example 60
313
+ */
314
+ actionTriggerDays: number;
315
+ /**
316
+ * Format: int32
317
+ * @description Period(per number of days) notification sent to users until account is deleted. Ex:Each 10 days notification event will be sent until profile is deleted
318
+ * @example 10
319
+ */
320
+ notificationRecurrenceDays: number;
321
+ /**
322
+ * Format: int32
323
+ * @description Number of times a notification can be sent
324
+ * @example 180
325
+ */
326
+ notificationLimit: number;
327
+ /** @enum {string} */
328
+ typeId: 'EMAIL_NEVER_VERIFIED' | 'NO_SIGN_IN' | 'LAST_LOGIN';
329
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code.store/arcxp-sdk-ts",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",