@nomalism-com/types 0.14.22 → 0.15.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/index.d.ts +1 -14
- package/dist/index.js +7 -33
- package/dist/modules/user/clients/interface.d.ts +6 -14
- package/dist/modules/user/clients/route.schema.js +3 -7
- package/dist/modules/user/commissioner/interface.d.ts +6 -12
- package/dist/modules/user/commissioner/route.schema.js +2 -2
- package/dist/modules/user/persona/interface.d.ts +18 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/modules/user/persona/route.schema.js +13 -1
- package/dist/modules/user/providers/interface.d.ts +6 -12
- package/dist/modules/user/providers/route.schema.js +2 -2
- package/dist/modules/user/storeOperator/interface.d.ts +2 -10
- package/dist/modules/user/storeOperator/route.schema.js +0 -2
- package/dist/modules/user/users/interface.d.ts +10 -13
- package/dist/shared/entities/index.d.ts +0 -3
- package/dist/shared/entities/user.d.ts +3 -50
- package/package.json +3 -3
- package/dist/modules/user/address/interface.d.ts +0 -53
- package/dist/modules/user/address/interface.js +0 -6
- package/dist/modules/user/address/oas.schema.d.ts +0 -352
- package/dist/modules/user/address/oas.schema.js +0 -248
- package/dist/modules/user/address/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/address/responseCreate.schema.js +0 -58
- package/dist/modules/user/address/route.schema.d.ts +0 -5
- package/dist/modules/user/address/route.schema.js +0 -46
- package/dist/modules/user/address/tests.d.ts +0 -10
- package/dist/modules/user/address/tests.js +0 -117
- package/dist/modules/user/clients/oas.schema.d.ts +0 -0
- package/dist/modules/user/clients/oas.schema.js +0 -1
- package/dist/modules/user/clients/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/clients/responseCreate.schema.js +0 -64
- package/dist/modules/user/commissioner/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/commissioner/responseCreate.schema.js +0 -59
- package/dist/modules/user/contactTypes/interface.d.ts +0 -30
- package/dist/modules/user/contactTypes/interface.js +0 -6
- package/dist/modules/user/contactTypes/oas.schema.d.ts +0 -350
- package/dist/modules/user/contactTypes/oas.schema.js +0 -237
- package/dist/modules/user/contactTypes/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/contactTypes/responseCreate.schema.js +0 -48
- package/dist/modules/user/contactTypes/route.schema.d.ts +0 -5
- package/dist/modules/user/contactTypes/route.schema.js +0 -26
- package/dist/modules/user/contactTypes/tests.d.ts +0 -6
- package/dist/modules/user/contactTypes/tests.js +0 -73
- package/dist/modules/user/contacts/interface.d.ts +0 -67
- package/dist/modules/user/contacts/interface.js +0 -6
- package/dist/modules/user/contacts/oas.schema.d.ts +0 -406
- package/dist/modules/user/contacts/oas.schema.js +0 -268
- package/dist/modules/user/contacts/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/contacts/responseCreate.schema.js +0 -60
- package/dist/modules/user/contacts/route.schema.d.ts +0 -6
- package/dist/modules/user/contacts/route.schema.js +0 -69
- package/dist/modules/user/contacts/tests.d.ts +0 -10
- package/dist/modules/user/contacts/tests.js +0 -121
- package/dist/modules/user/providers/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/providers/responseCreate.schema.js +0 -63
- package/dist/modules/user/storeOperator/oas.schema.d.ts +0 -406
- package/dist/modules/user/storeOperator/oas.schema.js +0 -268
- package/dist/modules/user/storeOperator/responseCreate.schema.d.ts +0 -2
- package/dist/modules/user/storeOperator/responseCreate.schema.js +0 -61
- package/dist/modules/user/storeOperator/tests.d.ts +0 -7
- package/dist/modules/user/storeOperator/tests.js +0 -139
- package/dist/modules/user/users/oas.schema.d.ts +0 -350
- package/dist/modules/user/users/oas.schema.js +0 -237
- package/dist/modules/user/users/tests.d.ts +0 -6
- package/dist/modules/user/users/tests.js +0 -154
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.sw = exports.findPaginatedAdress = exports.findAdress = exports.findByOwnerIdAdress = exports.findByIdAdress = exports.deleteAddress = exports.updateAddress = exports.createAddress = void 0;
|
|
41
|
-
var joi_to_swagger_1 = __importDefault(require("joi-to-swagger"));
|
|
42
|
-
var route_schema_1 = require("./route.schema");
|
|
43
|
-
var tests_1 = require("./tests");
|
|
44
|
-
var interfaces = __importStar(require("./interface"));
|
|
45
|
-
var createAddressSchema = (0, joi_to_swagger_1.default)(route_schema_1.createBody).swagger;
|
|
46
|
-
var createAddressSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.createUpdateDeleteBodyResponse).swagger;
|
|
47
|
-
var updateAddressSchema = (0, joi_to_swagger_1.default)(route_schema_1.updateBody).swagger;
|
|
48
|
-
var findByIdAddressSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findByIdBodyResponse).swagger;
|
|
49
|
-
var findByOwnerIdAddressSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findOwnerIdBodyResponse).swagger;
|
|
50
|
-
var findAddressSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findBodyResponse).swagger;
|
|
51
|
-
var findPaginatedAddressSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findPaginationBodyResponse).swagger;
|
|
52
|
-
exports.createAddress = {
|
|
53
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
54
|
-
summary: "Create ".concat(interfaces.Route),
|
|
55
|
-
description: "Create a new ".concat(interfaces.Route),
|
|
56
|
-
requestBody: {
|
|
57
|
-
content: {
|
|
58
|
-
'application/json': {
|
|
59
|
-
schema: __assign({}, createAddressSchema),
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
responses: {
|
|
64
|
-
'200': {
|
|
65
|
-
description: 'Create with success',
|
|
66
|
-
content: {
|
|
67
|
-
'application/json': {
|
|
68
|
-
schema: __assign({}, createAddressSchemaResponse),
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
exports.updateAddress = {
|
|
75
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
76
|
-
summary: "Update ".concat(interfaces.Route),
|
|
77
|
-
description: "Update a ".concat(interfaces.Route),
|
|
78
|
-
parameters: [
|
|
79
|
-
{
|
|
80
|
-
name: 'id',
|
|
81
|
-
in: 'path',
|
|
82
|
-
description: 'ID of address to return',
|
|
83
|
-
required: true,
|
|
84
|
-
schema: {
|
|
85
|
-
type: 'string',
|
|
86
|
-
format: 'uuid',
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
requestBody: {
|
|
91
|
-
content: {
|
|
92
|
-
'application/json': {
|
|
93
|
-
schema: __assign({}, updateAddressSchema),
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
responses: {
|
|
98
|
-
'200': {
|
|
99
|
-
description: 'Updated with success',
|
|
100
|
-
content: {
|
|
101
|
-
'application/json': {
|
|
102
|
-
schema: __assign({}, createAddressSchemaResponse),
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
exports.deleteAddress = {
|
|
109
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
110
|
-
summary: "Delete ".concat(interfaces.Route),
|
|
111
|
-
description: "Delete an existing ".concat(interfaces.Route),
|
|
112
|
-
parameters: [
|
|
113
|
-
{
|
|
114
|
-
name: 'address_id',
|
|
115
|
-
in: 'path',
|
|
116
|
-
description: 'ID of address to return',
|
|
117
|
-
required: true,
|
|
118
|
-
schema: {
|
|
119
|
-
type: 'string',
|
|
120
|
-
format: 'uuid',
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
name: 'user_id',
|
|
125
|
-
in: 'path',
|
|
126
|
-
description: 'ID of user to return',
|
|
127
|
-
required: true,
|
|
128
|
-
schema: {
|
|
129
|
-
type: 'string',
|
|
130
|
-
format: 'uuid',
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
],
|
|
134
|
-
responses: {
|
|
135
|
-
'200': {
|
|
136
|
-
description: 'Delete with success',
|
|
137
|
-
content: {
|
|
138
|
-
'application/json': {
|
|
139
|
-
schema: __assign({}, createAddressSchemaResponse),
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
exports.findByIdAdress = {
|
|
146
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
147
|
-
summary: "Find ".concat(interfaces.Route),
|
|
148
|
-
description: "Find ".concat(interfaces.Route),
|
|
149
|
-
parameters: [
|
|
150
|
-
{
|
|
151
|
-
name: 'id',
|
|
152
|
-
in: 'path',
|
|
153
|
-
description: 'ID of address to return',
|
|
154
|
-
required: true,
|
|
155
|
-
schema: {
|
|
156
|
-
type: 'string',
|
|
157
|
-
format: 'uuid',
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
responses: {
|
|
162
|
-
'200': {
|
|
163
|
-
description: 'Find with success',
|
|
164
|
-
content: {
|
|
165
|
-
'application/json': {
|
|
166
|
-
schema: __assign({}, findByIdAddressSchemaResponse),
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
exports.findByOwnerIdAdress = {
|
|
173
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
174
|
-
summary: "Find by Owner Id ".concat(interfaces.Route),
|
|
175
|
-
description: "Find by owner id ".concat(interfaces.Route),
|
|
176
|
-
parameters: [
|
|
177
|
-
{
|
|
178
|
-
name: 'owner_id',
|
|
179
|
-
in: 'path',
|
|
180
|
-
description: 'Owner ID of address to return',
|
|
181
|
-
required: true,
|
|
182
|
-
schema: {
|
|
183
|
-
type: 'string',
|
|
184
|
-
format: 'uuid',
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
responses: {
|
|
189
|
-
'200': {
|
|
190
|
-
description: 'Find with success',
|
|
191
|
-
content: {
|
|
192
|
-
'application/json': {
|
|
193
|
-
schema: __assign({}, findByOwnerIdAddressSchemaResponse),
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
};
|
|
199
|
-
exports.findAdress = {
|
|
200
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
201
|
-
summary: "Find ".concat(interfaces.Route),
|
|
202
|
-
description: "Find ".concat(interfaces.Route),
|
|
203
|
-
parameters: [],
|
|
204
|
-
responses: {
|
|
205
|
-
'200': {
|
|
206
|
-
description: 'Find with success',
|
|
207
|
-
content: {
|
|
208
|
-
'application/json': {
|
|
209
|
-
schema: __assign({}, findAddressSchemaResponse),
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
};
|
|
215
|
-
exports.findPaginatedAdress = {
|
|
216
|
-
tags: ["".concat(interfaces.UpperName)],
|
|
217
|
-
summary: "Find pagination ".concat(interfaces.Route),
|
|
218
|
-
description: "Find with pagination ".concat(interfaces.Route),
|
|
219
|
-
parameters: [],
|
|
220
|
-
responses: {
|
|
221
|
-
'200': {
|
|
222
|
-
description: 'Find with success',
|
|
223
|
-
content: {
|
|
224
|
-
'application/json': {
|
|
225
|
-
schema: __assign({}, findPaginatedAddressSchemaResponse),
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
exports.sw = {
|
|
232
|
-
'/address': {
|
|
233
|
-
post: __assign({}, exports.createAddress),
|
|
234
|
-
},
|
|
235
|
-
'/address/{id}': {
|
|
236
|
-
put: __assign({}, exports.updateAddress),
|
|
237
|
-
get: __assign({}, exports.findByIdAdress),
|
|
238
|
-
},
|
|
239
|
-
'/address/by_owner': {
|
|
240
|
-
get: __assign({}, exports.findByOwnerIdAdress),
|
|
241
|
-
},
|
|
242
|
-
'/address/paginated': {
|
|
243
|
-
get: __assign({}, exports.findPaginatedAdress),
|
|
244
|
-
},
|
|
245
|
-
'/address/{address_id}/user/{user_id}': {
|
|
246
|
-
delete: __assign({}, exports.deleteAddress),
|
|
247
|
-
},
|
|
248
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.createUpdateDeleteBodyResponse = void 0;
|
|
41
|
-
var joi_1 = __importDefault(require("joi"));
|
|
42
|
-
var IShared = __importStar(require("../../../shared/interface"));
|
|
43
|
-
var createUpdateDeleteBodyResponseKeys = {
|
|
44
|
-
id: joi_1.default.string().uuid().required(),
|
|
45
|
-
provider_id: joi_1.default.string().allow(null).required(),
|
|
46
|
-
client_id: joi_1.default.string().allow(null).required(),
|
|
47
|
-
store_operator_id: joi_1.default.string().allow(null).required(),
|
|
48
|
-
commissioner_id: joi_1.default.string().allow(null).required(),
|
|
49
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
50
|
-
street: joi_1.default.string().required(),
|
|
51
|
-
locality: joi_1.default.string().required(),
|
|
52
|
-
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
53
|
-
billing: joi_1.default.boolean().required(),
|
|
54
|
-
delivery: joi_1.default.boolean().required(),
|
|
55
|
-
head_office: joi_1.default.boolean().required(),
|
|
56
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
57
|
-
};
|
|
58
|
-
exports.createUpdateDeleteBodyResponse = joi_1.default.object().keys(__assign(__assign({}, createUpdateDeleteBodyResponseKeys), IShared.joiValidateStamps));
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findWithPaginationQuery = exports.findQuery = exports.updateBody = exports.createBody = void 0;
|
|
7
|
-
var joi_1 = __importDefault(require("joi"));
|
|
8
|
-
var messages_1 = require("../../../shared/messages");
|
|
9
|
-
var createBodyKeys = {
|
|
10
|
-
billing: joi_1.default.boolean().default(false),
|
|
11
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
12
|
-
delivery: joi_1.default.boolean().default(false),
|
|
13
|
-
head_office: joi_1.default.boolean().default(false),
|
|
14
|
-
locality: joi_1.default.string().required(),
|
|
15
|
-
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
16
|
-
street: joi_1.default.string().required(),
|
|
17
|
-
provider_id: joi_1.default.string().uuid(),
|
|
18
|
-
client_id: joi_1.default.string().uuid(),
|
|
19
|
-
store_operator_id: joi_1.default.string().uuid(),
|
|
20
|
-
commissioner_id: joi_1.default.string().uuid(),
|
|
21
|
-
};
|
|
22
|
-
exports.createBody = joi_1.default
|
|
23
|
-
.object()
|
|
24
|
-
.keys(createBodyKeys)
|
|
25
|
-
.xor('provider_id', 'client_id', 'store_operator_id', 'commissioner_id')
|
|
26
|
-
.messages(messages_1.messages);
|
|
27
|
-
var updateBodyKeys = {
|
|
28
|
-
billing: joi_1.default.boolean().default(false).optional(),
|
|
29
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
30
|
-
delivery: joi_1.default.boolean().default(false).optional(),
|
|
31
|
-
head_office: joi_1.default.boolean().default(false).optional(),
|
|
32
|
-
locality: joi_1.default.string().required(),
|
|
33
|
-
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
34
|
-
street: joi_1.default.string().required(),
|
|
35
|
-
};
|
|
36
|
-
exports.updateBody = joi_1.default.object().keys(updateBodyKeys).messages(messages_1.messages);
|
|
37
|
-
var findQueryKeys = {};
|
|
38
|
-
exports.findQuery = joi_1.default.object().keys(findQueryKeys).messages(messages_1.messages);
|
|
39
|
-
var findWithPaginationQueryKeys = {
|
|
40
|
-
per_page: joi_1.default.number().integer().positive().default(10).optional(),
|
|
41
|
-
current_page: joi_1.default.number().integer().positive().default(1).optional(),
|
|
42
|
-
};
|
|
43
|
-
exports.findWithPaginationQuery = joi_1.default
|
|
44
|
-
.object()
|
|
45
|
-
.keys(findWithPaginationQueryKeys)
|
|
46
|
-
.messages(messages_1.messages);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import joi from 'joi';
|
|
2
|
-
import * as IShared from '../../../shared/interface';
|
|
3
|
-
import { IFindByOwnerIdResponse } from './interface';
|
|
4
|
-
import { createUpdateDeleteBodyResponse } from './responseCreate.schema';
|
|
5
|
-
export { createUpdateDeleteBodyResponse };
|
|
6
|
-
export declare const findBodyResponse: joi.ArraySchema<any[]>;
|
|
7
|
-
export declare const findByIdBodyResponse: joi.ObjectSchema<any>;
|
|
8
|
-
export declare const findOwnerIdBodyResponsekeys: IShared.IRouteResponseWithoutStamps<IFindByOwnerIdResponse>;
|
|
9
|
-
export declare const findOwnerIdBodyResponse: joi.ArraySchema<any[]>;
|
|
10
|
-
export declare const findPaginationBodyResponse: joi.ObjectSchema<any>;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.findPaginationBodyResponse = exports.findOwnerIdBodyResponse = exports.findOwnerIdBodyResponsekeys = exports.findByIdBodyResponse = exports.findBodyResponse = exports.createUpdateDeleteBodyResponse = void 0;
|
|
41
|
-
var joi_1 = __importDefault(require("joi"));
|
|
42
|
-
var IShared = __importStar(require("../../../shared/interface"));
|
|
43
|
-
var responseCreate_schema_1 = require("../country/responseCreate.schema");
|
|
44
|
-
var responseCreate_schema_2 = require("./responseCreate.schema");
|
|
45
|
-
Object.defineProperty(exports, "createUpdateDeleteBodyResponse", { enumerable: true, get: function () { return responseCreate_schema_2.createUpdateDeleteBodyResponse; } });
|
|
46
|
-
var findBodyResponseKeys = {
|
|
47
|
-
id: joi_1.default.string().uuid().required(),
|
|
48
|
-
provider_id: joi_1.default.string().allow(null).required(),
|
|
49
|
-
client_id: joi_1.default.string().allow(null).required(),
|
|
50
|
-
store_operator_id: joi_1.default.string().allow(null).required(),
|
|
51
|
-
commissioner_id: joi_1.default.string().allow(null).required(),
|
|
52
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
53
|
-
street: joi_1.default.string().required(),
|
|
54
|
-
locality: joi_1.default.string().required(),
|
|
55
|
-
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
56
|
-
billing: joi_1.default.boolean().required(),
|
|
57
|
-
delivery: joi_1.default.boolean().required(),
|
|
58
|
-
head_office: joi_1.default.boolean().required(),
|
|
59
|
-
formatted_address: joi_1.default.string().required(),
|
|
60
|
-
country: responseCreate_schema_1.createUpdateDeleteBodyResponse.required(),
|
|
61
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
62
|
-
};
|
|
63
|
-
exports.findBodyResponse = joi_1.default
|
|
64
|
-
.array()
|
|
65
|
-
.items(__assign(__assign({}, findBodyResponseKeys), IShared.joiValidateStamps))
|
|
66
|
-
.required();
|
|
67
|
-
var findByIdBodyResponseKeys = {
|
|
68
|
-
id: joi_1.default.string().uuid().required(),
|
|
69
|
-
provider_id: joi_1.default.string().allow(null).required(),
|
|
70
|
-
client_id: joi_1.default.string().allow(null).required(),
|
|
71
|
-
store_operator_id: joi_1.default.string().allow(null).required(),
|
|
72
|
-
commissioner_id: joi_1.default.string().allow(null).required(),
|
|
73
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
74
|
-
street: joi_1.default.string().required(),
|
|
75
|
-
locality: joi_1.default.string().required(),
|
|
76
|
-
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
77
|
-
billing: joi_1.default.boolean().required(),
|
|
78
|
-
delivery: joi_1.default.boolean().required(),
|
|
79
|
-
head_office: joi_1.default.boolean().required(),
|
|
80
|
-
formatted_address: joi_1.default.string().required(),
|
|
81
|
-
country: responseCreate_schema_1.createUpdateDeleteBodyResponse.required(),
|
|
82
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
83
|
-
};
|
|
84
|
-
exports.findByIdBodyResponse = joi_1.default
|
|
85
|
-
.object()
|
|
86
|
-
.keys(__assign(__assign({}, findByIdBodyResponseKeys), IShared.joiValidateStamps))
|
|
87
|
-
.allow(null);
|
|
88
|
-
exports.findOwnerIdBodyResponsekeys = {
|
|
89
|
-
id: joi_1.default.string().uuid().required(),
|
|
90
|
-
provider_id: joi_1.default.string().allow(null).required(),
|
|
91
|
-
client_id: joi_1.default.string().allow(null).required(),
|
|
92
|
-
store_operator_id: joi_1.default.string().allow(null).required(),
|
|
93
|
-
commissioner_id: joi_1.default.string().allow(null).required(),
|
|
94
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
95
|
-
street: joi_1.default.string().required(),
|
|
96
|
-
locality: joi_1.default.string().required(),
|
|
97
|
-
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
98
|
-
billing: joi_1.default.boolean().required(),
|
|
99
|
-
delivery: joi_1.default.boolean().required(),
|
|
100
|
-
head_office: joi_1.default.boolean().required(),
|
|
101
|
-
country: responseCreate_schema_1.createUpdateDeleteBodyResponse.required(),
|
|
102
|
-
formatted_address: joi_1.default.string().required(),
|
|
103
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
104
|
-
};
|
|
105
|
-
exports.findOwnerIdBodyResponse = joi_1.default
|
|
106
|
-
.array()
|
|
107
|
-
.items(__assign(__assign({}, exports.findOwnerIdBodyResponsekeys), IShared.joiValidateStamps))
|
|
108
|
-
.required();
|
|
109
|
-
var findPaginatedBodyResponseKeys = {
|
|
110
|
-
per_page: joi_1.default.number().required(),
|
|
111
|
-
current_page: joi_1.default.number().required(),
|
|
112
|
-
total: joi_1.default.number().required(),
|
|
113
|
-
data: joi_1.default.array().items(findBodyResponseKeys).required(),
|
|
114
|
-
};
|
|
115
|
-
exports.findPaginationBodyResponse = joi_1.default
|
|
116
|
-
.object()
|
|
117
|
-
.keys(findPaginatedBodyResponseKeys);
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.createUpdateDeleteBodyResponse = void 0;
|
|
41
|
-
var joi_1 = __importDefault(require("joi"));
|
|
42
|
-
var IShared = __importStar(require("../../../shared/interface"));
|
|
43
|
-
var createUpdateDeleteBodyResponseKeys = {
|
|
44
|
-
number: joi_1.default.number().required(),
|
|
45
|
-
id: joi_1.default.string().uuid().required(),
|
|
46
|
-
user_id: joi_1.default.string().uuid().required(),
|
|
47
|
-
preferential_contact_id: joi_1.default.string().allow(null),
|
|
48
|
-
nif: joi_1.default.string().optional().allow(null),
|
|
49
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
50
|
-
language_id: joi_1.default.string().uuid().required(),
|
|
51
|
-
client_type_id: joi_1.default.string().uuid().required(),
|
|
52
|
-
newsletter: joi_1.default.boolean().allow(null),
|
|
53
|
-
inactive: joi_1.default.boolean().allow(null),
|
|
54
|
-
segments_area_id: joi_1.default.string().uuid().required(),
|
|
55
|
-
exemption_reason_id: joi_1.default.string().uuid().allow(null),
|
|
56
|
-
default_discount: joi_1.default.number().positive().required(),
|
|
57
|
-
default_payment_method_id: joi_1.default.string().uuid().required(),
|
|
58
|
-
default_maturity_date_id: joi_1.default.string().uuid().required(),
|
|
59
|
-
default_delivery_method_id: joi_1.default.string().uuid().required(),
|
|
60
|
-
default_vehicle_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
61
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
62
|
-
deferred_payment: joi_1.default.boolean().required(),
|
|
63
|
-
};
|
|
64
|
-
exports.createUpdateDeleteBodyResponse = joi_1.default.object().keys(__assign(__assign({}, createUpdateDeleteBodyResponseKeys), IShared.joiValidateStamps));
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.createUpdateDeleteBodyResponse = void 0;
|
|
41
|
-
var joi_1 = __importDefault(require("joi"));
|
|
42
|
-
var IShared = __importStar(require("../../../shared/interface"));
|
|
43
|
-
var createUpdateDeleteBodyResponseKeys = {
|
|
44
|
-
number: joi_1.default.number().required(),
|
|
45
|
-
id: joi_1.default.string().uuid().required(),
|
|
46
|
-
user_id: joi_1.default.string().uuid().required(),
|
|
47
|
-
preferential_contact_id: joi_1.default.string().uuid().required().allow(null),
|
|
48
|
-
nif: joi_1.default.string().allow(null),
|
|
49
|
-
country_id: joi_1.default.string().uuid().required(),
|
|
50
|
-
language_id: joi_1.default.string().uuid().required(),
|
|
51
|
-
default_percentage: joi_1.default.number().required(),
|
|
52
|
-
inactive: joi_1.default.boolean().required(),
|
|
53
|
-
default_payment_method_id: joi_1.default.string().uuid().required(),
|
|
54
|
-
default_maturity_date_id: joi_1.default.string().uuid().required(),
|
|
55
|
-
default_delivery_method_id: joi_1.default.string().uuid().required(),
|
|
56
|
-
default_vehicle_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
57
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
58
|
-
};
|
|
59
|
-
exports.createUpdateDeleteBodyResponse = joi_1.default.object().keys(__assign(__assign({}, createUpdateDeleteBodyResponseKeys), IShared.joiValidateStamps));
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { ContactTypes } from '../../../shared/entities';
|
|
3
|
-
export type Entity = ContactTypes;
|
|
4
|
-
export declare const Route = "contact_type";
|
|
5
|
-
export declare const UpperName = "ContactTypes";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
type IFindDetailedResponse = Entity;
|
|
8
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
|
-
export type IFindRequest = Record<string, unknown>;
|
|
10
|
-
export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
11
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
12
|
-
}
|
|
13
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
14
|
-
export interface ICreateRequest {
|
|
15
|
-
name: string;
|
|
16
|
-
}
|
|
17
|
-
export interface IUpdateRequest {
|
|
18
|
-
name?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface IRepository {
|
|
21
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
22
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
23
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
24
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
25
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
26
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
27
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
28
|
-
}
|
|
29
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
30
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LowerName = exports.UpperName = exports.Route = void 0;
|
|
4
|
-
exports.Route = 'contact_type';
|
|
5
|
-
exports.UpperName = 'ContactTypes';
|
|
6
|
-
exports.LowerName = exports.UpperName[0].toLowerCase() + exports.UpperName.substring(1);
|