telegram-jobs-contract 1.0.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 (47) hide show
  1. package/README.md +73 -0
  2. package/dist/contracts/bundles.contract.d.ts +183 -0
  3. package/dist/contracts/bundles.contract.d.ts.map +1 -0
  4. package/dist/contracts/bundles.contract.js +29 -0
  5. package/dist/contracts/channels.contract.d.ts +947 -0
  6. package/dist/contracts/channels.contract.d.ts.map +1 -0
  7. package/dist/contracts/channels.contract.js +114 -0
  8. package/dist/contracts/jobs.contract.d.ts +939 -0
  9. package/dist/contracts/jobs.contract.d.ts.map +1 -0
  10. package/dist/contracts/jobs.contract.js +69 -0
  11. package/dist/contracts/notifications.contract.d.ts +725 -0
  12. package/dist/contracts/notifications.contract.d.ts.map +1 -0
  13. package/dist/contracts/notifications.contract.js +65 -0
  14. package/dist/contracts/resume.contract.d.ts +87 -0
  15. package/dist/contracts/resume.contract.d.ts.map +1 -0
  16. package/dist/contracts/resume.contract.js +26 -0
  17. package/dist/contracts/sniper.contract.d.ts +108 -0
  18. package/dist/contracts/sniper.contract.d.ts.map +1 -0
  19. package/dist/contracts/sniper.contract.js +27 -0
  20. package/dist/contracts/stats.contract.d.ts +148 -0
  21. package/dist/contracts/stats.contract.d.ts.map +1 -0
  22. package/dist/contracts/stats.contract.js +41 -0
  23. package/dist/contracts/user.contract.d.ts +362 -0
  24. package/dist/contracts/user.contract.d.ts.map +1 -0
  25. package/dist/contracts/user.contract.js +31 -0
  26. package/dist/index.d.ts +3504 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +58 -0
  29. package/dist/schemas/bundles.d.ts +33 -0
  30. package/dist/schemas/bundles.d.ts.map +1 -0
  31. package/dist/schemas/bundles.js +15 -0
  32. package/dist/schemas/channels.d.ts +134 -0
  33. package/dist/schemas/channels.d.ts.map +1 -0
  34. package/dist/schemas/channels.js +25 -0
  35. package/dist/schemas/common.d.ts +12 -0
  36. package/dist/schemas/common.d.ts.map +1 -0
  37. package/dist/schemas/common.js +8 -0
  38. package/dist/schemas/errors.d.ts +29 -0
  39. package/dist/schemas/errors.d.ts.map +1 -0
  40. package/dist/schemas/errors.js +17 -0
  41. package/dist/schemas/jobs.d.ts +563 -0
  42. package/dist/schemas/jobs.d.ts.map +1 -0
  43. package/dist/schemas/jobs.js +64 -0
  44. package/dist/schemas/user.d.ts +262 -0
  45. package/dist/schemas/user.d.ts.map +1 -0
  46. package/dist/schemas/user.js +36 -0
  47. package/package.json +40 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/channels.contract.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2H3B,CAAC"}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.channelsContract = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const channels_1 = require("../schemas/channels");
