@happyvertical/smrt-support 0.40.69 → 0.41.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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-support",
5
- "packageVersion": "0.40.69",
5
+ "packageVersion": "0.41.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-support:ServiceTimeEntry": {
8
8
  "name": "servicetimeentry",
@@ -185,7 +185,12 @@
185
185
  },
186
186
  "tenantScoped": {
187
187
  "mode": "optional"
188
- }
188
+ },
189
+ "conflictColumns": [
190
+ "tenant_id",
191
+ "slug",
192
+ "context"
193
+ ]
189
194
  },
190
195
  "extends": "ServiceTimeEntry",
191
196
  "exportName": "ServiceTimeEntry",
@@ -355,19 +360,63 @@
355
360
  }
356
361
  },
357
362
  "indexes": [
358
- {
359
- "name": "service_time_entries_id_idx",
360
- "columns": [
361
- "id"
362
- ]
363
- },
364
363
  {
365
364
  "name": "service_time_entries_slug_context_idx",
366
365
  "columns": [
366
+ "tenant_id",
367
367
  "slug",
368
368
  "context"
369
369
  ],
370
370
  "unique": true
371
+ },
372
+ {
373
+ "name": "service_time_entries_tenant_id_created_at_idx",
374
+ "columns": [
375
+ "tenant_id",
376
+ "created_at"
377
+ ]
378
+ },
379
+ {
380
+ "name": "service_time_entries_case_id_idx",
381
+ "columns": [
382
+ "case_id"
383
+ ]
384
+ },
385
+ {
386
+ "name": "service_time_entries_specialist_id_idx",
387
+ "columns": [
388
+ "specialist_id"
389
+ ]
390
+ },
391
+ {
392
+ "name": "service_time_entries_participant_profile_id_idx",
393
+ "columns": [
394
+ "participant_profile_id"
395
+ ]
396
+ },
397
+ {
398
+ "name": "service_time_entries_submitted_by_profile_id_idx",
399
+ "columns": [
400
+ "submitted_by_profile_id"
401
+ ]
402
+ },
403
+ {
404
+ "name": "service_time_entries_approved_by_profile_id_idx",
405
+ "columns": [
406
+ "approved_by_profile_id"
407
+ ]
408
+ },
409
+ {
410
+ "name": "service_time_entries_rejected_by_profile_id_idx",
411
+ "columns": [
412
+ "rejected_by_profile_id"
413
+ ]
414
+ },
415
+ {
416
+ "name": "service_time_entries_correction_of_id_idx",
417
+ "columns": [
418
+ "correction_of_id"
419
+ ]
371
420
  }
372
421
  ],
373
422
  "version": "9367aec5"
@@ -457,12 +506,6 @@
457
506
  }
458
507
  },
459
508
  "indexes": [
460
- {
461
- "name": "service_time_entries_id_idx",
462
- "columns": [
463
- "id"
464
- ]
465
- },
466
509
  {
467
510
  "name": "service_time_entries_slug_context_idx",
468
511
  "columns": [
@@ -470,6 +513,12 @@
470
513
  "context"
471
514
  ],
472
515
  "unique": true
516
+ },
517
+ {
518
+ "name": "service_time_entries_created_at_idx",
519
+ "columns": [
520
+ "created_at"
521
+ ]
473
522
  }
474
523
  ],
475
524
  "version": "d9c34ac0"
@@ -670,7 +719,12 @@
670
719
  },
671
720
  "tenantScoped": {
672
721
  "mode": "optional"
673
- }
722
+ },
723
+ "conflictColumns": [
724
+ "tenant_id",
725
+ "slug",
726
+ "context"
727
+ ]
674
728
  },
675
729
  "extends": "SmrtObject",
676
730
  "exportName": "SupportAiRun",
@@ -797,19 +851,39 @@
797
851
  }
798
852
  },
799
853
  "indexes": [
800
- {
801
- "name": "support_ai_runs_id_idx",
802
- "columns": [
803
- "id"
804
- ]
805
- },
806
854
  {
807
855
  "name": "support_ai_runs_slug_context_idx",
808
856
  "columns": [
857
+ "tenant_id",
809
858
  "slug",
810
859
  "context"
811
860
  ],
812
861
  "unique": true
862
+ },
863
+ {
864
+ "name": "support_ai_runs_tenant_id_created_at_idx",
865
+ "columns": [
866
+ "tenant_id",
867
+ "created_at"
868
+ ]
869
+ },
870
+ {
871
+ "name": "support_ai_runs_case_id_idx",
872
+ "columns": [
873
+ "case_id"
874
+ ]
875
+ },
876
+ {
877
+ "name": "support_ai_runs_interaction_id_idx",
878
+ "columns": [
879
+ "interaction_id"
880
+ ]
881
+ },
882
+ {
883
+ "name": "support_ai_runs_response_interaction_id_idx",
884
+ "columns": [
885
+ "response_interaction_id"
886
+ ]
813
887
  }
814
888
  ],
815
889
  "version": "0caab968"
@@ -877,12 +951,6 @@
877
951
  }
878
952
  },
879
953
  "indexes": [
880
- {
881
- "name": "support_ai_runs_id_idx",
882
- "columns": [
883
- "id"
884
- ]
885
- },
886
954
  {
887
955
  "name": "support_ai_runs_slug_context_idx",
888
956
  "columns": [
@@ -890,6 +958,12 @@
890
958
  "context"
891
959
  ],
892
960
  "unique": true
961
+ },
962
+ {
963
+ "name": "support_ai_runs_created_at_idx",
964
+ "columns": [
965
+ "created_at"
966
+ ]
893
967
  }
894
968
  ],
895
969
  "version": "87728103"
