@mestra-dev/contract 0.0.310 → 0.0.312

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 +546 -20
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -5287,6 +5287,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
5287
5287
  companyKpp: string | null;
5288
5288
  companyOgrn: string | null;
5289
5289
  legalAddress: string | null;
5290
+ directorName: string | null;
5291
+ chiefAccountantName: string | null;
5292
+ hasSignatureImage: boolean;
5293
+ hasStampImage: boolean;
5290
5294
  bankName: string | null;
5291
5295
  bankBik: string | null;
5292
5296
  bankKc: string | null;
@@ -10092,6 +10096,155 @@ declare const routes: import("hono/hono-base").HonoBase<{
10092
10096
  status: import("hono/utils/http-status").ContentfulStatusCode;
10093
10097
  };
10094
10098
  };
10099
+ } & {
10100
+ "/upload-finance-account-image": {
10101
+ $post: {
10102
+ input: {
10103
+ json: {
10104
+ workspace: string;
10105
+ accountId: string;
10106
+ kind: "signature" | "stamp";
10107
+ contentType: "image/jpeg" | "image/png" | "image/webp";
10108
+ };
10109
+ };
10110
+ output: {
10111
+ success: false;
10112
+ error: string;
10113
+ };
10114
+ outputFormat: "json";
10115
+ status: 404;
10116
+ } | {
10117
+ input: {
10118
+ json: {
10119
+ workspace: string;
10120
+ accountId: string;
10121
+ kind: "signature" | "stamp";
10122
+ contentType: "image/jpeg" | "image/png" | "image/webp";
10123
+ };
10124
+ };
10125
+ output: {
10126
+ success: true;
10127
+ url: string;
10128
+ fields: {
10129
+ [x: string]: string;
10130
+ };
10131
+ key: string;
10132
+ maxSize: number;
10133
+ };
10134
+ outputFormat: "json";
10135
+ status: import("hono/utils/http-status").ContentfulStatusCode;
10136
+ };
10137
+ };
10138
+ } & {
10139
+ "/confirm-finance-account-image": {
10140
+ $post: {
10141
+ input: {
10142
+ json: {
10143
+ workspace: string;
10144
+ accountId: string;
10145
+ kind: "signature" | "stamp";
10146
+ };
10147
+ };
10148
+ output: {
10149
+ success: false;
10150
+ error: string;
10151
+ };
10152
+ outputFormat: "json";
10153
+ status: 404;
10154
+ } | {
10155
+ input: {
10156
+ json: {
10157
+ workspace: string;
10158
+ accountId: string;
10159
+ kind: "signature" | "stamp";
10160
+ };
10161
+ };
10162
+ output: {
10163
+ success: true;
10164
+ image: string;
10165
+ };
10166
+ outputFormat: "json";
10167
+ status: import("hono/utils/http-status").ContentfulStatusCode;
10168
+ } | {
10169
+ input: {
10170
+ json: {
10171
+ workspace: string;
10172
+ accountId: string;
10173
+ kind: "signature" | "stamp";
10174
+ };
10175
+ };
10176
+ output: {
10177
+ success: false;
10178
+ error: string;
10179
+ };
10180
+ outputFormat: "json";
10181
+ status: 400;
10182
+ };
10183
+ };
10184
+ } & {
10185
+ "/finance-account-images/:workspace/:accountId": {
10186
+ $get: {
10187
+ input: {
10188
+ param: {
10189
+ workspace: string;
10190
+ } & {
10191
+ accountId: string;
10192
+ };
10193
+ };
10194
+ output: {
10195
+ success: false;
10196
+ error: string;
10197
+ };
10198
+ outputFormat: "json";
10199
+ status: 404;
10200
+ } | {
10201
+ input: {
10202
+ param: {
10203
+ workspace: string;
10204
+ } & {
10205
+ accountId: string;
10206
+ };
10207
+ };
10208
+ output: {
10209
+ success: true;
10210
+ signature: string | null;
10211
+ stamp: string | null;
10212
+ };
10213
+ outputFormat: "json";
10214
+ status: import("hono/utils/http-status").ContentfulStatusCode;
10215
+ };
10216
+ };
10217
+ } & {
10218
+ "/delete-finance-account-image": {
10219
+ $post: {
10220
+ input: {
10221
+ json: {
10222
+ workspace: string;
10223
+ accountId: string;
10224
+ kind: "signature" | "stamp";
10225
+ };
10226
+ };
10227
+ output: {
10228
+ success: false;
10229
+ error: string;
10230
+ };
10231
+ outputFormat: "json";
10232
+ status: 404;
10233
+ } | {
10234
+ input: {
10235
+ json: {
10236
+ workspace: string;
10237
+ accountId: string;
10238
+ kind: "signature" | "stamp";
10239
+ };
10240
+ };
10241
+ output: {
10242
+ success: true;
10243
+ };
10244
+ outputFormat: "json";
10245
+ status: import("hono/utils/http-status").ContentfulStatusCode;
10246
+ };
10247
+ };
10095
10248
  } & {
10096
10249
  "/upload-to-cinvoice-payment": {
10097
10250
  $post: {
@@ -10357,26 +10510,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
10357
10510
  }, "/chat"> | import("hono/types").MergeSchemaPath<{
10358
10511
  "/inbound": {
10359
10512
  $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
10513
  input: {
10381
10514
  json: {
10382
10515
  messages: {
@@ -11621,6 +11754,371 @@ declare const routes: import("hono/hono-base").HonoBase<{
11621
11754
  status: 200;
11622
11755
  };
11623
11756
  };
11757
+ } & {
11758
+ "/:workspace/avg-deal-size": {
11759
+ $get: {
11760
+ input: {
11761
+ query: {
11762
+ from?: string | number | undefined;
11763
+ to?: string | number | undefined;
11764
+ };
11765
+ } & {
11766
+ param: {
11767
+ workspace: string;
11768
+ };
11769
+ };
11770
+ output: {
11771
+ success: false;
11772
+ error: string;
11773
+ };
11774
+ outputFormat: "json";
11775
+ status: 400;
11776
+ } | {
11777
+ input: {
11778
+ query: {
11779
+ from?: string | number | undefined;
11780
+ to?: string | number | undefined;
11781
+ };
11782
+ } & {
11783
+ param: {
11784
+ workspace: string;
11785
+ };
11786
+ };
11787
+ output: {
11788
+ success: false;
11789
+ error: string;
11790
+ };
11791
+ outputFormat: "json";
11792
+ status: 404;
11793
+ } | {
11794
+ input: {
11795
+ query: {
11796
+ from?: string | number | undefined;
11797
+ to?: string | number | undefined;
11798
+ };
11799
+ } & {
11800
+ param: {
11801
+ workspace: string;
11802
+ };
11803
+ };
11804
+ output: {
11805
+ success: true;
11806
+ workspaceId: string;
11807
+ category: string;
11808
+ period: {
11809
+ from: string | null;
11810
+ to: string | null;
11811
+ };
11812
+ previousPeriod: {
11813
+ from: string | null;
11814
+ to: string | null;
11815
+ } | null;
11816
+ currencies: ({
11817
+ growth: null;
11818
+ currency: string;
11819
+ averageDealSizeMinor: number;
11820
+ dealCount: number;
11821
+ } | {
11822
+ growth: {
11823
+ averageDealSizeMinor: {
11824
+ previousValue: number;
11825
+ growthPercentage: number | null;
11826
+ direction: GrowthDirection;
11827
+ };
11828
+ dealCount: {
11829
+ previousValue: number;
11830
+ growthPercentage: number | null;
11831
+ direction: GrowthDirection;
11832
+ };
11833
+ };
11834
+ currency: string;
11835
+ averageDealSizeMinor: number;
11836
+ dealCount: number;
11837
+ })[];
11838
+ };
11839
+ outputFormat: "json";
11840
+ status: 200;
11841
+ };
11842
+ };
11843
+ } & {
11844
+ "/:workspace/lost-deal-reasons": {
11845
+ $get: {
11846
+ input: {
11847
+ query: {
11848
+ from?: string | number | undefined;
11849
+ to?: string | number | undefined;
11850
+ };
11851
+ } & {
11852
+ param: {
11853
+ workspace: string;
11854
+ };
11855
+ };
11856
+ output: {
11857
+ success: false;
11858
+ error: string;
11859
+ };
11860
+ outputFormat: "json";
11861
+ status: 400;
11862
+ } | {
11863
+ input: {
11864
+ query: {
11865
+ from?: string | number | undefined;
11866
+ to?: string | number | undefined;
11867
+ };
11868
+ } & {
11869
+ param: {
11870
+ workspace: string;
11871
+ };
11872
+ };
11873
+ output: {
11874
+ success: false;
11875
+ error: string;
11876
+ };
11877
+ outputFormat: "json";
11878
+ status: 404;
11879
+ } | {
11880
+ input: {
11881
+ query: {
11882
+ from?: string | number | undefined;
11883
+ to?: string | number | undefined;
11884
+ };
11885
+ } & {
11886
+ param: {
11887
+ workspace: string;
11888
+ };
11889
+ };
11890
+ output: {
11891
+ success: true;
11892
+ workspaceId: string;
11893
+ category: string;
11894
+ period: {
11895
+ from: string | null;
11896
+ to: string | null;
11897
+ };
11898
+ lostCount: number;
11899
+ unattributedCount: number;
11900
+ reasons: {
11901
+ share: number;
11902
+ failureReasonId: string;
11903
+ title: string;
11904
+ lostCount: number;
11905
+ }[];
11906
+ };
11907
+ outputFormat: "json";
11908
+ status: 200;
11909
+ };
11910
+ };
11911
+ } & {
11912
+ "/:workspace/first-response-time": {
11913
+ $get: {
11914
+ input: {
11915
+ query: {
11916
+ from?: string | number | undefined;
11917
+ to?: string | number | undefined;
11918
+ };
11919
+ } & {
11920
+ param: {
11921
+ workspace: string;
11922
+ };
11923
+ };
11924
+ output: {
11925
+ success: false;
11926
+ error: string;
11927
+ };
11928
+ outputFormat: "json";
11929
+ status: 400;
11930
+ } | {
11931
+ input: {
11932
+ query: {
11933
+ from?: string | number | undefined;
11934
+ to?: string | number | undefined;
11935
+ };
11936
+ } & {
11937
+ param: {
11938
+ workspace: string;
11939
+ };
11940
+ };
11941
+ output: {
11942
+ success: false;
11943
+ error: string;
11944
+ };
11945
+ outputFormat: "json";
11946
+ status: 404;
11947
+ } | {
11948
+ input: {
11949
+ query: {
11950
+ from?: string | number | undefined;
11951
+ to?: string | number | undefined;
11952
+ };
11953
+ } & {
11954
+ param: {
11955
+ workspace: string;
11956
+ };
11957
+ };
11958
+ output: {
11959
+ success: true;
11960
+ workspaceId: string;
11961
+ period: {
11962
+ from: string | null;
11963
+ to: string | null;
11964
+ };
11965
+ trackingSince: string | null;
11966
+ slaSeconds: number;
11967
+ totals: {
11968
+ waitCount: number;
11969
+ answeredCount: number;
11970
+ unansweredCount: number;
11971
+ withinSlaCount: number;
11972
+ slaPercent: number | null;
11973
+ averageSeconds: number | null;
11974
+ medianSeconds: number | null;
11975
+ };
11976
+ members: {
11977
+ answeredCount: number;
11978
+ withinSlaCount: number;
11979
+ averageSeconds: number | null;
11980
+ medianSeconds: number | null;
11981
+ userId: string;
11982
+ status: string;
11983
+ collaboratorId: string;
11984
+ profilePicture: string | null;
11985
+ firstName: string | null;
11986
+ lastName: string | null;
11987
+ }[];
11988
+ };
11989
+ outputFormat: "json";
11990
+ status: 200;
11991
+ };
11992
+ };
11993
+ } & {
11994
+ "/:workspace/unanswered-chats": {
11995
+ $get: {
11996
+ input: {
11997
+ param: {
11998
+ workspace: string;
11999
+ };
12000
+ };
12001
+ output: {
12002
+ success: false;
12003
+ error: string;
12004
+ };
12005
+ outputFormat: "json";
12006
+ status: 404;
12007
+ } | {
12008
+ input: {
12009
+ param: {
12010
+ workspace: string;
12011
+ };
12012
+ };
12013
+ output: {
12014
+ success: true;
12015
+ workspaceId: string;
12016
+ asOf: string;
12017
+ trackingSince: string | null;
12018
+ total: number;
12019
+ waiting: {
12020
+ under15m: number;
12021
+ over15m: number;
12022
+ over1h: number;
12023
+ over24h: number;
12024
+ };
12025
+ oldestWaitingSince: string | null;
12026
+ };
12027
+ outputFormat: "json";
12028
+ status: 200;
12029
+ };
12030
+ };
12031
+ } & {
12032
+ "/:workspace/chat-activity-heatmap": {
12033
+ $get: {
12034
+ input: {
12035
+ query: {
12036
+ from?: string | number | undefined;
12037
+ to?: string | number | undefined;
12038
+ };
12039
+ } & {
12040
+ param: {
12041
+ workspace: string;
12042
+ };
12043
+ };
12044
+ output: {
12045
+ success: false;
12046
+ error: string;
12047
+ };
12048
+ outputFormat: "json";
12049
+ status: 400;
12050
+ } | {
12051
+ input: {
12052
+ query: {
12053
+ from?: string | number | undefined;
12054
+ to?: string | number | undefined;
12055
+ };
12056
+ } & {
12057
+ param: {
12058
+ workspace: string;
12059
+ };
12060
+ };
12061
+ output: {
12062
+ success: false;
12063
+ error: string;
12064
+ };
12065
+ outputFormat: "json";
12066
+ status: 404;
12067
+ } | {
12068
+ input: {
12069
+ query: {
12070
+ from?: string | number | undefined;
12071
+ to?: string | number | undefined;
12072
+ };
12073
+ } & {
12074
+ param: {
12075
+ workspace: string;
12076
+ };
12077
+ };
12078
+ output: {
12079
+ success: true;
12080
+ workspaceId: string;
12081
+ period: {
12082
+ from: string | null;
12083
+ to: string | null;
12084
+ };
12085
+ trackingSince: string | null;
12086
+ timeZone: string;
12087
+ cells: {
12088
+ weekday: number;
12089
+ hour: number;
12090
+ customerCount: number;
12091
+ operatorCount: number;
12092
+ }[];
12093
+ };
12094
+ outputFormat: "json";
12095
+ status: 200;
12096
+ };
12097
+ };
12098
+ } & {
12099
+ "/chat-events": {
12100
+ $post: {
12101
+ input: {
12102
+ json: {
12103
+ events: {
12104
+ eventId: string;
12105
+ roomId: string;
12106
+ sender: string;
12107
+ direction: "customer" | "operator";
12108
+ channel?: string | null | undefined;
12109
+ sentAt: number;
12110
+ }[];
12111
+ };
12112
+ };
12113
+ output: {
12114
+ recorded: number;
12115
+ skipped: number;
12116
+ success: true;
12117
+ };
12118
+ outputFormat: "json";
12119
+ status: 202;
12120
+ };
12121
+ };
11624
12122
  }, "/analytics"> | import("hono/types").MergeSchemaPath<{
11625
12123
  "/accounts/list/:workspace": {
11626
12124
  $get: {
@@ -11646,6 +12144,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
11646
12144
  companyKpp: string | null;
11647
12145
  companyOgrn: string | null;
11648
12146
  legalAddress: string | null;
12147
+ directorName: string | null;
12148
+ chiefAccountantName: string | null;
12149
+ hasSignatureImage: boolean;
12150
+ hasStampImage: boolean;
11649
12151
  bankName: string | null;
11650
12152
  bankBik: string | null;
11651
12153
  bankKc: string | null;
@@ -11704,6 +12206,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
11704
12206
  companyKpp: string | null;
11705
12207
  companyOgrn: string | null;
11706
12208
  legalAddress: string | null;
12209
+ directorName: string | null;
12210
+ chiefAccountantName: string | null;
12211
+ hasSignatureImage: boolean;
12212
+ hasStampImage: boolean;
11707
12213
  bankName: string | null;
11708
12214
  bankBik: string | null;
11709
12215
  bankKc: string | null;
@@ -11734,6 +12240,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
11734
12240
  companyKpp?: string | undefined;
11735
12241
  companyOgrn?: string | undefined;
11736
12242
  legalAddress?: string | undefined;
12243
+ directorName?: string | undefined;
12244
+ chiefAccountantName?: string | undefined;
11737
12245
  bankName?: string | undefined;
11738
12246
  bankBik?: string | undefined;
11739
12247
  bankKc?: string | undefined;
@@ -11766,6 +12274,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
11766
12274
  companyKpp?: string | undefined;
11767
12275
  companyOgrn?: string | undefined;
11768
12276
  legalAddress?: string | undefined;
12277
+ directorName?: string | undefined;
12278
+ chiefAccountantName?: string | undefined;
11769
12279
  bankName?: string | undefined;
11770
12280
  bankBik?: string | undefined;
11771
12281
  bankKc?: string | undefined;
@@ -11798,6 +12308,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
11798
12308
  companyKpp: string | null;
11799
12309
  companyOgrn: string | null;
11800
12310
  legalAddress: string | null;
12311
+ directorName: string | null;
12312
+ chiefAccountantName: string | null;
12313
+ hasSignatureImage: boolean;
12314
+ hasStampImage: boolean;
11801
12315
  bankName: string | null;
11802
12316
  bankBik: string | null;
11803
12317
  bankKc: string | null;
@@ -11827,6 +12341,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
11827
12341
  companyKpp?: string | undefined;
11828
12342
  companyOgrn?: string | undefined;
11829
12343
  legalAddress?: string | undefined;
12344
+ directorName?: string | undefined;
12345
+ chiefAccountantName?: string | undefined;
11830
12346
  bankName?: string | undefined;
11831
12347
  bankBik?: string | undefined;
11832
12348
  bankKc?: string | undefined;
@@ -11860,6 +12376,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
11860
12376
  companyKpp?: string | undefined;
11861
12377
  companyOgrn?: string | undefined;
11862
12378
  legalAddress?: string | undefined;
12379
+ directorName?: string | undefined;
12380
+ chiefAccountantName?: string | undefined;
11863
12381
  bankName?: string | undefined;
11864
12382
  bankBik?: string | undefined;
11865
12383
  bankKc?: string | undefined;
@@ -11894,6 +12412,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
11894
12412
  companyKpp: string | null;
11895
12413
  companyOgrn: string | null;
11896
12414
  legalAddress: string | null;
12415
+ directorName: string | null;
12416
+ chiefAccountantName: string | null;
12417
+ hasSignatureImage: boolean;
12418
+ hasStampImage: boolean;
11897
12419
  bankName: string | null;
11898
12420
  bankBik: string | null;
11899
12421
  bankKc: string | null;
@@ -11950,6 +12472,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
11950
12472
  companyKpp: string | null;
11951
12473
  companyOgrn: string | null;
11952
12474
  legalAddress: string | null;
12475
+ directorName: string | null;
12476
+ chiefAccountantName: string | null;
12477
+ hasSignatureImage: boolean;
12478
+ hasStampImage: boolean;
11953
12479
  bankName: string | null;
11954
12480
  bankBik: string | null;
11955
12481
  bankKc: string | null;
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.312",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,