@nikthegeek/dreamsforlittles-shared 0.1.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.
@@ -0,0 +1,1342 @@
1
+ import { z } from "zod";
2
+ export declare const actorRolesSchema: z.ZodObject<{
3
+ family: z.ZodBoolean;
4
+ coach: z.ZodBoolean;
5
+ superAdmin: z.ZodBoolean;
6
+ }, "strip", z.ZodTypeAny, {
7
+ family: boolean;
8
+ coach: boolean;
9
+ superAdmin: boolean;
10
+ }, {
11
+ family: boolean;
12
+ coach: boolean;
13
+ superAdmin: boolean;
14
+ }>;
15
+ export declare const publicUserSchema: z.ZodObject<{
16
+ id: z.ZodString;
17
+ authUserId: z.ZodString;
18
+ email: z.ZodString;
19
+ name: z.ZodString;
20
+ defaultRole: z.ZodEnum<["family", "coach", "superAdmin"]>;
21
+ roles: z.ZodObject<{
22
+ family: z.ZodBoolean;
23
+ coach: z.ZodBoolean;
24
+ superAdmin: z.ZodBoolean;
25
+ }, "strip", z.ZodTypeAny, {
26
+ family: boolean;
27
+ coach: boolean;
28
+ superAdmin: boolean;
29
+ }, {
30
+ family: boolean;
31
+ coach: boolean;
32
+ superAdmin: boolean;
33
+ }>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ id: string;
36
+ authUserId: string;
37
+ email: string;
38
+ name: string;
39
+ defaultRole: "family" | "coach" | "superAdmin";
40
+ roles: {
41
+ family: boolean;
42
+ coach: boolean;
43
+ superAdmin: boolean;
44
+ };
45
+ }, {
46
+ id: string;
47
+ authUserId: string;
48
+ email: string;
49
+ name: string;
50
+ defaultRole: "family" | "coach" | "superAdmin";
51
+ roles: {
52
+ family: boolean;
53
+ coach: boolean;
54
+ superAdmin: boolean;
55
+ };
56
+ }>;
57
+ export declare const authenticatedIdentitySchema: z.ZodObject<{
58
+ state: z.ZodLiteral<"authenticated">;
59
+ authUserId: z.ZodString;
60
+ authSessionId: z.ZodOptional<z.ZodString>;
61
+ email: z.ZodOptional<z.ZodString>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ authUserId: string;
64
+ state: "authenticated";
65
+ email?: string | undefined;
66
+ authSessionId?: string | undefined;
67
+ }, {
68
+ authUserId: string;
69
+ state: "authenticated";
70
+ email?: string | undefined;
71
+ authSessionId?: string | undefined;
72
+ }>;
73
+ export declare const onboardingIdentitySchema: z.ZodObject<{
74
+ state: z.ZodLiteral<"onboardingNeeded">;
75
+ authUserId: z.ZodString;
76
+ authSessionId: z.ZodOptional<z.ZodString>;
77
+ email: z.ZodOptional<z.ZodString>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ authUserId: string;
80
+ state: "onboardingNeeded";
81
+ email?: string | undefined;
82
+ authSessionId?: string | undefined;
83
+ }, {
84
+ authUserId: string;
85
+ state: "onboardingNeeded";
86
+ email?: string | undefined;
87
+ authSessionId?: string | undefined;
88
+ }>;
89
+ export declare const authIdentitySchema: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
90
+ state: z.ZodLiteral<"authenticated">;
91
+ authUserId: z.ZodString;
92
+ authSessionId: z.ZodOptional<z.ZodString>;
93
+ email: z.ZodOptional<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ authUserId: string;
96
+ state: "authenticated";
97
+ email?: string | undefined;
98
+ authSessionId?: string | undefined;
99
+ }, {
100
+ authUserId: string;
101
+ state: "authenticated";
102
+ email?: string | undefined;
103
+ authSessionId?: string | undefined;
104
+ }>, z.ZodObject<{
105
+ state: z.ZodLiteral<"onboardingNeeded">;
106
+ authUserId: z.ZodString;
107
+ authSessionId: z.ZodOptional<z.ZodString>;
108
+ email: z.ZodOptional<z.ZodString>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ authUserId: string;
111
+ state: "onboardingNeeded";
112
+ email?: string | undefined;
113
+ authSessionId?: string | undefined;
114
+ }, {
115
+ authUserId: string;
116
+ state: "onboardingNeeded";
117
+ email?: string | undefined;
118
+ authSessionId?: string | undefined;
119
+ }>]>;
120
+ export declare const sessionContextSchema: z.ZodObject<{
121
+ auth: z.ZodObject<{
122
+ state: z.ZodLiteral<"authenticated">;
123
+ authUserId: z.ZodString;
124
+ authSessionId: z.ZodOptional<z.ZodString>;
125
+ email: z.ZodOptional<z.ZodString>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ authUserId: string;
128
+ state: "authenticated";
129
+ email?: string | undefined;
130
+ authSessionId?: string | undefined;
131
+ }, {
132
+ authUserId: string;
133
+ state: "authenticated";
134
+ email?: string | undefined;
135
+ authSessionId?: string | undefined;
136
+ }>;
137
+ actorUser: z.ZodObject<{
138
+ id: z.ZodString;
139
+ authUserId: z.ZodString;
140
+ email: z.ZodString;
141
+ name: z.ZodString;
142
+ defaultRole: z.ZodEnum<["family", "coach", "superAdmin"]>;
143
+ roles: z.ZodObject<{
144
+ family: z.ZodBoolean;
145
+ coach: z.ZodBoolean;
146
+ superAdmin: z.ZodBoolean;
147
+ }, "strip", z.ZodTypeAny, {
148
+ family: boolean;
149
+ coach: boolean;
150
+ superAdmin: boolean;
151
+ }, {
152
+ family: boolean;
153
+ coach: boolean;
154
+ superAdmin: boolean;
155
+ }>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ id: string;
158
+ authUserId: string;
159
+ email: string;
160
+ name: string;
161
+ defaultRole: "family" | "coach" | "superAdmin";
162
+ roles: {
163
+ family: boolean;
164
+ coach: boolean;
165
+ superAdmin: boolean;
166
+ };
167
+ }, {
168
+ id: string;
169
+ authUserId: string;
170
+ email: string;
171
+ name: string;
172
+ defaultRole: "family" | "coach" | "superAdmin";
173
+ roles: {
174
+ family: boolean;
175
+ coach: boolean;
176
+ superAdmin: boolean;
177
+ };
178
+ }>;
179
+ actorRoles: z.ZodObject<{
180
+ family: z.ZodBoolean;
181
+ coach: z.ZodBoolean;
182
+ superAdmin: z.ZodBoolean;
183
+ }, "strip", z.ZodTypeAny, {
184
+ family: boolean;
185
+ coach: boolean;
186
+ superAdmin: boolean;
187
+ }, {
188
+ family: boolean;
189
+ coach: boolean;
190
+ superAdmin: boolean;
191
+ }>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ auth: {
194
+ authUserId: string;
195
+ state: "authenticated";
196
+ email?: string | undefined;
197
+ authSessionId?: string | undefined;
198
+ };
199
+ actorUser: {
200
+ id: string;
201
+ authUserId: string;
202
+ email: string;
203
+ name: string;
204
+ defaultRole: "family" | "coach" | "superAdmin";
205
+ roles: {
206
+ family: boolean;
207
+ coach: boolean;
208
+ superAdmin: boolean;
209
+ };
210
+ };
211
+ actorRoles: {
212
+ family: boolean;
213
+ coach: boolean;
214
+ superAdmin: boolean;
215
+ };
216
+ }, {
217
+ auth: {
218
+ authUserId: string;
219
+ state: "authenticated";
220
+ email?: string | undefined;
221
+ authSessionId?: string | undefined;
222
+ };
223
+ actorUser: {
224
+ id: string;
225
+ authUserId: string;
226
+ email: string;
227
+ name: string;
228
+ defaultRole: "family" | "coach" | "superAdmin";
229
+ roles: {
230
+ family: boolean;
231
+ coach: boolean;
232
+ superAdmin: boolean;
233
+ };
234
+ };
235
+ actorRoles: {
236
+ family: boolean;
237
+ coach: boolean;
238
+ superAdmin: boolean;
239
+ };
240
+ }>;
241
+ export declare const authMeResponseSchema: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
242
+ state: z.ZodLiteral<"authenticated">;
243
+ auth: z.ZodObject<{
244
+ state: z.ZodLiteral<"authenticated">;
245
+ authUserId: z.ZodString;
246
+ authSessionId: z.ZodOptional<z.ZodString>;
247
+ email: z.ZodOptional<z.ZodString>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ authUserId: string;
250
+ state: "authenticated";
251
+ email?: string | undefined;
252
+ authSessionId?: string | undefined;
253
+ }, {
254
+ authUserId: string;
255
+ state: "authenticated";
256
+ email?: string | undefined;
257
+ authSessionId?: string | undefined;
258
+ }>;
259
+ session: z.ZodObject<{
260
+ auth: z.ZodObject<{
261
+ state: z.ZodLiteral<"authenticated">;
262
+ authUserId: z.ZodString;
263
+ authSessionId: z.ZodOptional<z.ZodString>;
264
+ email: z.ZodOptional<z.ZodString>;
265
+ }, "strip", z.ZodTypeAny, {
266
+ authUserId: string;
267
+ state: "authenticated";
268
+ email?: string | undefined;
269
+ authSessionId?: string | undefined;
270
+ }, {
271
+ authUserId: string;
272
+ state: "authenticated";
273
+ email?: string | undefined;
274
+ authSessionId?: string | undefined;
275
+ }>;
276
+ actorUser: z.ZodObject<{
277
+ id: z.ZodString;
278
+ authUserId: z.ZodString;
279
+ email: z.ZodString;
280
+ name: z.ZodString;
281
+ defaultRole: z.ZodEnum<["family", "coach", "superAdmin"]>;
282
+ roles: z.ZodObject<{
283
+ family: z.ZodBoolean;
284
+ coach: z.ZodBoolean;
285
+ superAdmin: z.ZodBoolean;
286
+ }, "strip", z.ZodTypeAny, {
287
+ family: boolean;
288
+ coach: boolean;
289
+ superAdmin: boolean;
290
+ }, {
291
+ family: boolean;
292
+ coach: boolean;
293
+ superAdmin: boolean;
294
+ }>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ id: string;
297
+ authUserId: string;
298
+ email: string;
299
+ name: string;
300
+ defaultRole: "family" | "coach" | "superAdmin";
301
+ roles: {
302
+ family: boolean;
303
+ coach: boolean;
304
+ superAdmin: boolean;
305
+ };
306
+ }, {
307
+ id: string;
308
+ authUserId: string;
309
+ email: string;
310
+ name: string;
311
+ defaultRole: "family" | "coach" | "superAdmin";
312
+ roles: {
313
+ family: boolean;
314
+ coach: boolean;
315
+ superAdmin: boolean;
316
+ };
317
+ }>;
318
+ actorRoles: z.ZodObject<{
319
+ family: z.ZodBoolean;
320
+ coach: z.ZodBoolean;
321
+ superAdmin: z.ZodBoolean;
322
+ }, "strip", z.ZodTypeAny, {
323
+ family: boolean;
324
+ coach: boolean;
325
+ superAdmin: boolean;
326
+ }, {
327
+ family: boolean;
328
+ coach: boolean;
329
+ superAdmin: boolean;
330
+ }>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ auth: {
333
+ authUserId: string;
334
+ state: "authenticated";
335
+ email?: string | undefined;
336
+ authSessionId?: string | undefined;
337
+ };
338
+ actorUser: {
339
+ id: string;
340
+ authUserId: string;
341
+ email: string;
342
+ name: string;
343
+ defaultRole: "family" | "coach" | "superAdmin";
344
+ roles: {
345
+ family: boolean;
346
+ coach: boolean;
347
+ superAdmin: boolean;
348
+ };
349
+ };
350
+ actorRoles: {
351
+ family: boolean;
352
+ coach: boolean;
353
+ superAdmin: boolean;
354
+ };
355
+ }, {
356
+ auth: {
357
+ authUserId: string;
358
+ state: "authenticated";
359
+ email?: string | undefined;
360
+ authSessionId?: string | undefined;
361
+ };
362
+ actorUser: {
363
+ id: string;
364
+ authUserId: string;
365
+ email: string;
366
+ name: string;
367
+ defaultRole: "family" | "coach" | "superAdmin";
368
+ roles: {
369
+ family: boolean;
370
+ coach: boolean;
371
+ superAdmin: boolean;
372
+ };
373
+ };
374
+ actorRoles: {
375
+ family: boolean;
376
+ coach: boolean;
377
+ superAdmin: boolean;
378
+ };
379
+ }>;
380
+ onboardingNeeded: z.ZodLiteral<false>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ state: "authenticated";
383
+ onboardingNeeded: false;
384
+ auth: {
385
+ authUserId: string;
386
+ state: "authenticated";
387
+ email?: string | undefined;
388
+ authSessionId?: string | undefined;
389
+ };
390
+ session: {
391
+ auth: {
392
+ authUserId: string;
393
+ state: "authenticated";
394
+ email?: string | undefined;
395
+ authSessionId?: string | undefined;
396
+ };
397
+ actorUser: {
398
+ id: string;
399
+ authUserId: string;
400
+ email: string;
401
+ name: string;
402
+ defaultRole: "family" | "coach" | "superAdmin";
403
+ roles: {
404
+ family: boolean;
405
+ coach: boolean;
406
+ superAdmin: boolean;
407
+ };
408
+ };
409
+ actorRoles: {
410
+ family: boolean;
411
+ coach: boolean;
412
+ superAdmin: boolean;
413
+ };
414
+ };
415
+ }, {
416
+ state: "authenticated";
417
+ onboardingNeeded: false;
418
+ auth: {
419
+ authUserId: string;
420
+ state: "authenticated";
421
+ email?: string | undefined;
422
+ authSessionId?: string | undefined;
423
+ };
424
+ session: {
425
+ auth: {
426
+ authUserId: string;
427
+ state: "authenticated";
428
+ email?: string | undefined;
429
+ authSessionId?: string | undefined;
430
+ };
431
+ actorUser: {
432
+ id: string;
433
+ authUserId: string;
434
+ email: string;
435
+ name: string;
436
+ defaultRole: "family" | "coach" | "superAdmin";
437
+ roles: {
438
+ family: boolean;
439
+ coach: boolean;
440
+ superAdmin: boolean;
441
+ };
442
+ };
443
+ actorRoles: {
444
+ family: boolean;
445
+ coach: boolean;
446
+ superAdmin: boolean;
447
+ };
448
+ };
449
+ }>, z.ZodObject<{
450
+ state: z.ZodLiteral<"onboardingNeeded">;
451
+ auth: z.ZodObject<{
452
+ state: z.ZodLiteral<"onboardingNeeded">;
453
+ authUserId: z.ZodString;
454
+ authSessionId: z.ZodOptional<z.ZodString>;
455
+ email: z.ZodOptional<z.ZodString>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ authUserId: string;
458
+ state: "onboardingNeeded";
459
+ email?: string | undefined;
460
+ authSessionId?: string | undefined;
461
+ }, {
462
+ authUserId: string;
463
+ state: "onboardingNeeded";
464
+ email?: string | undefined;
465
+ authSessionId?: string | undefined;
466
+ }>;
467
+ session: z.ZodNull;
468
+ onboardingNeeded: z.ZodLiteral<true>;
469
+ }, "strip", z.ZodTypeAny, {
470
+ state: "onboardingNeeded";
471
+ onboardingNeeded: true;
472
+ auth: {
473
+ authUserId: string;
474
+ state: "onboardingNeeded";
475
+ email?: string | undefined;
476
+ authSessionId?: string | undefined;
477
+ };
478
+ session: null;
479
+ }, {
480
+ state: "onboardingNeeded";
481
+ onboardingNeeded: true;
482
+ auth: {
483
+ authUserId: string;
484
+ state: "onboardingNeeded";
485
+ email?: string | undefined;
486
+ authSessionId?: string | undefined;
487
+ };
488
+ session: null;
489
+ }>]>;
490
+ export declare const subjectModeSchema: z.ZodEnum<["self", "coachView", "coachAdminView", "superAdminView"]>;
491
+ export declare const subjectPermissionsSchema: z.ZodObject<{
492
+ canReadActivities: z.ZodBoolean;
493
+ canWriteActivities: z.ZodBoolean;
494
+ canManageSupportDates: z.ZodBoolean;
495
+ canRevokeAssignment: z.ZodBoolean;
496
+ canViewAnalysis: z.ZodBoolean;
497
+ }, "strip", z.ZodTypeAny, {
498
+ canReadActivities: boolean;
499
+ canWriteActivities: boolean;
500
+ canManageSupportDates: boolean;
501
+ canRevokeAssignment: boolean;
502
+ canViewAnalysis: boolean;
503
+ }, {
504
+ canReadActivities: boolean;
505
+ canWriteActivities: boolean;
506
+ canManageSupportDates: boolean;
507
+ canRevokeAssignment: boolean;
508
+ canViewAnalysis: boolean;
509
+ }>;
510
+ export declare const organizationSummarySchema: z.ZodObject<{
511
+ id: z.ZodString;
512
+ name: z.ZodString;
513
+ type: z.ZodEnum<["platformPractice", "independentCoach", "multiCoachPractice", "academy", "partner"]>;
514
+ status: z.ZodEnum<["active", "trialing", "pastDue", "suspended", "archived"]>;
515
+ }, "strip", z.ZodTypeAny, {
516
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
517
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
518
+ id: string;
519
+ name: string;
520
+ }, {
521
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
522
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
523
+ id: string;
524
+ name: string;
525
+ }>;
526
+ export declare const assignmentSummarySchema: z.ZodObject<{
527
+ id: z.ZodString;
528
+ status: z.ZodEnum<["active", "revoked", "transferred", "expired"]>;
529
+ organizationId: z.ZodString;
530
+ coachUserId: z.ZodString;
531
+ familyUserId: z.ZodOptional<z.ZodString>;
532
+ canViewLogs: z.ZodBoolean;
533
+ canEditLogs: z.ZodBoolean;
534
+ canViewAnalysis: z.ZodBoolean;
535
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
536
+ }, "strip", z.ZodTypeAny, {
537
+ status: "active" | "revoked" | "transferred" | "expired";
538
+ id: string;
539
+ canViewAnalysis: boolean;
540
+ organizationId: string;
541
+ coachUserId: string;
542
+ canViewLogs: boolean;
543
+ canEditLogs: boolean;
544
+ familyUserId?: string | undefined;
545
+ revokedAt?: string | null | undefined;
546
+ }, {
547
+ status: "active" | "revoked" | "transferred" | "expired";
548
+ id: string;
549
+ canViewAnalysis: boolean;
550
+ organizationId: string;
551
+ coachUserId: string;
552
+ canViewLogs: boolean;
553
+ canEditLogs: boolean;
554
+ familyUserId?: string | undefined;
555
+ revokedAt?: string | null | undefined;
556
+ }>;
557
+ export declare const premiumDisabledReasonSchema: z.ZodEnum<["none", "expired", "revoked", "billingInactive", "suspendedOrganization", "noEntitlement"]>;
558
+ export declare const premiumAccessResultSchema: z.ZodObject<{
559
+ active: z.ZodBoolean;
560
+ source: z.ZodOptional<z.ZodEnum<["directSubscription", "platformPractice", "coachInvite", "manualComp"]>>;
561
+ entitlementId: z.ZodOptional<z.ZodString>;
562
+ organizationId: z.ZodOptional<z.ZodString>;
563
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
564
+ disabledReason: z.ZodEnum<["none", "expired", "revoked", "billingInactive", "suspendedOrganization", "noEntitlement"]>;
565
+ }, "strip", z.ZodTypeAny, {
566
+ active: boolean;
567
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
568
+ organizationId?: string | undefined;
569
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
570
+ entitlementId?: string | undefined;
571
+ expiresAt?: string | null | undefined;
572
+ }, {
573
+ active: boolean;
574
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
575
+ organizationId?: string | undefined;
576
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
577
+ entitlementId?: string | undefined;
578
+ expiresAt?: string | null | undefined;
579
+ }>;
580
+ export declare const subjectContextSchema: z.ZodObject<{
581
+ subjectUser: z.ZodNullable<z.ZodObject<{
582
+ id: z.ZodString;
583
+ authUserId: z.ZodString;
584
+ email: z.ZodString;
585
+ name: z.ZodString;
586
+ defaultRole: z.ZodEnum<["family", "coach", "superAdmin"]>;
587
+ roles: z.ZodObject<{
588
+ family: z.ZodBoolean;
589
+ coach: z.ZodBoolean;
590
+ superAdmin: z.ZodBoolean;
591
+ }, "strip", z.ZodTypeAny, {
592
+ family: boolean;
593
+ coach: boolean;
594
+ superAdmin: boolean;
595
+ }, {
596
+ family: boolean;
597
+ coach: boolean;
598
+ superAdmin: boolean;
599
+ }>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ id: string;
602
+ authUserId: string;
603
+ email: string;
604
+ name: string;
605
+ defaultRole: "family" | "coach" | "superAdmin";
606
+ roles: {
607
+ family: boolean;
608
+ coach: boolean;
609
+ superAdmin: boolean;
610
+ };
611
+ }, {
612
+ id: string;
613
+ authUserId: string;
614
+ email: string;
615
+ name: string;
616
+ defaultRole: "family" | "coach" | "superAdmin";
617
+ roles: {
618
+ family: boolean;
619
+ coach: boolean;
620
+ superAdmin: boolean;
621
+ };
622
+ }>>;
623
+ mode: z.ZodEnum<["self", "coachView", "coachAdminView", "superAdminView"]>;
624
+ permissions: z.ZodObject<{
625
+ canReadActivities: z.ZodBoolean;
626
+ canWriteActivities: z.ZodBoolean;
627
+ canManageSupportDates: z.ZodBoolean;
628
+ canRevokeAssignment: z.ZodBoolean;
629
+ canViewAnalysis: z.ZodBoolean;
630
+ }, "strip", z.ZodTypeAny, {
631
+ canReadActivities: boolean;
632
+ canWriteActivities: boolean;
633
+ canManageSupportDates: boolean;
634
+ canRevokeAssignment: boolean;
635
+ canViewAnalysis: boolean;
636
+ }, {
637
+ canReadActivities: boolean;
638
+ canWriteActivities: boolean;
639
+ canManageSupportDates: boolean;
640
+ canRevokeAssignment: boolean;
641
+ canViewAnalysis: boolean;
642
+ }>;
643
+ assignment: z.ZodNullable<z.ZodObject<{
644
+ id: z.ZodString;
645
+ status: z.ZodEnum<["active", "revoked", "transferred", "expired"]>;
646
+ organizationId: z.ZodString;
647
+ coachUserId: z.ZodString;
648
+ familyUserId: z.ZodOptional<z.ZodString>;
649
+ canViewLogs: z.ZodBoolean;
650
+ canEditLogs: z.ZodBoolean;
651
+ canViewAnalysis: z.ZodBoolean;
652
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
653
+ }, "strip", z.ZodTypeAny, {
654
+ status: "active" | "revoked" | "transferred" | "expired";
655
+ id: string;
656
+ canViewAnalysis: boolean;
657
+ organizationId: string;
658
+ coachUserId: string;
659
+ canViewLogs: boolean;
660
+ canEditLogs: boolean;
661
+ familyUserId?: string | undefined;
662
+ revokedAt?: string | null | undefined;
663
+ }, {
664
+ status: "active" | "revoked" | "transferred" | "expired";
665
+ id: string;
666
+ canViewAnalysis: boolean;
667
+ organizationId: string;
668
+ coachUserId: string;
669
+ canViewLogs: boolean;
670
+ canEditLogs: boolean;
671
+ familyUserId?: string | undefined;
672
+ revokedAt?: string | null | undefined;
673
+ }>>;
674
+ organization: z.ZodNullable<z.ZodObject<{
675
+ id: z.ZodString;
676
+ name: z.ZodString;
677
+ type: z.ZodEnum<["platformPractice", "independentCoach", "multiCoachPractice", "academy", "partner"]>;
678
+ status: z.ZodEnum<["active", "trialing", "pastDue", "suspended", "archived"]>;
679
+ }, "strip", z.ZodTypeAny, {
680
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
681
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
682
+ id: string;
683
+ name: string;
684
+ }, {
685
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
686
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
687
+ id: string;
688
+ name: string;
689
+ }>>;
690
+ premium: z.ZodObject<{
691
+ active: z.ZodBoolean;
692
+ source: z.ZodOptional<z.ZodEnum<["directSubscription", "platformPractice", "coachInvite", "manualComp"]>>;
693
+ entitlementId: z.ZodOptional<z.ZodString>;
694
+ organizationId: z.ZodOptional<z.ZodString>;
695
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
+ disabledReason: z.ZodEnum<["none", "expired", "revoked", "billingInactive", "suspendedOrganization", "noEntitlement"]>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ active: boolean;
699
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
700
+ organizationId?: string | undefined;
701
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
702
+ entitlementId?: string | undefined;
703
+ expiresAt?: string | null | undefined;
704
+ }, {
705
+ active: boolean;
706
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
707
+ organizationId?: string | undefined;
708
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
709
+ entitlementId?: string | undefined;
710
+ expiresAt?: string | null | undefined;
711
+ }>;
712
+ }, "strip", z.ZodTypeAny, {
713
+ subjectUser: {
714
+ id: string;
715
+ authUserId: string;
716
+ email: string;
717
+ name: string;
718
+ defaultRole: "family" | "coach" | "superAdmin";
719
+ roles: {
720
+ family: boolean;
721
+ coach: boolean;
722
+ superAdmin: boolean;
723
+ };
724
+ } | null;
725
+ mode: "self" | "coachView" | "coachAdminView" | "superAdminView";
726
+ permissions: {
727
+ canReadActivities: boolean;
728
+ canWriteActivities: boolean;
729
+ canManageSupportDates: boolean;
730
+ canRevokeAssignment: boolean;
731
+ canViewAnalysis: boolean;
732
+ };
733
+ assignment: {
734
+ status: "active" | "revoked" | "transferred" | "expired";
735
+ id: string;
736
+ canViewAnalysis: boolean;
737
+ organizationId: string;
738
+ coachUserId: string;
739
+ canViewLogs: boolean;
740
+ canEditLogs: boolean;
741
+ familyUserId?: string | undefined;
742
+ revokedAt?: string | null | undefined;
743
+ } | null;
744
+ organization: {
745
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
746
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
747
+ id: string;
748
+ name: string;
749
+ } | null;
750
+ premium: {
751
+ active: boolean;
752
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
753
+ organizationId?: string | undefined;
754
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
755
+ entitlementId?: string | undefined;
756
+ expiresAt?: string | null | undefined;
757
+ };
758
+ }, {
759
+ subjectUser: {
760
+ id: string;
761
+ authUserId: string;
762
+ email: string;
763
+ name: string;
764
+ defaultRole: "family" | "coach" | "superAdmin";
765
+ roles: {
766
+ family: boolean;
767
+ coach: boolean;
768
+ superAdmin: boolean;
769
+ };
770
+ } | null;
771
+ mode: "self" | "coachView" | "coachAdminView" | "superAdminView";
772
+ permissions: {
773
+ canReadActivities: boolean;
774
+ canWriteActivities: boolean;
775
+ canManageSupportDates: boolean;
776
+ canRevokeAssignment: boolean;
777
+ canViewAnalysis: boolean;
778
+ };
779
+ assignment: {
780
+ status: "active" | "revoked" | "transferred" | "expired";
781
+ id: string;
782
+ canViewAnalysis: boolean;
783
+ organizationId: string;
784
+ coachUserId: string;
785
+ canViewLogs: boolean;
786
+ canEditLogs: boolean;
787
+ familyUserId?: string | undefined;
788
+ revokedAt?: string | null | undefined;
789
+ } | null;
790
+ organization: {
791
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
792
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
793
+ id: string;
794
+ name: string;
795
+ } | null;
796
+ premium: {
797
+ active: boolean;
798
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
799
+ organizationId?: string | undefined;
800
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
801
+ entitlementId?: string | undefined;
802
+ expiresAt?: string | null | undefined;
803
+ };
804
+ }>;
805
+ export declare const resolvedAccessContextSchema: z.ZodObject<{
806
+ session: z.ZodObject<{
807
+ auth: z.ZodObject<{
808
+ state: z.ZodLiteral<"authenticated">;
809
+ authUserId: z.ZodString;
810
+ authSessionId: z.ZodOptional<z.ZodString>;
811
+ email: z.ZodOptional<z.ZodString>;
812
+ }, "strip", z.ZodTypeAny, {
813
+ authUserId: string;
814
+ state: "authenticated";
815
+ email?: string | undefined;
816
+ authSessionId?: string | undefined;
817
+ }, {
818
+ authUserId: string;
819
+ state: "authenticated";
820
+ email?: string | undefined;
821
+ authSessionId?: string | undefined;
822
+ }>;
823
+ actorUser: z.ZodObject<{
824
+ id: z.ZodString;
825
+ authUserId: z.ZodString;
826
+ email: z.ZodString;
827
+ name: z.ZodString;
828
+ defaultRole: z.ZodEnum<["family", "coach", "superAdmin"]>;
829
+ roles: z.ZodObject<{
830
+ family: z.ZodBoolean;
831
+ coach: z.ZodBoolean;
832
+ superAdmin: z.ZodBoolean;
833
+ }, "strip", z.ZodTypeAny, {
834
+ family: boolean;
835
+ coach: boolean;
836
+ superAdmin: boolean;
837
+ }, {
838
+ family: boolean;
839
+ coach: boolean;
840
+ superAdmin: boolean;
841
+ }>;
842
+ }, "strip", z.ZodTypeAny, {
843
+ id: string;
844
+ authUserId: string;
845
+ email: string;
846
+ name: string;
847
+ defaultRole: "family" | "coach" | "superAdmin";
848
+ roles: {
849
+ family: boolean;
850
+ coach: boolean;
851
+ superAdmin: boolean;
852
+ };
853
+ }, {
854
+ id: string;
855
+ authUserId: string;
856
+ email: string;
857
+ name: string;
858
+ defaultRole: "family" | "coach" | "superAdmin";
859
+ roles: {
860
+ family: boolean;
861
+ coach: boolean;
862
+ superAdmin: boolean;
863
+ };
864
+ }>;
865
+ actorRoles: z.ZodObject<{
866
+ family: z.ZodBoolean;
867
+ coach: z.ZodBoolean;
868
+ superAdmin: z.ZodBoolean;
869
+ }, "strip", z.ZodTypeAny, {
870
+ family: boolean;
871
+ coach: boolean;
872
+ superAdmin: boolean;
873
+ }, {
874
+ family: boolean;
875
+ coach: boolean;
876
+ superAdmin: boolean;
877
+ }>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ auth: {
880
+ authUserId: string;
881
+ state: "authenticated";
882
+ email?: string | undefined;
883
+ authSessionId?: string | undefined;
884
+ };
885
+ actorUser: {
886
+ id: string;
887
+ authUserId: string;
888
+ email: string;
889
+ name: string;
890
+ defaultRole: "family" | "coach" | "superAdmin";
891
+ roles: {
892
+ family: boolean;
893
+ coach: boolean;
894
+ superAdmin: boolean;
895
+ };
896
+ };
897
+ actorRoles: {
898
+ family: boolean;
899
+ coach: boolean;
900
+ superAdmin: boolean;
901
+ };
902
+ }, {
903
+ auth: {
904
+ authUserId: string;
905
+ state: "authenticated";
906
+ email?: string | undefined;
907
+ authSessionId?: string | undefined;
908
+ };
909
+ actorUser: {
910
+ id: string;
911
+ authUserId: string;
912
+ email: string;
913
+ name: string;
914
+ defaultRole: "family" | "coach" | "superAdmin";
915
+ roles: {
916
+ family: boolean;
917
+ coach: boolean;
918
+ superAdmin: boolean;
919
+ };
920
+ };
921
+ actorRoles: {
922
+ family: boolean;
923
+ coach: boolean;
924
+ superAdmin: boolean;
925
+ };
926
+ }>;
927
+ subject: z.ZodObject<{
928
+ subjectUser: z.ZodNullable<z.ZodObject<{
929
+ id: z.ZodString;
930
+ authUserId: z.ZodString;
931
+ email: z.ZodString;
932
+ name: z.ZodString;
933
+ defaultRole: z.ZodEnum<["family", "coach", "superAdmin"]>;
934
+ roles: z.ZodObject<{
935
+ family: z.ZodBoolean;
936
+ coach: z.ZodBoolean;
937
+ superAdmin: z.ZodBoolean;
938
+ }, "strip", z.ZodTypeAny, {
939
+ family: boolean;
940
+ coach: boolean;
941
+ superAdmin: boolean;
942
+ }, {
943
+ family: boolean;
944
+ coach: boolean;
945
+ superAdmin: boolean;
946
+ }>;
947
+ }, "strip", z.ZodTypeAny, {
948
+ id: string;
949
+ authUserId: string;
950
+ email: string;
951
+ name: string;
952
+ defaultRole: "family" | "coach" | "superAdmin";
953
+ roles: {
954
+ family: boolean;
955
+ coach: boolean;
956
+ superAdmin: boolean;
957
+ };
958
+ }, {
959
+ id: string;
960
+ authUserId: string;
961
+ email: string;
962
+ name: string;
963
+ defaultRole: "family" | "coach" | "superAdmin";
964
+ roles: {
965
+ family: boolean;
966
+ coach: boolean;
967
+ superAdmin: boolean;
968
+ };
969
+ }>>;
970
+ mode: z.ZodEnum<["self", "coachView", "coachAdminView", "superAdminView"]>;
971
+ permissions: z.ZodObject<{
972
+ canReadActivities: z.ZodBoolean;
973
+ canWriteActivities: z.ZodBoolean;
974
+ canManageSupportDates: z.ZodBoolean;
975
+ canRevokeAssignment: z.ZodBoolean;
976
+ canViewAnalysis: z.ZodBoolean;
977
+ }, "strip", z.ZodTypeAny, {
978
+ canReadActivities: boolean;
979
+ canWriteActivities: boolean;
980
+ canManageSupportDates: boolean;
981
+ canRevokeAssignment: boolean;
982
+ canViewAnalysis: boolean;
983
+ }, {
984
+ canReadActivities: boolean;
985
+ canWriteActivities: boolean;
986
+ canManageSupportDates: boolean;
987
+ canRevokeAssignment: boolean;
988
+ canViewAnalysis: boolean;
989
+ }>;
990
+ assignment: z.ZodNullable<z.ZodObject<{
991
+ id: z.ZodString;
992
+ status: z.ZodEnum<["active", "revoked", "transferred", "expired"]>;
993
+ organizationId: z.ZodString;
994
+ coachUserId: z.ZodString;
995
+ familyUserId: z.ZodOptional<z.ZodString>;
996
+ canViewLogs: z.ZodBoolean;
997
+ canEditLogs: z.ZodBoolean;
998
+ canViewAnalysis: z.ZodBoolean;
999
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ status: "active" | "revoked" | "transferred" | "expired";
1002
+ id: string;
1003
+ canViewAnalysis: boolean;
1004
+ organizationId: string;
1005
+ coachUserId: string;
1006
+ canViewLogs: boolean;
1007
+ canEditLogs: boolean;
1008
+ familyUserId?: string | undefined;
1009
+ revokedAt?: string | null | undefined;
1010
+ }, {
1011
+ status: "active" | "revoked" | "transferred" | "expired";
1012
+ id: string;
1013
+ canViewAnalysis: boolean;
1014
+ organizationId: string;
1015
+ coachUserId: string;
1016
+ canViewLogs: boolean;
1017
+ canEditLogs: boolean;
1018
+ familyUserId?: string | undefined;
1019
+ revokedAt?: string | null | undefined;
1020
+ }>>;
1021
+ organization: z.ZodNullable<z.ZodObject<{
1022
+ id: z.ZodString;
1023
+ name: z.ZodString;
1024
+ type: z.ZodEnum<["platformPractice", "independentCoach", "multiCoachPractice", "academy", "partner"]>;
1025
+ status: z.ZodEnum<["active", "trialing", "pastDue", "suspended", "archived"]>;
1026
+ }, "strip", z.ZodTypeAny, {
1027
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
1028
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
1029
+ id: string;
1030
+ name: string;
1031
+ }, {
1032
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
1033
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
1034
+ id: string;
1035
+ name: string;
1036
+ }>>;
1037
+ premium: z.ZodObject<{
1038
+ active: z.ZodBoolean;
1039
+ source: z.ZodOptional<z.ZodEnum<["directSubscription", "platformPractice", "coachInvite", "manualComp"]>>;
1040
+ entitlementId: z.ZodOptional<z.ZodString>;
1041
+ organizationId: z.ZodOptional<z.ZodString>;
1042
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1043
+ disabledReason: z.ZodEnum<["none", "expired", "revoked", "billingInactive", "suspendedOrganization", "noEntitlement"]>;
1044
+ }, "strip", z.ZodTypeAny, {
1045
+ active: boolean;
1046
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
1047
+ organizationId?: string | undefined;
1048
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
1049
+ entitlementId?: string | undefined;
1050
+ expiresAt?: string | null | undefined;
1051
+ }, {
1052
+ active: boolean;
1053
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
1054
+ organizationId?: string | undefined;
1055
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
1056
+ entitlementId?: string | undefined;
1057
+ expiresAt?: string | null | undefined;
1058
+ }>;
1059
+ }, "strip", z.ZodTypeAny, {
1060
+ subjectUser: {
1061
+ id: string;
1062
+ authUserId: string;
1063
+ email: string;
1064
+ name: string;
1065
+ defaultRole: "family" | "coach" | "superAdmin";
1066
+ roles: {
1067
+ family: boolean;
1068
+ coach: boolean;
1069
+ superAdmin: boolean;
1070
+ };
1071
+ } | null;
1072
+ mode: "self" | "coachView" | "coachAdminView" | "superAdminView";
1073
+ permissions: {
1074
+ canReadActivities: boolean;
1075
+ canWriteActivities: boolean;
1076
+ canManageSupportDates: boolean;
1077
+ canRevokeAssignment: boolean;
1078
+ canViewAnalysis: boolean;
1079
+ };
1080
+ assignment: {
1081
+ status: "active" | "revoked" | "transferred" | "expired";
1082
+ id: string;
1083
+ canViewAnalysis: boolean;
1084
+ organizationId: string;
1085
+ coachUserId: string;
1086
+ canViewLogs: boolean;
1087
+ canEditLogs: boolean;
1088
+ familyUserId?: string | undefined;
1089
+ revokedAt?: string | null | undefined;
1090
+ } | null;
1091
+ organization: {
1092
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
1093
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
1094
+ id: string;
1095
+ name: string;
1096
+ } | null;
1097
+ premium: {
1098
+ active: boolean;
1099
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
1100
+ organizationId?: string | undefined;
1101
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
1102
+ entitlementId?: string | undefined;
1103
+ expiresAt?: string | null | undefined;
1104
+ };
1105
+ }, {
1106
+ subjectUser: {
1107
+ id: string;
1108
+ authUserId: string;
1109
+ email: string;
1110
+ name: string;
1111
+ defaultRole: "family" | "coach" | "superAdmin";
1112
+ roles: {
1113
+ family: boolean;
1114
+ coach: boolean;
1115
+ superAdmin: boolean;
1116
+ };
1117
+ } | null;
1118
+ mode: "self" | "coachView" | "coachAdminView" | "superAdminView";
1119
+ permissions: {
1120
+ canReadActivities: boolean;
1121
+ canWriteActivities: boolean;
1122
+ canManageSupportDates: boolean;
1123
+ canRevokeAssignment: boolean;
1124
+ canViewAnalysis: boolean;
1125
+ };
1126
+ assignment: {
1127
+ status: "active" | "revoked" | "transferred" | "expired";
1128
+ id: string;
1129
+ canViewAnalysis: boolean;
1130
+ organizationId: string;
1131
+ coachUserId: string;
1132
+ canViewLogs: boolean;
1133
+ canEditLogs: boolean;
1134
+ familyUserId?: string | undefined;
1135
+ revokedAt?: string | null | undefined;
1136
+ } | null;
1137
+ organization: {
1138
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
1139
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
1140
+ id: string;
1141
+ name: string;
1142
+ } | null;
1143
+ premium: {
1144
+ active: boolean;
1145
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
1146
+ organizationId?: string | undefined;
1147
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
1148
+ entitlementId?: string | undefined;
1149
+ expiresAt?: string | null | undefined;
1150
+ };
1151
+ }>;
1152
+ }, "strip", z.ZodTypeAny, {
1153
+ session: {
1154
+ auth: {
1155
+ authUserId: string;
1156
+ state: "authenticated";
1157
+ email?: string | undefined;
1158
+ authSessionId?: string | undefined;
1159
+ };
1160
+ actorUser: {
1161
+ id: string;
1162
+ authUserId: string;
1163
+ email: string;
1164
+ name: string;
1165
+ defaultRole: "family" | "coach" | "superAdmin";
1166
+ roles: {
1167
+ family: boolean;
1168
+ coach: boolean;
1169
+ superAdmin: boolean;
1170
+ };
1171
+ };
1172
+ actorRoles: {
1173
+ family: boolean;
1174
+ coach: boolean;
1175
+ superAdmin: boolean;
1176
+ };
1177
+ };
1178
+ subject: {
1179
+ subjectUser: {
1180
+ id: string;
1181
+ authUserId: string;
1182
+ email: string;
1183
+ name: string;
1184
+ defaultRole: "family" | "coach" | "superAdmin";
1185
+ roles: {
1186
+ family: boolean;
1187
+ coach: boolean;
1188
+ superAdmin: boolean;
1189
+ };
1190
+ } | null;
1191
+ mode: "self" | "coachView" | "coachAdminView" | "superAdminView";
1192
+ permissions: {
1193
+ canReadActivities: boolean;
1194
+ canWriteActivities: boolean;
1195
+ canManageSupportDates: boolean;
1196
+ canRevokeAssignment: boolean;
1197
+ canViewAnalysis: boolean;
1198
+ };
1199
+ assignment: {
1200
+ status: "active" | "revoked" | "transferred" | "expired";
1201
+ id: string;
1202
+ canViewAnalysis: boolean;
1203
+ organizationId: string;
1204
+ coachUserId: string;
1205
+ canViewLogs: boolean;
1206
+ canEditLogs: boolean;
1207
+ familyUserId?: string | undefined;
1208
+ revokedAt?: string | null | undefined;
1209
+ } | null;
1210
+ organization: {
1211
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
1212
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
1213
+ id: string;
1214
+ name: string;
1215
+ } | null;
1216
+ premium: {
1217
+ active: boolean;
1218
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
1219
+ organizationId?: string | undefined;
1220
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
1221
+ entitlementId?: string | undefined;
1222
+ expiresAt?: string | null | undefined;
1223
+ };
1224
+ };
1225
+ }, {
1226
+ session: {
1227
+ auth: {
1228
+ authUserId: string;
1229
+ state: "authenticated";
1230
+ email?: string | undefined;
1231
+ authSessionId?: string | undefined;
1232
+ };
1233
+ actorUser: {
1234
+ id: string;
1235
+ authUserId: string;
1236
+ email: string;
1237
+ name: string;
1238
+ defaultRole: "family" | "coach" | "superAdmin";
1239
+ roles: {
1240
+ family: boolean;
1241
+ coach: boolean;
1242
+ superAdmin: boolean;
1243
+ };
1244
+ };
1245
+ actorRoles: {
1246
+ family: boolean;
1247
+ coach: boolean;
1248
+ superAdmin: boolean;
1249
+ };
1250
+ };
1251
+ subject: {
1252
+ subjectUser: {
1253
+ id: string;
1254
+ authUserId: string;
1255
+ email: string;
1256
+ name: string;
1257
+ defaultRole: "family" | "coach" | "superAdmin";
1258
+ roles: {
1259
+ family: boolean;
1260
+ coach: boolean;
1261
+ superAdmin: boolean;
1262
+ };
1263
+ } | null;
1264
+ mode: "self" | "coachView" | "coachAdminView" | "superAdminView";
1265
+ permissions: {
1266
+ canReadActivities: boolean;
1267
+ canWriteActivities: boolean;
1268
+ canManageSupportDates: boolean;
1269
+ canRevokeAssignment: boolean;
1270
+ canViewAnalysis: boolean;
1271
+ };
1272
+ assignment: {
1273
+ status: "active" | "revoked" | "transferred" | "expired";
1274
+ id: string;
1275
+ canViewAnalysis: boolean;
1276
+ organizationId: string;
1277
+ coachUserId: string;
1278
+ canViewLogs: boolean;
1279
+ canEditLogs: boolean;
1280
+ familyUserId?: string | undefined;
1281
+ revokedAt?: string | null | undefined;
1282
+ } | null;
1283
+ organization: {
1284
+ type: "platformPractice" | "independentCoach" | "multiCoachPractice" | "academy" | "partner";
1285
+ status: "active" | "trialing" | "pastDue" | "suspended" | "archived";
1286
+ id: string;
1287
+ name: string;
1288
+ } | null;
1289
+ premium: {
1290
+ active: boolean;
1291
+ disabledReason: "revoked" | "expired" | "none" | "billingInactive" | "suspendedOrganization" | "noEntitlement";
1292
+ organizationId?: string | undefined;
1293
+ source?: "platformPractice" | "directSubscription" | "coachInvite" | "manualComp" | undefined;
1294
+ entitlementId?: string | undefined;
1295
+ expiresAt?: string | null | undefined;
1296
+ };
1297
+ };
1298
+ }>;
1299
+ export declare const auditEventSchema: z.ZodObject<{
1300
+ id: z.ZodString;
1301
+ actorUserId: z.ZodString;
1302
+ actorRole: z.ZodUnion<[z.ZodEnum<["family", "coach", "superAdmin"]>, z.ZodLiteral<"system">]>;
1303
+ type: z.ZodString;
1304
+ targetUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1305
+ organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1306
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1307
+ createdAt: z.ZodString;
1308
+ }, "strip", z.ZodTypeAny, {
1309
+ type: string;
1310
+ id: string;
1311
+ actorUserId: string;
1312
+ actorRole: "family" | "coach" | "superAdmin" | "system";
1313
+ createdAt: string;
1314
+ organizationId?: string | null | undefined;
1315
+ targetUserId?: string | null | undefined;
1316
+ metadata?: Record<string, unknown> | undefined;
1317
+ }, {
1318
+ type: string;
1319
+ id: string;
1320
+ actorUserId: string;
1321
+ actorRole: "family" | "coach" | "superAdmin" | "system";
1322
+ createdAt: string;
1323
+ organizationId?: string | null | undefined;
1324
+ targetUserId?: string | null | undefined;
1325
+ metadata?: Record<string, unknown> | undefined;
1326
+ }>;
1327
+ export type ActorRoles = z.infer<typeof actorRolesSchema>;
1328
+ export type PublicUser = z.infer<typeof publicUserSchema>;
1329
+ export type AuthenticatedIdentity = z.infer<typeof authenticatedIdentitySchema>;
1330
+ export type OnboardingIdentity = z.infer<typeof onboardingIdentitySchema>;
1331
+ export type AuthIdentity = z.infer<typeof authIdentitySchema>;
1332
+ export type SessionContext = z.infer<typeof sessionContextSchema>;
1333
+ export type AuthMeResponse = z.infer<typeof authMeResponseSchema>;
1334
+ export type SubjectMode = z.infer<typeof subjectModeSchema>;
1335
+ export type SubjectPermissions = z.infer<typeof subjectPermissionsSchema>;
1336
+ export type OrganizationSummary = z.infer<typeof organizationSummarySchema>;
1337
+ export type AssignmentSummary = z.infer<typeof assignmentSummarySchema>;
1338
+ export type PremiumDisabledReason = z.infer<typeof premiumDisabledReasonSchema>;
1339
+ export type PremiumAccessResult = z.infer<typeof premiumAccessResultSchema>;
1340
+ export type SubjectContext = z.infer<typeof subjectContextSchema>;
1341
+ export type ResolvedAccessContext = z.infer<typeof resolvedAccessContextSchema>;
1342
+ export type AuditEvent = z.infer<typeof auditEventSchema>;