@dakkitor/api-contracts 1.1.2 → 1.1.3
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 +1777 -231
- package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
- package/dist/client-contacts/client-contacts.contract.js +15 -15
- package/dist/clients/clients.contract.d.ts +1125 -161
- package/dist/clients/clients.contract.d.ts.map +1 -1
- package/dist/clients/clients.contract.js +11 -10
- package/dist/common/error-schemas.d.ts +17 -1
- package/dist/common/error-schemas.d.ts.map +1 -1
- package/dist/common/pagination.schema.d.ts +12 -2
- package/dist/common/pagination.schema.d.ts.map +1 -1
- package/dist/index.d.ts +2399 -293
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-contacts.contract.d.ts","sourceRoot":"","sources":["../../contracts/client-contacts/client-contacts.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"client-contacts.contract.d.ts","sourceRoot":"","sources":["../../contracts/client-contacts/client-contacts.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa9B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGxB,CAAC;AAIX,eAAO,MAAM,sBAAsB,EACD,OAAO,4BAA4B,CAAC"}
|
|
@@ -17,27 +17,27 @@ const ClientContactSortableFieldsSchema = zod_1.z.enum([
|
|
|
17
17
|
]);
|
|
18
18
|
// Shared Schemas
|
|
19
19
|
const ResourceIdSchema = zod_1.z.object({
|
|
20
|
-
id: zod_1.z.uuid(),
|
|
20
|
+
id: zod_1.z.string().uuid(),
|
|
21
21
|
});
|
|
22
22
|
// User Schema (duplicated from clients for now to avoid export issues, ideally should be in common)
|
|
23
23
|
const UserSchema = zod_1.z.object({
|
|
24
|
-
id: zod_1.z.uuid(),
|
|
24
|
+
id: zod_1.z.string().uuid(),
|
|
25
25
|
firstName: zod_1.z.string(),
|
|
26
26
|
lastName: zod_1.z.string(),
|
|
27
|
-
email: zod_1.z.email(),
|
|
27
|
+
email: zod_1.z.string().email(),
|
|
28
28
|
});
|
|
29
29
|
exports.ClientContactSchema = zod_1.z.object({
|
|
30
|
-
id: zod_1.z.uuid().describe('Contact ID'),
|
|
31
|
-
clientId: zod_1.z.uuid().describe('Client ID'),
|
|
30
|
+
id: zod_1.z.string().uuid().describe('Contact ID'),
|
|
31
|
+
clientId: zod_1.z.string().uuid().describe('Client ID'),
|
|
32
32
|
client: clients_contract_1.ClientSchema.describe('Client Details'),
|
|
33
33
|
name: zod_1.z.string().describe('Contact Name'),
|
|
34
34
|
position: zod_1.z.string().optional().describe('Job Position'),
|
|
35
35
|
phone: zod_1.z.string().describe('Phone Number'),
|
|
36
|
-
email: zod_1.z.email().describe('Email Address'),
|
|
36
|
+
email: zod_1.z.string().email().describe('Email Address'),
|
|
37
37
|
source: zod_1.z.string().optional().describe('Source'),
|
|
38
38
|
createdBy: UserSchema.describe('Created By'),
|
|
39
|
-
createdAt: zod_1.z.
|
|
40
|
-
updatedAt: zod_1.z.
|
|
39
|
+
createdAt: zod_1.z.string().datetime().describe('Creation Date'),
|
|
40
|
+
updatedAt: zod_1.z.string().datetime().describe('Last Update Date'),
|
|
41
41
|
version: zod_1.z.number().describe('Version Number'),
|
|
42
42
|
});
|
|
43
43
|
exports.CreateClientContactSchema = zod_1.z.object({
|
|
@@ -45,7 +45,7 @@ exports.CreateClientContactSchema = zod_1.z.object({
|
|
|
45
45
|
name: zod_1.z.string().max(255).describe('Full Name'),
|
|
46
46
|
position: zod_1.z.string().max(255).optional().describe('Job Position'),
|
|
47
47
|
phone: zod_1.z.string().max(50).describe('Phone Number'),
|
|
48
|
-
email: zod_1.z.email().max(255).describe('Email Address'),
|
|
48
|
+
email: zod_1.z.string().email().max(255).describe('Email Address'),
|
|
49
49
|
source: zod_1.z.string().max(255).optional().describe('Source'),
|
|
50
50
|
});
|
|
51
51
|
exports.CreateClientContactBodySchema = exports.CreateClientContactSchema.omit({
|
|
@@ -62,8 +62,8 @@ exports.FilterClientContactSchema = zod_1.z.object({
|
|
|
62
62
|
name: zod_1.z.string().optional().describe('Filter by name'),
|
|
63
63
|
email: zod_1.z.string().optional().describe('Filter by email'),
|
|
64
64
|
phone: zod_1.z.string().optional().describe('Filter by phone'),
|
|
65
|
-
clientId: zod_1.z.uuid().optional().describe('Search client'),
|
|
66
|
-
createdById: zod_1.z.uuid().optional().describe('Search by creator'),
|
|
65
|
+
clientId: zod_1.z.string().uuid().optional().describe('Search client'),
|
|
66
|
+
createdById: zod_1.z.string().uuid().optional().describe('Search by creator'),
|
|
67
67
|
sortBy: ClientContactSortableFieldsSchema.default('createdAt').describe('Sort field'),
|
|
68
68
|
sortOrder: SortOrderSchema.default('DESC').describe('Sort order'),
|
|
69
69
|
});
|
|
@@ -95,7 +95,7 @@ const clientContactsContractConfig = {
|
|
|
95
95
|
500: error_schemas_1.ErrorResponseSchema,
|
|
96
96
|
},
|
|
97
97
|
pathParams: zod_1.z.object({
|
|
98
|
-
clientId: zod_1.z.uuid(),
|
|
98
|
+
clientId: zod_1.z.string().uuid(),
|
|
99
99
|
}),
|
|
100
100
|
body: exports.CreateClientContactBodySchema,
|
|
101
101
|
summary: 'Create a new contact for a specific client',
|
|
@@ -125,7 +125,7 @@ const clientContactsContractConfig = {
|
|
|
125
125
|
500: error_schemas_1.ErrorResponseSchema,
|
|
126
126
|
},
|
|
127
127
|
pathParams: zod_1.z.object({
|
|
128
|
-
contactId: zod_1.z.uuid(),
|
|
128
|
+
contactId: zod_1.z.string().uuid(),
|
|
129
129
|
}),
|
|
130
130
|
summary: 'Get a client contact by ID',
|
|
131
131
|
},
|
|
@@ -142,7 +142,7 @@ const clientContactsContractConfig = {
|
|
|
142
142
|
500: error_schemas_1.ErrorResponseSchema,
|
|
143
143
|
},
|
|
144
144
|
pathParams: zod_1.z.object({
|
|
145
|
-
contactId: zod_1.z.uuid(),
|
|
145
|
+
contactId: zod_1.z.string().uuid(),
|
|
146
146
|
}),
|
|
147
147
|
body: exports.UpdateClientContactSchema,
|
|
148
148
|
summary: 'Update a client contact',
|
|
@@ -159,7 +159,7 @@ const clientContactsContractConfig = {
|
|
|
159
159
|
500: error_schemas_1.ErrorResponseSchema,
|
|
160
160
|
},
|
|
161
161
|
pathParams: zod_1.z.object({
|
|
162
|
-
contactId: zod_1.z.uuid(),
|
|
162
|
+
contactId: zod_1.z.string().uuid(),
|
|
163
163
|
}),
|
|
164
164
|
body: c.noBody(),
|
|
165
165
|
summary: 'Delete a client contact',
|