@dakkitor/api-contracts 1.1.9 → 1.1.11
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/actives/actives.contract.d.ts +263 -263
- package/dist/actives/actives.contract.d.ts.map +1 -1
- package/dist/actives/actives.contract.js +9 -17
- package/dist/agent-client-links/agent-client-links.contract.d.ts +1905 -0
- package/dist/agent-client-links/agent-client-links.contract.d.ts.map +1 -0
- package/dist/agent-client-links/agent-client-links.contract.js +127 -0
- package/dist/auth/auth.contract.d.ts +319 -0
- package/dist/auth/auth.contract.d.ts.map +1 -0
- package/dist/auth/auth.contract.js +63 -0
- package/dist/bookings/bookings.contract.d.ts +2183 -0
- package/dist/bookings/bookings.contract.d.ts.map +1 -0
- package/dist/bookings/bookings.contract.js +278 -0
- package/dist/call-history/call-history.contract.d.ts +1164 -0
- package/dist/call-history/call-history.contract.d.ts.map +1 -0
- package/dist/call-history/call-history.contract.js +254 -0
- package/dist/client-contacts/client-contacts.contract.d.ts +421 -472
- package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
- package/dist/client-contacts/client-contacts.contract.js +26 -15
- package/dist/clients/clients.contract.d.ts +336 -308
- package/dist/clients/clients.contract.d.ts.map +1 -1
- package/dist/clients/clients.contract.js +49 -52
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +3013 -0
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts.map +1 -0
- package/dist/collaboration-checkings/collaboration-checkings.contract.js +247 -0
- package/dist/collaborations/collaborations.contract.d.ts +2229 -0
- package/dist/collaborations/collaborations.contract.d.ts.map +1 -0
- package/dist/collaborations/collaborations.contract.js +284 -0
- package/dist/common/common-schemas.d.ts +120 -0
- package/dist/common/common-schemas.d.ts.map +1 -0
- package/dist/common/common-schemas.js +296 -0
- package/dist/common/error-schemas.d.ts +6 -6
- package/dist/common/openapi-metadata.d.ts +6 -0
- package/dist/common/openapi-metadata.d.ts.map +1 -1
- package/dist/common/pagination-query.schema.d.ts +17 -0
- package/dist/common/pagination-query.schema.d.ts.map +1 -0
- package/dist/common/pagination-query.schema.js +15 -0
- package/dist/common/pagination.schema.d.ts +2 -2
- package/dist/companies/companies.contract.d.ts +1108 -0
- package/dist/companies/companies.contract.d.ts.map +1 -0
- package/dist/companies/companies.contract.js +164 -0
- package/dist/cron-executions/cron-executions.contract.d.ts +1643 -0
- package/dist/cron-executions/cron-executions.contract.d.ts.map +1 -0
- package/dist/cron-executions/cron-executions.contract.js +271 -0
- package/dist/curated-workers/curated-workers.contract.d.ts +3183 -0
- package/dist/curated-workers/curated-workers.contract.d.ts.map +1 -0
- package/dist/curated-workers/curated-workers.contract.js +444 -0
- package/dist/dashboards/agent-daily-metrics.contract.d.ts +639 -0
- package/dist/dashboards/agent-daily-metrics.contract.d.ts.map +1 -0
- package/dist/dashboards/agent-daily-metrics.contract.js +118 -0
- package/dist/files/files.contract.d.ts +1258 -0
- package/dist/files/files.contract.d.ts.map +1 -0
- package/dist/files/files.contract.js +205 -0
- package/dist/health/health.contract.d.ts +161 -0
- package/dist/health/health.contract.d.ts.map +1 -0
- package/dist/health/health.contract.js +52 -0
- package/dist/index.d.ts +28596 -3088
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -0
- package/dist/jobs/jobs.contract.d.ts +2303 -0
- package/dist/jobs/jobs.contract.d.ts.map +1 -0
- package/dist/jobs/jobs.contract.js +295 -0
- package/dist/lead-assignments/lead-assignments.contract.d.ts +1826 -0
- package/dist/lead-assignments/lead-assignments.contract.d.ts.map +1 -0
- package/dist/lead-assignments/lead-assignments.contract.js +187 -0
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +1147 -0
- package/dist/lead-distribution/agent-lead-distribution.contract.d.ts.map +1 -0
- package/dist/lead-distribution/agent-lead-distribution.contract.js +154 -0
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts +1085 -0
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts.map +1 -0
- package/dist/lead-distribution/lead-distribution-config.contract.js +196 -0
- package/dist/leads/leads.contract.d.ts +1690 -0
- package/dist/leads/leads.contract.d.ts.map +1 -0
- package/dist/leads/leads.contract.js +328 -0
- package/dist/locations/locations.contract.d.ts +974 -0
- package/dist/locations/locations.contract.d.ts.map +1 -0
- package/dist/locations/locations.contract.js +154 -0
- package/dist/postcodes/postcodes.contract.d.ts +370 -0
- package/dist/postcodes/postcodes.contract.d.ts.map +1 -0
- package/dist/postcodes/postcodes.contract.js +90 -0
- package/dist/qualifications/qualifications.contract.d.ts +1489 -0
- package/dist/qualifications/qualifications.contract.d.ts.map +1 -0
- package/dist/qualifications/qualifications.contract.js +215 -0
- package/dist/trades/trades.contract.d.ts +799 -0
- package/dist/trades/trades.contract.d.ts.map +1 -0
- package/dist/trades/trades.contract.js +112 -0
- package/dist/users/users.contract.d.ts +315 -299
- package/dist/users/users.contract.d.ts.map +1 -1
- package/dist/users/users.contract.js +13 -29
- package/dist/workers/workers.contract.d.ts +3376 -0
- package/dist/workers/workers.contract.d.ts.map +1 -0
- package/dist/workers/workers.contract.js +363 -0
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboration-checkings.contract.d.ts","sourceRoot":"","sources":["../../contracts/collaboration-checkings/collaboration-checkings.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsCxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF1C,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collaborationCheckingsContract = exports.PaginatedCollaborationCheckingResponseSchema = exports.FilterCollaborationCheckingSchema = exports.UpdateCollaborationCheckingSchema = exports.CreateCollaborationCheckingSchema = exports.CollaborationCheckingSchema = void 0;
|
|
4
|
+
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
5
|
+
const core_1 = require("@ts-rest/core");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const client_contacts_contract_1 = require("../client-contacts/client-contacts.contract");
|
|
8
|
+
const common_schemas_1 = require("../common/common-schemas");
|
|
9
|
+
const error_schemas_1 = require("../common/error-schemas");
|
|
10
|
+
const pagination_query_schema_1 = require("../common/pagination-query.schema");
|
|
11
|
+
const pagination_schema_1 = require("../common/pagination.schema");
|
|
12
|
+
(0, zod_openapi_1.extendZodWithOpenApi)(zod_1.z);
|
|
13
|
+
// Enums
|
|
14
|
+
const CollaborationCheckingUrgencySchema = zod_1.z
|
|
15
|
+
.enum(['LOW', 'MEDIUM', 'HIGH'])
|
|
16
|
+
.openapi({
|
|
17
|
+
title: 'CollaborationCheckingUrgency',
|
|
18
|
+
description: 'The urgency level of the collaboration checking',
|
|
19
|
+
});
|
|
20
|
+
const CollaborationCheckingDecisionSchema = zod_1.z
|
|
21
|
+
.enum(['APPROVED', 'REJECTED', 'PENDING'])
|
|
22
|
+
.openapi({
|
|
23
|
+
title: 'CollaborationCheckingDecision',
|
|
24
|
+
description: 'The decision made on the collaboration checking',
|
|
25
|
+
});
|
|
26
|
+
const CollaborationCheckingEmailTypeSchema = zod_1.z
|
|
27
|
+
.enum(['INTRODUCTION', 'COLLABORATION', 'BOTH'])
|
|
28
|
+
.openapi({
|
|
29
|
+
title: 'CollaborationCheckingEmailType',
|
|
30
|
+
description: 'The type of email to be sent',
|
|
31
|
+
});
|
|
32
|
+
const CollaborationCheckingSortableFieldsSchema = zod_1.z
|
|
33
|
+
.enum(['urgency', 'decision', 'decisionTimestamp', 'createdAt', 'updatedAt'])
|
|
34
|
+
.openapi({
|
|
35
|
+
title: 'CollaborationCheckingSortableFields',
|
|
36
|
+
});
|
|
37
|
+
// Schemas
|
|
38
|
+
exports.CollaborationCheckingSchema = zod_1.z
|
|
39
|
+
.object({
|
|
40
|
+
id: zod_1.z.string().uuid().describe('Unique identifier'),
|
|
41
|
+
collaborationId: zod_1.z.string().uuid().describe('Collaboration ID'),
|
|
42
|
+
// collaboration: CollaborationSchema, // Leaving this out for now to avoid circular deps if not needed, or add later if needed
|
|
43
|
+
clientContactId: zod_1.z
|
|
44
|
+
.string()
|
|
45
|
+
.uuid()
|
|
46
|
+
.nullable()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Client Contact ID'),
|
|
49
|
+
clientContact: client_contacts_contract_1.ClientContactSchema.nullable()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('Client Contact information'),
|
|
52
|
+
urgency: CollaborationCheckingUrgencySchema,
|
|
53
|
+
decision: CollaborationCheckingDecisionSchema,
|
|
54
|
+
decisionTimestamp: zod_1.z
|
|
55
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
56
|
+
.nullable()
|
|
57
|
+
.optional()
|
|
58
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
59
|
+
.describe('Timestamp of decision'),
|
|
60
|
+
decisionComment: zod_1.z
|
|
61
|
+
.string()
|
|
62
|
+
.nullable()
|
|
63
|
+
.optional()
|
|
64
|
+
.describe('Comment regarding decision'),
|
|
65
|
+
isTermsAndConditionsConfirmed: zod_1.z
|
|
66
|
+
.boolean()
|
|
67
|
+
.describe('Terms and conditions confirmation status'),
|
|
68
|
+
termsAndConditionsConfirmedTimestamp: zod_1.z
|
|
69
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
70
|
+
.nullable()
|
|
71
|
+
.optional()
|
|
72
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
73
|
+
.describe('Timestamp of T&C confirmation'),
|
|
74
|
+
emailType: CollaborationCheckingEmailTypeSchema,
|
|
75
|
+
email: zod_1.z.string().email().describe('Email address'),
|
|
76
|
+
introductionEmailSent: zod_1.z
|
|
77
|
+
.boolean()
|
|
78
|
+
.describe('Introduction email sent status'),
|
|
79
|
+
introductionEmailTimestamp: zod_1.z
|
|
80
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
81
|
+
.nullable()
|
|
82
|
+
.optional()
|
|
83
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
84
|
+
.describe('Timestamp of introduction email'),
|
|
85
|
+
collaborationEmailSent: zod_1.z
|
|
86
|
+
.boolean()
|
|
87
|
+
.describe('Collaboration email sent status'),
|
|
88
|
+
collaborationEmailTimestamp: zod_1.z
|
|
89
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
90
|
+
.nullable()
|
|
91
|
+
.optional()
|
|
92
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
93
|
+
.describe('Timestamp of collaboration email'),
|
|
94
|
+
checkingComment: zod_1.z
|
|
95
|
+
.string()
|
|
96
|
+
.nullable()
|
|
97
|
+
.optional()
|
|
98
|
+
.describe('General checking comment'),
|
|
99
|
+
createdAt: zod_1.z
|
|
100
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
101
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
102
|
+
.describe('Creation timestamp'),
|
|
103
|
+
updatedAt: zod_1.z
|
|
104
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
105
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
106
|
+
.describe('Last update timestamp'),
|
|
107
|
+
deletedAt: zod_1.z
|
|
108
|
+
.union([zod_1.z.string().datetime(), zod_1.z.date()])
|
|
109
|
+
.nullable()
|
|
110
|
+
.optional()
|
|
111
|
+
.transform((val) => (val instanceof Date ? val.toISOString() : val))
|
|
112
|
+
.describe('Deletion timestamp'),
|
|
113
|
+
})
|
|
114
|
+
.openapi({ title: 'CollaborationChecking' });
|
|
115
|
+
const ResourceIdSchema = zod_1.z.object({
|
|
116
|
+
id: zod_1.z.string().uuid(),
|
|
117
|
+
});
|
|
118
|
+
exports.CreateCollaborationCheckingSchema = zod_1.z
|
|
119
|
+
.object({
|
|
120
|
+
collaboration: ResourceIdSchema.describe('Select collaboration'),
|
|
121
|
+
clientContact: ResourceIdSchema.describe('Select client contact'),
|
|
122
|
+
urgency: CollaborationCheckingUrgencySchema,
|
|
123
|
+
emailType: CollaborationCheckingEmailTypeSchema,
|
|
124
|
+
email: zod_1.z.string().email().describe('Enter email address'),
|
|
125
|
+
})
|
|
126
|
+
.openapi({ title: 'CreateCollaborationChecking' });
|
|
127
|
+
exports.UpdateCollaborationCheckingSchema = zod_1.z
|
|
128
|
+
.object({
|
|
129
|
+
urgency: CollaborationCheckingUrgencySchema.nullable().optional(),
|
|
130
|
+
emailType: CollaborationCheckingEmailTypeSchema.nullable().optional(),
|
|
131
|
+
email: zod_1.z.string().email().nullable().optional(),
|
|
132
|
+
decision: CollaborationCheckingDecisionSchema.nullable().optional(),
|
|
133
|
+
decisionComment: zod_1.z.string().nullable().optional(),
|
|
134
|
+
isTermsAndConditionsConfirmed: zod_1.z.boolean().nullable().optional(),
|
|
135
|
+
introductionEmailSent: zod_1.z.boolean().nullable().optional(),
|
|
136
|
+
collaborationEmailSent: zod_1.z.boolean().nullable().optional(),
|
|
137
|
+
checkingComment: zod_1.z.string().nullable().optional(),
|
|
138
|
+
clientContactId: zod_1.z.string().uuid().nullable().optional(),
|
|
139
|
+
})
|
|
140
|
+
.openapi({ title: 'UpdateCollaborationChecking' });
|
|
141
|
+
exports.FilterCollaborationCheckingSchema = pagination_query_schema_1.PaginationQuerySchema.extend({
|
|
142
|
+
companyId: zod_1.z.string().uuid().optional().describe('Filter by company ID'),
|
|
143
|
+
clientId: zod_1.z.string().uuid().optional().describe('Filter by client ID'),
|
|
144
|
+
urgency: CollaborationCheckingUrgencySchema.optional().describe('Filter by urgency'),
|
|
145
|
+
decision: CollaborationCheckingDecisionSchema.optional().describe('Filter by decision'),
|
|
146
|
+
createdById: zod_1.z
|
|
147
|
+
.string()
|
|
148
|
+
.uuid()
|
|
149
|
+
.optional()
|
|
150
|
+
.describe('Filter by creator ID (Admin only)'),
|
|
151
|
+
sortBy: CollaborationCheckingSortableFieldsSchema.optional()
|
|
152
|
+
.default('createdAt')
|
|
153
|
+
.describe('Sort by field'),
|
|
154
|
+
sortOrder: common_schemas_1.SortOrderSchema.optional().default('DESC').describe('Sort order'),
|
|
155
|
+
});
|
|
156
|
+
exports.PaginatedCollaborationCheckingResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.CollaborationCheckingSchema)
|
|
157
|
+
.describe('Resources retrieved successfully.')
|
|
158
|
+
.openapi({ title: 'CollaborationCheckingsPaginatedResponse' });
|
|
159
|
+
// Contract
|
|
160
|
+
const c = (0, core_1.initContract)();
|
|
161
|
+
exports.collaborationCheckingsContract = c.router({
|
|
162
|
+
create: {
|
|
163
|
+
method: 'POST',
|
|
164
|
+
path: '/collaboration-checkings',
|
|
165
|
+
body: exports.CreateCollaborationCheckingSchema,
|
|
166
|
+
responses: {
|
|
167
|
+
201: exports.CollaborationCheckingSchema,
|
|
168
|
+
409: error_schemas_1.ErrorResponseSchema,
|
|
169
|
+
},
|
|
170
|
+
summary: 'Create a new collaboration checking',
|
|
171
|
+
metadata: {
|
|
172
|
+
tags: ['Collaboration Checkings'],
|
|
173
|
+
openApi: { operationId: 'createCollaborationChecking' },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
findAll: {
|
|
177
|
+
method: 'GET',
|
|
178
|
+
path: '/collaboration-checkings',
|
|
179
|
+
query: exports.FilterCollaborationCheckingSchema,
|
|
180
|
+
responses: {
|
|
181
|
+
200: exports.PaginatedCollaborationCheckingResponseSchema,
|
|
182
|
+
},
|
|
183
|
+
summary: 'Get all collaboration checkings',
|
|
184
|
+
metadata: {
|
|
185
|
+
tags: ['Collaboration Checkings'],
|
|
186
|
+
openApi: { operationId: 'findAllCollaborationCheckings' },
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
findOne: {
|
|
190
|
+
method: 'GET',
|
|
191
|
+
path: '/collaboration-checkings/:id',
|
|
192
|
+
pathParams: zod_1.z.object({
|
|
193
|
+
id: zod_1.z.string().uuid().describe('Collaboration Checking ID'),
|
|
194
|
+
}),
|
|
195
|
+
responses: {
|
|
196
|
+
200: exports.CollaborationCheckingSchema,
|
|
197
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
198
|
+
},
|
|
199
|
+
summary: 'Get a collaboration checking by ID',
|
|
200
|
+
metadata: {
|
|
201
|
+
tags: ['Collaboration Checkings'],
|
|
202
|
+
openApi: { operationId: 'findOneCollaborationChecking' },
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
update: {
|
|
206
|
+
method: 'PATCH',
|
|
207
|
+
path: '/collaboration-checkings/:id',
|
|
208
|
+
pathParams: zod_1.z.object({
|
|
209
|
+
id: zod_1.z.string().uuid().describe('Collaboration Checking ID'),
|
|
210
|
+
}),
|
|
211
|
+
body: exports.UpdateCollaborationCheckingSchema,
|
|
212
|
+
responses: {
|
|
213
|
+
200: exports.CollaborationCheckingSchema,
|
|
214
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
215
|
+
},
|
|
216
|
+
summary: 'Update a collaboration checking',
|
|
217
|
+
metadata: {
|
|
218
|
+
tags: ['Collaboration Checkings'],
|
|
219
|
+
openApi: { operationId: 'updateCollaborationChecking' },
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
remove: {
|
|
223
|
+
method: 'DELETE',
|
|
224
|
+
path: '/collaboration-checkings/:id',
|
|
225
|
+
pathParams: zod_1.z.object({
|
|
226
|
+
id: zod_1.z.string().uuid().describe('Collaboration Checking ID'),
|
|
227
|
+
}),
|
|
228
|
+
body: c.noBody(),
|
|
229
|
+
responses: {
|
|
230
|
+
204: zod_1.z.undefined(),
|
|
231
|
+
404: error_schemas_1.ErrorResponseSchema,
|
|
232
|
+
},
|
|
233
|
+
summary: 'Delete a collaboration checking',
|
|
234
|
+
metadata: {
|
|
235
|
+
tags: ['Collaboration Checkings'],
|
|
236
|
+
openApi: { operationId: 'deleteCollaborationChecking' },
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
}, {
|
|
240
|
+
pathPrefix: '/v2',
|
|
241
|
+
commonResponses: {
|
|
242
|
+
400: error_schemas_1.ErrorResponseSchema,
|
|
243
|
+
401: error_schemas_1.ErrorResponseSchema,
|
|
244
|
+
403: error_schemas_1.ErrorResponseSchema,
|
|
245
|
+
500: error_schemas_1.ErrorResponseSchema,
|
|
246
|
+
},
|
|
247
|
+
});
|