@dakkitor/api-contracts 1.1.10 → 1.1.12

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.
Files changed (89) hide show
  1. package/dist/actives/actives.contract.d.ts +59 -60
  2. package/dist/actives/actives.contract.d.ts.map +1 -1
  3. package/dist/actives/actives.contract.js +16 -19
  4. package/dist/agent-client-links/agent-client-links.contract.d.ts +1909 -0
  5. package/dist/agent-client-links/agent-client-links.contract.d.ts.map +1 -0
  6. package/dist/agent-client-links/agent-client-links.contract.js +127 -0
  7. package/dist/auth/auth.contract.d.ts +319 -0
  8. package/dist/auth/auth.contract.d.ts.map +1 -0
  9. package/dist/auth/auth.contract.js +63 -0
  10. package/dist/bookings/bookings.contract.d.ts +371 -280
  11. package/dist/bookings/bookings.contract.d.ts.map +1 -1
  12. package/dist/bookings/bookings.contract.js +25 -33
  13. package/dist/call-history/call-history.contract.d.ts +1164 -0
  14. package/dist/call-history/call-history.contract.d.ts.map +1 -0
  15. package/dist/call-history/call-history.contract.js +254 -0
  16. package/dist/client-contacts/client-contacts.contract.d.ts +375 -426
  17. package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
  18. package/dist/client-contacts/client-contacts.contract.js +24 -13
  19. package/dist/clients/clients.contract.d.ts +317 -289
  20. package/dist/clients/clients.contract.d.ts.map +1 -1
  21. package/dist/clients/clients.contract.js +44 -29
  22. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +3013 -0
  23. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts.map +1 -0
  24. package/dist/collaboration-checkings/collaboration-checkings.contract.js +247 -0
  25. package/dist/collaborations/collaborations.contract.d.ts +2229 -0
  26. package/dist/collaborations/collaborations.contract.d.ts.map +1 -0
  27. package/dist/collaborations/collaborations.contract.js +284 -0
  28. package/dist/common/common-schemas.d.ts +100 -0
  29. package/dist/common/common-schemas.d.ts.map +1 -1
  30. package/dist/common/common-schemas.js +268 -1
  31. package/dist/common/error-schemas.d.ts +7 -7
  32. package/dist/common/error-schemas.d.ts.map +1 -1
  33. package/dist/common/openapi-metadata.d.ts +6 -0
  34. package/dist/common/openapi-metadata.d.ts.map +1 -1
  35. package/dist/companies/companies.contract.d.ts +1108 -0
  36. package/dist/companies/companies.contract.d.ts.map +1 -0
  37. package/dist/companies/companies.contract.js +164 -0
  38. package/dist/cron-executions/cron-executions.contract.d.ts +1643 -0
  39. package/dist/cron-executions/cron-executions.contract.d.ts.map +1 -0
  40. package/dist/cron-executions/cron-executions.contract.js +271 -0
  41. package/dist/curated-workers/curated-workers.contract.d.ts +3183 -0
  42. package/dist/curated-workers/curated-workers.contract.d.ts.map +1 -0
  43. package/dist/curated-workers/curated-workers.contract.js +444 -0
  44. package/dist/dashboards/agent-daily-metrics.contract.d.ts +639 -0
  45. package/dist/dashboards/agent-daily-metrics.contract.d.ts.map +1 -0
  46. package/dist/dashboards/agent-daily-metrics.contract.js +118 -0
  47. package/dist/files/files.contract.d.ts +1258 -0
  48. package/dist/files/files.contract.d.ts.map +1 -0
  49. package/dist/files/files.contract.js +205 -0
  50. package/dist/health/health.contract.d.ts +161 -0
  51. package/dist/health/health.contract.d.ts.map +1 -0
  52. package/dist/health/health.contract.js +52 -0
  53. package/dist/index.d.ts +27393 -3342
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +63 -0
  56. package/dist/jobs/jobs.contract.d.ts +2303 -0
  57. package/dist/jobs/jobs.contract.d.ts.map +1 -0
  58. package/dist/jobs/jobs.contract.js +295 -0
  59. package/dist/lead-assignments/lead-assignments.contract.d.ts +1826 -0
  60. package/dist/lead-assignments/lead-assignments.contract.d.ts.map +1 -0
  61. package/dist/lead-assignments/lead-assignments.contract.js +187 -0
  62. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +1147 -0
  63. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts.map +1 -0
  64. package/dist/lead-distribution/agent-lead-distribution.contract.js +154 -0
  65. package/dist/lead-distribution/lead-distribution-config.contract.d.ts +1085 -0
  66. package/dist/lead-distribution/lead-distribution-config.contract.d.ts.map +1 -0
  67. package/dist/lead-distribution/lead-distribution-config.contract.js +196 -0
  68. package/dist/leads/leads.contract.d.ts +1690 -0
  69. package/dist/leads/leads.contract.d.ts.map +1 -0
  70. package/dist/leads/leads.contract.js +328 -0
  71. package/dist/locations/locations.contract.d.ts +974 -0
  72. package/dist/locations/locations.contract.d.ts.map +1 -0
  73. package/dist/locations/locations.contract.js +154 -0
  74. package/dist/postcodes/postcodes.contract.d.ts +370 -0
  75. package/dist/postcodes/postcodes.contract.d.ts.map +1 -0
  76. package/dist/postcodes/postcodes.contract.js +90 -0
  77. package/dist/qualifications/qualifications.contract.d.ts +1489 -0
  78. package/dist/qualifications/qualifications.contract.d.ts.map +1 -0
  79. package/dist/qualifications/qualifications.contract.js +215 -0
  80. package/dist/trades/trades.contract.d.ts +799 -0
  81. package/dist/trades/trades.contract.d.ts.map +1 -0
  82. package/dist/trades/trades.contract.js +112 -0
  83. package/dist/users/users.contract.d.ts +162 -152
  84. package/dist/users/users.contract.d.ts.map +1 -1
  85. package/dist/users/users.contract.js +16 -28
  86. package/dist/workers/workers.contract.d.ts +3376 -0
  87. package/dist/workers/workers.contract.d.ts.map +1 -0
  88. package/dist/workers/workers.contract.js +363 -0
  89. package/package.json +4 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifications.contract.d.ts","sourceRoot":"","sources":["../../contracts/qualifications/qualifications.contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,uBAAuB;;;;;;;;;EAQM,CAAC;AAE3C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYM,CAAC;AAEvC,eAAO,MAAM,6BAA6B;;;;;;EAIM,CAAC;AAEjD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;EASM,CAAC;AAE7C,eAAO,MAAM,6BAA6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
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.qualificationsContract = exports.QualificationArraySchema = exports.UpdateQualificationTypeSchema = exports.UpdateQualificationSchema = exports.UpsertQualificationTypeSchema = exports.CreateQualificationSchema = exports.CreateQualificationTypeSchema = exports.QualificationSchema = exports.QualificationTypeSchema = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const error_schemas_1 = require("../common/error-schemas");
7
+ const c = (0, core_1.initContract)();
8
+ // --- Schemas ---
9
+ exports.QualificationTypeSchema = zod_1.z
10
+ .object({
11
+ id: zod_1.z
12
+ .string()
13
+ .uuid()
14
+ .describe('Unique identifier for the qualification type'),
15
+ name: zod_1.z.string().describe('Name of the qualification type'),
16
+ })
17
+ .openapi({ title: 'QualificationType' });
18
+ exports.QualificationSchema = zod_1.z
19
+ .object({
20
+ id: zod_1.z.string().uuid().describe('Unique identifier for the qualification'),
21
+ name: zod_1.z.string().describe('Name of the qualification'),
22
+ description: zod_1.z
23
+ .string()
24
+ .nullable()
25
+ .describe('Description of the qualification'),
26
+ types: zod_1.z
27
+ .array(exports.QualificationTypeSchema)
28
+ .describe('List of specific types associated with this qualification'),
29
+ })
30
+ .openapi({ title: 'Qualification' });
31
+ exports.CreateQualificationTypeSchema = zod_1.z
32
+ .object({
33
+ name: zod_1.z.string().min(1).describe('Name of the qualification type'),
34
+ })
35
+ .openapi({ title: 'CreateQualificationType' });
36
+ exports.CreateQualificationSchema = zod_1.z
37
+ .object({
38
+ name: zod_1.z.string().min(1).describe('Name of the qualification'),
39
+ description: zod_1.z.string().min(1).describe('Description of the qualification'),
40
+ types: zod_1.z
41
+ .array(exports.CreateQualificationTypeSchema)
42
+ .optional()
43
+ .describe('Optional list of types for the qualification'),
44
+ })
45
+ .openapi({ title: 'CreateQualification' });
46
+ exports.UpsertQualificationTypeSchema = zod_1.z
47
+ .object({
48
+ id: zod_1.z
49
+ .string()
50
+ .uuid()
51
+ .optional()
52
+ .describe('ID of the existing qualification type to update. Omit to create a new type.'),
53
+ name: zod_1.z.string().min(1).describe('Name of the qualification type'),
54
+ })
55
+ .openapi({ title: 'UpsertQualificationType' });
56
+ exports.UpdateQualificationSchema = zod_1.z
57
+ .object({
58
+ name: zod_1.z
59
+ .string()
60
+ .min(1)
61
+ .optional()
62
+ .describe('New name of the qualification'),
63
+ description: zod_1.z
64
+ .string()
65
+ .min(1)
66
+ .optional()
67
+ .describe('New description of the qualification'),
68
+ types: zod_1.z
69
+ .array(exports.UpsertQualificationTypeSchema)
70
+ .optional()
71
+ .describe('List of types to create, update, or associate with the qualification.'),
72
+ })
73
+ .openapi({ title: 'UpdateQualification' });
74
+ exports.UpdateQualificationTypeSchema = zod_1.z
75
+ .object({
76
+ name: zod_1.z
77
+ .string()
78
+ .min(1)
79
+ .optional()
80
+ .describe('Name of the qualification type'),
81
+ })
82
+ .openapi({ title: 'UpdateQualificationType' });
83
+ exports.QualificationArraySchema = zod_1.z
84
+ .array(exports.QualificationSchema)
85
+ .openapi({ title: 'QualificationArray' });
86
+ // --- Contract ---
87
+ exports.qualificationsContract = c.router({
88
+ create: {
89
+ method: 'POST',
90
+ path: '/qualifications',
91
+ body: exports.CreateQualificationSchema,
92
+ responses: {
93
+ 201: exports.QualificationSchema,
94
+ 409: error_schemas_1.ErrorResponseSchema,
95
+ },
96
+ summary: 'Create a new qualification',
97
+ metadata: {
98
+ tags: ['Qualifications'],
99
+ },
100
+ },
101
+ findAll: {
102
+ method: 'GET',
103
+ path: '/qualifications',
104
+ responses: {
105
+ 200: exports.QualificationArraySchema,
106
+ },
107
+ summary: 'Retrieve all qualifications',
108
+ metadata: {
109
+ tags: ['Qualifications'],
110
+ },
111
+ },
112
+ findOne: {
113
+ method: 'GET',
114
+ path: '/qualifications/:id',
115
+ pathParams: zod_1.z.object({
116
+ id: zod_1.z.string().uuid(),
117
+ }),
118
+ responses: {
119
+ 200: exports.QualificationSchema,
120
+ 404: error_schemas_1.ErrorResponseSchema,
121
+ },
122
+ summary: 'Retrieve a qualification by ID',
123
+ metadata: {
124
+ tags: ['Qualifications'],
125
+ },
126
+ },
127
+ update: {
128
+ method: 'PATCH',
129
+ path: '/qualifications/:id',
130
+ pathParams: zod_1.z.object({
131
+ id: zod_1.z.string().uuid(),
132
+ }),
133
+ body: exports.UpdateQualificationSchema,
134
+ responses: {
135
+ 200: exports.QualificationSchema,
136
+ 404: error_schemas_1.ErrorResponseSchema,
137
+ },
138
+ summary: 'Update an existing qualification',
139
+ metadata: {
140
+ tags: ['Qualifications'],
141
+ },
142
+ },
143
+ remove: {
144
+ method: 'DELETE',
145
+ path: '/qualifications/:id',
146
+ pathParams: zod_1.z.object({
147
+ id: zod_1.z.string().uuid(),
148
+ }),
149
+ body: c.noBody(),
150
+ responses: {
151
+ 204: zod_1.z.undefined(),
152
+ 404: error_schemas_1.ErrorResponseSchema,
153
+ },
154
+ summary: 'Delete a qualification',
155
+ metadata: {
156
+ tags: ['Qualifications'],
157
+ },
158
+ },
159
+ createType: {
160
+ method: 'POST',
161
+ path: '/qualifications/:qualificationId/types',
162
+ pathParams: zod_1.z.object({
163
+ qualificationId: zod_1.z.string().uuid(),
164
+ }),
165
+ body: exports.CreateQualificationTypeSchema,
166
+ responses: {
167
+ 201: exports.QualificationSchema, // Controller returns the parent Qualification
168
+ 404: error_schemas_1.ErrorResponseSchema,
169
+ },
170
+ summary: 'Add a new type to a qualification',
171
+ metadata: {
172
+ tags: ['Qualifications'],
173
+ },
174
+ },
175
+ updateType: {
176
+ method: 'PATCH',
177
+ path: '/qualifications/types/:id',
178
+ pathParams: zod_1.z.object({
179
+ id: zod_1.z.string().uuid(),
180
+ }),
181
+ body: exports.UpdateQualificationTypeSchema,
182
+ responses: {
183
+ 200: exports.QualificationTypeSchema,
184
+ 404: error_schemas_1.ErrorResponseSchema,
185
+ },
186
+ summary: 'Update an existing qualification type',
187
+ metadata: {
188
+ tags: ['Qualifications'],
189
+ },
190
+ },
191
+ removeType: {
192
+ method: 'DELETE',
193
+ path: '/qualifications/types/:id',
194
+ pathParams: zod_1.z.object({
195
+ id: zod_1.z.string().uuid(),
196
+ }),
197
+ body: c.noBody(),
198
+ responses: {
199
+ 204: zod_1.z.undefined(),
200
+ 404: error_schemas_1.ErrorResponseSchema,
201
+ },
202
+ summary: 'Delete a qualification type',
203
+ metadata: {
204
+ tags: ['Qualifications Management'],
205
+ },
206
+ },
207
+ }, {
208
+ pathPrefix: '/v2',
209
+ commonResponses: {
210
+ 400: error_schemas_1.ErrorResponseSchema,
211
+ 401: error_schemas_1.ErrorResponseSchema,
212
+ 403: error_schemas_1.ErrorResponseSchema,
213
+ 500: error_schemas_1.ErrorResponseSchema,
214
+ },
215
+ });