@@ -1008,7 +1082,12 @@
1008
1082
  },
1009
1083
  "tenantScoped": {
1010
1084
  "mode": "optional"
1011
- }
1085
+ },
1086
+ "conflictColumns": [
1087
+ "tenant_id",
1088
+ "slug",
1089
+ "context"
1090
+ ]
1012
1091
  },
1013
1092
  "extends": "SmrtObject",
1014
1093
  "exportName": "SupportCaseEvent",
@@ -1094,19 +1173,33 @@
1094
1173
  }
1095
1174
  },
1096
1175
  "indexes": [
1097
- {
1098
- "name": "support_case_events_id_idx",
1099
- "columns": [
1100
- "id"
1101
- ]
1102
- },
1103
1176
  {
1104
1177
  "name": "support_case_events_slug_context_idx",
1105
1178
  "columns": [
1179
+ "tenant_id",
1106
1180
  "slug",
1107
1181
  "context"
1108
1182
  ],
1109
1183
  "unique": true
1184
+ },
1185
+ {
1186
+ "name": "support_case_events_tenant_id_created_at_idx",
1187
+ "columns": [
1188
+ "tenant_id",
1189
+ "created_at"
1190
+ ]
1191
+ },
1192
+ {
1193
+ "name": "support_case_events_case_id_idx",
1194
+ "columns": [
1195
+ "case_id"
1196
+ ]
1197
+ },
1198
+ {
1199
+ "name": "support_case_events_actor_profile_id_idx",
1200
+ "columns": [
1201
+ "actor_profile_id"
1202
+ ]
1110
1203
  }
1111
1204
  ],
1112
1205
  "version": "cd3fc7c1"
@@ -1179,12 +1272,6 @@
1179
1272
  }
1180
1273
  },
1181
1274
  "indexes": [
1182
- {
1183
- "name": "support_case_events_id_idx",
1184
- "columns": [
1185
- "id"
1186
- ]
1187
- },
1188
1275
  {
1189
1276
  "name": "support_case_events_slug_context_idx",
1190
1277
  "columns": [
@@ -1192,6 +1279,12 @@
1192
1279
  "context"
1193
1280
  ],
1194
1281
  "unique": true
1282
+ },
1283
+ {
1284
+ "name": "support_case_events_created_at_idx",
1285
+ "columns": [
1286
+ "created_at"
1287
+ ]
1195
1288
  }
1196
1289
  ],
1197
1290
  "version": "15415d2b"
@@ -1498,7 +1591,12 @@
1498
1591
  },
1499
1592
  "tenantScoped": {
1500
1593
  "mode": "optional"
1501
- }
1594
+ },
1595
+ "conflictColumns": [
1596
+ "tenant_id",
1597
+ "slug",
1598
+ "context"
1599
+ ]
1502
1600
  },
1503
1601
  "extends": "SmrtObject",
1504
1602
  "exportName": "SupportCase",
@@ -1714,19 +1812,63 @@
1714
1812
  }
1715
1813
  },
1716
1814
  "indexes": [
1717
- {
1718
- "name": "support_cases_id_idx",
1719
- "columns": [
1720
- "id"
1721
- ]
1722
- },
1723
1815
  {
1724
1816
  "name": "support_cases_slug_context_idx",
1725
1817
  "columns": [
1818
+ "tenant_id",
1726
1819
  "slug",
1727
1820
  "context"
1728
1821
  ],
1729
1822
  "unique": true
1823
+ },
1824
+ {
1825
+ "name": "support_cases_tenant_id_created_at_idx",
1826
+ "columns": [
1827
+ "tenant_id",
1828
+ "created_at"
1829
+ ]
1830
+ },
1831
+ {
1832
+ "name": "support_cases_client_profile_id_idx",
1833
+ "columns": [
1834
+ "client_profile_id"
1835
+ ]
1836
+ },
1837
+ {
1838
+ "name": "support_cases_opened_by_profile_id_idx",
1839
+ "columns": [
1840
+ "opened_by_profile_id"
1841
+ ]
1842
+ },
1843
+ {
1844
+ "name": "support_cases_binding_id_idx",
1845
+ "columns": [
1846
+ "binding_id"
1847
+ ]
1848
+ },
1849
+ {
1850
+ "name": "support_cases_plan_id_idx",
1851
+ "columns": [
1852
+ "plan_id"
1853
+ ]
1854
+ },
1855
+ {
1856
+ "name": "support_cases_assigned_specialist_id_idx",
1857
+ "columns": [
1858
+ "assigned_specialist_id"
1859
+ ]
1860
+ },
1861
+ {
1862
+ "name": "support_cases_preferred_specialist_id_idx",
1863
+ "columns": [
1864
+ "preferred_specialist_id"
1865
+ ]
1866
+ },
1867
+ {
1868
+ "name": "support_cases_resolved_by_profile_id_idx",
1869
+ "columns": [
1870
+ "resolved_by_profile_id"
1871
+ ]
1730
1872
  }
1731
1873
  ],
1732
1874
  "version": "f9609447"
@@ -1813,12 +1955,6 @@
1813
1955
  }
1814
1956
  },
1815
1957
  "indexes": [
1816
- {
1817
- "name": "support_cases_id_idx",
1818
- "columns": [
1819
- "id"
1820
- ]
1821
- },
1822
1958
  {
1823
1959
  "name": "support_cases_slug_context_idx",
1824
1960
  "columns": [
@@ -1826,6 +1962,12 @@
1826
1962
  "context"
1827
1963
  ],
1828
1964
  "unique": true
1965
+ },
1966
+ {
1967
+ "name": "support_cases_created_at_idx",
1968
+ "columns": [
1969
+ "created_at"
1970
+ ]
1829
1971
  }
1830
1972
  ],
