@mestra-dev/contract 0.0.310 → 0.0.311

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 (2) hide show
  1. package/dist/index.d.ts +365 -20
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -10357,26 +10357,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10357
10357
  }, "/chat"> | import("hono/types").MergeSchemaPath<{
10358
10358
  "/inbound": {
10359
10359
  $post: {
10360
- input: {
10361
- json: {
10362
- messages: {
10363
- eventId: string;
10364
- roomId: string;
10365
- sender: string;
10366
- channel: string;
10367
- msgtype?: string | undefined;
10368
- text?: string | undefined;
10369
- sentAt?: number | undefined;
10370
- }[];
10371
- };
10372
- };
10373
- output: {
10374
- success: false;
10375
- error: string;
10376
- };
10377
- outputFormat: "json";
10378
- status: 401;
10379
- } | {
10380
10360
  input: {
10381
10361
  json: {
10382
10362
  messages: {
@@ -11621,6 +11601,371 @@ declare const routes: import("hono/hono-base").HonoBase<{
11621
11601
  status: 200;
11622
11602
  };
11623
11603
  };
11604
+ } & {
11605
+ "/:workspace/avg-deal-size": {
11606
+ $get: {
11607
+ input: {
11608
+ query: {
11609
+ from?: string | number | undefined;
11610
+ to?: string | number | undefined;
11611
+ };
11612
+ } & {
11613
+ param: {
11614
+ workspace: string;
11615
+ };
11616
+ };
11617
+ output: {
11618
+ success: false;
11619
+ error: string;
11620
+ };
11621
+ outputFormat: "json";
11622
+ status: 400;
11623
+ } | {
11624
+ input: {
11625
+ query: {
11626
+ from?: string | number | undefined;
11627
+ to?: string | number | undefined;
11628
+ };
11629
+ } & {
11630
+ param: {
11631
+ workspace: string;
11632
+ };
11633
+ };
11634
+ output: {
11635
+ success: false;
11636
+ error: string;
11637
+ };
11638
+ outputFormat: "json";
11639
+ status: 404;
11640
+ } | {
11641
+ input: {
11642
+ query: {
11643
+ from?: string | number | undefined;
11644
+ to?: string | number | undefined;
11645
+ };
11646
+ } & {
11647
+ param: {
11648
+ workspace: string;
11649
+ };
11650
+ };
11651
+ output: {
11652
+ success: true;
11653
+ workspaceId: string;
11654
+ category: string;
11655
+ period: {
11656
+ from: string | null;
11657
+ to: string | null;
11658
+ };
11659
+ previousPeriod: {
11660
+ from: string | null;
11661
+ to: string | null;
11662
+ } | null;
11663
+ currencies: ({
11664
+ growth: null;
11665
+ currency: string;
11666
+ averageDealSizeMinor: number;
11667
+ dealCount: number;
11668
+ } | {
11669
+ growth: {
11670
+ averageDealSizeMinor: {
11671
+ previousValue: number;
11672
+ growthPercentage: number | null;
11673
+ direction: GrowthDirection;
11674
+ };
11675
+ dealCount: {
11676
+ previousValue: number;
11677
+ growthPercentage: number | null;
11678
+ direction: GrowthDirection;
11679
+ };
11680
+ };
11681
+ currency: string;
11682
+ averageDealSizeMinor: number;
11683
+ dealCount: number;
11684
+ })[];
11685
+ };
11686
+ outputFormat: "json";
11687
+ status: 200;
11688
+ };
11689
+ };
11690
+ } & {
11691
+ "/:workspace/lost-deal-reasons": {
11692
+ $get: {
11693
+ input: {
11694
+ query: {
11695
+ from?: string | number | undefined;
11696
+ to?: string | number | undefined;
11697
+ };
11698
+ } & {
11699
+ param: {
11700
+ workspace: string;
11701
+ };
11702
+ };
11703
+ output: {
11704
+ success: false;
11705
+ error: string;
11706
+ };
11707
+ outputFormat: "json";
11708
+ status: 400;
11709
+ } | {
11710
+ input: {
11711
+ query: {
11712
+ from?: string | number | undefined;
11713
+ to?: string | number | undefined;
11714
+ };
11715
+ } & {
11716
+ param: {
11717
+ workspace: string;
11718
+ };
11719
+ };
11720
+ output: {
11721
+ success: false;
11722
+ error: string;
11723
+ };
11724
+ outputFormat: "json";
11725
+ status: 404;
11726
+ } | {
11727
+ input: {
11728
+ query: {
11729
+ from?: string | number | undefined;
11730
+ to?: string | number | undefined;
11731
+ };
11732
+ } & {
11733
+ param: {
11734
+ workspace: string;
11735
+ };
11736
+ };
11737
+ output: {
11738
+ success: true;
11739
+ workspaceId: string;
11740
+ category: string;
11741
+ period: {
11742
+ from: string | null;
11743
+ to: string | null;
11744
+ };
11745
+ lostCount: number;
11746
+ unattributedCount: number;
11747
+ reasons: {
11748
+ share: number;
11749
+ failureReasonId: string;
11750
+ title: string;
11751
+ lostCount: number;
11752
+ }[];
11753
+ };
11754
+ outputFormat: "json";
11755
+ status: 200;
11756
+ };
11757
+ };
11758
+ } & {
11759
+ "/:workspace/first-response-time": {
11760
+ $get: {
11761
+ input: {
11762
+ query: {
11763
+ from?: string | number | undefined;
11764
+ to?: string | number | undefined;
11765
+ };
11766
+ } & {
11767
+ param: {
11768
+ workspace: string;
11769
+ };
11770
+ };
11771
+ output: {
11772
+ success: false;
11773
+ error: string;
11774
+ };
11775
+ outputFormat: "json";
11776
+ status: 400;
11777
+ } | {
11778
+ input: {
11779
+ query: {
11780
+ from?: string | number | undefined;
11781
+ to?: string | number | undefined;
11782
+ };
11783
+ } & {
11784
+ param: {
11785
+ workspace: string;
11786
+ };
11787
+ };
11788
+ output: {
11789
+ success: false;
11790
+ error: string;
11791
+ };
11792
+ outputFormat: "json";
11793
+ status: 404;
11794
+ } | {
11795
+ input: {
11796
+ query: {
11797
+ from?: string | number | undefined;
11798
+ to?: string | number | undefined;
11799
+ };
11800
+ } & {
11801
+ param: {
11802
+ workspace: string;
11803
+ };
11804
+ };
11805
+ output: {
11806
+ success: true;
11807
+ workspaceId: string;
11808
+ period: {
11809
+ from: string | null;
11810
+ to: string | null;
11811
+ };
11812
+ trackingSince: string | null;
11813
+ slaSeconds: number;
11814
+ totals: {
11815
+ waitCount: number;
11816
+ answeredCount: number;
11817
+ unansweredCount: number;
11818
+ withinSlaCount: number;
11819
+ slaPercent: number | null;
11820
+ averageSeconds: number | null;
11821
+ medianSeconds: number | null;
11822
+ };
11823
+ members: {
11824
+ answeredCount: number;
11825
+ withinSlaCount: number;
11826
+ averageSeconds: number | null;
11827
+ medianSeconds: number | null;
11828
+ userId: string;
11829
+ status: string;
11830
+ collaboratorId: string;
11831
+ profilePicture: string | null;
11832
+ firstName: string | null;
11833
+ lastName: string | null;
11834
+ }[];
11835
+ };
11836
+ outputFormat: "json";
11837
+ status: 200;
11838
+ };
11839
+ };
11840
+ } & {
11841
+ "/:workspace/unanswered-chats": {
11842
+ $get: {
11843
+ input: {
11844
+ param: {
11845
+ workspace: string;
11846
+ };
11847
+ };
11848
+ output: {
11849
+ success: false;
11850
+ error: string;
11851
+ };
11852
+ outputFormat: "json";
11853
+ status: 404;
11854
+ } | {
11855
+ input: {
11856
+ param: {
11857
+ workspace: string;
11858
+ };
11859
+ };
11860
+ output: {
11861
+ success: true;
11862
+ workspaceId: string;
11863
+ asOf: string;
11864
+ trackingSince: string | null;
11865
+ total: number;
11866
+ waiting: {
11867
+ under15m: number;
11868
+ over15m: number;
11869
+ over1h: number;
11870
+ over24h: number;
11871
+ };
11872
+ oldestWaitingSince: string | null;
11873
+ };
11874
+ outputFormat: "json";
11875
+ status: 200;
11876
+ };
11877
+ };
11878
+ } & {
11879
+ "/:workspace/chat-activity-heatmap": {
11880
+ $get: {
11881
+ input: {
11882
+ query: {
11883
+ from?: string | number | undefined;
11884
+ to?: string | number | undefined;
11885
+ };
11886
+ } & {
11887
+ param: {
11888
+ workspace: string;
11889
+ };
11890
+ };
11891
+ output: {
11892
+ success: false;
11893
+ error: string;
11894
+ };
11895
+ outputFormat: "json";
11896
+ status: 400;
11897
+ } | {
11898
+ input: {
11899
+ query: {
11900
+ from?: string | number | undefined;
11901
+ to?: string | number | undefined;
11902
+ };
11903
+ } & {
11904
+ param: {
11905
+ workspace: string;
11906
+ };
11907
+ };
11908
+ output: {
11909
+ success: false;
11910
+ error: string;
11911
+ };
11912
+ outputFormat: "json";
11913
+ status: 404;
11914
+ } | {
11915
+ input: {
11916
+ query: {
11917
+ from?: string | number | undefined;
11918
+ to?: string | number | undefined;
11919
+ };
11920
+ } & {
11921
+ param: {
11922
+ workspace: string;
11923
+ };
11924
+ };
11925
+ output: {
11926
+ success: true;
11927
+ workspaceId: string;
11928
+ period: {
11929
+ from: string | null;
11930
+ to: string | null;
11931
+ };
11932
+ trackingSince: string | null;
11933
+ timeZone: string;
11934
+ cells: {
11935
+ weekday: number;
11936
+ hour: number;
11937
+ customerCount: number;
11938
+ operatorCount: number;
11939
+ }[];
11940
+ };
11941
+ outputFormat: "json";
11942
+ status: 200;
11943
+ };
11944
+ };
11945
+ } & {
11946
+ "/chat-events": {
11947
+ $post: {
11948
+ input: {
11949
+ json: {
11950
+ events: {
11951
+ eventId: string;
11952
+ roomId: string;
11953
+ sender: string;
11954
+ direction: "customer" | "operator";
11955
+ channel?: string | null | undefined;
11956
+ sentAt: number;
11957
+ }[];
11958
+ };
11959
+ };
11960
+ output: {
11961
+ recorded: number;
11962
+ skipped: number;
11963
+ success: true;
11964
+ };
11965
+ outputFormat: "json";
11966
+ status: 202;
11967
+ };
11968
+ };
11624
11969
  }, "/analytics"> | import("hono/types").MergeSchemaPath<{
11625
11970
  "/accounts/list/:workspace": {
11626
11971
  $get: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.310",
3
+ "version": "0.0.311",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,