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":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAK/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;CAUtB,CAAC;AAGH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,eAAe,GAChB,CAAC;AAGF,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.initContract = exports.bundlesContract = exports.feedbackContract = exports.statsContract = exports.notificationsContract = exports.sniperContract = exports.resumeContract = exports.userContract = exports.channelsContract = exports.jobsContract = exports.apiContract = void 0;
|
|
18
|
+
const core_1 = require("@ts-rest/core");
|
|
19
|
+
const jobs_contract_1 = require("./contracts/jobs.contract");
|
|
20
|
+
Object.defineProperty(exports, "jobsContract", { enumerable: true, get: function () { return jobs_contract_1.jobsContract; } });
|
|
21
|
+
const channels_contract_1 = require("./contracts/channels.contract");
|
|
22
|
+
Object.defineProperty(exports, "channelsContract", { enumerable: true, get: function () { return channels_contract_1.channelsContract; } });
|
|
23
|
+
const user_contract_1 = require("./contracts/user.contract");
|
|
24
|
+
Object.defineProperty(exports, "userContract", { enumerable: true, get: function () { return user_contract_1.userContract; } });
|
|
25
|
+
const resume_contract_1 = require("./contracts/resume.contract");
|
|
26
|
+
Object.defineProperty(exports, "resumeContract", { enumerable: true, get: function () { return resume_contract_1.resumeContract; } });
|
|
27
|
+
const sniper_contract_1 = require("./contracts/sniper.contract");
|
|
28
|
+
Object.defineProperty(exports, "sniperContract", { enumerable: true, get: function () { return sniper_contract_1.sniperContract; } });
|
|
29
|
+
const notifications_contract_1 = require("./contracts/notifications.contract");
|
|
30
|
+
Object.defineProperty(exports, "notificationsContract", { enumerable: true, get: function () { return notifications_contract_1.notificationsContract; } });
|
|
31
|
+
const stats_contract_1 = require("./contracts/stats.contract");
|
|
32
|
+
Object.defineProperty(exports, "statsContract", { enumerable: true, get: function () { return stats_contract_1.statsContract; } });
|
|
33
|
+
Object.defineProperty(exports, "feedbackContract", { enumerable: true, get: function () { return stats_contract_1.feedbackContract; } });
|
|
34
|
+
const bundles_contract_1 = require("./contracts/bundles.contract");
|
|
35
|
+
Object.defineProperty(exports, "bundlesContract", { enumerable: true, get: function () { return bundles_contract_1.bundlesContract; } });
|
|
36
|
+
const c = (0, core_1.initContract)();
|
|
37
|
+
// Combined API contract
|
|
38
|
+
exports.apiContract = c.router({
|
|
39
|
+
jobs: jobs_contract_1.jobsContract,
|
|
40
|
+
channels: channels_contract_1.channelsContract,
|
|
41
|
+
user: user_contract_1.userContract,
|
|
42
|
+
resume: resume_contract_1.resumeContract,
|
|
43
|
+
sniper: sniper_contract_1.sniperContract,
|
|
44
|
+
notifications: notifications_contract_1.notificationsContract,
|
|
45
|
+
stats: stats_contract_1.statsContract,
|
|
46
|
+
feedback: stats_contract_1.feedbackContract,
|
|
47
|
+
bundles: bundles_contract_1.bundlesContract,
|
|
48
|
+
});
|
|
49
|
+
// Export all schemas
|
|
50
|
+
__exportStar(require("./schemas/common"), exports);
|
|
51
|
+
__exportStar(require("./schemas/jobs"), exports);
|
|
52
|
+
__exportStar(require("./schemas/channels"), exports);
|
|
53
|
+
__exportStar(require("./schemas/user"), exports);
|
|
54
|
+
__exportStar(require("./schemas/bundles"), exports);
|
|
55
|
+
__exportStar(require("./schemas/errors"), exports);
|
|
56
|
+
// Re-export core types
|
|
57
|
+
var core_2 = require("@ts-rest/core");
|
|
58
|
+
Object.defineProperty(exports, "initContract", { enumerable: true, get: function () { return core_2.initContract; } });
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BundleSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
channels: z.ZodArray<z.ZodString, "many">;
|
|
7
|
+
category: z.ZodOptional<z.ZodString>;
|
|
8
|
+
isActive: z.ZodBoolean;
|
|
9
|
+
order: z.ZodNumber;
|
|
10
|
+
createdAt: z.ZodString;
|
|
11
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
id: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
name: string;
|
|
17
|
+
channels: string[];
|
|
18
|
+
order: number;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
updatedAt?: string | undefined;
|
|
21
|
+
category?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
id: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
name: string;
|
|
27
|
+
channels: string[];
|
|
28
|
+
order: number;
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
updatedAt?: string | undefined;
|
|
31
|
+
category?: string | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=bundles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundles.d.ts","sourceRoot":"","sources":["../../src/schemas/bundles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUvB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BundleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.BundleSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
name: zod_1.z.string(),
|
|
8
|
+
description: zod_1.z.string().optional(),
|
|
9
|
+
channels: zod_1.z.array(zod_1.z.string()),
|
|
10
|
+
category: zod_1.z.string().optional(),
|
|
11
|
+
isActive: zod_1.z.boolean(),
|
|
12
|
+
order: zod_1.z.number(),
|
|
13
|
+
createdAt: zod_1.z.string(),
|
|
14
|
+
updatedAt: zod_1.z.string().optional(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ChannelSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
username: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
category: z.ZodOptional<z.ZodString>;
|
|
8
|
+
memberCount: z.ZodOptional<z.ZodString>;
|
|
9
|
+
isActive: z.ZodBoolean;
|
|
10
|
+
isRecommended: z.ZodBoolean;
|
|
11
|
+
lastScrapedAt: z.ZodOptional<z.ZodString>;
|
|
12
|
+
createdAt: z.ZodString;
|
|
13
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
username: string;
|
|
18
|
+
title: string;
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
isRecommended: boolean;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
updatedAt?: string | undefined;
|
|
23
|
+
category?: string | undefined;
|
|
24
|
+
memberCount?: string | undefined;
|
|
25
|
+
lastScrapedAt?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
id: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
username: string;
|
|
30
|
+
title: string;
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
isRecommended: boolean;
|
|
33
|
+
description?: string | undefined;
|
|
34
|
+
updatedAt?: string | undefined;
|
|
35
|
+
category?: string | undefined;
|
|
36
|
+
memberCount?: string | undefined;
|
|
37
|
+
lastScrapedAt?: string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const CategorySchema: z.ZodObject<{
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
count: z.ZodNumber;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
name: string;
|
|
44
|
+
count: number;
|
|
45
|
+
}, {
|
|
46
|
+
name: string;
|
|
47
|
+
count: number;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const ExploreChannelsResponseSchema: z.ZodObject<{
|
|
50
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
count: z.ZodNumber;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
name: string;
|
|
55
|
+
count: number;
|
|
56
|
+
}, {
|
|
57
|
+
name: string;
|
|
58
|
+
count: number;
|
|
59
|
+
}>, "many">;
|
|
60
|
+
channelsByCategory: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
username: z.ZodString;
|
|
63
|
+
title: z.ZodString;
|
|
64
|
+
description: z.ZodOptional<z.ZodString>;
|
|
65
|
+
category: z.ZodOptional<z.ZodString>;
|
|
66
|
+
memberCount: z.ZodOptional<z.ZodString>;
|
|
67
|
+
isActive: z.ZodBoolean;
|
|
68
|
+
isRecommended: z.ZodBoolean;
|
|
69
|
+
lastScrapedAt: z.ZodOptional<z.ZodString>;
|
|
70
|
+
createdAt: z.ZodString;
|
|
71
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
id: string;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
username: string;
|
|
76
|
+
title: string;
|
|
77
|
+
isActive: boolean;
|
|
78
|
+
isRecommended: boolean;
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
updatedAt?: string | undefined;
|
|
81
|
+
category?: string | undefined;
|
|
82
|
+
memberCount?: string | undefined;
|
|
83
|
+
lastScrapedAt?: string | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
id: string;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
username: string;
|
|
88
|
+
title: string;
|
|
89
|
+
isActive: boolean;
|
|
90
|
+
isRecommended: boolean;
|
|
91
|
+
description?: string | undefined;
|
|
92
|
+
updatedAt?: string | undefined;
|
|
93
|
+
category?: string | undefined;
|
|
94
|
+
memberCount?: string | undefined;
|
|
95
|
+
lastScrapedAt?: string | undefined;
|
|
96
|
+
}>, "many">>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
categories: {
|
|
99
|
+
name: string;
|
|
100
|
+
count: number;
|
|
101
|
+
}[];
|
|
102
|
+
channelsByCategory: Record<string, {
|
|
103
|
+
id: string;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
username: string;
|
|
106
|
+
title: string;
|
|
107
|
+
isActive: boolean;
|
|
108
|
+
isRecommended: boolean;
|
|
109
|
+
description?: string | undefined;
|
|
110
|
+
updatedAt?: string | undefined;
|
|
111
|
+
category?: string | undefined;
|
|
112
|
+
memberCount?: string | undefined;
|
|
113
|
+
lastScrapedAt?: string | undefined;
|
|
114
|
+
}[]>;
|
|
115
|
+
}, {
|
|
116
|
+
categories: {
|
|
117
|
+
name: string;
|
|
118
|
+
count: number;
|
|
119
|
+
}[];
|
|
120
|
+
channelsByCategory: Record<string, {
|
|
121
|
+
id: string;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
username: string;
|
|
124
|
+
title: string;
|
|
125
|
+
isActive: boolean;
|
|
126
|
+
isRecommended: boolean;
|
|
127
|
+
description?: string | undefined;
|
|
128
|
+
updatedAt?: string | undefined;
|
|
129
|
+
category?: string | undefined;
|
|
130
|
+
memberCount?: string | undefined;
|
|
131
|
+
lastScrapedAt?: string | undefined;
|
|
132
|
+
}[]>;
|
|
133
|
+
}>;
|
|
134
|
+
//# sourceMappingURL=channels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/schemas/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYxB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExploreChannelsResponseSchema = exports.CategorySchema = exports.ChannelSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ChannelSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
username: zod_1.z.string(),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
description: zod_1.z.string().optional(),
|
|
10
|
+
category: zod_1.z.string().optional(),
|
|
11
|
+
memberCount: zod_1.z.string().optional(),
|
|
12
|
+
isActive: zod_1.z.boolean(),
|
|
13
|
+
isRecommended: zod_1.z.boolean(),
|
|
14
|
+
lastScrapedAt: zod_1.z.string().optional(),
|
|
15
|
+
createdAt: zod_1.z.string(),
|
|
16
|
+
updatedAt: zod_1.z.string().optional(),
|
|
17
|
+
});
|
|
18
|
+
exports.CategorySchema = zod_1.z.object({
|
|
19
|
+
name: zod_1.z.string(),
|
|
20
|
+
count: zod_1.z.number(),
|
|
21
|
+
});
|
|
22
|
+
exports.ExploreChannelsResponseSchema = zod_1.z.object({
|
|
23
|
+
categories: zod_1.z.array(exports.CategorySchema),
|
|
24
|
+
channelsByCategory: zod_1.z.record(zod_1.z.array(exports.ChannelSchema)),
|
|
25
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PaginationSchema: z.ZodObject<{
|
|
3
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
limit?: number | undefined;
|
|
7
|
+
offset?: number | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
offset?: number | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaginationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PaginationSchema = zod_1.z.object({
|
|
6
|
+
limit: zod_1.z.number().optional(),
|
|
7
|
+
offset: zod_1.z.number().optional(),
|
|
8
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ErrorResponseSchema: z.ZodObject<{
|
|
3
|
+
success: z.ZodLiteral<false>;
|
|
4
|
+
message: z.ZodString;
|
|
5
|
+
errors: z.ZodOptional<z.ZodAny>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
message: string;
|
|
8
|
+
success: false;
|
|
9
|
+
errors?: any;
|
|
10
|
+
}, {
|
|
11
|
+
message: string;
|
|
12
|
+
success: false;
|
|
13
|
+
errors?: any;
|
|
14
|
+
}>;
|
|
15
|
+
export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
|
|
16
|
+
export declare const SuccessResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
|
|
17
|
+
success: z.ZodLiteral<true>;
|
|
18
|
+
message: z.ZodString;
|
|
19
|
+
data: T;
|
|
20
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
21
|
+
success: z.ZodLiteral<true>;
|
|
22
|
+
message: z.ZodString;
|
|
23
|
+
data: T;
|
|
24
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
25
|
+
success: z.ZodLiteral<true>;
|
|
26
|
+
message: z.ZodString;
|
|
27
|
+
data: T;
|
|
28
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
29
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/schemas/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGhE,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;iEAKvE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SuccessResponseSchema = exports.ErrorResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
// Error response schema (matches server ApiResponse.error format)
|
|
6
|
+
exports.ErrorResponseSchema = zod_1.z.object({
|
|
7
|
+
success: zod_1.z.literal(false),
|
|
8
|
+
message: zod_1.z.string(),
|
|
9
|
+
errors: zod_1.z.any().optional(),
|
|
10
|
+
});
|
|
11
|
+
// Success response wrapper (matches server ApiResponse.success format)
|
|
12
|
+
const SuccessResponseSchema = (dataSchema) => zod_1.z.object({
|
|
13
|
+
success: zod_1.z.literal(true),
|
|
14
|
+
message: zod_1.z.string(),
|
|
15
|
+
data: dataSchema,
|
|
16
|
+
});
|
|
17
|
+
exports.SuccessResponseSchema = SuccessResponseSchema;
|