1831
1973
  "version": "a0ea314b"
@@ -2093,12 +2235,6 @@
2093
2235
  }
2094
2236
  },
2095
2237
  "indexes": [
2096
- {
2097
- "name": "support_channel_bindings_id_idx",
2098
- "columns": [
2099
- "id"
2100
- ]
2101
- },
2102
2238
  {
2103
2239
  "name": "support_channel_bindings_target_type_target_id_idx",
2104
2240
  "columns": [
@@ -2106,6 +2242,32 @@
2106
2242
  "target_id"
2107
2243
  ],
2108
2244
  "unique": true
2245
+ },
2246
+ {
2247
+ "name": "support_channel_bindings_slug_context_idx",
2248
+ "columns": [
2249
+ "slug",
2250
+ "context"
2251
+ ]
2252
+ },
2253
+ {
2254
+ "name": "support_channel_bindings_tenant_id_created_at_idx",
2255
+ "columns": [
2256
+ "tenant_id",
2257
+ "created_at"
2258
+ ]
2259
+ },
2260
+ {
2261
+ "name": "support_channel_bindings_client_profile_id_idx",
2262
+ "columns": [
2263
+ "client_profile_id"
2264
+ ]
2265
+ },
2266
+ {
2267
+ "name": "support_channel_bindings_plan_id_idx",
2268
+ "columns": [
2269
+ "plan_id"
2270
+ ]
2109
2271
  }
2110
2272
  ],
2111
2273
  "version": "eb6f0d2e"
@@ -2178,12 +2340,6 @@
2178
2340
  }
2179
2341
  },
2180
2342
  "indexes": [
2181
- {
2182
- "name": "support_channel_bindings_id_idx",
2183
- "columns": [
2184
- "id"
2185
- ]
2186
- },
2187
2343
  {
2188
2344
  "name": "support_channel_bindings_slug_context_idx",
2189
2345
  "columns": [
@@ -2191,6 +2347,12 @@
2191
2347
  "context"
2192
2348
  ],
2193
2349
  "unique": true
2350
+ },
2351
+ {
2352
+ "name": "support_channel_bindings_created_at_idx",
2353
+ "columns": [
2354
+ "created_at"
2355
+ ]
2194
2356
  }
2195
2357
  ],
2196
2358
  "version": "662a042a"
@@ -2411,12 +2573,6 @@
2411
2573
  }
2412
2574
  },
2413
2575
  "indexes": [
2414
- {
2415
- "name": "support_compensation_plans_id_idx",
2416
- "columns": [
2417
- "id"
2418
- ]
2419
- },
2420
2576
  {
2421
2577
  "name": "support_compensation_plans_tenant_id_specialist_id_idx",
2422
2578
  "columns": [
@@ -2425,6 +2581,26 @@
2425
2581
  "effective_from"
2426
2582
  ],
2427
2583
  "unique": true
2584
+ },
2585
+ {
2586
+ "name": "support_compensation_plans_slug_context_idx",
2587
+ "columns": [
2588
+ "slug",
2589
+ "context"
2590
+ ]
2591
+ },
2592
+ {
2593
+ "name": "support_compensation_plans_tenant_id_created_at_idx",
2594
+ "columns": [
2595
+ "tenant_id",
2596
+ "created_at"
2597
+ ]
2598
+ },
2599
+ {
2600
+ "name": "support_compensation_plans_specialist_id_idx",
2601
+ "columns": [
2602
+ "specialist_id"
2603
+ ]
2428
2604
  }
2429
2605
  ],
2430
2606
  "version": "818494af"
@@ -2502,12 +2678,6 @@
2502
2678
  }
2503
2679
  },
2504
2680
  "indexes": [
2505
- {
2506
- "name": "support_compensation_plans_id_idx",
2507
- "columns": [
2508
- "id"
2509
- ]
2510
- },
2511
2681
  {
2512
2682
  "name": "support_compensation_plans_slug_context_idx",
2513
2683
  "columns": [
@@ -2515,6 +2685,12 @@
2515
2685
  "context"
2516
2686
  ],
2517
2687
  "unique": true
2688
+ },
2689
+ {
2690
+ "name": "support_compensation_plans_created_at_idx",
2691
+ "columns": [
2692
+ "created_at"
2693
+ ]
2518
2694
  }
2519
2695
  ],
2520
2696
  "version": "121b3db1"
@@ -2776,18 +2952,38 @@
2776
2952
  }
2777
2953
  },
2778
2954
  "indexes": [
2779
- {
2780
- "name": "support_interactions_id_idx",
2781
- "columns": [
2782
- "id"
2783
- ]
2784
- },
2785
2955
  {
2786
2956
  "name": "support_interactions_source_key_idx",
2787
2957
  "columns": [
2788
2958
  "source_key"
2789
2959
  ],
2790
2960
  "unique": true
2961
+ },
2962
+ {
2963
+ "name": "support_interactions_slug_context_idx",
2964
+ "columns": [
2965
+ "slug",
2966
+ "context"
2967
+ ]
2968
+ },
2969
+ {
2970
+ "name": "support_interactions_tenant_id_created_at_idx",
2971
+ "columns": [
2972
+ "tenant_id",
2973
+ "created_at"
2974
+ ]
2975
+ },
2976
+ {
2977
+ "name": "support_interactions_case_id_idx",
2978
+ "columns": [
2979
+ "case_id"
2980
+ ]
2981
+ },
2982
+ {
2983
+ "name": "support_interactions_author_profile_id_idx",
2984
+ "columns": [
2985
+ "author_profile_id"
2986
+ ]
2791
2987
  }
2792
2988
  ],
2793
2989
  "version": "5e5f214e"
