@nomalism-com/types 0.14.21 → 0.15.1

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 (66) hide show
  1. package/dist/index.d.ts +1 -14
  2. package/dist/index.js +7 -33
  3. package/dist/modules/supply/transformado/interfaces.d.ts +1 -1
  4. package/dist/modules/user/clients/interface.d.ts +5 -15
  5. package/dist/modules/user/clients/route.schema.js +3 -7
  6. package/dist/modules/user/commissioner/interface.d.ts +5 -13
  7. package/dist/modules/user/commissioner/route.schema.js +2 -2
  8. package/dist/modules/user/persona/interface.d.ts +18 -0
  9. package/dist/modules/user/persona/route.schema.d.ts +1 -0
  10. package/dist/modules/user/persona/route.schema.js +13 -1
  11. package/dist/modules/user/providers/interface.d.ts +5 -13
  12. package/dist/modules/user/providers/route.schema.js +2 -2
  13. package/dist/modules/user/storeOperator/interface.d.ts +2 -10
  14. package/dist/modules/user/storeOperator/route.schema.js +0 -2
  15. package/dist/modules/user/users/interface.d.ts +4 -13
  16. package/dist/shared/entities/index.d.ts +0 -3
  17. package/dist/shared/entities/user.d.ts +3 -50
  18. package/package.json +3 -3
  19. package/dist/modules/user/address/interface.d.ts +0 -53
  20. package/dist/modules/user/address/interface.js +0 -6
  21. package/dist/modules/user/address/oas.schema.d.ts +0 -352
  22. package/dist/modules/user/address/oas.schema.js +0 -248
  23. package/dist/modules/user/address/responseCreate.schema.d.ts +0 -2
  24. package/dist/modules/user/address/responseCreate.schema.js +0 -58
  25. package/dist/modules/user/address/route.schema.d.ts +0 -5
  26. package/dist/modules/user/address/route.schema.js +0 -46
  27. package/dist/modules/user/address/tests.d.ts +0 -10
  28. package/dist/modules/user/address/tests.js +0 -117
  29. package/dist/modules/user/clients/oas.schema.d.ts +0 -0
  30. package/dist/modules/user/clients/oas.schema.js +0 -1
  31. package/dist/modules/user/clients/responseCreate.schema.d.ts +0 -2
  32. package/dist/modules/user/clients/responseCreate.schema.js +0 -64
  33. package/dist/modules/user/commissioner/responseCreate.schema.d.ts +0 -2
  34. package/dist/modules/user/commissioner/responseCreate.schema.js +0 -59
  35. package/dist/modules/user/contactTypes/interface.d.ts +0 -30
  36. package/dist/modules/user/contactTypes/interface.js +0 -6
  37. package/dist/modules/user/contactTypes/oas.schema.d.ts +0 -350
  38. package/dist/modules/user/contactTypes/oas.schema.js +0 -237
  39. package/dist/modules/user/contactTypes/responseCreate.schema.d.ts +0 -2
  40. package/dist/modules/user/contactTypes/responseCreate.schema.js +0 -48
  41. package/dist/modules/user/contactTypes/route.schema.d.ts +0 -5
  42. package/dist/modules/user/contactTypes/route.schema.js +0 -26
  43. package/dist/modules/user/contactTypes/tests.d.ts +0 -6
  44. package/dist/modules/user/contactTypes/tests.js +0 -73
  45. package/dist/modules/user/contacts/interface.d.ts +0 -67
  46. package/dist/modules/user/contacts/interface.js +0 -6
  47. package/dist/modules/user/contacts/oas.schema.d.ts +0 -406
  48. package/dist/modules/user/contacts/oas.schema.js +0 -268
  49. package/dist/modules/user/contacts/responseCreate.schema.d.ts +0 -2
  50. package/dist/modules/user/contacts/responseCreate.schema.js +0 -60
  51. package/dist/modules/user/contacts/route.schema.d.ts +0 -6
  52. package/dist/modules/user/contacts/route.schema.js +0 -69
  53. package/dist/modules/user/contacts/tests.d.ts +0 -10
  54. package/dist/modules/user/contacts/tests.js +0 -121
  55. package/dist/modules/user/providers/responseCreate.schema.d.ts +0 -2
  56. package/dist/modules/user/providers/responseCreate.schema.js +0 -63
  57. package/dist/modules/user/storeOperator/oas.schema.d.ts +0 -406
  58. package/dist/modules/user/storeOperator/oas.schema.js +0 -268
  59. package/dist/modules/user/storeOperator/responseCreate.schema.d.ts +0 -2
  60. package/dist/modules/user/storeOperator/responseCreate.schema.js +0 -61
  61. package/dist/modules/user/storeOperator/tests.d.ts +0 -7
  62. package/dist/modules/user/storeOperator/tests.js +0 -139
  63. package/dist/modules/user/users/oas.schema.d.ts +0 -350
  64. package/dist/modules/user/users/oas.schema.js +0 -237
  65. package/dist/modules/user/users/tests.d.ts +0 -6
  66. package/dist/modules/user/users/tests.js +0 -154
