@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.
Files changed (65) hide show
  1. package/dist/index.d.ts +1 -14
  2. package/dist/index.js +7 -33
  3. package/dist/modules/user/clients/interface.d.ts +6 -14
  4. package/dist/modules/user/clients/route.schema.js +3 -7
  5. package/dist/modules/user/commissioner/interface.d.ts +6 -12
  6. package/dist/modules/user/commissioner/route.schema.js +2 -2
  7. package/dist/modules/user/persona/interface.d.ts +18 -0
  8. package/dist/modules/user/persona/route.schema.d.ts +1 -0
  9. package/dist/modules/user/persona/route.schema.js +13 -1
  10. package/dist/modules/user/providers/interface.d.ts +6 -12
  11. package/dist/modules/user/providers/route.schema.js +2 -2
  12. package/dist/modules/user/storeOperator/interface.d.ts +2 -10
  13. package/dist/modules/user/storeOperator/route.schema.js +0 -2
  14. package/dist/modules/user/users/interface.d.ts +10 -13
  15. package/dist/shared/entities/index.d.ts +0 -3
  16. package/dist/shared/entities/user.d.ts +3 -50
  17. package/package.json +3 -3
  18. package/dist/modules/user/address/interface.d.ts +0 -53
  19. package/dist/modules/user/address/interface.js +0 -6
  20. package/dist/modules/user/address/oas.schema.d.ts +0 -352
  21. package/dist/modules/user/address/oas.schema.js +0 -248
  22. package/dist/modules/user/address/responseCreate.schema.d.ts +0 -2
  23. package/dist/modules/user/address/responseCreate.schema.js +0 -58
  24. package/dist/modules/user/address/route.schema.d.ts +0 -5
  25. package/dist/modules/user/address/route.schema.js +0 -46
  26. package/dist/modules/user/address/tests.d.ts +0 -10
  27. package/dist/modules/user/address/tests.js +0 -117
  28. package/dist/modules/user/clients/oas.schema.d.ts +0 -0
  29. package/dist/modules/user/clients/oas.schema.js +0 -1
  30. package/dist/modules/user/clients/responseCreate.schema.d.ts +0 -2
  31. package/dist/modules/user/clients/responseCreate.schema.js +0 -64
  32. package/dist/modules/user/commissioner/responseCreate.schema.d.ts +0 -2
  33. package/dist/modules/user/commissioner/responseCreate.schema.js +0 -59
  34. package/dist/modules/user/contactTypes/interface.d.ts +0 -30
  35. package/dist/modules/user/contactTypes/interface.js +0 -6
  36. package/dist/modules/user/contactTypes/oas.schema.d.ts +0 -350
  37. package/dist/modules/user/contactTypes/oas.schema.js +0 -237
  38. package/dist/modules/user/contactTypes/responseCreate.schema.d.ts +0 -2
  39. package/dist/modules/user/contactTypes/responseCreate.schema.js +0 -48
  40. package/dist/modules/user/contactTypes/route.schema.d.ts +0 -5
  41. package/dist/modules/user/contactTypes/route.schema.js +0 -26
  42. package/dist/modules/user/contactTypes/tests.d.ts +0 -6
  43. package/dist/modules/user/contactTypes/tests.js +0 -73
  44. package/dist/modules/user/contacts/interface.d.ts +0 -67
  45. package/dist/modules/user/contacts/interface.js +0 -6
  46. package/dist/modules/user/contacts/oas.schema.d.ts +0 -406
  47. package/dist/modules/user/contacts/oas.schema.js +0 -268
  48. package/dist/modules/user/contacts/responseCreate.schema.d.ts +0 -2
  49. package/dist/modules/user/contacts/responseCreate.schema.js +0 -60
  50. package/dist/modules/user/contacts/route.schema.d.ts +0 -6
  51. package/dist/modules/user/contacts/route.schema.js +0 -69
  52. package/dist/modules/user/contacts/tests.d.ts +0 -10
  53. package/dist/modules/user/contacts/tests.js +0 -121
  54. package/dist/modules/user/providers/responseCreate.schema.d.ts +0 -2
  55. package/dist/modules/user/providers/responseCreate.schema.js +0 -63
  56. package/dist/modules/user/storeOperator/oas.schema.d.ts +0 -406
  57. package/dist/modules/user/storeOperator/oas.schema.js +0 -268
  58. package/dist/modules/user/storeOperator/responseCreate.schema.d.ts +0 -2
  59. package/dist/modules/user/storeOperator/responseCreate.schema.js +0 -61
  60. package/dist/modules/user/storeOperator/tests.d.ts +0 -7
  61. package/dist/modules/user/storeOperator/tests.js +0 -139
  62. package/dist/modules/user/users/oas.schema.d.ts +0 -350
  63. package/dist/modules/user/users/oas.schema.js +0 -237
  64. package/dist/modules/user/users/tests.d.ts +0 -6
  65. package/dist/modules/user/users/tests.js +0 -154
