@nikthegeek/dreamsforlittles-shared 0.1.2 → 0.4.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.
Files changed (73) hide show
  1. package/dist/access.d.ts +360 -12
  2. package/dist/access.js +9 -2
  3. package/dist/access.js.map +1 -1
  4. package/dist/admin.d.ts +821 -169
  5. package/dist/admin.js +33 -2
  6. package/dist/admin.js.map +1 -1
  7. package/dist/analysis.d.ts +12 -12
  8. package/dist/api.d.ts +5 -5
  9. package/dist/app-runtime-users.d.ts +464 -0
  10. package/dist/app-runtime-users.js +64 -0
  11. package/dist/app-runtime-users.js.map +1 -0
  12. package/dist/auth.d.ts +20 -2
  13. package/dist/auth.js +7 -2
  14. package/dist/auth.js.map +1 -1
  15. package/dist/client-notices.d.ts +585 -585
  16. package/dist/coach-acquisition.d.ts +47 -0
  17. package/dist/coach-acquisition.js +45 -0
  18. package/dist/coach-acquisition.js.map +1 -0
  19. package/dist/coach-activity-notifications.d.ts +610 -0
  20. package/dist/coach-activity-notifications.js +179 -0
  21. package/dist/coach-activity-notifications.js.map +1 -0
  22. package/dist/coach-family-chat.d.ts +1658 -0
  23. package/dist/coach-family-chat.js +342 -0
  24. package/dist/coach-family-chat.js.map +1 -0
  25. package/dist/coach-family-chat.test.d.ts +1 -0
  26. package/dist/coach-family-chat.test.js +129 -0
  27. package/dist/coach-family-chat.test.js.map +1 -0
  28. package/dist/coach-growth.d.ts +706 -0
  29. package/dist/coach-growth.js +191 -0
  30. package/dist/coach-growth.js.map +1 -0
  31. package/dist/coach-growth.test.d.ts +1 -0
  32. package/dist/coach-growth.test.js +109 -0
  33. package/dist/coach-growth.test.js.map +1 -0
  34. package/dist/coach-private-notes.d.ts +169 -0
  35. package/dist/coach-private-notes.js +28 -0
  36. package/dist/coach-private-notes.js.map +1 -0
  37. package/dist/coach.d.ts +395 -374
  38. package/dist/coach.js +6 -1
  39. package/dist/coach.js.map +1 -1
  40. package/dist/enums.d.ts +1 -1
  41. package/dist/enums.js +14 -1
  42. package/dist/enums.js.map +1 -1
  43. package/dist/errors.d.ts +18 -4
  44. package/dist/errors.js +42 -0
  45. package/dist/errors.js.map +1 -1
  46. package/dist/family-invitations.d.ts +2 -2
  47. package/dist/family-profile-artifacts.d.ts +43 -31
  48. package/dist/family-profile-artifacts.js +4 -1
  49. package/dist/family-profile-artifacts.js.map +1 -1
  50. package/dist/family.d.ts +3152 -1499
  51. package/dist/family.js +30 -1
  52. package/dist/family.js.map +1 -1
  53. package/dist/geography.d.ts +15 -0
  54. package/dist/geography.js +45 -0
  55. package/dist/geography.js.map +1 -0
  56. package/dist/index.d.ts +8 -0
  57. package/dist/index.js +8 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/invites.d.ts +6 -6
  60. package/dist/mobile-web-releases.d.ts +14 -14
  61. package/dist/native-app-updates.d.ts +339 -0
  62. package/dist/native-app-updates.js +106 -0
  63. package/dist/native-app-updates.js.map +1 -0
  64. package/dist/notification-banners.d.ts +28 -28
  65. package/dist/product-analytics.d.ts +181 -181
  66. package/dist/product-analytics.js +1 -0
  67. package/dist/product-analytics.js.map +1 -1
  68. package/dist/push-devices.d.ts +6 -6
  69. package/dist/realtime.d.ts +12 -12
  70. package/dist/support-tickets.d.ts +28 -28
  71. package/fixtures/coach-family-chat-push-v1.json +104 -0
  72. package/fixtures/coach-family-chat-push-v1.sha256 +1 -0
  73. package/package.json +5 -3
