@kelpie/schemas 0.11.0 → 0.13.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.
Files changed (95) hide show
  1. package/dist/account.d.ts +5 -0
  2. package/dist/account.d.ts.map +1 -1
  3. package/dist/account.js +2 -0
  4. package/dist/account.js.map +1 -1
  5. package/dist/address.d.ts +55 -0
  6. package/dist/address.d.ts.map +1 -0
  7. package/dist/address.js +210 -0
  8. package/dist/address.js.map +1 -0
  9. package/dist/apiKeyScopes.d.ts +3 -3
  10. package/dist/apiKeyScopes.d.ts.map +1 -1
  11. package/dist/apiKeyScopes.js +6 -0
  12. package/dist/apiKeyScopes.js.map +1 -1
  13. package/dist/attendance.d.ts +33 -0
  14. package/dist/attendance.d.ts.map +1 -0
  15. package/dist/attendance.js +35 -0
  16. package/dist/attendance.js.map +1 -0
  17. package/dist/company.d.ts +3 -4
  18. package/dist/company.d.ts.map +1 -1
  19. package/dist/company.js +4 -6
  20. package/dist/company.js.map +1 -1
  21. package/dist/countries.d.ts +30 -0
  22. package/dist/countries.d.ts.map +1 -0
  23. package/dist/countries.js +300 -0
  24. package/dist/countries.js.map +1 -0
  25. package/dist/dashboard.d.ts +11 -0
  26. package/dist/dashboard.d.ts.map +1 -1
  27. package/dist/dashboard.js +23 -0
  28. package/dist/dashboard.js.map +1 -1
  29. package/dist/event.d.ts +54 -0
  30. package/dist/event.d.ts.map +1 -0
  31. package/dist/event.js +85 -0
  32. package/dist/event.js.map +1 -0
  33. package/dist/eventAssociation.d.ts +17 -0
  34. package/dist/eventAssociation.d.ts.map +1 -0
  35. package/dist/eventAssociation.js +17 -0
  36. package/dist/eventAssociation.js.map +1 -0
  37. package/dist/form.d.ts +5 -5
  38. package/dist/form.d.ts.map +1 -1
  39. package/dist/form.js +2 -2
  40. package/dist/form.js.map +1 -1
  41. package/dist/formMapTargets.d.ts +1 -1
  42. package/dist/formMapTargets.d.ts.map +1 -1
  43. package/dist/formMapTargets.js +41 -5
  44. package/dist/formMapTargets.js.map +1 -1
  45. package/dist/importExport.d.ts.map +1 -1
  46. package/dist/importExport.js +3 -3
  47. package/dist/importExport.js.map +1 -1
  48. package/dist/index.d.ts +17 -7
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +8 -3
  51. package/dist/index.js.map +1 -1
  52. package/dist/person.d.ts +3 -2
  53. package/dist/person.d.ts.map +1 -1
  54. package/dist/person.js +4 -3
  55. package/dist/person.js.map +1 -1
  56. package/dist/planItem.d.ts +4 -4
  57. package/dist/planItem.d.ts.map +1 -1
  58. package/dist/planItem.js +2 -2
  59. package/dist/planItem.js.map +1 -1
  60. package/dist/publicConfig.d.ts +42 -3
  61. package/dist/publicConfig.d.ts.map +1 -1
  62. package/dist/publicConfig.js +20 -0
  63. package/dist/publicConfig.js.map +1 -1
  64. package/dist/sampleData.d.ts +7 -2
  65. package/dist/sampleData.d.ts.map +1 -1
  66. package/dist/sampleData.js +4 -0
  67. package/dist/sampleData.js.map +1 -1
  68. package/dist/session.d.ts +28 -0
  69. package/dist/session.d.ts.map +1 -1
  70. package/dist/session.js +39 -0
  71. package/dist/session.js.map +1 -1
  72. package/dist/values.d.ts +35 -5
  73. package/dist/values.d.ts.map +1 -1
  74. package/dist/values.js +90 -0
  75. package/dist/values.js.map +1 -1
  76. package/package.json +1 -1
  77. package/src/account.ts +7 -0
  78. package/src/address.ts +287 -0
  79. package/src/apiKeyScopes.ts +6 -0
  80. package/src/attendance.ts +72 -0
  81. package/src/company.ts +7 -10
  82. package/src/countries.ts +320 -0
  83. package/src/dashboard.ts +36 -0
  84. package/src/event.ts +159 -0
  85. package/src/eventAssociation.ts +36 -0
  86. package/src/form.ts +7 -7
  87. package/src/formMapTargets.ts +43 -4
  88. package/src/importExport.ts +3 -3
  89. package/src/index.ts +80 -2
  90. package/src/person.ts +7 -5
  91. package/src/planItem.ts +6 -6
  92. package/src/publicConfig.ts +44 -3
  93. package/src/sampleData.ts +11 -2
  94. package/src/session.ts +76 -0
  95. package/src/values.ts +119 -0
