@dakkitor/api-contracts 1.1.1 → 1.1.2
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/client-contacts/client-contacts.contract.d.ts +539 -34
- package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
- package/dist/client-contacts/client-contacts.contract.js +10 -10
- package/dist/clients/clients.contract.d.ts +418 -33
- package/dist/clients/clients.contract.d.ts.map +1 -1
- package/dist/clients/clients.contract.js +10 -10
- package/dist/index.d.ts +955 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
|
@@ -68,10 +68,10 @@ exports.FilterClientContactSchema = zod_1.z.object({
|
|
|
68
68
|
sortOrder: SortOrderSchema.default('DESC').describe('Sort order'),
|
|
69
69
|
});
|
|
70
70
|
const c = (0, core_1.initContract)();
|
|
71
|
-
|
|
71
|
+
const clientContactsContractConfig = {
|
|
72
72
|
create: {
|
|
73
73
|
method: 'POST',
|
|
74
|
-
path: '/client-contacts',
|
|
74
|
+
path: '/v2/client-contacts',
|
|
75
75
|
responses: {
|
|
76
76
|
201: exports.ClientContactSchema,
|
|
77
77
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -85,7 +85,7 @@ exports.clientContactsContract = c.router({
|
|
|
85
85
|
},
|
|
86
86
|
createByClientId: {
|
|
87
87
|
method: 'POST',
|
|
88
|
-
path: '/client-contacts/client/:clientId',
|
|
88
|
+
path: '/v2/client-contacts/client/:clientId',
|
|
89
89
|
responses: {
|
|
90
90
|
201: exports.ClientContactSchema,
|
|
91
91
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -102,7 +102,7 @@ exports.clientContactsContract = c.router({
|
|
|
102
102
|
},
|
|
103
103
|
findAll: {
|
|
104
104
|
method: 'GET',
|
|
105
|
-
path: '/client-contacts',
|
|
105
|
+
path: '/v2/client-contacts',
|
|
106
106
|
responses: {
|
|
107
107
|
200: (0, pagination_schema_1.createPaginatedResponseSchema)(exports.ClientContactSchema),
|
|
108
108
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -115,7 +115,7 @@ exports.clientContactsContract = c.router({
|
|
|
115
115
|
},
|
|
116
116
|
findOne: {
|
|
117
117
|
method: 'GET',
|
|
118
|
-
path: '/client-contacts/:contactId',
|
|
118
|
+
path: '/v2/client-contacts/:contactId',
|
|
119
119
|
responses: {
|
|
120
120
|
200: exports.ClientContactSchema,
|
|
121
121
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -131,7 +131,7 @@ exports.clientContactsContract = c.router({
|
|
|
131
131
|
},
|
|
132
132
|
update: {
|
|
133
133
|
method: 'PATCH',
|
|
134
|
-
path: '/client-contacts/:contactId',
|
|
134
|
+
path: '/v2/client-contacts/:contactId',
|
|
135
135
|
responses: {
|
|
136
136
|
200: exports.ClientContactSchema,
|
|
137
137
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -149,7 +149,7 @@ exports.clientContactsContract = c.router({
|
|
|
149
149
|
},
|
|
150
150
|
remove: {
|
|
151
151
|
method: 'DELETE',
|
|
152
|
-
path: '/client-contacts/:contactId',
|
|
152
|
+
path: '/v2/client-contacts/:contactId',
|
|
153
153
|
responses: {
|
|
154
154
|
204: c.noBody(),
|
|
155
155
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -164,6 +164,6 @@ exports.clientContactsContract = c.router({
|
|
|
164
164
|
body: c.noBody(),
|
|
165
165
|
summary: 'Delete a client contact',
|
|
166
166
|
},
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
};
|
|
168
|
+
const clientContactsContractRouter = c.router(clientContactsContractConfig);
|
|
169
|
+
exports.clientContactsContract = clientContactsContractRouter;
|
|
@@ -94,20 +94,161 @@ export type FilterClientV2 = z.infer<typeof FilterClientSchema>;
|
|
|
94
94
|
export type ClientAutocompleteResponseV2 = z.infer<typeof ClientAutocompleteResponseSchema>;
|
|
95
95
|
export type AutocompleteQueryV2 = z.infer<typeof AutocompleteQuerySchema>;
|
|
96
96
|
export type PaginatedResponseV2 = z.infer<typeof PaginatedResponseSchema>;
|
|
97
|
-
|
|
98
|
-
create: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
declare const clientsContractConfig: {
|
|
98
|
+
readonly create: {
|
|
99
|
+
readonly method: "POST";
|
|
100
|
+
readonly path: "/v2/clients";
|
|
101
|
+
readonly responses: {
|
|
102
|
+
readonly 201: z.ZodObject<{
|
|
103
|
+
id: z.ZodUUID;
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
crn: z.ZodString;
|
|
106
|
+
govLink: z.ZodURL;
|
|
107
|
+
status: z.ZodEnum<{
|
|
108
|
+
APPROVED: "APPROVED";
|
|
109
|
+
PENDING_VERIFICATION: "PENDING_VERIFICATION";
|
|
110
|
+
BLACKLISTED: "BLACKLISTED";
|
|
111
|
+
}>;
|
|
112
|
+
director: z.ZodString;
|
|
113
|
+
blacklistReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
lastUpdatedBy: z.ZodObject<{
|
|
115
|
+
id: z.ZodUUID;
|
|
116
|
+
firstName: z.ZodString;
|
|
117
|
+
lastName: z.ZodString;
|
|
118
|
+
email: z.ZodEmail;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
createdAt: z.ZodISODateTime;
|
|
121
|
+
updatedAt: z.ZodISODateTime;
|
|
122
|
+
version: z.ZodNumber;
|
|
123
|
+
agentClientLinks: z.ZodObject<{
|
|
124
|
+
agentId: z.ZodString;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
readonly 400: z.ZodObject<{
|
|
128
|
+
statusCode: z.ZodNumber;
|
|
129
|
+
message: z.ZodString;
|
|
130
|
+
code: z.ZodString;
|
|
131
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
132
|
+
timestamp: z.ZodString;
|
|
133
|
+
path: z.ZodString;
|
|
134
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
readonly 401: z.ZodObject<{
|
|
137
|
+
statusCode: z.ZodNumber;
|
|
138
|
+
message: z.ZodString;
|
|
139
|
+
code: z.ZodString;
|
|
140
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
141
|
+
timestamp: z.ZodString;
|
|
142
|
+
path: z.ZodString;
|
|
143
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
readonly 403: z.ZodObject<{
|
|
146
|
+
statusCode: z.ZodNumber;
|
|
147
|
+
message: z.ZodString;
|
|
148
|
+
code: z.ZodString;
|
|
149
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
150
|
+
timestamp: z.ZodString;
|
|
151
|
+
path: z.ZodString;
|
|
152
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
readonly 409: z.ZodObject<{
|
|
155
|
+
statusCode: z.ZodNumber;
|
|
156
|
+
message: z.ZodString;
|
|
157
|
+
code: z.ZodString;
|
|
158
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
159
|
+
timestamp: z.ZodString;
|
|
160
|
+
path: z.ZodString;
|
|
161
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
readonly 500: z.ZodObject<{
|
|
164
|
+
statusCode: z.ZodNumber;
|
|
165
|
+
message: z.ZodString;
|
|
166
|
+
code: z.ZodString;
|
|
167
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
168
|
+
timestamp: z.ZodString;
|
|
169
|
+
path: z.ZodString;
|
|
170
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
};
|
|
173
|
+
readonly body: z.ZodObject<{
|
|
103
174
|
name: z.ZodString;
|
|
104
175
|
govLink: z.ZodURL;
|
|
105
176
|
director: z.ZodString;
|
|
106
177
|
}, z.core.$strip>;
|
|
178
|
+
readonly summary: "Create a new client";
|
|
107
179
|
};
|
|
108
|
-
findAll: {
|
|
109
|
-
|
|
110
|
-
|
|
180
|
+
readonly findAll: {
|
|
181
|
+
readonly method: "GET";
|
|
182
|
+
readonly path: "/v2/clients";
|
|
183
|
+
readonly responses: {
|
|
184
|
+
readonly 200: z.ZodObject<{
|
|
185
|
+
data: z.ZodArray<z.ZodObject<{
|
|
186
|
+
id: z.ZodUUID;
|
|
187
|
+
name: z.ZodString;
|
|
188
|
+
crn: z.ZodString;
|
|
189
|
+
govLink: z.ZodURL;
|
|
190
|
+
status: z.ZodEnum<{
|
|
191
|
+
APPROVED: "APPROVED";
|
|
192
|
+
PENDING_VERIFICATION: "PENDING_VERIFICATION";
|
|
193
|
+
BLACKLISTED: "BLACKLISTED";
|
|
194
|
+
}>;
|
|
195
|
+
director: z.ZodString;
|
|
196
|
+
blacklistReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
+
lastUpdatedBy: z.ZodObject<{
|
|
198
|
+
id: z.ZodUUID;
|
|
199
|
+
firstName: z.ZodString;
|
|
200
|
+
lastName: z.ZodString;
|
|
201
|
+
email: z.ZodEmail;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
createdAt: z.ZodISODateTime;
|
|
204
|
+
updatedAt: z.ZodISODateTime;
|
|
205
|
+
version: z.ZodNumber;
|
|
206
|
+
agentClientLinks: z.ZodObject<{
|
|
207
|
+
agentId: z.ZodString;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
total: z.ZodNumber;
|
|
211
|
+
limit: z.ZodNumber;
|
|
212
|
+
skip: z.ZodNumber;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
readonly 400: z.ZodObject<{
|
|
215
|
+
statusCode: z.ZodNumber;
|
|
216
|
+
message: z.ZodString;
|
|
217
|
+
code: z.ZodString;
|
|
218
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
219
|
+
timestamp: z.ZodString;
|
|
220
|
+
path: z.ZodString;
|
|
221
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
readonly 401: z.ZodObject<{
|
|
224
|
+
statusCode: z.ZodNumber;
|
|
225
|
+
message: z.ZodString;
|
|
226
|
+
code: z.ZodString;
|
|
227
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
228
|
+
timestamp: z.ZodString;
|
|
229
|
+
path: z.ZodString;
|
|
230
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
readonly 403: z.ZodObject<{
|
|
233
|
+
statusCode: z.ZodNumber;
|
|
234
|
+
message: z.ZodString;
|
|
235
|
+
code: z.ZodString;
|
|
236
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
237
|
+
timestamp: z.ZodString;
|
|
238
|
+
path: z.ZodString;
|
|
239
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
readonly 500: z.ZodObject<{
|
|
242
|
+
statusCode: z.ZodNumber;
|
|
243
|
+
message: z.ZodString;
|
|
244
|
+
code: z.ZodString;
|
|
245
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
246
|
+
timestamp: z.ZodString;
|
|
247
|
+
path: z.ZodString;
|
|
248
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
};
|
|
251
|
+
readonly query: z.ZodObject<{
|
|
111
252
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
112
253
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
113
254
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -117,33 +258,226 @@ export declare const clientsContract: {
|
|
|
117
258
|
BLACKLISTED: "BLACKLISTED";
|
|
118
259
|
}>>;
|
|
119
260
|
}, z.core.$strip>;
|
|
120
|
-
summary: "Get all clients";
|
|
121
|
-
method: "GET";
|
|
261
|
+
readonly summary: "Get all clients";
|
|
122
262
|
};
|
|
123
|
-
autocomplete: {
|
|
124
|
-
|
|
125
|
-
|
|
263
|
+
readonly autocomplete: {
|
|
264
|
+
readonly method: "GET";
|
|
265
|
+
readonly path: "/v2/clients/autocomplete";
|
|
266
|
+
readonly responses: {
|
|
267
|
+
readonly 200: z.ZodArray<z.ZodObject<{
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
}, z.core.$strip>>;
|
|
271
|
+
readonly 400: z.ZodObject<{
|
|
272
|
+
statusCode: z.ZodNumber;
|
|
273
|
+
message: z.ZodString;
|
|
274
|
+
code: z.ZodString;
|
|
275
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
276
|
+
timestamp: z.ZodString;
|
|
277
|
+
path: z.ZodString;
|
|
278
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
readonly 401: z.ZodObject<{
|
|
281
|
+
statusCode: z.ZodNumber;
|
|
282
|
+
message: z.ZodString;
|
|
283
|
+
code: z.ZodString;
|
|
284
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
285
|
+
timestamp: z.ZodString;
|
|
286
|
+
path: z.ZodString;
|
|
287
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
readonly 403: z.ZodObject<{
|
|
290
|
+
statusCode: z.ZodNumber;
|
|
291
|
+
message: z.ZodString;
|
|
292
|
+
code: z.ZodString;
|
|
293
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
294
|
+
timestamp: z.ZodString;
|
|
295
|
+
path: z.ZodString;
|
|
296
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
readonly 500: z.ZodObject<{
|
|
299
|
+
statusCode: z.ZodNumber;
|
|
300
|
+
message: z.ZodString;
|
|
301
|
+
code: z.ZodString;
|
|
302
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
303
|
+
timestamp: z.ZodString;
|
|
304
|
+
path: z.ZodString;
|
|
305
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
};
|
|
308
|
+
readonly query: z.ZodObject<{
|
|
126
309
|
search: z.ZodOptional<z.ZodString>;
|
|
127
310
|
}, z.core.$strip>;
|
|
128
|
-
summary: "Get clients for autocomplete";
|
|
129
|
-
method: "GET";
|
|
311
|
+
readonly summary: "Get clients for autocomplete";
|
|
130
312
|
};
|
|
131
|
-
findOne: {
|
|
132
|
-
|
|
133
|
-
|
|
313
|
+
readonly findOne: {
|
|
314
|
+
readonly method: "GET";
|
|
315
|
+
readonly path: "/v2/clients/:id";
|
|
316
|
+
readonly responses: {
|
|
317
|
+
readonly 200: z.ZodObject<{
|
|
318
|
+
id: z.ZodUUID;
|
|
319
|
+
name: z.ZodString;
|
|
320
|
+
crn: z.ZodString;
|
|
321
|
+
govLink: z.ZodURL;
|
|
322
|
+
status: z.ZodEnum<{
|
|
323
|
+
APPROVED: "APPROVED";
|
|
324
|
+
PENDING_VERIFICATION: "PENDING_VERIFICATION";
|
|
325
|
+
BLACKLISTED: "BLACKLISTED";
|
|
326
|
+
}>;
|
|
327
|
+
director: z.ZodString;
|
|
328
|
+
blacklistReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
329
|
+
lastUpdatedBy: z.ZodObject<{
|
|
330
|
+
id: z.ZodUUID;
|
|
331
|
+
firstName: z.ZodString;
|
|
332
|
+
lastName: z.ZodString;
|
|
333
|
+
email: z.ZodEmail;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
createdAt: z.ZodISODateTime;
|
|
336
|
+
updatedAt: z.ZodISODateTime;
|
|
337
|
+
version: z.ZodNumber;
|
|
338
|
+
agentClientLinks: z.ZodObject<{
|
|
339
|
+
agentId: z.ZodString;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
readonly 400: z.ZodObject<{
|
|
343
|
+
statusCode: z.ZodNumber;
|
|
344
|
+
message: z.ZodString;
|
|
345
|
+
code: z.ZodString;
|
|
346
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
347
|
+
timestamp: z.ZodString;
|
|
348
|
+
path: z.ZodString;
|
|
349
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
readonly 401: z.ZodObject<{
|
|
352
|
+
statusCode: z.ZodNumber;
|
|
353
|
+
message: z.ZodString;
|
|
354
|
+
code: z.ZodString;
|
|
355
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
356
|
+
timestamp: z.ZodString;
|
|
357
|
+
path: z.ZodString;
|
|
358
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
359
|
+
}, z.core.$strip>;
|
|
360
|
+
readonly 403: z.ZodObject<{
|
|
361
|
+
statusCode: z.ZodNumber;
|
|
362
|
+
message: z.ZodString;
|
|
363
|
+
code: z.ZodString;
|
|
364
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
365
|
+
timestamp: z.ZodString;
|
|
366
|
+
path: z.ZodString;
|
|
367
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
readonly 404: z.ZodObject<{
|
|
370
|
+
statusCode: z.ZodNumber;
|
|
371
|
+
message: z.ZodString;
|
|
372
|
+
code: z.ZodString;
|
|
373
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
374
|
+
timestamp: z.ZodString;
|
|
375
|
+
path: z.ZodString;
|
|
376
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
377
|
+
}, z.core.$strip>;
|
|
378
|
+
readonly 500: z.ZodObject<{
|
|
379
|
+
statusCode: z.ZodNumber;
|
|
380
|
+
message: z.ZodString;
|
|
381
|
+
code: z.ZodString;
|
|
382
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
383
|
+
timestamp: z.ZodString;
|
|
384
|
+
path: z.ZodString;
|
|
385
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
};
|
|
388
|
+
readonly pathParams: z.ZodObject<{
|
|
134
389
|
id: z.ZodUUID;
|
|
135
390
|
}, z.core.$strip>;
|
|
136
|
-
summary: "Get a client by ID";
|
|
137
|
-
method: "GET";
|
|
391
|
+
readonly summary: "Get a client by ID";
|
|
138
392
|
};
|
|
139
|
-
update: {
|
|
140
|
-
|
|
141
|
-
|
|
393
|
+
readonly update: {
|
|
394
|
+
readonly method: "PATCH";
|
|
395
|
+
readonly path: "/v2/clients/:id";
|
|
396
|
+
readonly responses: {
|
|
397
|
+
readonly 200: z.ZodObject<{
|
|
398
|
+
id: z.ZodUUID;
|
|
399
|
+
name: z.ZodString;
|
|
400
|
+
crn: z.ZodString;
|
|
401
|
+
govLink: z.ZodURL;
|
|
402
|
+
status: z.ZodEnum<{
|
|
403
|
+
APPROVED: "APPROVED";
|
|
404
|
+
PENDING_VERIFICATION: "PENDING_VERIFICATION";
|
|
405
|
+
BLACKLISTED: "BLACKLISTED";
|
|
406
|
+
}>;
|
|
407
|
+
director: z.ZodString;
|
|
408
|
+
blacklistReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
409
|
+
lastUpdatedBy: z.ZodObject<{
|
|
410
|
+
id: z.ZodUUID;
|
|
411
|
+
firstName: z.ZodString;
|
|
412
|
+
lastName: z.ZodString;
|
|
413
|
+
email: z.ZodEmail;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
createdAt: z.ZodISODateTime;
|
|
416
|
+
updatedAt: z.ZodISODateTime;
|
|
417
|
+
version: z.ZodNumber;
|
|
418
|
+
agentClientLinks: z.ZodObject<{
|
|
419
|
+
agentId: z.ZodString;
|
|
420
|
+
}, z.core.$strip>;
|
|
421
|
+
}, z.core.$strip>;
|
|
422
|
+
readonly 400: z.ZodObject<{
|
|
423
|
+
statusCode: z.ZodNumber;
|
|
424
|
+
message: z.ZodString;
|
|
425
|
+
code: z.ZodString;
|
|
426
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
427
|
+
timestamp: z.ZodString;
|
|
428
|
+
path: z.ZodString;
|
|
429
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
readonly 401: z.ZodObject<{
|
|
432
|
+
statusCode: z.ZodNumber;
|
|
433
|
+
message: z.ZodString;
|
|
434
|
+
code: z.ZodString;
|
|
435
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
436
|
+
timestamp: z.ZodString;
|
|
437
|
+
path: z.ZodString;
|
|
438
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
readonly 403: z.ZodObject<{
|
|
441
|
+
statusCode: z.ZodNumber;
|
|
442
|
+
message: z.ZodString;
|
|
443
|
+
code: z.ZodString;
|
|
444
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
445
|
+
timestamp: z.ZodString;
|
|
446
|
+
path: z.ZodString;
|
|
447
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
readonly 404: z.ZodObject<{
|
|
450
|
+
statusCode: z.ZodNumber;
|
|
451
|
+
message: z.ZodString;
|
|
452
|
+
code: z.ZodString;
|
|
453
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
454
|
+
timestamp: z.ZodString;
|
|
455
|
+
path: z.ZodString;
|
|
456
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
readonly 409: z.ZodObject<{
|
|
459
|
+
statusCode: z.ZodNumber;
|
|
460
|
+
message: z.ZodString;
|
|
461
|
+
code: z.ZodString;
|
|
462
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
463
|
+
timestamp: z.ZodString;
|
|
464
|
+
path: z.ZodString;
|
|
465
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
466
|
+
}, z.core.$strip>;
|
|
467
|
+
readonly 500: z.ZodObject<{
|
|
468
|
+
statusCode: z.ZodNumber;
|
|
469
|
+
message: z.ZodString;
|
|
470
|
+
code: z.ZodString;
|
|
471
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
472
|
+
timestamp: z.ZodString;
|
|
473
|
+
path: z.ZodString;
|
|
474
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
475
|
+
}, z.core.$strip>;
|
|
476
|
+
};
|
|
477
|
+
readonly pathParams: z.ZodObject<{
|
|
142
478
|
id: z.ZodUUID;
|
|
143
479
|
}, z.core.$strip>;
|
|
144
|
-
|
|
145
|
-
method: "PATCH";
|
|
146
|
-
body: z.ZodObject<{
|
|
480
|
+
readonly body: z.ZodObject<{
|
|
147
481
|
name: z.ZodOptional<z.ZodString>;
|
|
148
482
|
govLink: z.ZodOptional<z.ZodURL>;
|
|
149
483
|
director: z.ZodOptional<z.ZodString>;
|
|
@@ -154,15 +488,66 @@ export declare const clientsContract: {
|
|
|
154
488
|
}>>;
|
|
155
489
|
blacklistReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
490
|
}, z.core.$strip>;
|
|
491
|
+
readonly summary: "Update a client";
|
|
157
492
|
};
|
|
158
|
-
remove: {
|
|
159
|
-
|
|
160
|
-
|
|
493
|
+
readonly remove: {
|
|
494
|
+
readonly method: "DELETE";
|
|
495
|
+
readonly path: "/v2/clients/:id";
|
|
496
|
+
readonly responses: {
|
|
497
|
+
readonly 204: z.ZodNull;
|
|
498
|
+
readonly 400: z.ZodObject<{
|
|
499
|
+
statusCode: z.ZodNumber;
|
|
500
|
+
message: z.ZodString;
|
|
501
|
+
code: z.ZodString;
|
|
502
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
503
|
+
timestamp: z.ZodString;
|
|
504
|
+
path: z.ZodString;
|
|
505
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
readonly 401: z.ZodObject<{
|
|
508
|
+
statusCode: z.ZodNumber;
|
|
509
|
+
message: z.ZodString;
|
|
510
|
+
code: z.ZodString;
|
|
511
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
512
|
+
timestamp: z.ZodString;
|
|
513
|
+
path: z.ZodString;
|
|
514
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
515
|
+
}, z.core.$strip>;
|
|
516
|
+
readonly 403: z.ZodObject<{
|
|
517
|
+
statusCode: z.ZodNumber;
|
|
518
|
+
message: z.ZodString;
|
|
519
|
+
code: z.ZodString;
|
|
520
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
521
|
+
timestamp: z.ZodString;
|
|
522
|
+
path: z.ZodString;
|
|
523
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>;
|
|
525
|
+
readonly 404: z.ZodObject<{
|
|
526
|
+
statusCode: z.ZodNumber;
|
|
527
|
+
message: z.ZodString;
|
|
528
|
+
code: z.ZodString;
|
|
529
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
530
|
+
timestamp: z.ZodString;
|
|
531
|
+
path: z.ZodString;
|
|
532
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
533
|
+
}, z.core.$strip>;
|
|
534
|
+
readonly 500: z.ZodObject<{
|
|
535
|
+
statusCode: z.ZodNumber;
|
|
536
|
+
message: z.ZodString;
|
|
537
|
+
code: z.ZodString;
|
|
538
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
539
|
+
timestamp: z.ZodString;
|
|
540
|
+
path: z.ZodString;
|
|
541
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
542
|
+
}, z.core.$strip>;
|
|
543
|
+
};
|
|
544
|
+
readonly pathParams: z.ZodObject<{
|
|
161
545
|
id: z.ZodUUID;
|
|
162
546
|
}, z.core.$strip>;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
body: z.ZodUndefined;
|
|
547
|
+
readonly body: z.ZodUndefined;
|
|
548
|
+
readonly summary: "Delete a client";
|
|
166
549
|
};
|
|
167
550
|
};
|
|
551
|
+
export declare const clientsContract: typeof clientsContractConfig;
|
|
552
|
+
export {};
|
|
168
553
|
//# sourceMappingURL=clients.contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.contract.d.ts","sourceRoot":"","sources":["../../contracts/clients/clients.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;iBAiBvB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;iBA2B5B,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;;iBAK7B,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACS,CAAC;AAI9C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE1E,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"clients.contract.d.ts","sourceRoot":"","sources":["../../contracts/clients/clients.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;iBAiBvB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;iBA2B5B,CAAC;AAEJ,eAAO,MAAM,kBAAkB;;;;;;;;;iBAK7B,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACS,CAAC;AAI9C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAChE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE1E,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FjB,CAAC;AAIX,eAAO,MAAM,eAAe,EACD,OAAO,qBAAqB,CAAC"}
|
|
@@ -79,10 +79,10 @@ exports.AutocompleteQuerySchema = zod_1.z.object({
|
|
|
79
79
|
});
|
|
80
80
|
exports.PaginatedResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.ClientSchema);
|
|
81
81
|
const c = (0, core_1.initContract)();
|
|
82
|
-
|
|
82
|
+
const clientsContractConfig = {
|
|
83
83
|
create: {
|
|
84
84
|
method: 'POST',
|
|
85
|
-
path: '/clients',
|
|
85
|
+
path: '/v2/clients',
|
|
86
86
|
responses: {
|
|
87
87
|
201: exports.ClientSchema,
|
|
88
88
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -96,7 +96,7 @@ exports.clientsContract = c.router({
|
|
|
96
96
|
},
|
|
97
97
|
findAll: {
|
|
98
98
|
method: 'GET',
|
|
99
|
-
path: '/clients',
|
|
99
|
+
path: '/v2/clients',
|
|
100
100
|
responses: {
|
|
101
101
|
200: exports.PaginatedResponseSchema,
|
|
102
102
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -109,7 +109,7 @@ exports.clientsContract = c.router({
|
|
|
109
109
|
},
|
|
110
110
|
autocomplete: {
|
|
111
111
|
method: 'GET',
|
|
112
|
-
path: '/clients/autocomplete',
|
|
112
|
+
path: '/v2/clients/autocomplete',
|
|
113
113
|
responses: {
|
|
114
114
|
200: zod_1.z.array(exports.ClientAutocompleteResponseSchema),
|
|
115
115
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -122,7 +122,7 @@ exports.clientsContract = c.router({
|
|
|
122
122
|
},
|
|
123
123
|
findOne: {
|
|
124
124
|
method: 'GET',
|
|
125
|
-
path: '/clients/:id',
|
|
125
|
+
path: '/v2/clients/:id',
|
|
126
126
|
responses: {
|
|
127
127
|
200: exports.ClientSchema,
|
|
128
128
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -138,7 +138,7 @@ exports.clientsContract = c.router({
|
|
|
138
138
|
},
|
|
139
139
|
update: {
|
|
140
140
|
method: 'PATCH',
|
|
141
|
-
path: '/clients/:id',
|
|
141
|
+
path: '/v2/clients/:id',
|
|
142
142
|
responses: {
|
|
143
143
|
200: exports.ClientSchema,
|
|
144
144
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -156,7 +156,7 @@ exports.clientsContract = c.router({
|
|
|
156
156
|
},
|
|
157
157
|
remove: {
|
|
158
158
|
method: 'DELETE',
|
|
159
|
-
path: '/clients/:id',
|
|
159
|
+
path: '/v2/clients/:id',
|
|
160
160
|
responses: {
|
|
161
161
|
204: zod_1.z.null(),
|
|
162
162
|
400: error_schemas_1.ErrorResponseSchema,
|
|
@@ -171,6 +171,6 @@ exports.clientsContract = c.router({
|
|
|
171
171
|
body: zod_1.z.undefined(),
|
|
172
172
|
summary: 'Delete a client',
|
|
173
173
|
},
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
};
|
|
175
|
+
const clientsContractRouter = c.router(clientsContractConfig);
|
|
176
|
+
exports.clientsContract = clientsContractRouter;
|