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,262 @@
1
+ import { z } from 'zod';
2
+ export declare const UserPreferencesSchema: z.ZodObject<{
3
+ filters: z.ZodOptional<z.ZodObject<{
4
+ stack: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5
+ level: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6
+ jobFunction: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
7
+ locationType: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8
+ excludedTitles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
+ muteKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ experienceYears: z.ZodOptional<z.ZodObject<{
11
+ min: z.ZodOptional<z.ZodNumber>;
12
+ max: z.ZodOptional<z.ZodNumber>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ min?: number | undefined;
15
+ max?: number | undefined;
16
+ }, {
17
+ min?: number | undefined;
18
+ max?: number | undefined;
19
+ }>>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ level?: string[] | undefined;
22
+ experienceYears?: {
23
+ min?: number | undefined;
24
+ max?: number | undefined;
25
+ } | undefined;
26
+ stack?: string[] | undefined;
27
+ jobFunction?: string[] | undefined;
28
+ locationType?: string[] | undefined;
29
+ excludedTitles?: string[] | undefined;
30
+ muteKeywords?: string[] | undefined;
31
+ }, {
32
+ level?: string[] | undefined;
33
+ experienceYears?: {
34
+ min?: number | undefined;
35
+ max?: number | undefined;
36
+ } | undefined;
37
+ stack?: string[] | undefined;
38
+ jobFunction?: string[] | undefined;
39
+ locationType?: string[] | undefined;
40
+ excludedTitles?: string[] | undefined;
41
+ muteKeywords?: string[] | undefined;
42
+ }>>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ filters?: {
45
+ level?: string[] | undefined;
46
+ experienceYears?: {
47
+ min?: number | undefined;
48
+ max?: number | undefined;
49
+ } | undefined;
50
+ stack?: string[] | undefined;
51
+ jobFunction?: string[] | undefined;
52
+ locationType?: string[] | undefined;
53
+ excludedTitles?: string[] | undefined;
54
+ muteKeywords?: string[] | undefined;
55
+ } | undefined;
56
+ }, {
57
+ filters?: {
58
+ level?: string[] | undefined;
59
+ experienceYears?: {
60
+ min?: number | undefined;
61
+ max?: number | undefined;
62
+ } | undefined;
63
+ stack?: string[] | undefined;
64
+ jobFunction?: string[] | undefined;
65
+ locationType?: string[] | undefined;
66
+ excludedTitles?: string[] | undefined;
67
+ muteKeywords?: string[] | undefined;
68
+ } | undefined;
69
+ }>;
70
+ export declare const QuietHoursSchema: z.ZodObject<{
71
+ enabled: z.ZodBoolean;
72
+ startHour: z.ZodNumber;
73
+ endHour: z.ZodNumber;
74
+ timezone: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ enabled: boolean;
77
+ startHour: number;
78
+ endHour: number;
79
+ timezone: string;
80
+ }, {
81
+ enabled: boolean;
82
+ startHour: number;
83
+ endHour: number;
84
+ timezone: string;
85
+ }>;
86
+ export declare const NotificationSettingsSchema: z.ZodObject<{
87
+ enabled: z.ZodBoolean;
88
+ filters: z.ZodOptional<z.ZodObject<{
89
+ stack: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
90
+ level: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
+ jobFunction: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
92
+ locationType: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
+ excludedTitles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
+ muteKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
+ experienceYears: z.ZodOptional<z.ZodObject<{
96
+ min: z.ZodOptional<z.ZodNumber>;
97
+ max: z.ZodOptional<z.ZodNumber>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ min?: number | undefined;
100
+ max?: number | undefined;
101
+ }, {
102
+ min?: number | undefined;
103
+ max?: number | undefined;
104
+ }>>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ level?: string[] | undefined;
107
+ experienceYears?: {
108
+ min?: number | undefined;
109
+ max?: number | undefined;
110
+ } | undefined;
111
+ stack?: string[] | undefined;
112
+ jobFunction?: string[] | undefined;
113
+ locationType?: string[] | undefined;
114
+ excludedTitles?: string[] | undefined;
115
+ muteKeywords?: string[] | undefined;
116
+ }, {
117
+ level?: string[] | undefined;
118
+ experienceYears?: {
119
+ min?: number | undefined;
120
+ max?: number | undefined;
121
+ } | undefined;
122
+ stack?: string[] | undefined;
123
+ jobFunction?: string[] | undefined;
124
+ locationType?: string[] | undefined;
125
+ excludedTitles?: string[] | undefined;
126
+ muteKeywords?: string[] | undefined;
127
+ }>>;
128
+ quietHours: z.ZodOptional<z.ZodObject<{
129
+ enabled: z.ZodBoolean;
130
+ startHour: z.ZodNumber;
131
+ endHour: z.ZodNumber;
132
+ timezone: z.ZodString;
133
+ }, "strip", z.ZodTypeAny, {
134
+ enabled: boolean;
135
+ startHour: number;
136
+ endHour: number;
137
+ timezone: string;
138
+ }, {
139
+ enabled: boolean;
140
+ startHour: number;
141
+ endHour: number;
142
+ timezone: string;
143
+ }>>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ enabled: boolean;
146
+ filters?: {
147
+ level?: string[] | undefined;
148
+ experienceYears?: {
149
+ min?: number | undefined;
150
+ max?: number | undefined;
151
+ } | undefined;
152
+ stack?: string[] | undefined;
153
+ jobFunction?: string[] | undefined;
154
+ locationType?: string[] | undefined;
155
+ excludedTitles?: string[] | undefined;
156
+ muteKeywords?: string[] | undefined;
157
+ } | undefined;
158
+ quietHours?: {
159
+ enabled: boolean;
160
+ startHour: number;
161
+ endHour: number;
162
+ timezone: string;
163
+ } | undefined;
164
+ }, {
165
+ enabled: boolean;
166
+ filters?: {
167
+ level?: string[] | undefined;
168
+ experienceYears?: {
169
+ min?: number | undefined;
170
+ max?: number | undefined;
171
+ } | undefined;
172
+ stack?: string[] | undefined;
173
+ jobFunction?: string[] | undefined;
174
+ locationType?: string[] | undefined;
175
+ excludedTitles?: string[] | undefined;
176
+ muteKeywords?: string[] | undefined;
177
+ } | undefined;
178
+ quietHours?: {
179
+ enabled: boolean;
180
+ startHour: number;
181
+ endHour: number;
182
+ timezone: string;
183
+ } | undefined;
184
+ }>;
185
+ export declare const TelegramWebhookSchema: z.ZodObject<{
186
+ update_id: z.ZodNumber;
187
+ message: z.ZodOptional<z.ZodObject<{
188
+ message_id: z.ZodNumber;
189
+ from: z.ZodObject<{
190
+ id: z.ZodNumber;
191
+ first_name: z.ZodString;
192
+ }, "strip", z.ZodTypeAny, {
193
+ id: number;
194
+ first_name: string;
195
+ }, {
196
+ id: number;
197
+ first_name: string;
198
+ }>;
199
+ chat: z.ZodObject<{
200
+ id: z.ZodNumber;
201
+ type: z.ZodString;
202
+ }, "strip", z.ZodTypeAny, {
203
+ type: string;
204
+ id: number;
205
+ }, {
206
+ type: string;
207
+ id: number;
208
+ }>;
209
+ text: z.ZodOptional<z.ZodString>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ message_id: number;
212
+ from: {
213
+ id: number;
214
+ first_name: string;
215
+ };
216
+ chat: {
217
+ type: string;
218
+ id: number;
219
+ };
220
+ text?: string | undefined;
221
+ }, {
222
+ message_id: number;
223
+ from: {
224
+ id: number;
225
+ first_name: string;
226
+ };
227
+ chat: {
228
+ type: string;
229
+ id: number;
230
+ };
231
+ text?: string | undefined;
232
+ }>>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ update_id: number;
235
+ message?: {
236
+ message_id: number;
237
+ from: {
238
+ id: number;
239
+ first_name: string;
240
+ };
241
+ chat: {
242
+ type: string;
243
+ id: number;
244
+ };
245
+ text?: string | undefined;
246
+ } | undefined;
247
+ }, {
248
+ update_id: number;
249
+ message?: {
250
+ message_id: number;
251
+ from: {
252
+ id: number;
253
+ first_name: string;
254
+ };
255
+ chat: {
256
+ type: string;
257
+ id: number;
258
+ };
259
+ text?: string | undefined;
260
+ } | undefined;
261
+ }>;
262
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/schemas/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBhC,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TelegramWebhookSchema = exports.NotificationSettingsSchema = exports.QuietHoursSchema = exports.UserPreferencesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const jobs_1 = require("./jobs");
6
+ exports.UserPreferencesSchema = zod_1.z.object({
7
+ filters: jobs_1.JobFiltersSchema.optional(),
8
+ });
9
+ exports.QuietHoursSchema = zod_1.z.object({
10
+ enabled: zod_1.z.boolean(),
11
+ startHour: zod_1.z.number().min(0).max(23),
12
+ endHour: zod_1.z.number().min(0).max(23),
13
+ timezone: zod_1.z.string(),
14
+ });
15
+ exports.NotificationSettingsSchema = zod_1.z.object({
16
+ enabled: zod_1.z.boolean(),
17
+ filters: jobs_1.JobFiltersSchema.optional(),
18
+ quietHours: exports.QuietHoursSchema.optional(),
19
+ });
20
+ exports.TelegramWebhookSchema = zod_1.z.object({
21
+ update_id: zod_1.z.number(),
22
+ message: zod_1.z
23
+ .object({
24
+ message_id: zod_1.z.number(),
25
+ from: zod_1.z.object({
26
+ id: zod_1.z.number(),
27
+ first_name: zod_1.z.string(),
28
+ }),
29
+ chat: zod_1.z.object({
30
+ id: zod_1.z.number(),
31
+ type: zod_1.z.string(),
32
+ }),
33
+ text: zod_1.z.string().optional(),
34
+ })
35
+ .optional(),
36
+ });
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "telegram-jobs-contract",
3
+ "version": "1.0.0",
4
+ "description": "Shared API contract for telegram-jobs",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsc --watch",
13
+ "prepublishOnly": "npm run build",
14
+ "version:patch": "npm version patch",
15
+ "version:minor": "npm version minor",
16
+ "version:major": "npm version major",
17
+ "publish": "npm run build && npm version patch && npm publish"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/werty-potom/telegram-jobs-contract.git"
25
+ },
26
+ "keywords": [
27
+ "telegram-jobs",
28
+ "api-contract",
29
+ "ts-rest"
30
+ ],
31
+ "author": "werty.potom",
32
+ "license": "MIT",
33
+ "dependencies": {
34
+ "@ts-rest/core": "^3.30.0",
35
+ "zod": "^3.22.0"
36
+ },
37
+ "devDependencies": {
38
+ "typescript": "^5.3.3"
39
+ }
40
+ }