6
+ const errors_1 = require("../schemas/errors");
7
+ const zod_1 = require("zod");
8
+ const c = (0, core_1.initContract)();
9
+ exports.channelsContract = c.router({
10
+ getAvailableChannels: {
11
+ method: 'GET',
12
+ path: '/api/channels/available',
13
+ responses: {
14
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.object({ channels: zod_1.z.array(channels_1.ChannelSchema) })),
15
+ 401: errors_1.ErrorResponseSchema,
16
+ 500: errors_1.ErrorResponseSchema,
17
+ },
18
+ summary: 'Get all channels server monitors (authenticated)',
19
+ },
20
+ getUserChannels: {
21
+ method: 'GET',
22
+ path: '/api/channels/user-channels',
23
+ responses: {
24
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.object({ channels: zod_1.z.array(channels_1.ChannelSchema) })),
25
+ 401: errors_1.ErrorResponseSchema,
26
+ 500: errors_1.ErrorResponseSchema,
27
+ },
28
+ summary: 'Get user subscribed channels',
29
+ },
30
+ getRecommendedChannels: {
31
+ method: 'GET',
32
+ path: '/api/channels/recommended',
33
+ responses: {
34
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.array(channels_1.ChannelSchema)),
35
+ 500: errors_1.ErrorResponseSchema,
36
+ },
37
+ summary: 'Get recommended channels',
38
+ },
39
+ getCategories: {
40
+ method: 'GET',
41
+ path: '/api/channels/categories',
42
+ responses: {
43
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.array(channels_1.CategorySchema)),
44
+ 500: errors_1.ErrorResponseSchema,
45
+ },
46
+ summary: 'Get all channel categories',
47
+ },
48
+ exploreChannels: {
49
+ method: 'GET',
50
+ path: '/api/channels/explore',
51
+ responses: {
52
+ 200: (0, errors_1.SuccessResponseSchema)(channels_1.ExploreChannelsResponseSchema),
53
+ 401: errors_1.ErrorResponseSchema,
54
+ 500: errors_1.ErrorResponseSchema,
55
+ },
56
+ summary: 'Get explore channels modal data',
57
+ },
58
+ searchChannels: {
59
+ method: 'POST',
60
+ path: '/api/channels/search',
61
+ body: zod_1.z.object({ query: zod_1.z.string() }),
62
+ responses: {
63
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.array(channels_1.ChannelSchema)),
64
+ 400: errors_1.ErrorResponseSchema,
65
+ 500: errors_1.ErrorResponseSchema,
66
+ },
67
+ summary: 'Search channels by query',
68
+ },
69
+ subscribeToChannels: {
70
+ method: 'POST',
71
+ path: '/api/channels/subscribe',
72
+ body: zod_1.z.object({ channelUsernames: zod_1.z.array(zod_1.z.string()) }),
73
+ responses: {
74
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.object({
75
+ subscribedChannels: zod_1.z.array(zod_1.z.string()),
76
+ message: zod_1.z.string(),
77
+ })),
78
+ 400: errors_1.ErrorResponseSchema,
79
+ 401: errors_1.ErrorResponseSchema,
80
+ 500: errors_1.ErrorResponseSchema,
81
+ },
82
+ summary: 'Subscribe to channels (replaces existing)',
83
+ },
84
+ addChannels: {
85
+ method: 'POST',
86
+ path: '/api/channels/add',
87
+ body: zod_1.z.object({ channelUsernames: zod_1.z.array(zod_1.z.string()) }),
88
+ responses: {
89
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.object({
90
+ subscribedChannels: zod_1.z.array(zod_1.z.string()),
91
+ message: zod_1.z.string(),
92
+ })),
93
+ 400: errors_1.ErrorResponseSchema,
94
+ 401: errors_1.ErrorResponseSchema,
95
+ 500: errors_1.ErrorResponseSchema,
96
+ },
97
+ summary: 'Add channels to subscription',
98
+ },
99
+ unsubscribeFromChannel: {
100
+ method: 'POST',
101
+ path: '/api/channels/unsubscribe',
102
+ body: zod_1.z.object({ channelUsername: zod_1.z.string() }),
103
+ responses: {
104
+ 200: (0, errors_1.SuccessResponseSchema)(zod_1.z.object({
105
+ subscribedChannels: zod_1.z.array(zod_1.z.string()),
106
+ message: zod_1.z.string(),
107
+ })),
108
+ 400: errors_1.ErrorResponseSchema,
109
+ 401: errors_1.ErrorResponseSchema,
110
+ 500: errors_1.ErrorResponseSchema,
111
+ },
112
+ summary: 'Unsubscribe from channel',
113
+ },
114
+ });