@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.
@@ -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,QAAA,MAAM,qBAAqB;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FjB,CAAC;AAIX,eAAO,MAAM,eAAe,EACD,OAAO,qBAAqB,CAAC"}
@@ -11,16 +11,16 @@ const ClientStatusSchema = zod_1.z.enum([
11
11
  'BLACKLISTED',
12
12
  ]);
13
13
  const UserSchema = zod_1.z.object({
14
- id: zod_1.z.uuid(),
14
+ id: zod_1.z.string().uuid(),
15
15
  firstName: zod_1.z.string(),
16
16
  lastName: zod_1.z.string(),
17
- email: zod_1.z.email(),
17
+ email: zod_1.z.string().email(),
18
18
  });
19
19
  exports.ClientSchema = zod_1.z.object({
20
- id: zod_1.z.uuid().describe('Client ID'),
20
+ id: zod_1.z.string().uuid().describe('Client ID'),
21
21
  name: zod_1.z.string().describe('Client Name'),
22
22
  crn: zod_1.z.string().describe('Company Registration Number'),
23
- govLink: zod_1.z.url().describe('Government Registration Link'),
23
+ govLink: zod_1.z.string().url().describe('Government Registration Link'),
24
24
  status: ClientStatusSchema.describe('Client Status'),
25
25
  director: zod_1.z.string().describe('Director Name'),
26
26
  blacklistReason: zod_1.z
@@ -29,20 +29,21 @@ exports.ClientSchema = zod_1.z.object({
29
29
  .optional()
30
30
  .describe('Reason for Blacklisting'),
31
31
  lastUpdatedBy: UserSchema.describe('Last Updated By'),
32
- createdAt: zod_1.z.iso.datetime().describe('Creation Date'),
33
- updatedAt: zod_1.z.iso.datetime().describe('Last Update Date'),
32
+ createdAt: zod_1.z.string().datetime().describe('Creation Date'),
33
+ updatedAt: zod_1.z.string().datetime().describe('Last Update Date'),
34
34
  version: zod_1.z.number().describe('Version Number'),
35
35
  agentClientLinks: zod_1.z.object({ agentId: zod_1.z.string() }).describe('Agent Link'),
36
36
  });
37
37
  exports.CreateClientSchema = zod_1.z.object({
38
38
  name: zod_1.z.string().max(255).describe('Client Name'),
39
- govLink: zod_1.z.url().max(2048).describe('Government Registration Link'),
39
+ govLink: zod_1.z.string().url().max(2048).describe('Government Registration Link'),
40
40
  director: zod_1.z.string().max(255).describe('Director Name'),
41
41
  });
42
42
  exports.UpdateClientSchema = zod_1.z
43
43
  .object({
44
44
  name: zod_1.z.string().max(255).optional().describe('Client Name'),
45
45
  govLink: zod_1.z
46
+ .string()
46
47
  .url()
47
48
  .max(2048)
48
49
  .optional()
@@ -132,7 +133,7 @@ const clientsContractConfig = {
132
133
  500: error_schemas_1.ErrorResponseSchema,
133
134
  },
134
135
  pathParams: zod_1.z.object({
135
- id: zod_1.z.uuid(),
136
+ id: zod_1.z.string().uuid(),
136
137
  }),
137
138
  summary: 'Get a client by ID',
138
139
  },
@@ -149,7 +150,7 @@ const clientsContractConfig = {
149
150
  500: error_schemas_1.ErrorResponseSchema,
150
151
  },
151
152
  pathParams: zod_1.z.object({
152
- id: zod_1.z.uuid(),
153
+ id: zod_1.z.string().uuid(),
153
154
  }),
154
155
  body: exports.UpdateClientSchema,
155
156
  summary: 'Update a client',
@@ -166,7 +167,7 @@ const clientsContractConfig = {
166
167
  500: error_schemas_1.ErrorResponseSchema,
167
168
  },
168
169
  pathParams: zod_1.z.object({
169
- id: zod_1.z.uuid(),
170
+ id: zod_1.z.string().uuid(),
170
171
  }),
171
172
  body: zod_1.z.undefined(),
172
173
  summary: 'Delete a client',
@@ -11,6 +11,22 @@ export declare const ErrorResponseSchema: z.ZodObject<{
11
11
  timestamp: z.ZodString;
12
12
  path: z.ZodString;
13
13
  correlationId: z.ZodOptional<z.ZodString>;
14
- }, z.core.$strip>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ statusCode: number;
16
+ message: string;
17
+ code: string;
18
+ timestamp: string;
19
+ path: string;
20
+ details?: unknown;
21
+ correlationId?: string | undefined;
22
+ }, {
23
+ statusCode: number;
24
+ message: string;
25
+ code: string;
26
+ timestamp: string;
27
+ path: string;
28
+ details?: unknown;
29
+ correlationId?: string | undefined;
30
+ }>;
15
31
  export type ErrorResponseV2 = z.infer<typeof ErrorResponseSchema>;
16
32
  //# sourceMappingURL=error-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-schemas.d.ts","sourceRoot":"","sources":["../../contracts/common/error-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;iBAQ9B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"error-schemas.d.ts","sourceRoot":"","sources":["../../contracts/common/error-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;EAQ9B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1,8 +1,18 @@
1
1
  import { z } from 'zod';
2
2
  export declare const createPaginatedResponseSchema: <T extends z.ZodTypeAny>(itemSchema: T) => z.ZodObject<{
3
- data: z.ZodArray<T>;
3
+ data: z.ZodArray<T, "many">;
4
4
  total: z.ZodNumber;
5
5
  limit: z.ZodNumber;
6
6
  skip: z.ZodNumber;
7
- }, z.core.$strip>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ data: T["_output"][];
9
+ total: number;
10
+ limit: number;
11
+ skip: number;
12
+ }, {
13
+ data: T["_input"][];
14
+ total: number;
15
+ limit: number;
16
+ skip: number;
17
+ }>;
8
18
  //# sourceMappingURL=pagination.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.schema.d.ts","sourceRoot":"","sources":["../../contracts/common/pagination.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAClE,YAAY,CAAC;;;;;iBAQd,CAAC"}
1
+ {"version":3,"file":"pagination.schema.d.ts","sourceRoot":"","sources":["../../contracts/common/pagination.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAClE,YAAY,CAAC;;;;;;;;;;;;;;;EAQd,CAAC"}