package/src/values.ts CHANGED
@@ -91,8 +91,10 @@ export const EXTENSIBLE_RECORD_TYPES = [
91
91
  'partnership',
92
92
  'raise',
93
93
  'enquiry',
94
+ 'event',
94
95
  'role',
95
96
  'candidate',
97
+ 'attendance',
96
98
  ] as const
97
99
 
98
100
  export type ExtensibleRecordType = (typeof EXTENSIBLE_RECORD_TYPES)[number]
@@ -113,6 +115,8 @@ export const RECORD_TARGET_TYPES = [
113
115
  'raise',
114
116
  'enquiry',
115
117
  'candidate',
118
+ 'event',
119
+ 'attendance',
116
120
  ] as const
117
121
 
118
122
  export type RecordTargetType = (typeof RECORD_TARGET_TYPES)[number]
@@ -127,6 +131,8 @@ export const RECORD_TARGET_TYPE_LABELS: Readonly<Record<RecordTargetType, string
127
131
  raise: 'Raise',
128
132
  enquiry: 'Enquiry',
129
133
  candidate: 'Candidate',
134
+ event: 'Event',
135
+ attendance: 'Attendance',
130
136
  }
131
137
 
132
138
  /**
@@ -150,6 +156,7 @@ export const SEARCH_COLLECTIONS = [
150
156
  'opportunity',
151
157
  'raise',
152
158
  'partnership',
159
+ 'event',
153
160
  'decision',
154
161
  ] as const
155
162
 
@@ -234,6 +241,115 @@ export const PIPELINE_KIND_LABELS: Readonly<Record<PipelineKind, string>> = {
234
241
  partnership: 'Partnership',
235
242
  }
236
243
 
244
+ /**
245
+ * What a Plan item may attach to: the five pipelines plus Event.
246
+ *
247
+ * Event is a calendar object, not a pipeline, but prep work ("send reminder",
248
+ * "record the session") still needs a dated action on the Event itself.
249
+ */
250
+ export const PLAN_ITEM_TARGET_TYPES = [
251
+ 'enquiry',
252
+ 'deal',
253
+ 'opportunity',
254
+ 'raise',
255
+ 'partnership',
256
+ 'event',
257
+ ] as const
258
+
259
+ export type PlanItemTargetType = (typeof PLAN_ITEM_TARGET_TYPES)[number]
260
+
261
+ export const PLAN_ITEM_TARGET_TYPE_LABELS: Readonly<Record<PlanItemTargetType, string>> = {
262
+ enquiry: 'Enquiry',
263
+ deal: 'Deal',
264
+ opportunity: 'Opportunity',
265
+ raise: 'Fundraising',
266
+ partnership: 'Partnership',
267
+ event: 'Event',
268
+ }
269
+
270
+ /**
271
+ * Form attach targets: pipeline records (person_links) plus Event (Attendance).
272
+ */
273
+ export const FORM_ATTACH_TARGET_TYPES = [
274
+ 'enquiry',
275
+ 'deal',
276
+ 'opportunity',
277
+ 'raise',
278
+ 'partnership',
279
+ 'event',
280
+ ] as const
281
+
282
+ export type FormAttachTargetType = (typeof FORM_ATTACH_TARGET_TYPES)[number]
283
+
284
+ /** Where an Event may point besides its own Attendances. */
285
+ export const EVENT_ASSOCIATION_TARGET_TYPES = [
286
+ 'person',
287
+ 'company',
288
+ 'deal',
289
+ 'opportunity',
290
+ 'partnership',
291
+ 'raise',
292
+ 'enquiry',
293
+ 'role',
294
+ 'candidate',
295
+ ] as const
296
+
297
+ export type EventAssociationTargetType = (typeof EVENT_ASSOCIATION_TARGET_TYPES)[number]
298
+
299
+ export const EVENT_ASSOCIATION_TARGET_TYPE_LABELS: Readonly<
300
+ Record<EventAssociationTargetType, string>
301
+ > = {
302
+ person: 'Person',
303
+ company: 'Company',
304
+ deal: 'Deal',
305
+ opportunity: 'Opportunity',
306
+ partnership: 'Partnership',
307
+ raise: 'Raise',
308
+ enquiry: 'Enquiry',
309
+ role: 'Role',
310
+ candidate: 'Candidate',
311
+ }
312
+
313
+ export const EVENT_FORMATS = ['in_person', 'virtual', 'hybrid'] as const
314
+
315
+ export type EventFormat = (typeof EVENT_FORMATS)[number]
316
+
317
+ export const EVENT_FORMAT_LABELS: Readonly<Record<EventFormat, string>> = {
318
+ in_person: 'In person',
319
+ virtual: 'Virtual',
320
+ hybrid: 'Hybrid',
321
+ }
322
+
323
+ export const EVENT_STATUSES = ['draft', 'scheduled', 'cancelled'] as const
324
+
325
+ export type EventStatus = (typeof EVENT_STATUSES)[number]
326
+
327
+ export const EVENT_STATUS_LABELS: Readonly<Record<EventStatus, string>> = {
328
+ draft: 'Draft',
329
+ scheduled: 'Scheduled',
330
+ cancelled: 'Cancelled',
331
+ }
332
+
333
+ export const ATTENDANCE_STATUSES = ['registered', 'attended', 'no_show', 'cancelled'] as const
334
+
335
+ export type AttendanceStatus = (typeof ATTENDANCE_STATUSES)[number]
336
+
337
+ export const ATTENDANCE_STATUS_LABELS: Readonly<Record<AttendanceStatus, string>> = {
338
+ registered: 'Registered',
339
+ attended: 'Attended',
340
+ no_show: 'No-show',
341
+ cancelled: 'Cancelled',
342
+ }
343
+
344
+ export const ATTENDANCE_SOURCES = ['manual', 'form'] as const
345
+
346
+ export type AttendanceSource = (typeof ATTENDANCE_SOURCES)[number]
347
+
348
+ export const ATTENDANCE_SOURCE_LABELS: Readonly<Record<AttendanceSource, string>> = {
349
+ manual: 'Manual',
350
+ form: 'Form',
351
+ }
352
+
237
353
  /**
238
354
  * How far along a plan item is. Stored, never derived: whether something is
239
355
  * overdue is a question about its date, and whether it is finished is a question
@@ -473,6 +589,7 @@ export const AGENT_TASK_TARGET_TYPES = [
473
589
  'partnership',
474
590
  'raise',
475
591
  'enquiry',
592
+ 'event',
476
593
  'candidate',
477
594
  'role',
478
595
  'handbook',
@@ -521,6 +638,7 @@ export const CUSTOM_FIELD_OBJECT_TYPES = [
521
638
  'partnership',
522
639
  'raise',
523
640
  'enquiry',
641
+ 'event',
524
642
  ] as const
525
643
 
526
644
  export type CustomFieldObjectType = (typeof CUSTOM_FIELD_OBJECT_TYPES)[number]
@@ -533,6 +651,7 @@ export const CUSTOM_FIELD_OBJECT_TYPE_LABELS: Readonly<Record<CustomFieldObjectT
533
651
  partnership: 'Partnership',
534
652
  raise: 'Raise',
535
653
  enquiry: 'Enquiry',
654
+ event: 'Event',
536
655
  }
537
656
 
538
657
  /**