@@ -1,268 +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.findMinifiedGet = exports.findPaginatedGet = exports.findGet = exports.findByOwnerIdGet = exports.findByIdGet = exports.deletePost = exports.updatePost = exports.createPost = void 0;
41
- var joi_to_swagger_1 = __importDefault(require("joi-to-swagger"));
42
- var interface_1 = require("../../../shared/interface");
43
- var route_schema_1 = require("./route.schema");
44
- var tests_1 = require("./tests");
45
- var interfaces = __importStar(require("./interface"));
46
- var createSchema = (0, joi_to_swagger_1.default)(route_schema_1.createBody).swagger;
47
- var createSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.createUpdateDeleteBodyResponse).swagger;
48
- var updateSchema = (0, joi_to_swagger_1.default)(route_schema_1.updateBody).swagger;
49
- var findByIdSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findByIdBodyResponse).swagger;
50
- var findByOwnerIdSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findOwnerIdBodyResponse).swagger;
51
- var findSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findBodyResponse).swagger;
52
- var findPaginatedSchemaResponse = (0, joi_to_swagger_1.default)(tests_1.findPaginationBodyResponse).swagger;
53
- var findMinifiedSchemaResponse = (0, joi_to_swagger_1.default)(interface_1.findMinifiedReponse).swagger;
54
- exports.createPost = {
55
- tags: ["".concat(interfaces.UpperName)],
56
- summary: "Create ".concat(interfaces.Route),
57
- description: "Create a new ".concat(interfaces.Route),
58
- requestBody: {
59
- content: {
60
- 'application/json': {
61
- schema: __assign({}, createSchema),
62
- },
63
- },
64
- },
65
- responses: {
66
- '200': {
67
- description: 'Create with success',
68
- content: {
69
- 'application/json': {
70
- schema: __assign({}, createSchemaResponse),
71
- },
72
- },
73
- },
74
- },
75
- };
76
- exports.updatePost = {
77
- tags: ["".concat(interfaces.UpperName)],
78
- summary: "Update ".concat(interfaces.Route),
79
- description: "Update a ".concat(interfaces.Route),
80
- parameters: [
81
- {
82
- name: 'id',
83
- in: 'path',
84
- description: "ID of ".concat(interfaces.Route, " to return"),
85
- required: true,
86
- schema: {
87
- type: 'string',
88
- format: 'uuid',
89
- },
90
- },
91
- ],
92
- requestBody: {
93
- content: {
94
- 'application/json': {
95
- schema: __assign({}, updateSchema),
96
- },
97
- },
98
- },
99
- responses: {
100
- '200': {
101
- description: 'Updated with success',
102
- content: {
103
- 'application/json': {
104
- schema: __assign({}, createSchemaResponse),
105
- },
106
- },
107
- },
108
- },
109
- };
110
- exports.deletePost = {
111
- tags: ["".concat(interfaces.UpperName)],
112
- summary: "Delete ".concat(interfaces.Route),
113
- description: "Delete an existing ".concat(interfaces.Route),
114
- parameters: [
115
- {
116
- name: 'id',
117
- in: 'path',
118
- description: "ID of ".concat(interfaces.Route, " to return"),
119
- required: true,
120
- schema: {
121
- type: 'string',
122
- format: 'uuid',
123
- },
124
- },
125
- ],
126
- responses: {
127
- '200': {
128
- description: 'Delete with success',
129
- content: {
130
- 'application/json': {
131
- schema: __assign({}, createSchemaResponse),
132
- },
133
- },
134
- },
135
- },
136
- };
137
- exports.findByIdGet = {
138
- tags: ["".concat(interfaces.UpperName)],
139
- summary: "Find ".concat(interfaces.Route),
140
- description: "Find ".concat(interfaces.Route),
141
- parameters: [
142
- {
143
- name: 'id',
144
- in: 'path',
145
- description: "ID of ".concat(interfaces.Route, " to return"),
146
- required: true,
147
- schema: {
148
- type: 'string',
149
- format: 'uuid',
150
- },
151
- },
152
- ],
153
- responses: {
154
- '200': {
155
- description: 'Find with success',
156
- content: {
157
- 'application/json': {
158
- schema: __assign({}, findByIdSchemaResponse),
159
- },
160
- },
161
- },
162
- },
163
- };
164
- exports.findByOwnerIdGet = {
165
- tags: ["".concat(interfaces.UpperName)],
166
- summary: "Find by Owner Id ".concat(interfaces.Route),
167
- description: "Find by owner id ".concat(interfaces.Route),
168
- parameters: [
169
- {
170
- name: 'owner_id',
171
- in: 'path',
172
- description: "Owner ID of ".concat(interfaces.Route, " to return"),
173
- required: true,
174
- schema: {
175
- type: 'string',
176
- format: 'uuid',
177
- },
178
- },
179
- ],
180
- responses: {
181
- '200': {
182
- description: 'Find with success',
183
- content: {
184
- 'application/json': {
185
- schema: __assign({}, findByOwnerIdSchemaResponse),
186
- },
187
- },
188
- },
189
- },
190
- };
191
- exports.findGet = {
192
- tags: ["".concat(interfaces.UpperName)],
193
- summary: "Find ".concat(interfaces.Route),
194
- description: "Find ".concat(interfaces.Route),
195
- parameters: [],
196
- responses: {
197
- '200': {
198
- description: 'Find with success',
199
- content: {
200
- 'application/json': {
201
- schema: __assign({}, findSchemaResponse),
202
- },
203
- },
204
- },
205
- },
206
- };
207
- exports.findPaginatedGet = {
208
- tags: ["".concat(interfaces.UpperName)],
209
- summary: "Find pagination ".concat(interfaces.Route),
210
- description: "Find with pagination ".concat(interfaces.Route),
211
- parameters: [],
212
- responses: {
213
- '200': {
214
- description: 'Find with success',
215
- content: {
216
- 'application/json': {
217
- schema: __assign({}, findPaginatedSchemaResponse),
218
- },
219
- },
220
- },
221
- },
222
- };
223
- exports.findMinifiedGet = {
224
- tags: ["".concat(interfaces.UpperName)],
225
- summary: "Find pagination ".concat(interfaces.Route),
226
- description: "Find with pagination ".concat(interfaces.Route),
227
- parameters: [
228
- {
229
- name: 'search_value',
230
- in: 'path',
231
- description: "Value of ".concat(interfaces.Route, " to return"),
232
- required: true,
233
- schema: {
234
- type: 'string',
235
- format: 'uuid',
236
- },
237
- },
238
- ],
239
- responses: {
240
- '200': {
241
- description: 'Find with success',
242
- content: {
243
- 'application/json': {
244
- schema: __assign({}, findMinifiedSchemaResponse),
245
- },
246
- },
247
- },
248
- },
249
- };
250
- exports.sw = {
251
- '/contacts': {
252
- post: __assign({}, exports.createPost),
253
- },
254
- '/contacts/{id}': {
255
- put: __assign({}, exports.updatePost),
256
- get: __assign({}, exports.findByIdGet),
257
- delete: __assign({}, exports.deletePost),
258
- },
259
- '/contacts/by_owner': {
260
- get: __assign({}, exports.findByOwnerIdGet),
261
- },
262
- '/contacts/paginated': {
263
- get: __assign({}, exports.findPaginatedGet),
264
- },
265
- '/contacts/minified': {
266
- get: __assign({}, exports.findMinifiedGet),
267
- },
268
- };
@@ -1,2 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createUpdateDeleteBodyResponse: joi.ObjectSchema<any>;
@@ -1,60 +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),
46
- client_id: joi_1.default.string().allow(null),
47
- store_operator_id: joi_1.default.string().allow(null),
48
- commissioner_id: joi_1.default.string().allow(null),
49
- contact_type_id: joi_1.default.string().uuid().required(),
50
- name: joi_1.default.string().required(),
51
- title: joi_1.default.string().required(),
52
- position: joi_1.default.string().required(),
53
- telephone: joi_1.default.string().required(),
54
- email: joi_1.default
55
- .string()
56
- .email({ tlds: { allow: false } })
57
- .required(),
58
- origin_id: joi_1.default.string().allow(null).optional(),
59
- };
60
- exports.createUpdateDeleteBodyResponse = joi_1.default.object().keys(__assign(__assign({}, createUpdateDeleteBodyResponseKeys), IShared.joiValidateStamps));
@@ -1,6 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;
4
- export declare const findQuery: joi.ObjectSchema<any>;
5
- export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
6
- export declare const getBasicSearchParamsValidate: joi.ObjectSchema<any>;
@@ -1,69 +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.getBasicSearchParamsValidate = 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
- provider_id: joi_1.default.string().uuid().allow(null).optional(),
11
- client_id: joi_1.default.string().uuid().allow(null).optional(),
12
- store_operator_id: joi_1.default.string().uuid().allow(null).optional(),
13
- commissioner_id: joi_1.default.string().uuid().allow(null).optional(),
14
- contact_type_id: joi_1.default.string().uuid().allow(null).optional(),
15
- title: joi_1.default.string().allow(null).optional(),
16
- name: joi_1.default.string().optional(),
17
- position: joi_1.default.string().allow(null).optional(),
18
- telephone: joi_1.default.string().allow(null).optional(),
19
- email: joi_1.default
20
- .string()
21
- .email({ tlds: { allow: false } })
22
- .allow(null)
23
- .optional(),
24
- preferential: joi_1.default.boolean().default(false).optional(),
25
- };
26
- exports.createBody = joi_1.default
27
- .object()
28
- .keys(createBodyKeys)
29
- .xor('provider_id', 'client_id', 'store_operator_id', 'commissioner_id')
30
- .or('telephone', 'email')
31
- .messages(messages_1.messages);
32
- var updateBodyKeys = {
33
- contact_type_id: joi_1.default.string().uuid().allow(null).optional(),
34
- title: joi_1.default.string().allow(null).optional(),
35
- name: joi_1.default.string().optional(),
36
- position: joi_1.default.string().allow(null).optional(),
37
- telephone: joi_1.default.string().allow(null).optional(),
38
- email: joi_1.default
39
- .string()
40
- .email({ tlds: { allow: false } })
41
- .allow(null)
42
- .optional(),
43
- preferential: joi_1.default.boolean().optional(),
44
- };
45
- exports.updateBody = joi_1.default
46
- .object()
47
- .keys(updateBodyKeys)
48
- .or('telephone', 'email')
49
- .messages(messages_1.messages);
50
- var findQueryKeys = {};
51
- exports.findQuery = joi_1.default.object().keys(findQueryKeys).messages(messages_1.messages);
52
- var findWithPaginationQueryKeys = {
53
- per_page: joi_1.default.number().integer().positive().default(10).optional(),
54
- current_page: joi_1.default.number().integer().positive().default(1).optional(),
55
- };
56
- exports.findWithPaginationQuery = joi_1.default
57
- .object()
58
- .keys(findWithPaginationQueryKeys)
59
- .messages(messages_1.messages);
60
- var getBasicSearchQueryKeys = {
61
- per_page: joi_1.default.number().integer().positive().default(10).optional(),
62
- current_page: joi_1.default.number().integer().positive().default(1).optional(),
63
- inactive: joi_1.default.boolean().default(false).optional(),
64
- search_value: joi_1.default.string().allow('', null).optional(),
65
- };
66
- exports.getBasicSearchParamsValidate = joi_1.default
67
- .object()
68
- .keys(getBasicSearchQueryKeys)
69
- .messages(messages_1.messages);
@@ -1,10 +0,0 @@
1
- import joi from 'joi';
2
- import * as IShared from '../../../shared/interface';
3
- import { IFindByIdResponse } from './interface';
4
- import { createUpdateDeleteBodyResponse } from './responseCreate.schema';
5
- export { createUpdateDeleteBodyResponse };
6
- export declare const findBodyResponse: joi.ArraySchema<any[]>;
7
- export declare const findByIdBodyResponseKeys: IShared.IRouteResponseWithoutStamps<IFindByIdResponse>;
8
- export declare const findByIdBodyResponse: joi.ObjectSchema<any>;
9
- export declare const findOwnerIdBodyResponse: joi.ArraySchema<any[]>;
10
- export declare const findPaginationBodyResponse: joi.ObjectSchema<any>;
@@ -1,121 +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.findByIdBodyResponse = exports.findByIdBodyResponseKeys = 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("./responseCreate.schema");
44
- Object.defineProperty(exports, "createUpdateDeleteBodyResponse", { enumerable: true, get: function () { return responseCreate_schema_1.createUpdateDeleteBodyResponse; } });
45
- var tests_1 = require("../contactTypes/tests");
46
- var findBodyResponseKeys = {
47
- id: joi_1.default.string().uuid().required(),
48
- provider_id: joi_1.default.string().allow(null),
49
- client_id: joi_1.default.string().allow(null),
50
- store_operator_id: joi_1.default.string().allow(null),
51
- commissioner_id: joi_1.default.string().allow(null),
52
- contact_type_id: joi_1.default.string().uuid().required(),
53
- name: joi_1.default.string().required(),
54
- title: joi_1.default.string().required(),
55
- position: joi_1.default.string().required(),
56
- telephone: joi_1.default.string().required(),
57
- email: joi_1.default
58
- .string()
59
- .email({ tlds: { allow: false } })
60
- .required(),
61
- origin_id: joi_1.default.string().allow(null).optional(),
62
- preferential: joi_1.default.boolean().required(),
63
- };
64
- exports.findBodyResponse = joi_1.default
65
- .array()
66
- .items(__assign(__assign({}, findBodyResponseKeys), IShared.joiValidateStamps))
67
- .required();
68
- exports.findByIdBodyResponseKeys = {
69
- id: joi_1.default.string().uuid().required(),
70
- provider_id: joi_1.default.string().allow(null),
71
- client_id: joi_1.default.string().allow(null),
72
- store_operator_id: joi_1.default.string().allow(null),
73
- commissioner_id: joi_1.default.string().allow(null),
74
- contact_type_id: joi_1.default.string().uuid().required(),
75
- name: joi_1.default.string().required(),
76
- title: joi_1.default.string().required(),
77
- position: joi_1.default.string().required(),
78
- telephone: joi_1.default.string().required(),
79
- email: joi_1.default
80
- .string()
81
- .email({ tlds: { allow: false } })
82
- .required(),
83
- origin_id: joi_1.default.string().allow(null).optional(),
84
- preferential: joi_1.default.boolean().required(),
85
- };
86
- exports.findByIdBodyResponse = joi_1.default
87
- .object()
88
- .keys(__assign(__assign({}, exports.findByIdBodyResponseKeys), IShared.joiValidateStamps))
89
- .allow(null);
90
- var findOwnerIdBodyResponsekeys = {
91
- id: joi_1.default.string().uuid().required(),
92
- provider_id: joi_1.default.string().allow(null),
93
- client_id: joi_1.default.string().allow(null),
94
- store_operator_id: joi_1.default.string().allow(null),
95
- commissioner_id: joi_1.default.string().allow(null),
96
- contact_type_id: joi_1.default.string().uuid().required(),
97
- name: joi_1.default.string().required(),
98
- title: joi_1.default.string().required(),
99
- position: joi_1.default.string().required(),
100
- telephone: joi_1.default.string().required(),
101
- email: joi_1.default
102
- .string()
103
- .email({ tlds: { allow: false } })
104
- .required(),
105
- contact_type: tests_1.createUpdateDeleteBodyResponse.required(),
106
- origin_id: joi_1.default.string().allow(null).optional(),
107
- preferential: joi_1.default.boolean().required(),
108
- };
109
- exports.findOwnerIdBodyResponse = joi_1.default
110
- .array()
111
- .items(__assign(__assign({}, findOwnerIdBodyResponsekeys), IShared.joiValidateStamps))
112
- .required();
113
- var findPaginatedBodyResponseKeys = {
114
- per_page: joi_1.default.number().required(),
115
- current_page: joi_1.default.number().required(),
116
- total: joi_1.default.number().required(),
117
- data: joi_1.default.array().items(findBodyResponseKeys).required(),
118
- };
119
- exports.findPaginationBodyResponse = joi_1.default
120
- .object()
121
- .keys(findPaginatedBodyResponseKeys);
@@ -1,2 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createUpdateDeleteBodyResponse: joi.ObjectSchema<any>;
@@ -1,63 +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
- user_id: joi_1.default.string().uuid().required(),
46
- nif: joi_1.default.string().required(),
47
- provider_type_id: joi_1.default.string().uuid().required(),
48
- country_id: joi_1.default.string().uuid().required(),
49
- language_id: joi_1.default.string().uuid().required(),
50
- support_language_id: joi_1.default.string().uuid().required().allow(null),
51
- exemption_reason_id: joi_1.default.string().uuid().required().allow(null),
52
- preferential_contact_id: joi_1.default.string().uuid().required().allow(null),
53
- number: joi_1.default.number().required(),
54
- inactive: joi_1.default.boolean().required(),
55
- manufacturer: joi_1.default.boolean().optional(),
56
- default_payment_method_id: joi_1.default.string().uuid().required(),
57
- default_maturity_date_id: joi_1.default.string().uuid().required(),
58
- default_delivery_method_id: joi_1.default.string().uuid().required(),
59
- default_vehicle_id: joi_1.default.string().uuid().allow(null).required(),
60
- origin_id: joi_1.default.string().allow(null).required(),
61
- default_discount: joi_1.default.number().positive().allow(0).max(100).required(),
62
- };
63
- exports.createUpdateDeleteBodyResponse = joi_1.default.object().keys(__assign(__assign({}, createUpdateDeleteBodyResponseKeys), IShared.joiValidateStamps));