@@ -65,22 +65,22 @@ export declare const supportTicketMessageSchema: z.ZodObject<{
65
65
  id: string;
66
66
  createdAt: string;
67
67
  updatedAt: string;
68
+ body: string;
68
69
  ticketId: string;
69
70
  authorUserId: string;
70
71
  authorName: string;
71
72
  authorRole: "coach" | "system" | "support";
72
- body: string;
73
73
  internal: boolean;
74
74
  authorEmail?: string | null | undefined;
75
75
  }, {
76
76
  id: string;
77
77
  createdAt: string;
78
78
  updatedAt: string;
79
+ body: string;
79
80
  ticketId: string;
80
81
  authorUserId: string;
81
82
  authorName: string;
82
83
  authorRole: "coach" | "system" | "support";
83
- body: string;
84
84
  internal: boolean;
85
85
  authorEmail?: string | null | undefined;
86
86
  }>;
@@ -119,22 +119,22 @@ export declare const supportTicketSchema: z.ZodObject<{
119
119
  id: string;
120
120
  createdAt: string;
121
121
  updatedAt: string;
122
+ body: string;
122
123
  ticketId: string;
123
124
  authorUserId: string;
124
125
  authorName: string;
125
126
  authorRole: "coach" | "system" | "support";
126
- body: string;
127
127
  internal: boolean;
128
128
  authorEmail?: string | null | undefined;
129
129
  }, {
130
130
  id: string;
131
131
  createdAt: string;
132
132
  updatedAt: string;
133
+ body: string;
133
134
  ticketId: string;
134
135
  authorUserId: string;
135
136
  authorName: string;
136
137
  authorRole: "coach" | "system" | "support";
137
- body: string;
138
138
  internal: boolean;
139
139
  authorEmail?: string | null | undefined;
140
140
  }>, "many">;
