@dakkitor/api-contracts 1.1.141 → 1.1.142
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/dist/abilities/first-agent.abilities.json +17 -63
- package/dist/abilities/second-agent.abilities.json +10 -0
- package/dist/actives/actives.contract.d.ts +4358 -3670
- package/dist/actives/actives.contract.d.ts.map +1 -1
- package/dist/actives/actives.contract.js +22 -0
- package/dist/agent-client-links/agent-client-links.contract.d.ts +1285 -1285
- package/dist/auth/auth.contract.d.ts +40 -28
- package/dist/auth/auth.contract.d.ts.map +1 -1
- package/dist/bookings/bookings.contract.d.ts +6395 -5825
- package/dist/bookings/bookings.contract.d.ts.map +1 -1
- package/dist/bookings/bookings.contract.js +0 -6
- package/dist/call-history/call-history.contract.d.ts +717 -717
- package/dist/client-contacts/client-contacts.contract.d.ts +309 -309
- package/dist/client-contacts/client-contacts.contract.js +2 -2
- package/dist/clients/clients.contract.d.ts +173 -173
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +2328 -2328
- package/dist/collaborations/collaborations.contract.d.ts +2052 -2052
- package/dist/common/call-rating.schema.d.ts +12 -12
- package/dist/common/call-rating.schema.js +40 -48
- package/dist/common/common-schemas.d.ts +10 -4
- package/dist/common/common-schemas.d.ts.map +1 -1
- package/dist/common/common-schemas.js +2 -0
- package/dist/common/error-schemas.d.ts +5 -11
- package/dist/common/error-schemas.js +8 -11
- package/dist/common/openapi-metadata.d.ts +44 -54
- package/dist/common/openapi-metadata.js +129 -135
- package/dist/common/pagination-query.schema.d.ts +7 -13
- package/dist/common/pagination-query.schema.js +8 -11
- package/dist/companies/companies.contract.d.ts +26 -26
- package/dist/cron-executions/cron-executions.contract.d.ts +255 -7
- package/dist/cron-executions/cron-executions.contract.d.ts.map +1 -1
- package/dist/cron-executions/cron-executions.contract.js +28 -0
- package/dist/curated-workers/curated-workers.contract.d.ts +626 -558
- package/dist/curated-workers/curated-workers.contract.d.ts.map +1 -1
- package/dist/curated-workers/curated-workers.contract.js +2 -4
- package/dist/dashboards/agent-daily-metrics.contract.d.ts +20 -11
- package/dist/dashboards/agent-daily-metrics.contract.d.ts.map +1 -1
- package/dist/dashboards/agent-daily-metrics.contract.js +1 -0
- package/dist/dashboards/dashboard-widgets.contract.d.ts +92 -92
- package/dist/dashboards/dashboard-widgets.contract.d.ts.map +1 -1
- package/dist/dashboards/dashboard-widgets.contract.js +4 -1
- package/dist/dashboards/dashboard.contract.d.ts +12 -12
- package/dist/files/files.contract.d.ts +1189 -1556
- package/dist/files/files.contract.js +162 -177
- package/dist/health/health.contract.d.ts +144 -191
- package/dist/health/health.contract.js +40 -53
- package/dist/jobs/jobs.contract.d.ts +4427 -3769
- package/dist/jobs/jobs.contract.d.ts.map +1 -1
- package/dist/jobs/jobs.contract.js +106 -17
- package/dist/kpi-impersonation/kpi-impersonation.contract.d.ts +114 -114
- package/dist/lead-assignments/lead-assignments.contract.d.ts +606 -606
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +217 -217
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts +16 -16
- package/dist/leads/leads.contract.d.ts +199 -199
- package/dist/locations/locations.contract.d.ts +28 -28
- package/dist/own-research/own-research.contract.d.ts +736 -736
- package/dist/postcodes/postcodes.contract.d.ts +6 -6
- package/dist/qualifications/qualifications.contract.d.ts +1387 -1898
- package/dist/qualifications/qualifications.contract.js +171 -193
- package/dist/trades/trades.contract.d.ts +763 -991
- package/dist/trades/trades.contract.js +89 -111
- package/dist/users/users.contract.d.ts +632 -285
- package/dist/users/users.contract.d.ts.map +1 -1
- package/dist/users/users.contract.js +38 -1
- package/dist/workers/workers.contract.d.ts +4581 -2712
- package/dist/workers/workers.contract.d.ts.map +1 -1
- package/dist/workers/workers.contract.js +277 -28
- package/package.json +1 -1
- package/dist/monitoring/monitoring.contract.d.ts +0 -615
- package/dist/monitoring/monitoring.contract.d.ts.map +0 -1
- package/dist/monitoring/monitoring.contract.js +0 -106
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
export declare enum CallRating {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
NO_ANSWER = 0,
|
|
10
|
+
INVALID_NUMBER = 1,
|
|
11
|
+
STRONGLY_NOT_INTERESTED = 2,
|
|
12
|
+
NOT_INTERESTED_NOW = 3,
|
|
13
|
+
BRUSHED_OFF = 4,
|
|
14
|
+
INTERESTED = 5,
|
|
15
|
+
REQUESTED_INFO = 6,
|
|
16
|
+
WANTS_TO_COLLABORATE = 7,
|
|
17
|
+
FUTURE_NEEDS_IDENTIFIED = 8,
|
|
18
|
+
COLLABORATION_ACCEPTED = 9,
|
|
19
|
+
JOB_RECEIVED = 10
|
|
20
20
|
}
|
|
21
21
|
export declare const CallRatingSchema: z.ZodNativeEnum<typeof CallRating>;
|
|
22
22
|
export type CallRatingType = z.infer<typeof CallRatingSchema>;
|
|
@@ -28,4 +28,4 @@ export declare const CALL_RATING_LABELS: Record<CallRating, string>;
|
|
|
28
28
|
* Short labels for compact UI displays
|
|
29
29
|
*/
|
|
30
30
|
export declare const CALL_RATING_SHORT_LABELS: Record<CallRating, string>;
|
|
31
|
-
//# sourceMappingURL=call-rating.schema.d.ts.map
|
|
31
|
+
//# sourceMappingURL=call-rating.schema.d.ts.map
|
|
@@ -1,71 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Project: Internal Recruitment Platform API
|
|
4
4
|
* File: call-rating.schema.ts
|
|
5
5
|
*
|
|
6
6
|
* Description: Shared CallRating enum and schema to avoid circular imports.
|
|
7
7
|
*/
|
|
8
|
-
Object.defineProperty(exports,
|
|
9
|
-
exports.CALL_RATING_SHORT_LABELS =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.CallRating =
|
|
13
|
-
void 0;
|
|
14
|
-
const zod_openapi_1 = require('@anatine/zod-openapi');
|
|
15
|
-
const zod_1 = require('zod');
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CALL_RATING_SHORT_LABELS = exports.CALL_RATING_LABELS = exports.CallRatingSchema = exports.CallRating = void 0;
|
|
10
|
+
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
11
|
+
const zod_1 = require("zod");
|
|
16
12
|
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
17
13
|
// Call Rating Enum - shared between call-history and lead-assignments
|
|
18
14
|
var CallRating;
|
|
19
15
|
(function (CallRating) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
CallRating[(CallRating['COLLABORATION_ACCEPTED'] = 9)] =
|
|
32
|
-
'COLLABORATION_ACCEPTED';
|
|
33
|
-
CallRating[(CallRating['JOB_RECEIVED'] = 10)] = 'JOB_RECEIVED';
|
|
16
|
+
CallRating[CallRating["NO_ANSWER"] = 0] = "NO_ANSWER";
|
|
17
|
+
CallRating[CallRating["INVALID_NUMBER"] = 1] = "INVALID_NUMBER";
|
|
18
|
+
CallRating[CallRating["STRONGLY_NOT_INTERESTED"] = 2] = "STRONGLY_NOT_INTERESTED";
|
|
19
|
+
CallRating[CallRating["NOT_INTERESTED_NOW"] = 3] = "NOT_INTERESTED_NOW";
|
|
20
|
+
CallRating[CallRating["BRUSHED_OFF"] = 4] = "BRUSHED_OFF";
|
|
21
|
+
CallRating[CallRating["INTERESTED"] = 5] = "INTERESTED";
|
|
22
|
+
CallRating[CallRating["REQUESTED_INFO"] = 6] = "REQUESTED_INFO";
|
|
23
|
+
CallRating[CallRating["WANTS_TO_COLLABORATE"] = 7] = "WANTS_TO_COLLABORATE";
|
|
24
|
+
CallRating[CallRating["FUTURE_NEEDS_IDENTIFIED"] = 8] = "FUTURE_NEEDS_IDENTIFIED";
|
|
25
|
+
CallRating[CallRating["COLLABORATION_ACCEPTED"] = 9] = "COLLABORATION_ACCEPTED";
|
|
26
|
+
CallRating[CallRating["JOB_RECEIVED"] = 10] = "JOB_RECEIVED";
|
|
34
27
|
})(CallRating || (exports.CallRating = CallRating = {}));
|
|
35
28
|
exports.CallRatingSchema = zod_1.z.nativeEnum(CallRating).openapi({
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
title: 'CallRating',
|
|
30
|
+
description: 'Rating of the call outcome (0-10)',
|
|
38
31
|
});
|
|
39
32
|
/**
|
|
40
33
|
* User-friendly labels for display in UI
|
|
41
34
|
*/
|
|
42
35
|
exports.CALL_RATING_LABELS = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[CallRating.JOB_RECEIVED]: 'Job Received from Call',
|
|
36
|
+
[CallRating.NO_ANSWER]: 'No Answer / Denied / Voicemail',
|
|
37
|
+
[CallRating.INVALID_NUMBER]: "Not Construction / Invalid Number / Won't Call",
|
|
38
|
+
[CallRating.STRONGLY_NOT_INTERESTED]: 'Strongly Not Interested / Annoyed / Blacklist',
|
|
39
|
+
[CallRating.NOT_INTERESTED_NOW]: 'Not Interested Now (Call Again Later)',
|
|
40
|
+
[CallRating.BRUSHED_OFF]: 'Asked for Details to Get Rid of Caller',
|
|
41
|
+
[CallRating.INTERESTED]: 'Interested',
|
|
42
|
+
[CallRating.REQUESTED_INFO]: 'Asked for Company Details (Genuine)',
|
|
43
|
+
[CallRating.WANTS_TO_COLLABORATE]: 'Wants to Collaborate',
|
|
44
|
+
[CallRating.FUTURE_NEEDS_IDENTIFIED]: 'Identified Future Trade Needs',
|
|
45
|
+
[CallRating.COLLABORATION_ACCEPTED]: 'Collaboration Accepted',
|
|
46
|
+
[CallRating.JOB_RECEIVED]: 'Job Received from Call',
|
|
55
47
|
};
|
|
56
48
|
/**
|
|
57
49
|
* Short labels for compact UI displays
|
|
58
50
|
*/
|
|
59
51
|
exports.CALL_RATING_SHORT_LABELS = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
[CallRating.NO_ANSWER]: 'No Answer',
|
|
53
|
+
[CallRating.INVALID_NUMBER]: 'Invalid',
|
|
54
|
+
[CallRating.STRONGLY_NOT_INTERESTED]: 'Rejected',
|
|
55
|
+
[CallRating.NOT_INTERESTED_NOW]: 'Not Now',
|
|
56
|
+
[CallRating.BRUSHED_OFF]: 'Brushed Off',
|
|
57
|
+
[CallRating.INTERESTED]: 'Interested',
|
|
58
|
+
[CallRating.REQUESTED_INFO]: 'Info Request',
|
|
59
|
+
[CallRating.WANTS_TO_COLLABORATE]: 'Wants Collab',
|
|
60
|
+
[CallRating.FUTURE_NEEDS_IDENTIFIED]: 'Future Needs',
|
|
61
|
+
[CallRating.COLLABORATION_ACCEPTED]: 'Accepted',
|
|
62
|
+
[CallRating.JOB_RECEIVED]: 'Job Received',
|
|
71
63
|
};
|
|
@@ -44,23 +44,23 @@ export declare const UpsertPhoneNumberSchema: z.ZodEffects<z.ZodObject<{
|
|
|
44
44
|
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
46
|
id?: string | undefined;
|
|
47
|
-
phoneNumber?: string | undefined;
|
|
48
47
|
description?: string | null | undefined;
|
|
48
|
+
phoneNumber?: string | undefined;
|
|
49
49
|
isPrimary?: boolean | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
id?: string | undefined;
|
|
52
|
-
phoneNumber?: string | undefined;
|
|
53
52
|
description?: string | null | undefined;
|
|
53
|
+
phoneNumber?: string | undefined;
|
|
54
54
|
isPrimary?: boolean | undefined;
|
|
55
55
|
}>, {
|
|
56
56
|
id?: string | undefined;
|
|
57
|
-
phoneNumber?: string | undefined;
|
|
58
57
|
description?: string | null | undefined;
|
|
58
|
+
phoneNumber?: string | undefined;
|
|
59
59
|
isPrimary?: boolean | undefined;
|
|
60
60
|
}, {
|
|
61
61
|
id?: string | undefined;
|
|
62
|
-
phoneNumber?: string | undefined;
|
|
63
62
|
description?: string | null | undefined;
|
|
63
|
+
phoneNumber?: string | undefined;
|
|
64
64
|
isPrimary?: boolean | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
export type PhoneNumberResponse = z.infer<typeof PhoneNumberResponseSchema>;
|
|
@@ -136,6 +136,8 @@ export declare const LocationDetailsSchema: z.ZodObject<{
|
|
|
136
136
|
builtUpArea: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
137
137
|
postTown: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
138
138
|
areaCovered: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
139
|
+
latitude: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
140
|
+
longitude: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
139
141
|
}, "strip", z.ZodTypeAny, {
|
|
140
142
|
address?: string | null | undefined;
|
|
141
143
|
postcode?: string | null | undefined;
|
|
@@ -144,6 +146,8 @@ export declare const LocationDetailsSchema: z.ZodObject<{
|
|
|
144
146
|
builtUpArea?: string | null | undefined;
|
|
145
147
|
postTown?: string | null | undefined;
|
|
146
148
|
areaCovered?: string | null | undefined;
|
|
149
|
+
latitude?: number | null | undefined;
|
|
150
|
+
longitude?: number | null | undefined;
|
|
147
151
|
}, {
|
|
148
152
|
address?: string | null | undefined;
|
|
149
153
|
postcode?: string | null | undefined;
|
|
@@ -152,6 +156,8 @@ export declare const LocationDetailsSchema: z.ZodObject<{
|
|
|
152
156
|
builtUpArea?: string | null | undefined;
|
|
153
157
|
postTown?: string | null | undefined;
|
|
154
158
|
areaCovered?: string | null | undefined;
|
|
159
|
+
latitude?: number | null | undefined;
|
|
160
|
+
longitude?: number | null | undefined;
|
|
155
161
|
}>;
|
|
156
162
|
export type CreateLocation = z.infer<typeof CreateLocationSchema>;
|
|
157
163
|
export type LocationDetails = z.infer<typeof LocationDetailsSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-schemas.d.ts","sourceRoot":"","sources":["../../contracts/common/common-schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;GAIG;AACH,eAAO,MAAM,WAAW,2CAKrB,CAAC;AAEJ;;GAEG;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAcM,CAAC;AAE7C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAcM,CAAC;AAE3C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;EAkCM,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AAEH,eAAO,MAAM,eAAe,4BAEM,CAAC;AAEnC,eAAO,MAAM,cAAc,gCAA8B,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;;;;;EAKM,CAAC;AAEnC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAA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AAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAchC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,oBAAoB;;;;;;;;;EAUM,CAAC;AAExC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;EAaM,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,cAAc;;;;;;;;;EAeM,CAAC;AAElC,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,qBAAqB;;;;;;EAIM,CAAC;AAEzC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -342,6 +342,8 @@ exports.LocationDetailsSchema = zod_1.z.object({
|
|
|
342
342
|
builtUpArea: zod_1.z.string().optional().nullable().describe('Built-up area'),
|
|
343
343
|
postTown: zod_1.z.string().optional().nullable().describe('Post town'),
|
|
344
344
|
areaCovered: zod_1.z.string().optional().nullable().describe('Area covered'),
|
|
345
|
+
latitude: zod_1.z.number().optional().nullable().describe('Latitude coordinate'),
|
|
346
|
+
longitude: zod_1.z.number().optional().nullable().describe('Longitude coordinate'),
|
|
345
347
|
});
|
|
346
348
|
exports.LocationFilterSchema = zod_1.z
|
|
347
349
|
.object({
|
|
@@ -3,8 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
* Shared error response schema matching IErrorResponse interface.
|
|
4
4
|
* This ensures type consistency between backend error handling and contract definitions.
|
|
5
5
|
*/
|
|
6
|
-
export declare const ErrorResponseSchema: z.ZodObject<
|
|
7
|
-
{
|
|
6
|
+
export declare const ErrorResponseSchema: z.ZodObject<{
|
|
8
7
|
statusCode: z.ZodNumber;
|
|
9
8
|
message: z.ZodString;
|
|
10
9
|
code: z.ZodString;
|
|
@@ -12,10 +11,7 @@ export declare const ErrorResponseSchema: z.ZodObject<
|
|
|
12
11
|
timestamp: z.ZodString;
|
|
13
12
|
path: z.ZodString;
|
|
14
13
|
correlationId: z.ZodOptional<z.ZodString>;
|
|
15
|
-
|
|
16
|
-
'strip',
|
|
17
|
-
z.ZodTypeAny,
|
|
18
|
-
{
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
15
|
code: string;
|
|
20
16
|
path: string;
|
|
21
17
|
message: string;
|
|
@@ -23,8 +19,7 @@ export declare const ErrorResponseSchema: z.ZodObject<
|
|
|
23
19
|
timestamp: string;
|
|
24
20
|
details?: unknown;
|
|
25
21
|
correlationId?: string | undefined;
|
|
26
|
-
|
|
27
|
-
{
|
|
22
|
+
}, {
|
|
28
23
|
code: string;
|
|
29
24
|
path: string;
|
|
30
25
|
message: string;
|
|
@@ -32,7 +27,6 @@ export declare const ErrorResponseSchema: z.ZodObject<
|
|
|
32
27
|
timestamp: string;
|
|
33
28
|
details?: unknown;
|
|
34
29
|
correlationId?: string | undefined;
|
|
35
|
-
|
|
36
|
-
>;
|
|
30
|
+
}>;
|
|
37
31
|
export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
|
|
38
|
-
//# sourceMappingURL=error-schemas.d.ts.map
|
|
32
|
+
//# sourceMappingURL=error-schemas.d.ts.map
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErrorResponseSchema = void 0;
|
|
4
|
-
const zod_openapi_1 = require(
|
|
5
|
-
const zod_1 = require(
|
|
4
|
+
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
6
|
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
7
7
|
/**
|
|
8
8
|
* Shared error response schema matching IErrorResponse interface.
|
|
9
9
|
* This ensures type consistency between backend error handling and contract definitions.
|
|
10
10
|
*/
|
|
11
11
|
exports.ErrorResponseSchema = zod_1.z
|
|
12
|
-
|
|
12
|
+
.object({
|
|
13
13
|
statusCode: zod_1.z.number().describe('HTTP Status Code'),
|
|
14
14
|
message: zod_1.z.string().describe('Human-readable error message'),
|
|
15
15
|
code: zod_1.z.string().describe('Machine-readable error code'),
|
|
16
16
|
details: zod_1.z.unknown().optional().describe('Additional error details'),
|
|
17
17
|
timestamp: zod_1.z.string().describe('Error timestamp'),
|
|
18
18
|
path: zod_1.z.string().describe('Request path'),
|
|
19
|
-
correlationId: zod_1.z
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.describe('Request correlation ID'),
|
|
23
|
-
})
|
|
24
|
-
.openapi({ title: 'ErrorResponse' });
|
|
19
|
+
correlationId: zod_1.z.string().optional().describe('Request correlation ID'),
|
|
20
|
+
})
|
|
21
|
+
.openapi({ title: 'ErrorResponse' });
|
|
@@ -10,34 +10,34 @@
|
|
|
10
10
|
* Metadata for a single response status code.
|
|
11
11
|
*/
|
|
12
12
|
export interface ResponseMetadata {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Description of the response.
|
|
15
|
+
*/
|
|
16
|
+
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Example response data.
|
|
19
|
+
*/
|
|
20
|
+
example?: Record<string, unknown>;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Metadata for OpenAPI documentation that can be attached to ts-rest routes.
|
|
24
24
|
*/
|
|
25
25
|
export interface OpenApiMetadata {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Tags for grouping endpoints in Swagger UI.
|
|
28
|
+
*/
|
|
29
|
+
tags?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Custom response metadata for each status code.
|
|
32
|
+
* Keys are status codes (e.g., '200', '201', '400', '401', etc.)
|
|
33
|
+
*/
|
|
34
|
+
responses?: Record<string, ResponseMetadata>;
|
|
35
|
+
/**
|
|
36
|
+
* Indicates if the route is public (no authentication required).
|
|
37
|
+
* If true, the route will not require JWT authentication in the OpenAPI spec.
|
|
38
|
+
* If false or undefined, the route requires authentication (default).
|
|
39
|
+
*/
|
|
40
|
+
isPublic?: boolean;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Standard error response examples and descriptions
|
|
@@ -47,35 +47,25 @@ export declare const STANDARD_ERROR_RESPONSES: Record<number, ResponseMetadata>;
|
|
|
47
47
|
* Helper to create metadata for standard CRUD operations
|
|
48
48
|
*/
|
|
49
49
|
export declare const createStandardMetadata: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*/
|
|
71
|
-
update: (
|
|
72
|
-
customResponses?: Record<string, ResponseMetadata>,
|
|
73
|
-
) => OpenApiMetadata;
|
|
74
|
-
/**
|
|
75
|
-
* Metadata for DELETE operations (204)
|
|
76
|
-
*/
|
|
77
|
-
delete: (
|
|
78
|
-
customResponses?: Record<string, ResponseMetadata>,
|
|
79
|
-
) => OpenApiMetadata;
|
|
50
|
+
/**
|
|
51
|
+
* Metadata for CREATE operations (201)
|
|
52
|
+
*/
|
|
53
|
+
create: (customResponses?: Record<string, ResponseMetadata>) => OpenApiMetadata;
|
|
54
|
+
/**
|
|
55
|
+
* Metadata for FIND ONE operations (200)
|
|
56
|
+
*/
|
|
57
|
+
findOne: (customResponses?: Record<string, ResponseMetadata>) => OpenApiMetadata;
|
|
58
|
+
/**
|
|
59
|
+
* Metadata for FIND ALL operations (200)
|
|
60
|
+
*/
|
|
61
|
+
findAll: (customResponses?: Record<string, ResponseMetadata>) => OpenApiMetadata;
|
|
62
|
+
/**
|
|
63
|
+
* Metadata for UPDATE operations (200)
|
|
64
|
+
*/
|
|
65
|
+
update: (customResponses?: Record<string, ResponseMetadata>) => OpenApiMetadata;
|
|
66
|
+
/**
|
|
67
|
+
* Metadata for DELETE operations (204)
|
|
68
|
+
*/
|
|
69
|
+
delete: (customResponses?: Record<string, ResponseMetadata>) => OpenApiMetadata;
|
|
80
70
|
};
|
|
81
|
-
//# sourceMappingURL=openapi-metadata.d.ts.map
|
|
71
|
+
//# sourceMappingURL=openapi-metadata.d.ts.map
|