@@ -2883,12 +3079,6 @@
2883
3079
  }
2884
3080
  },
2885
3081
  "indexes": [
2886
- {
2887
- "name": "support_interactions_id_idx",
2888
- "columns": [
2889
- "id"
2890
- ]
2891
- },
2892
3082
  {
2893
3083
  "name": "support_interactions_slug_context_idx",
2894
3084
  "columns": [
@@ -2896,6 +3086,12 @@
2896
3086
  "context"
2897
3087
  ],
2898
3088
  "unique": true
3089
+ },
3090
+ {
3091
+ "name": "support_interactions_created_at_idx",
3092
+ "columns": [
3093
+ "created_at"
3094
+ ]
2899
3095
  }
2900
3096
  ],
2901
3097
  "version": "b1c57eb7"
@@ -2988,7 +3184,7 @@
2988
3184
  "_meta": {}
2989
3185
  },
2990
3186
  "availabilityFeeAmount": {
2991
- "type": "decimal",
3187
+ "type": "integer",
2992
3188
  "required": false,
2993
3189
  "default": 0
2994
3190
  },
@@ -3283,7 +3479,7 @@
3283
3479
  "collectionExportName": "SupportPlanCollection",
3284
3480
  "schema": {
3285
3481
  "tableName": "support_plans",
3286
- "ddl": "CREATE TABLE IF NOT EXISTS \"support_plans\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"plan_key\" TEXT,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT,\n \"status\" TEXT,\n \"channels\" TEXT,\n \"timezone\" TEXT,\n \"coverage\" TEXT,\n \"holidays\" TEXT,\n \"severity_definitions\" TEXT,\n \"targets\" TEXT,\n \"pause_statuses\" TEXT,\n \"escalation_policy\" TEXT,\n \"availability_fee_amount\" REAL DEFAULT 0,\n \"currency\" TEXT,\n \"included_minutes\" INTEGER DEFAULT 0,\n \"overage_hourly_rate\" REAL DEFAULT 0,\n \"on_call_hourly_rate\" REAL DEFAULT 0,\n \"time_approval_policy\" TEXT,\n \"subscription_plan_key\" TEXT,\n \"metadata\" TEXT\n);",
3482
+ "ddl": "CREATE TABLE IF NOT EXISTS \"support_plans\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"plan_key\" TEXT,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT,\n \"status\" TEXT,\n \"channels\" TEXT,\n \"timezone\" TEXT,\n \"coverage\" TEXT,\n \"holidays\" TEXT,\n \"severity_definitions\" TEXT,\n \"targets\" TEXT,\n \"pause_statuses\" TEXT,\n \"escalation_policy\" TEXT,\n \"availability_fee_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT,\n \"included_minutes\" INTEGER DEFAULT 0,\n \"overage_hourly_rate\" REAL DEFAULT 0,\n \"on_call_hourly_rate\" REAL DEFAULT 0,\n \"time_approval_policy\" TEXT,\n \"subscription_plan_key\" TEXT,\n \"metadata\" TEXT\n);",
3287
3483
  "columns": {
3288
3484
  "id": {
3289
3485
  "type": "UUID",
@@ -3378,7 +3574,7 @@
3378
3574
  "unique": false
3379
3575
  },
3380
3576
  "availability_fee_amount": {
3381
- "type": "REAL",
3577
+ "type": "INTEGER",
3382
3578
  "notNull": false,
3383
3579
  "unique": false,
3384
3580
  "default": 0
@@ -3423,12 +3619,6 @@
3423
3619
  }
3424
3620
  },
3425
3621
  "indexes": [
3426
- {
3427
- "name": "support_plans_id_idx",
3428
- "columns": [
3429
- "id"
3430
- ]
3431
- },
3432
3622
  {
3433
3623
  "name": "support_plans_tenant_id_plan_key_idx",
3434
3624
  "columns": [
@@ -3436,9 +3626,23 @@
3436
3626
  "plan_key"
3437
3627
  ],
3438
3628
  "unique": true
3629
+ },
3630
+ {
3631
+ "name": "support_plans_slug_context_idx",
3632
+ "columns": [
3633
+ "slug",
3634
+ "context"
3635
+ ]
3636
+ },
3637
+ {
3638
+ "name": "support_plans_tenant_id_created_at_idx",
3639
+ "columns": [
3640
+ "tenant_id",
3641
+ "created_at"
3642
+ ]
3439
3643
  }
3440
3644
  ],
3441
- "version": "b472a876"
3645
+ "version": "492a9cf6"
3442
3646
  }
3443
3647
  },
3444
3648
  "@happyvertical/smrt-support:SupportPlanCollection": {
@@ -3503,12 +3707,6 @@
3503
3707
  }
3504
3708
  },
3505
3709
  "indexes": [
3506
- {
3507
- "name": "support_plans_id_idx",
3508
- "columns": [
3509
- "id"
3510
- ]
3511
- },
3512
3710
  {
3513
3711
  "name": "support_plans_slug_context_idx",
3514
3712
  "columns": [
@@ -3516,6 +3714,12 @@
3516
3714
  "context"
3517
3715
  ],
3518
3716
  "unique": true
3717
+ },
3718
+ {
3719
+ "name": "support_plans_created_at_idx",
3720
+ "columns": [
3721
+ "created_at"
3722
+ ]
3519
3723
  }
3520
3724
  ],
3521
3725
  "version": "a2548347"
@@ -3861,12 +4065,6 @@
3861
4065
  }
3862
4066
  },
