api-arreya-types 1.0.22 → 1.0.24

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,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { Account } from './account.type';
3
2
  export declare const UserRole: z.ZodObject<{
4
3
  id: z.ZodString;
5
4
  hierarchy: z.ZodNumber;
@@ -19,58 +18,74 @@ export declare const ManagerRole: UserRole;
19
18
  export declare const EditorRole: UserRole;
20
19
  export declare const ViewerRole: UserRole;
21
20
  export declare const allRoles: UserRole[];
22
- export declare const User: z.ZodObject<{
21
+ export declare const UserProject: z.ZodObject<{
23
22
  id: z.ZodString;
24
- username: z.ZodString;
25
- email: z.ZodString;
26
- lastLogin: z.ZodNullable<z.ZodDate>;
23
+ userAccountId: z.ZodString;
24
+ projectId: z.ZodString;
27
25
  createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
28
26
  updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
29
27
  }, "strip", z.ZodTypeAny, {
30
28
  id: string;
31
29
  createdAt: Date;
32
30
  updatedAt: Date;
33
- email: string;
34
- username: string;
35
- lastLogin: Date | null;
31
+ projectId: string;
32
+ userAccountId: string;
36
33
  }, {
37
34
  id: string;
38
35
  createdAt: string | Date;
39
36
  updatedAt: string | Date;
40
- email: string;
41
- username: string;
42
- lastLogin: Date | null;
37
+ projectId: string;
38
+ userAccountId: string;
43
39
  }>;
44
- export declare const UserCreate: z.ZodObject<{
45
- id: z.ZodOptional<z.ZodString>;
46
- username: z.ZodString;
47
- email: z.ZodString;
40
+ export declare const CreateUserProject: z.ZodObject<{
41
+ userAccountId: z.ZodString;
42
+ projectId: z.ZodString;
48
43
  }, "strip", z.ZodTypeAny, {
49
- email: string;
50
- username: string;
51
- id?: string | undefined;
44
+ projectId: string;
45
+ userAccountId: string;
52
46
  }, {
53
- email: string;
54
- username: string;
55
- id?: string | undefined;
47
+ projectId: string;
48
+ userAccountId: string;
56
49
  }>;
57
- export declare const UserUpdate: z.ZodObject<{
50
+ export declare const CreateUserProjects: z.ZodObject<{
51
+ userAccountId: z.ZodString;
52
+ projectIds: z.ZodArray<z.ZodString, "many">;
53
+ }, "strip", z.ZodTypeAny, {
54
+ projectIds: string[];
55
+ userAccountId: string;
56
+ }, {
57
+ projectIds: string[];
58
+ userAccountId: string;
59
+ }>;
60
+ export type UserProject = z.infer<typeof UserProject>;
61
+ export type CreateUserProject = z.infer<typeof CreateUserProject>;
62
+ export type CreateUserProjects = z.infer<typeof CreateUserProjects>;
63
+ export declare const UserAccount: z.ZodObject<{
58
64
  id: z.ZodString;
59
- email: z.ZodOptional<z.ZodString>;
65
+ userId: z.ZodString;
66
+ accountId: z.ZodString;
67
+ roleId: z.ZodString;
68
+ allProjects: z.ZodBoolean;
69
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
70
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
60
71
  }, "strip", z.ZodTypeAny, {
61
72
  id: string;
62
- email?: string | undefined;
73
+ createdAt: Date;
74
+ updatedAt: Date;
75
+ accountId: string;
76
+ userId: string;
77
+ roleId: string;
78
+ allProjects: boolean;
63
79
  }, {
64
80
  id: string;
65
- email?: string | undefined;
81
+ createdAt: string | Date;
82
+ updatedAt: string | Date;
83
+ accountId: string;
84
+ userId: string;
85
+ roleId: string;
86
+ allProjects: boolean;
66
87
  }>;
67
- export type User = z.infer<typeof User>;
68
- export type UserCreate = z.infer<typeof UserCreate>;
69
- export type UserUpdate = z.infer<typeof UserUpdate>;
70
- export type UserExtended = User & {
71
- userAccounts: UserAccount[];
72
- };
73
- export declare const UserAccount: z.ZodObject<{
88
+ export declare const UserAccountExtended: z.ZodObject<z.objectUtil.extendShape<{
74
89
  id: z.ZodString;
75
90
  userId: z.ZodString;
76
91
  accountId: z.ZodString;
@@ -78,7 +93,61 @@ export declare const UserAccount: z.ZodObject<{
78
93
  allProjects: z.ZodBoolean;
79
94
  createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
80
95
  updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
81
- }, "strip", z.ZodTypeAny, {
96
+ }, {
97
+ account: z.ZodObject<{
98
+ id: z.ZodString;
99
+ name: z.ZodString;
100
+ stripeCustomer: z.ZodNullable<z.ZodString>;
101
+ stripeSubscription: z.ZodNullable<z.ZodString>;
102
+ status: z.ZodEnum<[string, ...string[]]>;
103
+ deviceLimit: z.ZodNullable<z.ZodNumber>;
104
+ mediaLimit: z.ZodNullable<z.ZodNumber>;
105
+ private: z.ZodDefault<z.ZodBoolean>;
106
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
107
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ status: string;
110
+ id: string;
111
+ name: string;
112
+ stripeCustomer: string | null;
113
+ stripeSubscription: string | null;
114
+ deviceLimit: number | null;
115
+ mediaLimit: number | null;
116
+ private: boolean;
117
+ createdAt: Date;
118
+ updatedAt: Date;
119
+ }, {
120
+ status: string;
121
+ id: string;
122
+ name: string;
123
+ stripeCustomer: string | null;
124
+ stripeSubscription: string | null;
125
+ deviceLimit: number | null;
126
+ mediaLimit: number | null;
127
+ createdAt: string | Date;
128
+ updatedAt: string | Date;
129
+ private?: boolean | undefined;
130
+ }>;
131
+ userProjects: z.ZodArray<z.ZodObject<{
132
+ id: z.ZodString;
133
+ userAccountId: z.ZodString;
134
+ projectId: z.ZodString;
135
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
136
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ id: string;
139
+ createdAt: Date;
140
+ updatedAt: Date;
141
+ projectId: string;
142
+ userAccountId: string;
143
+ }, {
144
+ id: string;
145
+ createdAt: string | Date;
146
+ updatedAt: string | Date;
147
+ projectId: string;
148
+ userAccountId: string;
149
+ }>, "many">;
150
+ }>, "strip", z.ZodTypeAny, {
82
151
  id: string;
83
152
  createdAt: Date;
84
153
  updatedAt: Date;
@@ -86,6 +155,25 @@ export declare const UserAccount: z.ZodObject<{
86
155
  userId: string;
87
156
  roleId: string;
88
157
  allProjects: boolean;
158
+ account: {
159
+ status: string;
160
+ id: string;
161
+ name: string;
162
+ stripeCustomer: string | null;
163
+ stripeSubscription: string | null;
164
+ deviceLimit: number | null;
165
+ mediaLimit: number | null;
166
+ private: boolean;
167
+ createdAt: Date;
168
+ updatedAt: Date;
169
+ };
170
+ userProjects: {
171
+ id: string;
172
+ createdAt: Date;
173
+ updatedAt: Date;
174
+ projectId: string;
175
+ userAccountId: string;
176
+ }[];
89
177
  }, {
90
178
  id: string;
91
179
  createdAt: string | Date;
@@ -94,6 +182,25 @@ export declare const UserAccount: z.ZodObject<{
94
182
  userId: string;
95
183
  roleId: string;
96
184
  allProjects: boolean;
185
+ account: {
186
+ status: string;
187
+ id: string;
188
+ name: string;
189
+ stripeCustomer: string | null;
190
+ stripeSubscription: string | null;
191
+ deviceLimit: number | null;
192
+ mediaLimit: number | null;
193
+ createdAt: string | Date;
194
+ updatedAt: string | Date;
195
+ private?: boolean | undefined;
196
+ };
197
+ userProjects: {
198
+ id: string;
199
+ createdAt: string | Date;
200
+ updatedAt: string | Date;
201
+ projectId: string;
202
+ userAccountId: string;
203
+ }[];
97
204
  }>;
98
205
  export declare const CreateUserAccount: z.ZodObject<{
99
206
  userId: z.ZodString;
@@ -125,54 +232,254 @@ export declare const UpdateUserAccount: z.ZodObject<{
125
232
  allProjects?: boolean | undefined;
126
233
  }>;
127
234
  export type UserAccount = z.infer<typeof UserAccount>;
128
- export type UserAccountExtended = UserAccount & {
129
- account: Account;
130
- userProjects: UserProject[];
131
- };
235
+ export type UserAccountExtended = z.infer<typeof UserAccountExtended>;
132
236
  export type CreateUserAccount = z.infer<typeof CreateUserAccount>;
133
237
  export type UpdateUserAccount = z.infer<typeof UpdateUserAccount>;
134
- export declare const UserProject: z.ZodObject<{
238
+ export declare const User: z.ZodObject<{
135
239
  id: z.ZodString;
136
- userAccountId: z.ZodString;
137
- projectId: z.ZodString;
240
+ username: z.ZodString;
241
+ email: z.ZodString;
242
+ lastLogin: z.ZodNullable<z.ZodDate>;
138
243
  createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
139
244
  updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
140
245
  }, "strip", z.ZodTypeAny, {
141
246
  id: string;
142
247
  createdAt: Date;
143
248
  updatedAt: Date;
144
- projectId: string;
145
- userAccountId: string;
249
+ email: string;
250
+ username: string;
251
+ lastLogin: Date | null;
146
252
  }, {
147
253
  id: string;
148
254
  createdAt: string | Date;
149
255
  updatedAt: string | Date;
150
- projectId: string;
151
- userAccountId: string;
256
+ email: string;
257
+ username: string;
258
+ lastLogin: Date | null;
152
259
  }>;
153
- export declare const CreateUserProject: z.ZodObject<{
154
- userAccountId: z.ZodString;
155
- projectId: z.ZodString;
260
+ export declare const UserExtended: z.ZodObject<z.objectUtil.extendShape<{
261
+ id: z.ZodString;
262
+ username: z.ZodString;
263
+ email: z.ZodString;
264
+ lastLogin: z.ZodNullable<z.ZodDate>;
265
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
266
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
267
+ }, {
268
+ userAccounts: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
269
+ id: z.ZodString;
270
+ userId: z.ZodString;
271
+ accountId: z.ZodString;
272
+ roleId: z.ZodString;
273
+ allProjects: z.ZodBoolean;
274
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
275
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
276
+ }, {
277
+ account: z.ZodObject<{
278
+ id: z.ZodString;
279
+ name: z.ZodString;
280
+ stripeCustomer: z.ZodNullable<z.ZodString>;
281
+ stripeSubscription: z.ZodNullable<z.ZodString>;
282
+ status: z.ZodEnum<[string, ...string[]]>;
283
+ deviceLimit: z.ZodNullable<z.ZodNumber>;
284
+ mediaLimit: z.ZodNullable<z.ZodNumber>;
285
+ private: z.ZodDefault<z.ZodBoolean>;
286
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
287
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ status: string;
290
+ id: string;
291
+ name: string;
292
+ stripeCustomer: string | null;
293
+ stripeSubscription: string | null;
294
+ deviceLimit: number | null;
295
+ mediaLimit: number | null;
296
+ private: boolean;
297
+ createdAt: Date;
298
+ updatedAt: Date;
299
+ }, {
300
+ status: string;
301
+ id: string;
302
+ name: string;
303
+ stripeCustomer: string | null;
304
+ stripeSubscription: string | null;
305
+ deviceLimit: number | null;
306
+ mediaLimit: number | null;
307
+ createdAt: string | Date;
308
+ updatedAt: string | Date;
309
+ private?: boolean | undefined;
310
+ }>;
311
+ userProjects: z.ZodArray<z.ZodObject<{
312
+ id: z.ZodString;
313
+ userAccountId: z.ZodString;
314
+ projectId: z.ZodString;
315
+ createdAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
316
+ updatedAt: z.ZodUnion<[z.ZodDate, z.ZodEffects<z.ZodString, Date, string>]>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ id: string;
319
+ createdAt: Date;
320
+ updatedAt: Date;
321
+ projectId: string;
322
+ userAccountId: string;
323
+ }, {
324
+ id: string;
325
+ createdAt: string | Date;
326
+ updatedAt: string | Date;
327
+ projectId: string;
328
+ userAccountId: string;
329
+ }>, "many">;
330
+ }>, "strip", z.ZodTypeAny, {
331
+ id: string;
332
+ createdAt: Date;
333
+ updatedAt: Date;
334
+ accountId: string;
335
+ userId: string;
336
+ roleId: string;
337
+ allProjects: boolean;
338
+ account: {
339
+ status: string;
340
+ id: string;
341
+ name: string;
342
+ stripeCustomer: string | null;
343
+ stripeSubscription: string | null;
344
+ deviceLimit: number | null;
345
+ mediaLimit: number | null;
346
+ private: boolean;
347
+ createdAt: Date;
348
+ updatedAt: Date;
349
+ };
350
+ userProjects: {
351
+ id: string;
352
+ createdAt: Date;
353
+ updatedAt: Date;
354
+ projectId: string;
355
+ userAccountId: string;
356
+ }[];
357
+ }, {
358
+ id: string;
359
+ createdAt: string | Date;
360
+ updatedAt: string | Date;
361
+ accountId: string;
362
+ userId: string;
363
+ roleId: string;
364
+ allProjects: boolean;
365
+ account: {
366
+ status: string;
367
+ id: string;
368
+ name: string;
369
+ stripeCustomer: string | null;
370
+ stripeSubscription: string | null;
371
+ deviceLimit: number | null;
372
+ mediaLimit: number | null;
373
+ createdAt: string | Date;
374
+ updatedAt: string | Date;
375
+ private?: boolean | undefined;
376
+ };
377
+ userProjects: {
378
+ id: string;
379
+ createdAt: string | Date;
380
+ updatedAt: string | Date;
381
+ projectId: string;
382
+ userAccountId: string;
383
+ }[];
384
+ }>, "many">;
385
+ }>, "strip", z.ZodTypeAny, {
386
+ id: string;
387
+ createdAt: Date;
388
+ updatedAt: Date;
389
+ email: string;
390
+ username: string;
391
+ lastLogin: Date | null;
392
+ userAccounts: {
393
+ id: string;
394
+ createdAt: Date;
395
+ updatedAt: Date;
396
+ accountId: string;
397
+ userId: string;
398
+ roleId: string;
399
+ allProjects: boolean;
400
+ account: {
401
+ status: string;
402
+ id: string;
403
+ name: string;
404
+ stripeCustomer: string | null;
405
+ stripeSubscription: string | null;
406
+ deviceLimit: number | null;
407
+ mediaLimit: number | null;
408
+ private: boolean;
409
+ createdAt: Date;
410
+ updatedAt: Date;
411
+ };
412
+ userProjects: {
413
+ id: string;
414
+ createdAt: Date;
415
+ updatedAt: Date;
416
+ projectId: string;
417
+ userAccountId: string;
418
+ }[];
419
+ }[];
420
+ }, {
421
+ id: string;
422
+ createdAt: string | Date;
423
+ updatedAt: string | Date;
424
+ email: string;
425
+ username: string;
426
+ lastLogin: Date | null;
427
+ userAccounts: {
428
+ id: string;
429
+ createdAt: string | Date;
430
+ updatedAt: string | Date;
431
+ accountId: string;
432
+ userId: string;
433
+ roleId: string;
434
+ allProjects: boolean;
435
+ account: {
436
+ status: string;
437
+ id: string;
438
+ name: string;
439
+ stripeCustomer: string | null;
440
+ stripeSubscription: string | null;
441
+ deviceLimit: number | null;
442
+ mediaLimit: number | null;
443
+ createdAt: string | Date;
444
+ updatedAt: string | Date;
445
+ private?: boolean | undefined;
446
+ };
447
+ userProjects: {
448
+ id: string;
449
+ createdAt: string | Date;
450
+ updatedAt: string | Date;
451
+ projectId: string;
452
+ userAccountId: string;
453
+ }[];
454
+ }[];
455
+ }>;
456
+ export declare const UserCreate: z.ZodObject<{
457
+ id: z.ZodOptional<z.ZodString>;
458
+ username: z.ZodString;
459
+ email: z.ZodString;
156
460
  }, "strip", z.ZodTypeAny, {
157
- projectId: string;
158
- userAccountId: string;
461
+ email: string;
462
+ username: string;
463
+ id?: string | undefined;
159
464
  }, {
160
- projectId: string;
161
- userAccountId: string;
465
+ email: string;
466
+ username: string;
467
+ id?: string | undefined;
162
468
  }>;
163
- export declare const CreateUserProjects: z.ZodObject<{
164
- userAccountId: z.ZodString;
165
- projectIds: z.ZodArray<z.ZodString, "many">;
469
+ export declare const UserUpdate: z.ZodObject<{
470
+ id: z.ZodString;
471
+ email: z.ZodOptional<z.ZodString>;
166
472
  }, "strip", z.ZodTypeAny, {
167
- projectIds: string[];
168
- userAccountId: string;
473
+ id: string;
474
+ email?: string | undefined;
169
475
  }, {
170
- projectIds: string[];
171
- userAccountId: string;
476
+ id: string;
477
+ email?: string | undefined;
172
478
  }>;
173
- export type UserProject = z.infer<typeof UserProject>;
174
- export type CreateUserProject = z.infer<typeof CreateUserProject>;
175
- export type CreateUserProjects = z.infer<typeof CreateUserProjects>;
479
+ export type User = z.infer<typeof User>;
480
+ export type UserCreate = z.infer<typeof UserCreate>;
481
+ export type UserUpdate = z.infer<typeof UserUpdate>;
482
+ export type UserExtended = z.infer<typeof UserExtended>;
176
483
  export declare const UserIdRequestParams: z.ZodObject<{
177
484
  id: z.ZodString;
178
485
  }, "strip", z.ZodTypeAny, {
package/dist/user.type.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateUserAccessRequestBody = exports.InviteUserRequestBody = exports.UpdateUserRequestBody = exports.CreateUserRequestBody = exports.UserIdRequestParams = exports.CreateUserProjects = exports.CreateUserProject = exports.UserProject = exports.UpdateUserAccount = exports.CreateUserAccount = exports.UserAccount = exports.UserUpdate = exports.UserCreate = exports.User = exports.allRoles = exports.ViewerRole = exports.EditorRole = exports.ManagerRole = exports.AdminRole = exports.UserRole = void 0;
3
+ exports.UpdateUserAccessRequestBody = exports.InviteUserRequestBody = exports.UpdateUserRequestBody = exports.CreateUserRequestBody = exports.UserIdRequestParams = exports.UserUpdate = exports.UserCreate = exports.UserExtended = exports.User = exports.UpdateUserAccount = exports.CreateUserAccount = exports.UserAccountExtended = exports.UserAccount = exports.CreateUserProjects = exports.CreateUserProject = exports.UserProject = exports.allRoles = exports.ViewerRole = exports.EditorRole = exports.ManagerRole = exports.AdminRole = exports.UserRole = void 0;
4
4
  var zod_1 = require("zod");
5
+ var account_type_1 = require("./account.type");
5
6
  var zod_utils_1 = require("./zod-utils");
6
7
  exports.UserRole = zod_1.z.object({
7
8
  id: zod_1.z.string(),
@@ -13,23 +14,21 @@ exports.ManagerRole = { id: '2', hierarchy: 2, name: 'Manager' };
13
14
  exports.EditorRole = { id: '3', hierarchy: 3, name: 'Editor' };
14
15
  exports.ViewerRole = { id: '4', hierarchy: 4, name: 'Viewer' };
15
16
  exports.allRoles = [exports.AdminRole, exports.ManagerRole, exports.EditorRole, exports.ViewerRole];
16
- // User
17
- exports.User = zod_1.z.object({
17
+ // User Project
18
+ exports.UserProject = zod_1.z.object({
18
19
  id: zod_1.z.string(),
19
- username: zod_1.z.string(),
20
- email: zod_1.z.string(),
21
- lastLogin: zod_1.z.date().nullable(),
20
+ userAccountId: zod_1.z.string(),
21
+ projectId: zod_1.z.string(),
22
22
  createdAt: zod_utils_1.zodDate,
23
23
  updatedAt: zod_utils_1.zodDate,
24
24
  });
25
- exports.UserCreate = zod_1.z.object({
26
- id: zod_1.z.string().optional(),
27
- username: zod_1.z.string(),
28
- email: zod_1.z.string(),
25
+ exports.CreateUserProject = zod_1.z.object({
26
+ userAccountId: zod_1.z.string(),
27
+ projectId: zod_1.z.string(),
29
28
  });
30
- exports.UserUpdate = zod_1.z.object({
31
- id: zod_1.z.string(),
32
- email: zod_1.z.string().optional(),
29
+ exports.CreateUserProjects = zod_1.z.object({
30
+ userAccountId: zod_1.z.string(),
31
+ projectIds: zod_1.z.array(zod_1.z.string()),
33
32
  });
34
33
  // User Account
35
34
  exports.UserAccount = zod_1.z.object({
@@ -41,6 +40,10 @@ exports.UserAccount = zod_1.z.object({
41
40
  createdAt: zod_utils_1.zodDate,
42
41
  updatedAt: zod_utils_1.zodDate,
43
42
  });
43
+ exports.UserAccountExtended = exports.UserAccount.extend({
44
+ account: account_type_1.Account,
45
+ userProjects: zod_1.z.array(exports.UserProject),
46
+ });
44
47
  exports.CreateUserAccount = zod_1.z.object({
45
48
  userId: zod_1.z.string(),
46
49
  accountId: zod_1.z.string(),
@@ -53,21 +56,26 @@ exports.UpdateUserAccount = zod_1.z.object({
53
56
  allProjects: zod_1.z.boolean().optional(),
54
57
  });
55
58
  // export type UpdateUserAccount = z.infer<typeof UpdateUserAccountWithId | typeof UpdateUserAccountSearch>
56
- // User Project
57
- exports.UserProject = zod_1.z.object({
59
+ // User
60
+ exports.User = zod_1.z.object({
58
61
  id: zod_1.z.string(),
59
- userAccountId: zod_1.z.string(),
60
- projectId: zod_1.z.string(),
62
+ username: zod_1.z.string(),
63
+ email: zod_1.z.string(),
64
+ lastLogin: zod_1.z.date().nullable(),
61
65
  createdAt: zod_utils_1.zodDate,
62
66
  updatedAt: zod_utils_1.zodDate,
63
67
  });
64
- exports.CreateUserProject = zod_1.z.object({
65
- userAccountId: zod_1.z.string(),
66
- projectId: zod_1.z.string(),
68
+ exports.UserExtended = exports.User.extend({
69
+ userAccounts: zod_1.z.array(exports.UserAccountExtended),
67
70
  });
68
- exports.CreateUserProjects = zod_1.z.object({
69
- userAccountId: zod_1.z.string(),
70
- projectIds: zod_1.z.array(zod_1.z.string()),
71
+ exports.UserCreate = zod_1.z.object({
72
+ id: zod_1.z.string().optional(),
73
+ username: zod_1.z.string(),
74
+ email: zod_1.z.string(),
75
+ });
76
+ exports.UserUpdate = zod_1.z.object({
77
+ id: zod_1.z.string(),
78
+ email: zod_1.z.string().optional(),
71
79
  });
72
80
  // Request
73
81
  exports.UserIdRequestParams = zod_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-arreya-types",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "private": false,