@mestra-dev/contract 0.0.309 → 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 +406 -20
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -5276,6 +5276,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5276
5276
  name: string;
5277
5277
  active: boolean;
5278
5278
  currency: FinanceCurrency;
5279
+ branchId: string | null;
5279
5280
  companyName: string | null;
5280
5281
  vatRate: number | null;
5281
5282
  order: number;
@@ -10356,26 +10357,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10356
10357
  }, "/chat"> | import("hono/types").MergeSchemaPath<{
10357
10358
  "/inbound": {
10358
10359
  $post: {
10359
- input: {
10360
- json: {
10361
- messages: {
10362
- eventId: string;
10363
- roomId: string;
10364
- sender: string;
10365
- channel: string;
10366
- msgtype?: string | undefined;
10367
- text?: string | undefined;
10368
- sentAt?: number | undefined;
10369
- }[];
10370
- };
10371
- };
10372
- output: {
10373
- success: false;
10374
- error: string;
10375
- };
10376
- outputFormat: "json";
10377
- status: 401;
10378
- } | {
10379
10360
  input: {
10380
10361
  json: {
10381
10362
  messages: {
@@ -11620,6 +11601,371 @@ declare const routes: import("hono/hono-base").HonoBase<{
11620
11601
  status: 200;
11621
11602
  };
11622
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
+ };
11623
11969
  }, "/analytics"> | import("hono/types").MergeSchemaPath<{
11624
11970
  "/accounts/list/:workspace": {
11625
11971
  $get: {
@@ -11652,6 +11998,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11652
11998
  bankKpp: string | null;
11653
11999
  vatRate: number | null;
11654
12000
  pricesIncludeVat: boolean;
12001
+ branchId: string | null;
11655
12002
  active: boolean;
11656
12003
  created_at: string;
11657
12004
  updated_at: string | null;
@@ -11709,6 +12056,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11709
12056
  bankKpp: string | null;
11710
12057
  vatRate: number | null;
11711
12058
  pricesIncludeVat: boolean;
12059
+ branchId: string | null;
11712
12060
  active: boolean;
11713
12061
  created_at: string;
11714
12062
  updated_at: string | null;
@@ -11738,6 +12086,39 @@ declare const routes: import("hono/hono-base").HonoBase<{
11738
12086
  bankKpp?: string | undefined;
11739
12087
  vatRate?: number | undefined;
11740
12088
  pricesIncludeVat?: boolean | undefined;
12089
+ branchId?: string | null | undefined;
12090
+ workspace: string;
12091
+ name: string;
12092
+ cardColor: string;
12093
+ currency: "ruble" | "dollar" | "euro";
12094
+ openingBalance: unknown;
12095
+ };
12096
+ };
12097
+ output: {
12098
+ success: false;
12099
+ error: string;
12100
+ };
12101
+ outputFormat: "json";
12102
+ status: 404;
12103
+ } | {
12104
+ input: {
12105
+ json: {
12106
+ active?: boolean | undefined;
12107
+ country?: string | undefined;
12108
+ companyName?: string | undefined;
12109
+ companyAccountNumber?: string | undefined;
12110
+ companyInn?: string | undefined;
12111
+ companyKpp?: string | undefined;
12112
+ companyOgrn?: string | undefined;
12113
+ legalAddress?: string | undefined;
12114
+ bankName?: string | undefined;
12115
+ bankBik?: string | undefined;
12116
+ bankKc?: string | undefined;
12117
+ bankInn?: string | undefined;
12118
+ bankKpp?: string | undefined;
12119
+ vatRate?: number | undefined;
12120
+ pricesIncludeVat?: boolean | undefined;
12121
+ branchId?: string | null | undefined;
11741
12122
  workspace: string;
11742
12123
  name: string;
11743
12124
  cardColor: string;
@@ -11769,6 +12150,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11769
12150
  bankKpp: string | null;
11770
12151
  vatRate: number | null;
11771
12152
  pricesIncludeVat: boolean;
12153
+ branchId: string | null;
11772
12154
  active: boolean;
11773
12155
  created_at: string;
11774
12156
  updated_at: string | null;
@@ -11797,6 +12179,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11797
12179
  bankKpp?: string | undefined;
11798
12180
  vatRate?: number | undefined;
11799
12181
  pricesIncludeVat?: boolean | undefined;
12182
+ branchId?: string | null | undefined;
11800
12183
  active?: boolean | undefined;
11801
12184
  accountId: string;
11802
12185
  workspace: string;
@@ -11829,6 +12212,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11829
12212
  bankKpp?: string | undefined;
11830
12213
  vatRate?: number | undefined;
11831
12214
  pricesIncludeVat?: boolean | undefined;
12215
+ branchId?: string | null | undefined;
11832
12216
  active?: boolean | undefined;
11833
12217
  accountId: string;
11834
12218
  workspace: string;
@@ -11862,6 +12246,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11862
12246
  bankKpp: string | null;
11863
12247
  vatRate: number | null;
11864
12248
  pricesIncludeVat: boolean;
12249
+ branchId: string | null;
11865
12250
  active: boolean;
11866
12251
  created_at: string;
11867
12252
  updated_at: string | null;
@@ -11917,6 +12302,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11917
12302
  bankKpp: string | null;
11918
12303
  vatRate: number | null;
11919
12304
  pricesIncludeVat: boolean;
12305
+ branchId: string | null;
11920
12306
  active: boolean;
11921
12307
  created_at: string;
11922
12308
  updated_at: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.309",
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,