3863
4067
  "indexes": [
3864
- {
3865
- "name": "support_policies_id_idx",
3866
- "columns": [
3867
- "id"
3868
- ]
3869
- },
3870
4068
  {
3871
4069
  "name": "support_policies_tenant_id_name_idx",
3872
4070
  "columns": [
@@ -3874,6 +4072,26 @@
3874
4072
  "name"
3875
4073
  ],
3876
4074
  "unique": true
4075
+ },
4076
+ {
4077
+ "name": "support_policies_slug_context_idx",
4078
+ "columns": [
4079
+ "slug",
4080
+ "context"
4081
+ ]
4082
+ },
4083
+ {
4084
+ "name": "support_policies_tenant_id_created_at_idx",
4085
+ "columns": [
4086
+ "tenant_id",
4087
+ "created_at"
4088
+ ]
4089
+ },
4090
+ {
4091
+ "name": "support_policies_plan_id_idx",
4092
+ "columns": [
4093
+ "plan_id"
4094
+ ]
3877
4095
  }
3878
4096
  ],
3879
4097
  "version": "3bdcc3f5"
@@ -3941,12 +4159,6 @@
3941
4159
  }
3942
4160
  },
3943
4161
  "indexes": [
3944
- {
3945
- "name": "support_policies_id_idx",
3946
- "columns": [
3947
- "id"
3948
- ]
3949
- },
3950
4162
  {
3951
4163
  "name": "support_policies_slug_context_idx",
3952
4164
  "columns": [
@@ -3954,6 +4166,12 @@
3954
4166
  "context"
3955
4167
  ],
3956
4168
  "unique": true
4169
+ },
4170
+ {
4171
+ "name": "support_policies_created_at_idx",
4172
+ "columns": [
4173
+ "created_at"
4174
+ ]
3957
4175
  }
3958
4176
  ],
3959
4177
  "version": "555a3403"
@@ -4264,12 +4482,6 @@
4264
4482
  }
4265
4483
  },
4266
4484
  "indexes": [
4267
- {
4268
- "name": "support_service_targets_id_idx",
4269
- "columns": [
4270
- "id"
4271
- ]
4272
- },
4273
4485
  {
4274
4486
  "name": "support_service_targets_case_id_target_type_idx",
4275
4487
  "columns": [
@@ -4278,6 +4490,20 @@
4278
4490
  "cycle"
4279
4491
  ],
4280
4492
  "unique": true
4493
+ },
4494
+ {
4495
+ "name": "support_service_targets_slug_context_idx",
4496
+ "columns": [
4497
+ "slug",
4498
+ "context"
4499
+ ]
4500
+ },
4501
+ {
4502
+ "name": "support_service_targets_tenant_id_created_at_idx",
4503
+ "columns": [
4504
+ "tenant_id",
4505
+ "created_at"
4506
+ ]
4281
4507
  }
4282
4508
  ],
4283
4509
  "version": "8af54dc4"
@@ -4364,12 +4590,6 @@
4364
4590
  }
4365
4591
  },
4366
4592
  "indexes": [
4367
- {
4368
- "name": "support_service_targets_id_idx",
4369
- "columns": [
4370
- "id"
4371
- ]
4372
- },
4373
4593
  {
4374
4594
  "name": "support_service_targets_slug_context_idx",
4375
4595
  "columns": [
@@ -4377,6 +4597,12 @@
4377
4597
  "context"
4378
4598
  ],
4379
4599
  "unique": true
4600
+ },
4601
+ {
4602
+ "name": "support_service_targets_created_at_idx",
4603
+ "columns": [
4604
+ "created_at"
4605
+ ]
4380
4606
  }
4381
4607
  ],
4382
4608
  "version": "f201a103"
@@ -4512,7 +4738,12 @@
4512
4738
  },
4513
4739
  "tenantScoped": {
4514
4740
  "mode": "optional"
4515
- }
4741
+ },
4742
+ "conflictColumns": [
4743
+ "tenant_id",
4744
+ "slug",
4745
+ "context"
4746
+ ]
4516
4747
  },
4517
4748
  "extends": "SmrtObject",
4518
4749
  "exportName": "SupportEscalation",
@@ -4621,19 +4852,45 @@
4621
4852
  }
4622
4853
  },
4623
4854
  "indexes": [
4624
- {
4625
- "name": "support_escalations_id_idx",
4626
- "columns": [
4627
- "id"
4628
- ]
4629
- },
4630
4855
  {
4631
4856
  "name": "support_escalations_slug_context_idx",
4632
4857
  "columns": [
4858
+ "tenant_id",
4633
4859
  "slug",
4634
4860
  "context"
4635
4861
  ],
4636
4862
  "unique": true
4863
+ },
4864
+ {
4865
+ "name": "support_escalations_tenant_id_created_at_idx",
4866
+ "columns": [
4867
+ "tenant_id",
4868
+ "created_at"
4869
+ ]
4870
+ },
4871
+ {
4872
+ "name": "support_escalations_case_id_idx",
4873
+ "columns": [
4874
+ "case_id"
4875
+ ]
4876
+ },
4877
+ {
4878
+ "name": "support_escalations_target_id_idx",
4879
+ "columns": [
4880
+ "target_id"
4881
+ ]
4882
+ },
4883
+ {
4884
+ "name": "support_escalations_from_specialist_id_idx",
4885
+ "columns": [
4886
+ "from_specialist_id"
4887
+ ]
4888
+ },
4889
+ {
4890
+ "name": "support_escalations_to_specialist_id_idx",
4891
+ "columns": [
4892
+ "to_specialist_id"
4893
+ ]
4637
4894
  }
4638
4895
  ],
4639
4896
  "version": "977ea730"
@@ -4701,12 +4958,6 @@
4701
4958
  }
4702
4959
  },