@@ -73,7 +73,7 @@ export type UserPermissions = {
73
73
  export type Providers = {
74
74
  id: string;
75
75
  user_id: string;
76
- preferential_contact_id: string | null;
76
+ main_persona_id: string | null;
77
77
  number: number;
78
78
  nif: string | null;
79
79
  country_id: string | null;
@@ -127,7 +127,7 @@ export type Language = {
127
127
  export type Clients = {
128
128
  id: string;
129
129
  user_id: string;
130
- preferential_contact_id: string | null;
130
+ main_persona_id: string | null;
131
131
  number: number;
132
132
  nif: string | null;
133
133
  country_id: string | null;
@@ -220,7 +220,7 @@ export type SocialMedia = {
220
220
  export type Commissioner = {
221
221
  id: string;
222
222
  user_id: string;
223
- preferential_contact_id: string | null;
223
+ main_persona_id: string | null;
224
224
  number: number;
225
225
  nif: string | null;
226
226
  country_id: string | null;
@@ -237,25 +237,6 @@ export type Commissioner = {
237
237
  updated_by: string;
238
238
  origin_id: string | null;
239
239
  };
240
- export type Address = {
241
- id: string;
242
- provider_id: string | null;
243
- client_id: string | null;
244
- store_operator_id: string | null;
245
- commissioner_id: string | null;
246
- country_id: string;
247
- street: string;
248
- locality: string;
249
- postal_code: string;
250
- billing: boolean;
251
- delivery: boolean;
252
- head_office: boolean;
253
- created_at: Date;
254
- updated_at: Date;
255
- created_by: string;
256
- updated_by: string;
257
- origin_id: string | null;
258
- };
259
240
  export type BankData = {
260
241
  id: string;
261
242
  provider_id: string | null;
@@ -300,7 +281,6 @@ export type ReasonForExemption = {
300
281
  export type StoreOperator = {
301
282
  id: string;
302
283
  user_id: string;
303
- preferential_contact_id: string | null;
304
284
  user_position_id: string | null;
305
285
  number: number;
306
286
  internal_email: string | null;
@@ -324,33 +304,6 @@ export type UserPositions = {
324
304
  updated_by: string;
325
305
  origin_id: string | null;
326
306
  };
327
- export type Contacts = {
328
- id: string;
329
- provider_id: string | null;
330
- client_id: string | null;
331
- store_operator_id: string | null;
332
- commissioner_id: string | null;
333
- contact_type_id: string | null;
334
- name: string;
335
- title: string | null;
336
- position: string | null;
337
- telephone: string | null;
338
- email: string | null;
339
- created_at: Date;
340
- updated_at: Date;
341
- created_by: string;
342
- updated_by: string;
343
- origin_id: string | null;
344
- };
345
- export type ContactTypes = {
346
- id: string;
347
- name: string;
348
- created_at: Date;
349
- updated_at: Date;
350
- created_by: string;
351
- updated_by: string;
352
- origin_id: string | null;
353
- };
354
307
  export type PaymentMethods = {
355
308
  id: string;
356
309
  payment_method_id: number | null;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.14.21",
12
+ "version": "0.15.1",
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [
@@ -39,8 +39,8 @@
39
39
  "devDependencies": {
40
40
  "@types/convert-units": "^2.3.9",
41
41
  "@types/node": "^20.10.5",
42
- "@typescript-eslint/eslint-plugin": "^6.14.0",
43
- "@typescript-eslint/parser": "^6.14.0",
42
+ "@typescript-eslint/eslint-plugin": "^6.15.0",
43
+ "@typescript-eslint/parser": "^6.15.0",
44
44
  "concurrently": "^8.2.2",
45
45
  "eslint": "^8.56.0",
46
46
  "eslint-config-airbnb-base": "^15.0.0",
@@ -1,53 +0,0 @@
1
- import * as IShared from '../../../shared/interface';
2
- import { Address, Country } from '../../../shared/entities';
3
- export type Entity = Address;
4
- export declare const Route = "address";
5
- export declare const UpperName = "Address";
6
- export declare const LowerName: string;
7
- export interface IEntityExtended extends Entity {
8
- country: Country;
9
- }
10
- interface IFindDetailedResponse extends IEntityExtended {
11
- formatted_address: string;
12
- }
13
- export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
14
- export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
15
- export type IFindRequest = Record<string, unknown>;
16
- export type IFindResponse = Omit<IFindDetailedResponse, ''>;
17
- export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
18
- }
19
- export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
20
- export interface ICreateRequest {
21
- provider_id?: string | null;
22
- client_id?: string | null;
23
- store_operator_id?: string | null;
24
- commissioner_id?: string | null;
25
- street: string;
26
- locality: string;
27
- postal_code: string;
28
- country_id: string;
29
- billing: boolean;
30
- delivery: boolean;
31
- head_office: boolean;
32
- }
33
- export interface IUpdateRequest {
34
- street?: string;
35
- locality?: string;
36
- postal_code?: string;
37
- country_id?: string;
38
- billing?: boolean;
39
- delivery?: boolean;
40
- head_office?: boolean;
41
- }
42
- export interface IRepository {
43
- findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
44
- findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
45
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
46
- find(selector: IFindRequest): Promise<IFindResponse[]>;
47
- findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
48
- create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
49
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
50
- deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindByOwnerIdResponse | null>;
51
- }
52
- export type IController = IShared.IEntityWithUserToken<IRepository>;
53
- 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 = 'address';
5
- exports.UpperName = 'Address';
6
- exports.LowerName = exports.UpperName[0].toLowerCase() + exports.UpperName.substring(1);
@@ -1,352 +0,0 @@
1
- export declare const createAddress: {
2
- tags: string[];
3
- summary: string;
4
- description: string;
5
- requestBody: {
6
- content: {
7
- 'application/json': {
8
- schema: {
9
- [x: string]: any;
10
- };
11
- };
12
- };
13
- };
14
- responses: {
15
- '200': {
16
- description: string;
17
- content: {
18
- 'application/json': {
19
- schema: {
20
- [x: string]: any;
21
- };
22
- };
23
- };
24
- };
25
- };
26
- };
27
- export declare const updateAddress: {
28
- tags: string[];
29
- summary: string;
30
- description: string;
31
- parameters: {
32
- name: string;
33
- in: string;
34
- description: string;
35
- required: boolean;
36
- schema: {
37
- type: string;
38
- format: string;
39
- };
40
- }[];
41
- requestBody: {
42
- content: {
43
- 'application/json': {
44
- schema: {
45
- [x: string]: any;
46
- };
47
- };
48
- };
49
- };
50
- responses: {
51
- '200': {
52
- description: string;
53
- content: {
54
- 'application/json': {
55
- schema: {
56
- [x: string]: any;
57
- };
58
- };
59
- };
60
- };
61
- };
62
- };
63
- export declare const deleteAddress: {
64
- tags: string[];
65
- summary: string;
66
- description: string;
67
- parameters: {
68
- name: string;
69
- in: string;
70
- description: string;
71
- required: boolean;
72
- schema: {
73
- type: string;
74
- format: string;
75
- };
76
- }[];
77
- responses: {
78
- '200': {
79
- description: string;
80
- content: {
81
- 'application/json': {
82
- schema: {
83
- [x: string]: any;
84
- };
85
- };
86
- };
87
- };
88
- };
89
- };
90
- export declare const findByIdAdress: {
91
- tags: string[];
92
- summary: string;
93
- description: string;
94
- parameters: {
95
- name: string;
96
- in: string;
97
- description: string;
98
- required: boolean;
99
- schema: {
100
- type: string;
101
- format: string;
102
- };
103
- }[];
104
- responses: {
105
- '200': {
106
- description: string;
107
- content: {
108
- 'application/json': {
109
- schema: {
110
- [x: string]: any;
111
- };
112
- };
113
- };
114
- };
115
- };
116
- };
117
- export declare const findByOwnerIdAdress: {
118
- tags: string[];
119
- summary: string;
120
- description: string;
121
- parameters: {
122
- name: string;
123
- in: string;
124
- description: string;
125
- required: boolean;
126
- schema: {
127
- type: string;
128
- format: string;
129
- };
130
- }[];
131
- responses: {
132
- '200': {
133
- description: string;
134
- content: {
135
- 'application/json': {
136
- schema: {
137
- [x: string]: any;
138
- };
139
- };
140
- };
141
- };
142
- };
143
- };
144
- export declare const findAdress: {
145
- tags: string[];
146
- summary: string;
147
- description: string;
148
- parameters: never[];
149
- responses: {
150
- '200': {
151
- description: string;
152
- content: {
153
- 'application/json': {
154
- schema: {
155
- [x: string]: any;
156
- };
157
- };
158
- };
159
- };
160
- };
161
- };
162
- export declare const findPaginatedAdress: {
163
- tags: string[];
164
- summary: string;
165
- description: string;
166
- parameters: never[];
167
- responses: {
168
- '200': {
169
- description: string;
170
- content: {
171
- 'application/json': {
172
- schema: {
173
- [x: string]: any;
174
- };
175
- };
176
- };
177
- };
178
- };
179
- };
180
- export declare const sw: {
181
- '/address': {
182
- post: {
183
- tags: string[];
184
- summary: string;
185
- description: string;
186
- requestBody: {
187
- content: {
188
- 'application/json': {
189
- schema: {
190
- [x: string]: any;
191
- };
192
- };
193
- };
194
- };
195
- responses: {
196
- '200': {
197
- description: string;
198
- content: {
199
- 'application/json': {
200
- schema: {
201
- [x: string]: any;
202
- };
203
- };
204
- };
205
- };
206
- };
207
- };
208
- };
209
- '/address/{id}': {
210
- put: {
211
- tags: string[];
212
- summary: string;
213
- description: string;
214
- parameters: {
215
- name: string;
216
- in: string;
217
- description: string;
218
- required: boolean;
219
- schema: {
220
- type: string;
221
- format: string;
222
- };
223
- }[];
224
- requestBody: {
225
- content: {
226
- 'application/json': {
227
- schema: {
228
- [x: string]: any;
229
- };
230
- };
231
- };
232
- };
233
- responses: {
234
- '200': {
235
- description: string;
236
- content: {
237
- 'application/json': {
238
- schema: {
239
- [x: string]: any;
240
- };
241
- };
242
- };
243
- };
244
- };
245
- };
246
- get: {
247
- tags: string[];
248
- summary: string;
249
- description: string;
250
- parameters: {
251
- name: string;
252
- in: string;
253
- description: string;
254
- required: boolean;
255
- schema: {
256
- type: string;
257
- format: string;
258
- };
259
- }[];
260
- responses: {
261
- '200': {
262
- description: string;
263
- content: {
264
- 'application/json': {
265
- schema: {
266
- [x: string]: any;
267
- };
268
- };
269
- };
270
- };
271
- };
272
- };
273
- };
274
- '/address/by_owner': {
275
- get: {
276
- tags: string[];
277
- summary: string;
278
- description: string;
279
- parameters: {
280
- name: string;
281
- in: string;
282
- description: string;
283
- required: boolean;
284
- schema: {
285
- type: string;
286
- format: string;
287
- };
288
- }[];
289
- responses: {
290
- '200': {
291
- description: string;
292
- content: {
293
- 'application/json': {
294
- schema: {
295
- [x: string]: any;
296
- };
297
- };
298
- };
299
- };
300
- };
301
- };
302
- };
303
- '/address/paginated': {
304
- get: {
305
- tags: string[];
306
- summary: string;
307
- description: string;
308
- parameters: never[];
309
- responses: {
310
- '200': {
311
- description: string;
312
- content: {
313
- 'application/json': {
314
- schema: {
315
- [x: string]: any;
316
- };
317
- };
318
- };
319
- };
320
- };
321
- };
322
- };
323
- '/address/{address_id}/user/{user_id}': {
324
- delete: {
325
- tags: string[];
326
- summary: string;
327
- description: string;
328
- parameters: {
329
- name: string;
330
- in: string;
331
- description: string;
332
- required: boolean;
333
- schema: {
334
- type: string;
335
- format: string;
336
- };
337
- }[];
338
- responses: {
339
- '200': {
340
- description: string;
341
- content: {
342
- 'application/json': {
343
- schema: {
344
- [x: string]: any;
345
- };
346
- };
347
- };
348
- };
349
- };
350
- };
351
- };
352
- };