@@ -147,20 +147,20 @@ export declare const supportTicketSchema: z.ZodObject<{
147
147
  createdByUserId: string;
148
148
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
149
149
  sourceRole: "family" | "coach";
150
- createdByName: string;
151
150
  lastMessageAt: string;
152
151
  messages: {
153
152
  id: string;
154
153
  createdAt: string;
155
154
  updatedAt: string;
155
+ body: string;
156
156
  ticketId: string;
157
157
  authorUserId: string;
158
158
  authorName: string;
159
159
  authorRole: "coach" | "system" | "support";
160
- body: string;
161
160
  internal: boolean;
162
161
  authorEmail?: string | null | undefined;
163
162
  }[];
163
+ createdByName: string;
164
164
  organizationId?: string | null | undefined;
165
165
  resolvedAt?: string | null | undefined;
166
166
  archivedAt?: string | null | undefined;
@@ -179,20 +179,20 @@ export declare const supportTicketSchema: z.ZodObject<{
179
179
  createdByUserId: string;
180
180
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
181
181
  sourceRole: "family" | "coach";
182
- createdByName: string;
183
182
  lastMessageAt: string;
184
183
  messages: {
185
184
  id: string;
186
185
  createdAt: string;
187
186
  updatedAt: string;
187
+ body: string;
188
188
  ticketId: string;
189
189
  authorUserId: string;
190
190
  authorName: string;
191
191
  authorRole: "coach" | "system" | "support";
192
- body: string;
193
192
  internal: boolean;
194
193
  authorEmail?: string | null | undefined;
195
194
  }[];
195
+ createdByName: string;
196
196
  organizationId?: string | null | undefined;
197
197
  resolvedAt?: string | null | undefined;
198
198
  archivedAt?: string | null | undefined;
@@ -239,22 +239,22 @@ export declare const supportTicketResponseSchema: z.ZodObject<{
239
239
  id: string;
240
240
  createdAt: string;
241
241
  updatedAt: string;
242
+ body: string;
242
243
  ticketId: string;
243
244
  authorUserId: string;
244
245
  authorName: string;
245
246
  authorRole: "coach" | "system" | "support";
246
- body: string;
247
247
  internal: boolean;
248
248
  authorEmail?: string | null | undefined;
249
249
  }, {
250
250
  id: string;
251
251
  createdAt: string;
252
252
  updatedAt: string;
253
+ body: string;
253
254
  ticketId: string;
254
255
  authorUserId: string;
255
256
  authorName: string;
256
257
  authorRole: "coach" | "system" | "support";
257
- body: string;
258
258
  internal: boolean;
259
259
  authorEmail?: string | null | undefined;
260
260
  }>, "many">;
@@ -267,20 +267,20 @@ export declare const supportTicketResponseSchema: z.ZodObject<{
267
267
  createdByUserId: string;
268
268
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
269
269
  sourceRole: "family" | "coach";
270
- createdByName: string;
271
270
  lastMessageAt: string;
272
271
  messages: {
273
272
  id: string;
274
273
  createdAt: string;
275
274
  updatedAt: string;
275
+ body: string;
276
276
  ticketId: string;
277
277
  authorUserId: string;
278
278
  authorName: string;
279
279
  authorRole: "coach" | "system" | "support";
280
- body: string;
281
280
  internal: boolean;
282
281
  authorEmail?: string | null | undefined;
283
282
  }[];
283
+ createdByName: string;
284
284
  organizationId?: string | null | undefined;
285
285
  resolvedAt?: string | null | undefined;
286
286
  archivedAt?: string | null | undefined;
@@ -299,20 +299,20 @@ export declare const supportTicketResponseSchema: z.ZodObject<{
299
299
  createdByUserId: string;
300
300
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
301
301
  sourceRole: "family" | "coach";
302
- createdByName: string;
303
302
  lastMessageAt: string;
304
303
  messages: {
305
304
  id: string;
306
305
  createdAt: string;
307
306
  updatedAt: string;
307
+ body: string;
308
308
  ticketId: string;
309
309
  authorUserId: string;
310
310
  authorName: string;
311
311
  authorRole: "coach" | "system" | "support";
312
- body: string;
313
312
  internal: boolean;
314
313
  authorEmail?: string | null | undefined;
315
314
  }[];
315
+ createdByName: string;
316
316
  organizationId?: string | null | undefined;
317
317
  resolvedAt?: string | null | undefined;
318
318
  archivedAt?: string | null | undefined;
@@ -333,20 +333,20 @@ export declare const supportTicketResponseSchema: z.ZodObject<{
333
333
  createdByUserId: string;
334
334
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
335
335
  sourceRole: "family" | "coach";
336
- createdByName: string;
337
336
  lastMessageAt: string;
338
337
  messages: {
339
338
  id: string;
340
339
  createdAt: string;
341
340
  updatedAt: string;
341
+ body: string;
342
342
  ticketId: string;
343
343
  authorUserId: string;
344
344
  authorName: string;
345
345
  authorRole: "coach" | "system" | "support";
346
- body: string;
347
346
  internal: boolean;
348
347
  authorEmail?: string | null | undefined;
349
348
  }[];
349
+ createdByName: string;
350
350
  organizationId?: string | null | undefined;
351
351
  resolvedAt?: string | null | undefined;
352
352
  archivedAt?: string | null | undefined;
@@ -367,20 +367,20 @@ export declare const supportTicketResponseSchema: z.ZodObject<{
367
367
  createdByUserId: string;
368
368
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
369
369
  sourceRole: "family" | "coach";
370
- createdByName: string;
371
370
  lastMessageAt: string;
372
371
  messages: {
373
372
  id: string;
374
373
  createdAt: string;
375
374
  updatedAt: string;
375
+ body: string;
376
376
  ticketId: string;
377
377
  authorUserId: string;
378
378
  authorName: string;
379
379
  authorRole: "coach" | "system" | "support";
380
- body: string;
381
380
  internal: boolean;
382
381
  authorEmail?: string | null | undefined;
383
382
  }[];
383
+ createdByName: string;
384
384
  organizationId?: string | null | undefined;
385
385
  resolvedAt?: string | null | undefined;
386
386
  archivedAt?: string | null | undefined;
@@ -428,22 +428,22 @@ export declare const supportTicketsResponseSchema: z.ZodObject<{
428
428
  id: string;
429
429
  createdAt: string;
430
430
  updatedAt: string;
431
+ body: string;
431
432
  ticketId: string;
432
433
  authorUserId: string;
433
434
  authorName: string;
434
435
  authorRole: "coach" | "system" | "support";
435
- body: string;
436
436
  internal: boolean;
437
437
  authorEmail?: string | null | undefined;
438
438
  }, {
439
439
  id: string;
440
440
  createdAt: string;
441
441
  updatedAt: string;
442
+ body: string;
442
443
  ticketId: string;
443
444
  authorUserId: string;
444
445
  authorName: string;
445
446
  authorRole: "coach" | "system" | "support";
446
- body: string;
447
447
  internal: boolean;
448
448
  authorEmail?: string | null | undefined;
449
449
  }>, "many">;
@@ -456,20 +456,20 @@ export declare const supportTicketsResponseSchema: z.ZodObject<{
456
456
  createdByUserId: string;
457
457
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
458
458
  sourceRole: "family" | "coach";
459
- createdByName: string;
460
459
  lastMessageAt: string;
461
460
  messages: {
462
461
  id: string;
463
462
  createdAt: string;
464
463
  updatedAt: string;
464
+ body: string;
465
465
  ticketId: string;
466
466
  authorUserId: string;
467
467
  authorName: string;
468
468
  authorRole: "coach" | "system" | "support";
469
- body: string;
470
469
  internal: boolean;
471
470
  authorEmail?: string | null | undefined;
472
471
  }[];
472
+ createdByName: string;
473
473
  organizationId?: string | null | undefined;
474
474
  resolvedAt?: string | null | undefined;
475
475
  archivedAt?: string | null | undefined;
@@ -488,20 +488,20 @@ export declare const supportTicketsResponseSchema: z.ZodObject<{
488
488
  createdByUserId: string;
489
489
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
490
490
  sourceRole: "family" | "coach";
491
- createdByName: string;
492
491
  lastMessageAt: string;
493
492
  messages: {
494
493
  id: string;
495
494
  createdAt: string;
496
495
  updatedAt: string;
496
+ body: string;
497
497
  ticketId: string;
498
498
  authorUserId: string;
499
499
  authorName: string;
500
500
  authorRole: "coach" | "system" | "support";
501
- body: string;
502
501
  internal: boolean;
503
502
  authorEmail?: string | null | undefined;
504
503
  }[];
504
+ createdByName: string;
505
505
  organizationId?: string | null | undefined;
506
506
  resolvedAt?: string | null | undefined;
507
507
  archivedAt?: string | null | undefined;
@@ -523,20 +523,20 @@ export declare const supportTicketsResponseSchema: z.ZodObject<{
523
523
  createdByUserId: string;
524
524
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
525
525
  sourceRole: "family" | "coach";
526
- createdByName: string;
527
526
  lastMessageAt: string;
528
527
  messages: {
529
528
  id: string;
530
529
  createdAt: string;
531
530
  updatedAt: string;
531
+ body: string;
532
532
  ticketId: string;
533
533
  authorUserId: string;
534
534
  authorName: string;
535
535
  authorRole: "coach" | "system" | "support";
536
- body: string;
537
536
  internal: boolean;
538
537
  authorEmail?: string | null | undefined;
539
538
  }[];
539
+ createdByName: string;
540
540
  organizationId?: string | null | undefined;
541
541
  resolvedAt?: string | null | undefined;
542
542
  archivedAt?: string | null | undefined;
@@ -558,20 +558,20 @@ export declare const supportTicketsResponseSchema: z.ZodObject<{
558
558
  createdByUserId: string;
559
559
  category: "general" | "billing" | "account" | "technical" | "clientAccess";
560
560
  sourceRole: "family" | "coach";
561
- createdByName: string;
562
561
  lastMessageAt: string;
563
562
  messages: {
564
563
  id: string;
565
564
  createdAt: string;
566
565
  updatedAt: string;
566
+ body: string;
567
567
  ticketId: string;
568
568
  authorUserId: string;
569
569
  authorName: string;
570
570
  authorRole: "coach" | "system" | "support";
571
- body: string;
572
571
  internal: boolean;
573
572
  authorEmail?: string | null | undefined;
574
573
  }[];
574
+ createdByName: string;
575
575
  organizationId?: string | null | undefined;
576
576
  resolvedAt?: string | null | undefined;
577
577
  archivedAt?: string | null | undefined;
@@ -0,0 +1,104 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "cases": [
4
+ {
5
+ "name": "family conversation",
6
+ "valid": true,
7
+ "payload": {
8
+ "source": "dreamsforlittles-coach-family-chat",
9
+ "schemaVersion": "1",
10
+ "conversationId": "conversation-family-123",
11
+ "recipientRole": "family"
12
+ },
13
+ "route": "/family/messages/conversation-family-123"
14
+ },
15
+ {
16
+ "name": "coach conversation with encoded opaque id",
17
+ "valid": true,
18
+ "payload": {
19
+ "source": "dreamsforlittles-coach-family-chat",
20
+ "schemaVersion": "1",
21
+ "conversationId": "conversation/coach 123",
22
+ "recipientRole": "coach"
23
+ },
24
+ "route": "/coach/messages/conversation%2Fcoach%20123"
25
+ },
26
+ {
27
+ "name": "unknown source",
28
+ "valid": false,
29
+ "payload": {
30
+ "source": "unexpected-source",
31
+ "schemaVersion": "1",
32
+ "conversationId": "conversation-123",
33
+ "recipientRole": "family"
34
+ }
35
+ },
36
+ {
37
+ "name": "unknown schema version",
38
+ "valid": false,
39
+ "payload": {
40
+ "source": "dreamsforlittles-coach-family-chat",
41
+ "schemaVersion": "2",
42
+ "conversationId": "conversation-123",
43
+ "recipientRole": "family"
44
+ }
45
+ },
46
+ {
47
+ "name": "unsupported recipient role",
48
+ "valid": false,
49
+ "payload": {
50
+ "source": "dreamsforlittles-coach-family-chat",
51
+ "schemaVersion": "1",
52
+ "conversationId": "conversation-123",
53
+ "recipientRole": "owner"
54
+ }
55
+ },
56
+ {
57
+ "name": "blank conversation id",
58
+ "valid": false,
59
+ "payload": {
60
+ "source": "dreamsforlittles-coach-family-chat",
61
+ "schemaVersion": "1",
62
+ "conversationId": " ",
63
+ "recipientRole": "coach"
64
+ }
65
+ },
66
+ {
67
+ "name": "conversation id over 240 characters",
68
+ "valid": false,
69
+ "payload": {
70
+ "source": "dreamsforlittles-coach-family-chat",
71
+ "schemaVersion": "1",
72
+ "conversationId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
73
+ "recipientRole": "family"
74
+ }
75
+ },
76
+ {
77
+ "name": "unexpected preview field",
78
+ "valid": false,
79
+ "payload": {
80
+ "source": "dreamsforlittles-coach-family-chat",
81
+ "schemaVersion": "1",
82
+ "conversationId": "conversation-123",
83
+ "recipientRole": "family",
84
+ "messagePreview": "private content"
85
+ }
86
+ },
87
+ {
88
+ "name": "arbitrary route field",
89
+ "valid": false,
90
+ "payload": {
91
+ "source": "dreamsforlittles-coach-family-chat",
92
+ "schemaVersion": "1",
93
+ "conversationId": "conversation-123",
94
+ "recipientRole": "family",
95
+ "route": "/owner"
96
+ }
97
+ },
98
+ {
99
+ "name": "non-object payload",
100
+ "valid": false,
101
+ "payload": "dreamsforlittles-coach-family-chat"
102
+ }
103
+ ]
104
+ }
@@ -0,0 +1 @@
1
+ e94c89b8790ebe2abd54d5d19d8c4995f323b3428ac91b26a9f04756f745b8cf
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nikthegeek/dreamsforlittles-shared",
3
3
  "private": false,
4
- "version": "0.1.2",
4
+ "version": "0.4.1",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,14 +18,16 @@
18
18
  },
19
19
  "scripts": {
20
20
  "build": "tsc -p tsconfig.json",
21
- "typecheck": "tsc -p tsconfig.json --noEmit"
21
+ "typecheck": "tsc -p tsconfig.json --noEmit",
22
+ "test": "vitest run src/*.test.ts"
22
23
  },
23
24
  "dependencies": {
24
25
  "zod": "^3.24.1"
25
26
  },
26
27
  "description": "Shared API contracts, schemas, constants, and permission types for Dreams For Littles.",
27
28
  "files": [
28
- "dist"
29
+ "dist",
30
+ "fixtures"
29
31
  ],
30
32
  "publishConfig": {
31
33
  "access": "public"