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.
- package/README.md +73 -0
- package/dist/contracts/bundles.contract.d.ts +183 -0
- package/dist/contracts/bundles.contract.d.ts.map +1 -0
- package/dist/contracts/bundles.contract.js +29 -0
- package/dist/contracts/channels.contract.d.ts +947 -0
- package/dist/contracts/channels.contract.d.ts.map +1 -0
- package/dist/contracts/channels.contract.js +114 -0
- package/dist/contracts/jobs.contract.d.ts +939 -0
- package/dist/contracts/jobs.contract.d.ts.map +1 -0
- package/dist/contracts/jobs.contract.js +69 -0
- package/dist/contracts/notifications.contract.d.ts +725 -0
- package/dist/contracts/notifications.contract.d.ts.map +1 -0
- package/dist/contracts/notifications.contract.js +65 -0
- package/dist/contracts/resume.contract.d.ts +87 -0
- package/dist/contracts/resume.contract.d.ts.map +1 -0
- package/dist/contracts/resume.contract.js +26 -0
- package/dist/contracts/sniper.contract.d.ts +108 -0
- package/dist/contracts/sniper.contract.d.ts.map +1 -0
- package/dist/contracts/sniper.contract.js +27 -0
- package/dist/contracts/stats.contract.d.ts +148 -0
- package/dist/contracts/stats.contract.d.ts.map +1 -0
- package/dist/contracts/stats.contract.js +41 -0
- package/dist/contracts/user.contract.d.ts +362 -0
- package/dist/contracts/user.contract.d.ts.map +1 -0
- package/dist/contracts/user.contract.js +31 -0
- package/dist/index.d.ts +3504 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/schemas/bundles.d.ts +33 -0
- package/dist/schemas/bundles.d.ts.map +1 -0
- package/dist/schemas/bundles.js +15 -0
- package/dist/schemas/channels.d.ts +134 -0
- package/dist/schemas/channels.d.ts.map +1 -0
- package/dist/schemas/channels.js +25 -0
- package/dist/schemas/common.d.ts +12 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +8 -0
- package/dist/schemas/errors.d.ts +29 -0
- package/dist/schemas/errors.d.ts.map +1 -0
- package/dist/schemas/errors.js +17 -0
- package/dist/schemas/jobs.d.ts +563 -0
- package/dist/schemas/jobs.d.ts.map +1 -0
- package/dist/schemas/jobs.js +64 -0
- package/dist/schemas/user.d.ts +262 -0
- package/dist/schemas/user.d.ts.map +1 -0
- package/dist/schemas/user.js +36 -0
- 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
|
+
});
|