4703
4960
  "indexes": [
4704
- {
4705
- "name": "support_escalations_id_idx",
4706
- "columns": [
4707
- "id"
4708
- ]
4709
- },
4710
4961
  {
4711
4962
  "name": "support_escalations_slug_context_idx",
4712
4963
  "columns": [
@@ -4714,6 +4965,12 @@
4714
4965
  "context"
4715
4966
  ],
4716
4967
  "unique": true
4968
+ },
4969
+ {
4970
+ "name": "support_escalations_created_at_idx",
4971
+ "columns": [
4972
+ "created_at"
4973
+ ]
4717
4974
  }
4718
4975
  ],
4719
4976
  "version": "f9b3556a"
@@ -4764,7 +5021,7 @@
4764
5021
  "related": "SupportPlan"
4765
5022
  },
4766
5023
  "amount": {
4767
- "type": "decimal",
5024
+ "type": "integer",
4768
5025
  "required": false,
4769
5026
  "default": 0
4770
5027
  },
@@ -4866,7 +5123,7 @@
4866
5123
  ],
4867
5124
  "schema": {
4868
5125
  "tableName": "support_charges",
4869
- "ddl": "CREATE TABLE IF NOT EXISTS \"support_charges\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"time_entry_id\" UUID NOT NULL,\n \"case_id\" UUID,\n \"plan_id\" UUID,\n \"amount\" REAL DEFAULT 0,\n \"currency\" TEXT,\n \"billable_seconds\" INTEGER DEFAULT 0,\n \"included_seconds_applied\" INTEGER DEFAULT 0,\n \"rate_snapshot\" TEXT,\n \"status\" TEXT,\n \"finalized_at\" TIMESTAMP,\n \"metadata\" TEXT\n);",
5126
+ "ddl": "CREATE TABLE IF NOT EXISTS \"support_charges\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"time_entry_id\" UUID NOT NULL,\n \"case_id\" UUID,\n \"plan_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT,\n \"billable_seconds\" INTEGER DEFAULT 0,\n \"included_seconds_applied\" INTEGER DEFAULT 0,\n \"rate_snapshot\" TEXT,\n \"status\" TEXT,\n \"finalized_at\" TIMESTAMP,\n \"metadata\" TEXT\n);",
4870
5127
  "columns": {
4871
5128
  "id": {
4872
5129
  "type": "UUID",
@@ -4918,7 +5175,7 @@
4918
5175
  "unique": false
4919
5176
  },
4920
5177
  "amount": {
4921
- "type": "REAL",
5178
+ "type": "INTEGER",
4922
5179
  "notNull": false,
4923
5180
  "unique": false,
4924
5181
  "default": 0
@@ -4962,21 +5219,41 @@
4962
5219
  }
4963
5220
  },
4964
5221
  "indexes": [
4965
- {
4966
- "name": "support_charges_id_idx",
4967
- "columns": [
4968
- "id"
4969
- ]
4970
- },
4971
5222
  {
4972
5223
  "name": "support_charges_time_entry_id_idx",
4973
5224
  "columns": [
4974
5225
  "time_entry_id"
4975
5226
  ],
4976
5227
  "unique": true
5228
+ },
5229
+ {
5230
+ "name": "support_charges_slug_context_idx",
5231
+ "columns": [
5232
+ "slug",
5233
+ "context"
5234
+ ]
5235
+ },
5236
+ {
5237
+ "name": "support_charges_tenant_id_created_at_idx",
5238
+ "columns": [
5239
+ "tenant_id",
5240
+ "created_at"
5241
+ ]
5242
+ },
5243
+ {
5244
+ "name": "support_charges_case_id_idx",
5245
+ "columns": [
5246
+ "case_id"
5247
+ ]
5248
+ },
5249
+ {
5250
+ "name": "support_charges_plan_id_idx",
5251
+ "columns": [
5252
+ "plan_id"
5253
+ ]
4977
5254
  }
4978
5255
  ],
4979
- "version": "80736ce6"
5256
+ "version": "4b8b4db5"
4980
5257
  }
4981
5258
  },
4982
5259
  "@happyvertical/smrt-support:SupportChargeCollection": {
@@ -5055,12 +5332,6 @@
5055
5332
  }
5056
5333
  },
5057
5334
  "indexes": [
5058
- {
5059
- "name": "support_charges_id_idx",
5060
- "columns": [
5061
- "id"
5062
- ]
5063
- },
5064
5335
  {
5065
5336
  "name": "support_charges_slug_context_idx",
5066
5337
  "columns": [
@@ -5068,6 +5339,12 @@
5068
5339
  "context"
5069
5340
  ],
5070
5341
  "unique": true
5342
+ },
5343
+ {
5344
+ "name": "support_charges_created_at_idx",
5345
+ "columns": [
5346
+ "created_at"
5347
+ ]
5071
5348
  }
5072
5349
  ],
5073
5350
  "version": "6853d84d"
@@ -5118,7 +5395,7 @@
5118
5395
  "related": "SupportCompensationPlan"
5119
5396
  },
5120
5397
  "amount": {
5121
- "type": "decimal",
5398
+ "type": "integer",
5122
5399
  "required": false,
5123
5400
  "default": 0
5124
5401
  },
@@ -5215,7 +5492,7 @@
5215
5492
  ],
