@dakkitor/api-contracts 1.1.27 → 1.1.29
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 +5955 -1711
- package/dist/actives/actives.contract.d.ts.map +1 -1
- package/dist/actives/actives.contract.js +0 -1
- package/dist/agent-client-links/agent-client-links.contract.d.ts +336 -336
- package/dist/agent-client-links/agent-client-links.contract.d.ts.map +1 -1
- package/dist/agent-client-links/agent-client-links.contract.js +2 -0
- package/dist/bookings/bookings.contract.d.ts +4557 -383
- package/dist/bookings/bookings.contract.d.ts.map +1 -1
- package/dist/bookings/bookings.contract.js +6 -6
- package/dist/call-history/call-history.contract.d.ts +1190 -276
- package/dist/call-history/call-history.contract.d.ts.map +1 -1
- package/dist/call-history/call-history.contract.js +11 -28
- package/dist/client-contacts/client-contacts.contract.d.ts +571 -534
- package/dist/client-contacts/client-contacts.contract.d.ts.map +1 -1
- package/dist/client-contacts/client-contacts.contract.js +4 -1
- package/dist/clients/clients.contract.d.ts +380 -380
- package/dist/clients/clients.contract.d.ts.map +1 -1
- package/dist/clients/clients.contract.js +8 -2
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +3349 -1023
- package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts.map +1 -1
- package/dist/collaboration-checkings/collaboration-checkings.contract.js +3 -10
- package/dist/collaborations/collaborations.contract.d.ts +2934 -219
- package/dist/collaborations/collaborations.contract.d.ts.map +1 -1
- package/dist/collaborations/collaborations.contract.js +19 -33
- package/dist/common/call-rating.schema.d.ts +31 -0
- package/dist/common/call-rating.schema.d.ts.map +1 -0
- package/dist/common/call-rating.schema.js +63 -0
- package/dist/common/common-schemas.d.ts +6 -6
- package/dist/common/common-schemas.d.ts.map +1 -1
- package/dist/common/common-schemas.js +5 -7
- package/dist/common/error-schemas.d.ts +6 -6
- package/dist/companies/companies.contract.d.ts +212 -212
- package/dist/cron-executions/cron-executions.contract.d.ts +228 -228
- package/dist/curated-workers/curated-workers.contract.d.ts +374 -374
- package/dist/curated-workers/curated-workers.contract.d.ts.map +1 -1
- package/dist/curated-workers/curated-workers.contract.js +6 -13
- package/dist/dashboards/agent-daily-metrics.contract.d.ts +120 -120
- package/dist/files/files.contract.d.ts +228 -228
- package/dist/health/health.contract.d.ts +22 -22
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/jobs/jobs.contract.d.ts +3274 -268
- package/dist/jobs/jobs.contract.d.ts.map +1 -1
- package/dist/jobs/jobs.contract.js +37 -18
- package/dist/lead-assignments/lead-assignments.contract.d.ts +278 -278
- package/dist/lead-assignments/lead-assignments.contract.js +2 -2
- package/dist/lead-distribution/lead-distribution-config.contract.d.ts +146 -146
- package/dist/leads/leads.contract.d.ts +319 -319
- package/dist/locations/locations.contract.d.ts +161 -161
- package/dist/postcodes/postcodes.contract.d.ts +66 -66
- package/dist/qualifications/qualifications.contract.d.ts +256 -256
- package/dist/trades/trades.contract.d.ts +160 -160
- package/dist/users/users.contract.d.ts +8 -8
- package/dist/users/users.contract.d.ts.map +1 -1
- package/dist/users/users.contract.js +2 -3
- package/dist/workers/workers.contract.d.ts +245 -266
- package/dist/workers/workers.contract.d.ts.map +1 -1
- package/dist/workers/workers.contract.js +22 -21
- package/package.json +1 -1
- package/dist/common/api-responses.d.ts +0 -105
- package/dist/common/api-responses.d.ts.map +0 -1
- package/dist/common/api-responses.js +0 -107
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workers.contract.d.ts","sourceRoot":"","sources":["../../contracts/workers/workers.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"workers.contract.d.ts","sourceRoot":"","sources":["../../contracts/workers/workers.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,kB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3
|
-
exports.workersContractRouter = exports.PaginatedWorkerResponseSchema = exports.FilterWorkerSchema = exports.UpdateWorkerSchema = exports.CreateWorkerSchema = exports.WorkerSchema = exports.WorkerUserSchema = exports.TradeFilterSchema = exports.ShareCodeSchema = exports.CreateWorkerQualificationSchema = exports.WorkerQualificationSchema = exports.CreateWorkerTradeSchema = exports.WorkerTradeSchema = exports.UpsertWorkerPhoneNumberSchema = exports.CreateWorkerPhoneNumberSchema = exports.WorkerPhoneNumberSchema = exports.WorkerSortableFieldsSchema = exports.
|
|
3
|
+
exports.workersContractRouter = exports.PaginatedWorkerResponseSchema = exports.FilterWorkerSchema = exports.UpdateWorkerSchema = exports.CreateWorkerSchema = exports.WorkerSchema = exports.WorkerUserSchema = exports.TradeFilterSchema = exports.ShareCodeSchema = exports.CreateWorkerQualificationSchema = exports.WorkerQualificationSchema = exports.CreateWorkerTradeSchema = exports.WorkerTradeSchema = exports.UpsertWorkerPhoneNumberSchema = exports.CreateWorkerPhoneNumberSchema = exports.WorkerPhoneNumberSchema = exports.WorkerSortableFieldsSchema = exports.AvailabilitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@anatine/zod-openapi");
|
|
5
5
|
const core_1 = require("@ts-rest/core");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const common_schemas_1 = require("../common/common-schemas");
|
|
8
|
+
const curated_workers_contract_1 = require("../curated-workers/curated-workers.contract");
|
|
8
9
|
const error_schemas_1 = require("../common/error-schemas");
|
|
9
10
|
const pagination_query_schema_1 = require("../common/pagination-query.schema");
|
|
10
11
|
const pagination_schema_1 = require("../common/pagination.schema");
|
|
@@ -16,9 +17,6 @@ exports.AvailabilitySchema = zod_1.z.enum([
|
|
|
16
17
|
'UNAVAILABLE',
|
|
17
18
|
]);
|
|
18
19
|
// EnglishLevelSchema and NationalitySchema are now imported from common-schemas
|
|
19
|
-
exports.SkillLevelSchema = zod_1.z
|
|
20
|
-
.enum(['LABOURER', 'SKILLED', 'SUPERVISOR', 'MANAGER'])
|
|
21
|
-
.openapi({ title: 'SkillLevel' });
|
|
22
20
|
exports.WorkerSortableFieldsSchema = zod_1.z
|
|
23
21
|
.enum(['nameSimilarity', 'fullName', 'distance', 'email', 'phone'])
|
|
24
22
|
.openapi({ title: 'WorkerSortableFields' });
|
|
@@ -51,14 +49,12 @@ exports.WorkerTradeSchema = zod_1.z
|
|
|
51
49
|
id: zod_1.z.string().uuid().optional(),
|
|
52
50
|
tradeId: zod_1.z.string().uuid(),
|
|
53
51
|
mainTrade: zod_1.z.boolean().default(false),
|
|
54
|
-
skillLevel: exports.SkillLevelSchema.optional().nullable(),
|
|
55
52
|
})
|
|
56
53
|
.openapi({ title: 'WorkerTrade' });
|
|
57
54
|
exports.CreateWorkerTradeSchema = zod_1.z
|
|
58
55
|
.object({
|
|
59
56
|
tradeId: zod_1.z.string().uuid(),
|
|
60
57
|
mainTrade: zod_1.z.boolean().default(false),
|
|
61
|
-
skillLevel: exports.SkillLevelSchema.optional().nullable(),
|
|
62
58
|
})
|
|
63
59
|
.openapi({ title: 'CreateWorkerTrade' });
|
|
64
60
|
exports.WorkerQualificationSchema = zod_1.z
|
|
@@ -94,9 +90,10 @@ exports.ShareCodeSchema = zod_1.z
|
|
|
94
90
|
.object({
|
|
95
91
|
code: zod_1.z
|
|
96
92
|
.string()
|
|
97
|
-
.
|
|
98
|
-
.
|
|
99
|
-
.
|
|
93
|
+
.transform((val) => val.toUpperCase().replace(/\s/g, ''))
|
|
94
|
+
.refine((val) => val === '' || /^[A-Z0-9]{9}$/.test(val), {
|
|
95
|
+
message: 'Share code must be 9 alphanumeric characters (e.g., ABC 123 XYZ)',
|
|
96
|
+
}),
|
|
100
97
|
expiryDate: zod_1.z
|
|
101
98
|
.union([zod_1.z.string().date(), zod_1.z.date()])
|
|
102
99
|
.transform((val) => val instanceof Date ? val.toISOString().split('T')[0] : val)
|
|
@@ -107,8 +104,7 @@ exports.ShareCodeSchema = zod_1.z
|
|
|
107
104
|
exports.TradeFilterSchema = zod_1.z
|
|
108
105
|
.object({
|
|
109
106
|
tradeId: zod_1.z.string().uuid(),
|
|
110
|
-
|
|
111
|
-
mainTrade: zod_1.z.boolean().optional(),
|
|
107
|
+
mainTrade: zod_1.z.preprocess((val) => (val === 'true' ? true : val === 'false' ? false : val), zod_1.z.boolean().optional()),
|
|
112
108
|
})
|
|
113
109
|
.openapi({ title: 'TradeFilter' });
|
|
114
110
|
exports.WorkerUserSchema = zod_1.z.object({
|
|
@@ -260,27 +256,32 @@ exports.UpdateWorkerSchema = zod_1.z
|
|
|
260
256
|
})
|
|
261
257
|
.openapi({ title: 'UpdateWorker' });
|
|
262
258
|
exports.FilterWorkerSchema = pagination_query_schema_1.PaginationQuerySchema.extend({
|
|
263
|
-
|
|
259
|
+
name: zod_1.z.string().optional().describe('Search by name (fuzzy match)'),
|
|
260
|
+
email: zod_1.z.string().optional().describe('Filter by email'),
|
|
261
|
+
phone: zod_1.z.string().optional().describe('Filter by phone'),
|
|
264
262
|
availability: exports.AvailabilitySchema.optional()
|
|
265
263
|
.nullable()
|
|
266
264
|
.describe('Filter by availability'),
|
|
265
|
+
englishLevel: common_schemas_1.EnglishLevelSchema.optional()
|
|
266
|
+
.nullable()
|
|
267
|
+
.describe('Filter by English level'),
|
|
268
|
+
nationality: common_schemas_1.NationalitySchema.optional()
|
|
269
|
+
.nullable()
|
|
270
|
+
.describe('Filter by nationality'),
|
|
271
|
+
postcode: zod_1.z.string().optional().describe('Filter by postcode'),
|
|
272
|
+
distance: zod_1.z.coerce.number().min(0).optional().describe('Search radius in km'),
|
|
267
273
|
tradeFilters: zod_1.z
|
|
268
274
|
.array(exports.TradeFilterSchema)
|
|
269
275
|
.optional()
|
|
270
276
|
.describe('Filter by trades'),
|
|
277
|
+
qualificationFilters: zod_1.z
|
|
278
|
+
.array(curated_workers_contract_1.QualificationFilterSchema)
|
|
279
|
+
.optional()
|
|
280
|
+
.describe('Filter by qualifications'),
|
|
271
281
|
sortBy: exports.WorkerSortableFieldsSchema.optional()
|
|
272
282
|
.nullable()
|
|
273
283
|
.describe('Sort by field'),
|
|
274
284
|
sortOrder: common_schemas_1.SortOrderSchema.optional().nullable().describe('Sort order'),
|
|
275
|
-
latitude: zod_1.z.coerce
|
|
276
|
-
.number()
|
|
277
|
-
.optional()
|
|
278
|
-
.describe('Latitude for distance search'),
|
|
279
|
-
longitude: zod_1.z.coerce
|
|
280
|
-
.number()
|
|
281
|
-
.optional()
|
|
282
|
-
.describe('Longitude for distance search'),
|
|
283
|
-
radiusKm: zod_1.z.coerce.number().optional().describe('Radius in KM'),
|
|
284
285
|
});
|
|
285
286
|
exports.PaginatedWorkerResponseSchema = (0, pagination_schema_1.createPaginatedResponseSchema)(exports.WorkerSchema)
|
|
286
287
|
.describe('Workers retrieved successfully.')
|
package/package.json
CHANGED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
export declare const CommonErrorResponses: {
|
|
2
|
-
readonly 400: {
|
|
3
|
-
readonly description: "Bad Request. The request could not be understood by the server due to malformed syntax or invalid data.";
|
|
4
|
-
readonly content: {
|
|
5
|
-
readonly 'application/json': {
|
|
6
|
-
readonly schema: {
|
|
7
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
8
|
-
};
|
|
9
|
-
readonly example: {
|
|
10
|
-
readonly statusCode: 400;
|
|
11
|
-
readonly message: "Input validation failed or request is malformed.";
|
|
12
|
-
readonly code: "VALIDATION_ERROR";
|
|
13
|
-
readonly timestamp: "2024-01-01T12:00:00.000Z";
|
|
14
|
-
readonly path: "/v1/example-endpoint";
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
readonly 401: {
|
|
20
|
-
readonly description: "Unauthorized. The user is not authenticated or token is missing/invalid.";
|
|
21
|
-
readonly content: {
|
|
22
|
-
readonly 'application/json': {
|
|
23
|
-
readonly schema: {
|
|
24
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
25
|
-
};
|
|
26
|
-
readonly example: {
|
|
27
|
-
readonly statusCode: 401;
|
|
28
|
-
readonly message: "Authentication required or token is invalid.";
|
|
29
|
-
readonly code: "UNAUTHORIZED";
|
|
30
|
-
readonly timestamp: "2024-01-01T12:00:00.000Z";
|
|
31
|
-
readonly path: "/v1/example-endpoint";
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
readonly 403: {
|
|
37
|
-
readonly description: "Forbidden. The user does not have the necessary permissions for this resource.";
|
|
38
|
-
readonly content: {
|
|
39
|
-
readonly 'application/json': {
|
|
40
|
-
readonly schema: {
|
|
41
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
42
|
-
};
|
|
43
|
-
readonly example: {
|
|
44
|
-
readonly statusCode: 403;
|
|
45
|
-
readonly message: "Access to this resource is forbidden.";
|
|
46
|
-
readonly code: "FORBIDDEN";
|
|
47
|
-
readonly timestamp: "2024-01-01T12:00:00.000Z";
|
|
48
|
-
readonly path: "/v1/example-endpoint";
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
readonly 404: {
|
|
54
|
-
readonly description: "Not Found. The requested resource could not be found.";
|
|
55
|
-
readonly content: {
|
|
56
|
-
readonly 'application/json': {
|
|
57
|
-
readonly schema: {
|
|
58
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
59
|
-
};
|
|
60
|
-
readonly example: {
|
|
61
|
-
readonly statusCode: 404;
|
|
62
|
-
readonly message: "The requested resource could not be found.";
|
|
63
|
-
readonly code: "RESOURCE_NOT_FOUND";
|
|
64
|
-
readonly timestamp: "2024-01-01T12:00:00.000Z";
|
|
65
|
-
readonly path: "/v1/example-endpoint";
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
readonly 409: {
|
|
71
|
-
readonly description: "Conflict. The resource already exists.";
|
|
72
|
-
readonly content: {
|
|
73
|
-
readonly 'application/json': {
|
|
74
|
-
readonly schema: {
|
|
75
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
76
|
-
};
|
|
77
|
-
readonly example: {
|
|
78
|
-
readonly statusCode: 409;
|
|
79
|
-
readonly message: "A conflict occurred with the current state of the resource.";
|
|
80
|
-
readonly code: "RESOURCE_CONFLICT";
|
|
81
|
-
readonly timestamp: "2024-01-01T12:00:00.000Z";
|
|
82
|
-
readonly path: "/v1/example-endpoint";
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
readonly 500: {
|
|
88
|
-
readonly description: "Internal Server Error. An unexpected error occurred on the server.";
|
|
89
|
-
readonly content: {
|
|
90
|
-
readonly 'application/json': {
|
|
91
|
-
readonly schema: {
|
|
92
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
93
|
-
};
|
|
94
|
-
readonly example: {
|
|
95
|
-
readonly statusCode: 500;
|
|
96
|
-
readonly message: "An unexpected error occurred on the server.";
|
|
97
|
-
readonly code: "INTERNAL_SERVER_ERROR";
|
|
98
|
-
readonly timestamp: "2024-01-01T12:00:00.000Z";
|
|
99
|
-
readonly path: "/v1/example-endpoint";
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=api-responses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-responses.d.ts","sourceRoot":"","sources":["../../contracts/common/api-responses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GvB,CAAC"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommonErrorResponses = void 0;
|
|
4
|
-
exports.CommonErrorResponses = {
|
|
5
|
-
400: {
|
|
6
|
-
description: 'Bad Request. The request could not be understood by the server due to malformed syntax or invalid data.',
|
|
7
|
-
content: {
|
|
8
|
-
'application/json': {
|
|
9
|
-
schema: {
|
|
10
|
-
$ref: '#/components/schemas/ErrorResponse',
|
|
11
|
-
},
|
|
12
|
-
example: {
|
|
13
|
-
statusCode: 400,
|
|
14
|
-
message: 'Input validation failed or request is malformed.',
|
|
15
|
-
code: 'VALIDATION_ERROR',
|
|
16
|
-
timestamp: '2024-01-01T12:00:00.000Z',
|
|
17
|
-
path: '/v1/example-endpoint',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
401: {
|
|
23
|
-
description: 'Unauthorized. The user is not authenticated or token is missing/invalid.',
|
|
24
|
-
content: {
|
|
25
|
-
'application/json': {
|
|
26
|
-
schema: {
|
|
27
|
-
$ref: '#/components/schemas/ErrorResponse',
|
|
28
|
-
},
|
|
29
|
-
example: {
|
|
30
|
-
statusCode: 401,
|
|
31
|
-
message: 'Authentication required or token is invalid.',
|
|
32
|
-
code: 'UNAUTHORIZED',
|
|
33
|
-
timestamp: '2024-01-01T12:00:00.000Z',
|
|
34
|
-
path: '/v1/example-endpoint',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
403: {
|
|
40
|
-
description: 'Forbidden. The user does not have the necessary permissions for this resource.',
|
|
41
|
-
content: {
|
|
42
|
-
'application/json': {
|
|
43
|
-
schema: {
|
|
44
|
-
$ref: '#/components/schemas/ErrorResponse',
|
|
45
|
-
},
|
|
46
|
-
example: {
|
|
47
|
-
statusCode: 403,
|
|
48
|
-
message: 'Access to this resource is forbidden.',
|
|
49
|
-
code: 'FORBIDDEN',
|
|
50
|
-
timestamp: '2024-01-01T12:00:00.000Z',
|
|
51
|
-
path: '/v1/example-endpoint',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
404: {
|
|
57
|
-
description: 'Not Found. The requested resource could not be found.',
|
|
58
|
-
content: {
|
|
59
|
-
'application/json': {
|
|
60
|
-
schema: {
|
|
61
|
-
$ref: '#/components/schemas/ErrorResponse',
|
|
62
|
-
},
|
|
63
|
-
example: {
|
|
64
|
-
statusCode: 404,
|
|
65
|
-
message: 'The requested resource could not be found.',
|
|
66
|
-
code: 'RESOURCE_NOT_FOUND',
|
|
67
|
-
timestamp: '2024-01-01T12:00:00.000Z',
|
|
68
|
-
path: '/v1/example-endpoint',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
409: {
|
|
74
|
-
description: 'Conflict. The resource already exists.',
|
|
75
|
-
content: {
|
|
76
|
-
'application/json': {
|
|
77
|
-
schema: {
|
|
78
|
-
$ref: '#/components/schemas/ErrorResponse',
|
|
79
|
-
},
|
|
80
|
-
example: {
|
|
81
|
-
statusCode: 409,
|
|
82
|
-
message: 'A conflict occurred with the current state of the resource.',
|
|
83
|
-
code: 'RESOURCE_CONFLICT',
|
|
84
|
-
timestamp: '2024-01-01T12:00:00.000Z',
|
|
85
|
-
path: '/v1/example-endpoint',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
500: {
|
|
91
|
-
description: 'Internal Server Error. An unexpected error occurred on the server.',
|
|
92
|
-
content: {
|
|
93
|
-
'application/json': {
|
|
94
|
-
schema: {
|
|
95
|
-
$ref: '#/components/schemas/ErrorResponse',
|
|
96
|
-
},
|
|
97
|
-
example: {
|
|
98
|
-
statusCode: 500,
|
|
99
|
-
message: 'An unexpected error occurred on the server.',
|
|
100
|
-
code: 'INTERNAL_SERVER_ERROR',
|
|
101
|
-
timestamp: '2024-01-01T12:00:00.000Z',
|
|
102
|
-
path: '/v1/example-endpoint',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|