5216
5493
  "schema": {
5217
5494
  "tableName": "support_compensations",
5218
- "ddl": "CREATE TABLE IF NOT EXISTS \"support_compensations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"time_entry_id\" UUID NOT NULL,\n \"specialist_id\" UUID,\n \"compensation_plan_id\" UUID,\n \"amount\" REAL DEFAULT 0,\n \"currency\" TEXT,\n \"payable_seconds\" INTEGER DEFAULT 0,\n \"rate_snapshot\" TEXT,\n \"status\" TEXT,\n \"finalized_at\" TIMESTAMP,\n \"metadata\" TEXT\n);",
5495
+ "ddl": "CREATE TABLE IF NOT EXISTS \"support_compensations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"time_entry_id\" UUID NOT NULL,\n \"specialist_id\" UUID,\n \"compensation_plan_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT,\n \"payable_seconds\" INTEGER DEFAULT 0,\n \"rate_snapshot\" TEXT,\n \"status\" TEXT,\n \"finalized_at\" TIMESTAMP,\n \"metadata\" TEXT\n);",
5219
5496
  "columns": {
5220
5497
  "id": {
5221
5498
  "type": "UUID",
@@ -5267,7 +5544,7 @@
5267
5544
  "unique": false
5268
5545
  },
5269
5546
  "amount": {
5270
- "type": "REAL",
5547
+ "type": "INTEGER",
5271
5548
  "notNull": false,
5272
5549
  "unique": false,
5273
5550
  "default": 0
@@ -5305,21 +5582,41 @@
5305
5582
  }
5306
5583
  },
5307
5584
  "indexes": [
5308
- {
5309
- "name": "support_compensations_id_idx",
5310
- "columns": [
5311
- "id"
5312
- ]
5313
- },
5314
5585
  {
5315
5586
  "name": "support_compensations_time_entry_id_idx",
5316
5587
  "columns": [
5317
5588
  "time_entry_id"
5318
5589
  ],
5319
5590
  "unique": true
5591
+ },
5592
+ {
5593
+ "name": "support_compensations_slug_context_idx",
5594
+ "columns": [
5595
+ "slug",
5596
+ "context"
5597
+ ]
5598
+ },
5599
+ {
5600
+ "name": "support_compensations_tenant_id_created_at_idx",
5601
+ "columns": [
5602
+ "tenant_id",
5603
+ "created_at"
5604
+ ]
5605
+ },
5606
+ {
5607
+ "name": "support_compensations_specialist_id_idx",
5608
+ "columns": [
5609
+ "specialist_id"
5610
+ ]
5611
+ },
5612
+ {
5613
+ "name": "support_compensations_compensation_plan_id_idx",
5614
+ "columns": [
5615
+ "compensation_plan_id"
5616
+ ]
5320
5617
  }
5321
5618
  ],
5322
- "version": "2ec22878"
5619
+ "version": "1e16b14c"
5323
5620
  }
5324
5621
  },
5325
5622
  "@happyvertical/smrt-support:SupportCompensationCollection": {
@@ -5398,12 +5695,6 @@
5398
5695
  }
5399
5696
  },
5400
5697
  "indexes": [
5401
- {
5402
- "name": "support_compensations_id_idx",
5403
- "columns": [
5404
- "id"
5405
- ]
5406
- },
5407
5698
  {
5408
5699
  "name": "support_compensations_slug_context_idx",
5409
5700
  "columns": [
@@ -5411,6 +5702,12 @@
5411
5702
  "context"
5412
5703
  ],
5413
5704
  "unique": true
5705
+ },
5706
+ {
5707
+ "name": "support_compensations_created_at_idx",
5708
+ "columns": [
5709
+ "created_at"
5710
+ ]
5414
5711
  }
5415
5712
  ],
5416
5713
  "version": "ec88df4e"
@@ -5669,18 +5966,32 @@
5669
5966
  },
5670
5967
  "indexes": [
5671
5968
  {
5672
- "name": "support_specialists_id_idx",
5969
+ "name": "support_specialists_tenant_id_profile_id_idx",
5673
5970
  "columns": [
5674
- "id"
5971
+ "tenant_id",
5972
+ "profile_id"
5973
+ ],
5974
+ "unique": true
5975
+ },
5976
+ {
5977
+ "name": "support_specialists_slug_context_idx",
5978
+ "columns": [
5979
+ "slug",
5980
+ "context"
5675
5981
  ]
5676
5982
  },
5677
5983
  {
5678
- "name": "support_specialists_tenant_id_profile_id_idx",
5984
+ "name": "support_specialists_tenant_id_created_at_idx",
5679
5985
  "columns": [
5680
5986
  "tenant_id",
5987
+ "created_at"
5988
+ ]
5989
+ },
5990
+ {
5991
+ "name": "support_specialists_profile_id_idx",
5992
+ "columns": [
5681
5993
  "profile_id"
5682
- ],
5683
- "unique": true
5994
+ ]
5684
5995
  }
5685
5996
  ],
5686
5997
  "version": "ff5305d3"
@@ -5756,12 +6067,6 @@
5756
6067
  }
5757
6068
  },
5758
6069
  "indexes": [
5759
- {
5760
- "name": "support_specialists_id_idx",
5761
- "columns": [
5762
- "id"
5763
- ]
5764
- },
5765
6070
  {
5766
6071
  "name": "support_specialists_slug_context_idx",
5767
6072
  "columns": [
@@ -5769,6 +6074,12 @@
5769
6074
  "context"
5770
6075
  ],
5771
6076
  "unique": true
6077
+ },
6078
+ {
6079
+ "name": "support_specialists_created_at_idx",
6080
+ "columns": [
6081
+ "created_at"
6082
+ ]
5772
6083
  }
5773
6084
  ],
5774
6085
  "version": "65dfee96"
@@ -5971,12 +6282,6 @@
5971
6282
  }
5972
6283
  },
5973
6284
  "indexes": [
5974
- {
5975
- "name": "support_qualifications_id_idx",
5976
- "columns": [
5977
- "id"
5978
- ]
5979
- },
5980
6285
  {
5981
6286
  "name": "support_qualifications_specialist_id_project_id_idx",
5982
6287
  "columns": [
@@ -5984,6 +6289,26 @@
5984
6289
  "project_id"
5985
6290
  ],
5986
6291
  "unique": true
6292
+ },
6293
+ {
6294
+ "name": "support_qualifications_slug_context_idx",
6295
+ "columns": [
6296
+ "slug",
6297
+ "context"
6298
+ ]
6299
+ },
6300
+ {
6301
+ "name": "support_qualifications_tenant_id_created_at_idx",
6302
+ "columns": [
6303
+ "tenant_id",
6304
+ "created_at"
6305
+ ]
6306
+ },
6307
+ {
6308
+ "name": "support_qualifications_granted_by_profile_id_idx",
6309
+ "columns": [
6310
+ "granted_by_profile_id"
6311
+ ]
5987
6312
  }
5988
6313
  ],
5989
6314
  "version": "7b4f8c26"
@@ -6065,12 +6390,6 @@
6065
6390
  }
6066
6391
  },
6067
6392
  "indexes": [
6068
- {
6069
- "name": "support_qualifications_id_idx",
6070
- "columns": [
6071
- "id"
6072
- ]
6073
- },
6074
6393
  {
6075
6394
  "name": "support_qualifications_slug_context_idx",
6076
6395
  "columns": [
@@ -6078,6 +6397,12 @@
6078
6397
  "context"
6079
6398
  ],
6080
6399
  "unique": true
6400
+ },
6401
+ {
6402
+ "name": "support_qualifications_created_at_idx",
6403
+ "columns": [
6404
+ "created_at"
6405
+ ]
6081
6406
  }
6082
6407
  ],
6083
6408
  "version": "a0c2e59b"
@@ -6179,7 +6504,12 @@
6179
6504
  },
6180
6505
  "tenantScoped": {
6181
6506
  "mode": "optional"
6182
- }
6507
+ },
6508
+ "conflictColumns": [
6509
+ "tenant_id",
6510
+ "slug",
6511
+ "context"
6512
+ ]
6183
6513
  },
6184
6514
  "extends": "SmrtObject",
6185
6515
  "exportName": "SupportAvailability",
@@ -6271,19 +6601,27 @@
6271
6601
  }
6272
6602
  },
6273
6603
  "indexes": [
6274
- {
6275
- "name": "support_availability_windows_id_idx",
6276
- "columns": [
6277
- "id"
6278
- ]
6279
- },
6280
6604
  {
6281
6605
  "name": "support_availability_windows_slug_context_idx",
6282
6606
  "columns": [
6607
+ "tenant_id",
6283
6608
  "slug",
6284
6609
  "context"
6285
6610
  ],
6286
6611
  "unique": true
6612
+ },
6613
+ {
6614
+ "name": "support_availability_windows_tenant_id_created_at_idx",
6615
+ "columns": [
6616
+ "tenant_id",
6617
+ "created_at"
6618
+ ]
6619
+ },
6620
+ {
6621
+ "name": "support_availability_windows_specialist_id_idx",
6622
+ "columns": [
6623
+ "specialist_id"
6624
+ ]
6287
6625
  }
6288
6626
  ],
6289
6627
  "version": "3cb42cd3"
@@ -6351,12 +6689,6 @@
6351
6689
  }
6352
6690
  },
6353
6691
  "indexes": [
6354
- {
6355
- "name": "support_availability_windows_id_idx",
6356
- "columns": [
6357
- "id"
6358
- ]
6359
- },
6360
6692
  {
6361
6693
  "name": "support_availability_windows_slug_context_idx",
6362
6694
  "columns": [
@@ -6364,6 +6696,12 @@
6364
6696
  "context"
6365
6697
  ],
6366
6698
  "unique": true
6699
+ },
6700
+ {
6701
+ "name": "support_availability_windows_created_at_idx",
6702
+ "columns": [
6703
+ "created_at"
6704
+ ]
6367
6705
  }
6368
6706
  ],
6369
6707
  "version": "acd97b79"
@@ -6589,12 +6927,6 @@
6589
6927
  }
6590
6928
  },
6591
6929
  "indexes": [
6592
- {
6593
- "name": "support_work_links_id_idx",
6594
- "columns": [
6595
- "id"
6596
- ]
6597
- },
6598
6930
  {
6599
6931
  "name": "support_work_links_case_id_target_type_idx",
6600
6932
  "columns": [
@@ -6603,6 +6935,20 @@
6603
6935
  "target_id"
6604
6936
  ],
6605
6937
  "unique": true
6938
+ },
6939
+ {
6940
+ "name": "support_work_links_slug_context_idx",
6941
+ "columns": [
6942
+ "slug",
6943
+ "context"
6944
+ ]
6945
+ },
6946
+ {
6947
+ "name": "support_work_links_tenant_id_created_at_idx",
6948
+ "columns": [
6949
+ "tenant_id",
6950
+ "created_at"
6951
+ ]
6606
6952
  }
6607
6953
  ],
6608
6954
  "version": "72accaad"
@@ -6670,12 +7016,6 @@
6670
7016
  }
6671
7017
  },
6672
7018
  "indexes": [
6673
- {
6674
- "name": "support_work_links_id_idx",
6675
- "columns": [
6676
- "id"
6677
- ]
6678
- },
6679
7019
  {
6680
7020
  "name": "support_work_links_slug_context_idx",
6681
7021
  "columns": [
@@ -6683,6 +7023,12 @@
6683
7023
  "context"
6684
7024
  ],
6685
7025
  "unique": true
7026
+ },
7027
+ {
7028
+ "name": "support_work_links_created_at_idx",
7029
+ "columns": [
7030
+ "created_at"
7031
+ ]
6686
7032
  }
6687
7033
  ],
6688
7034
  "version": "d1147c3e"