controlresell 2.0.5 → 2.0.7

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 (34) hide show
  1. package/package.json +2 -2
  2. package/src/com/controlresell/models/auth/LoginPayload.d.ts +12 -0
  3. package/src/com/controlresell/models/auth/LoginPayload.js +8 -0
  4. package/src/com/controlresell/models/auth/LoginPayload.ts +7 -0
  5. package/src/com/controlresell/models/auth/RegisterPayload.d.ts +12 -0
  6. package/src/com/controlresell/models/auth/RegisterPayload.js +8 -0
  7. package/src/com/controlresell/models/auth/RegisterPayload.ts +7 -0
  8. package/src/com/controlresell/models/customers/Customer.d.ts +2 -2
  9. package/src/com/controlresell/models/items/CreatedItems.d.ts +6 -6
  10. package/src/com/controlresell/models/items/Item.d.ts +4 -4
  11. package/src/com/controlresell/models/items/ItemFiltersContext.d.ts +3 -3
  12. package/src/com/controlresell/models/items/ItemSort.d.ts +1 -1
  13. package/src/com/controlresell/models/items/ItemSort.js +1 -1
  14. package/src/com/controlresell/models/items/ItemSort.ts +1 -1
  15. package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +6 -52
  16. package/src/com/controlresell/models/items/ItemsWithFilters.js +0 -3
  17. package/src/com/controlresell/models/items/ItemsWithFilters.ts +0 -3
  18. package/src/com/controlresell/models/items/UpdatedItem.d.ts +6 -6
  19. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +6 -6
  20. package/src/com/controlresell/models/users/CreateUserPayload.d.ts +18 -0
  21. package/src/com/controlresell/models/users/CreateUserPayload.js +10 -0
  22. package/src/com/controlresell/models/users/CreateUserPayload.ts +9 -0
  23. package/src/com/controlresell/models/users/UpdateUserPayload.d.ts +7 -4
  24. package/src/com/controlresell/models/users/UpdateUserPayload.js +1 -0
  25. package/src/com/controlresell/models/users/UpdateUserPayload.ts +1 -0
  26. package/src/com/controlresell/models/users/User.d.ts +6 -6
  27. package/src/com/controlresell/models/users/fields/Field.d.ts +2 -2
  28. package/src/com/controlresell/models/users/fields/FieldPayload.d.ts +2 -2
  29. package/src/com/controlresell/models/users/fields/FieldsWithData.d.ts +52 -0
  30. package/src/com/controlresell/models/users/fields/FieldsWithData.js +9 -0
  31. package/src/com/controlresell/models/users/fields/FieldsWithData.ts +8 -0
  32. package/src/index.d.ts +4 -0
  33. package/src/index.js +4 -0
  34. package/src/index.ts +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "controlresell",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -17,7 +17,7 @@
17
17
  "typescript": "^5.8.3"
18
18
  },
19
19
  "dependencies": {
20
- "controlresell-connector": "^0.0.25",
20
+ "controlresell-connector": "^0.0.27",
21
21
  "zod": "^3.24.2",
22
22
  "zodable-idschema": "^1.0.0"
23
23
  }
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const LoginPayloadSchema: z.ZodObject<{
3
+ email: z.ZodString;
4
+ password: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ email: string;
7
+ password: string;
8
+ }, {
9
+ email: string;
10
+ password: string;
11
+ }>;
12
+ export type LoginPayload = z.infer<typeof LoginPayloadSchema>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoginPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.LoginPayloadSchema = zod_1.z.object({
6
+ email: zod_1.z.string(),
7
+ password: zod_1.z.string()
8
+ });
@@ -0,0 +1,7 @@
1
+ import {z} from "zod"
2
+
3
+ export const LoginPayloadSchema = z.object({
4
+ email: z.string(),
5
+ password: z.string()
6
+ })
7
+ export type LoginPayload = z.infer<typeof LoginPayloadSchema>
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const RegisterPayloadSchema: z.ZodObject<{
3
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ email?: string | null | undefined;
7
+ password?: string | null | undefined;
8
+ }, {
9
+ email?: string | null | undefined;
10
+ password?: string | null | undefined;
11
+ }>;
12
+ export type RegisterPayload = z.infer<typeof RegisterPayloadSchema>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RegisterPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.RegisterPayloadSchema = zod_1.z.object({
6
+ email: zod_1.z.string().nullish(),
7
+ password: zod_1.z.string().nullish()
8
+ });
@@ -0,0 +1,7 @@
1
+ import {z} from "zod"
2
+
3
+ export const RegisterPayloadSchema = z.object({
4
+ email: z.string().nullish(),
5
+ password: z.string().nullish()
6
+ })
7
+ export type RegisterPayload = z.infer<typeof RegisterPayloadSchema>
@@ -12,24 +12,24 @@ export declare const CustomerSchema: z.ZodObject<{
12
12
  bic: z.ZodString;
13
13
  phoneVerified: z.ZodBoolean;
14
14
  }, "strip", z.ZodTypeAny, {
15
+ email: string;
15
16
  id: string | number;
16
17
  userId: string | number;
17
18
  firstName: string;
18
19
  lastName: string;
19
20
  birthDate: Date;
20
- email: string;
21
21
  idNumber: string;
22
22
  phone: string;
23
23
  iban: string;
24
24
  bic: string;
25
25
  phoneVerified: boolean;
26
26
  }, {
27
+ email: string;
27
28
  id: string | number;
28
29
  userId: string | number;
29
30
  firstName: string;
30
31
  lastName: string;
31
32
  birthDate: Date;
32
- email: string;
33
33
  idNumber: string;
34
34
  phone: string;
35
35
  iban: string;
@@ -170,24 +170,24 @@ export declare const CreatedItemsSchema: z.ZodObject<{
170
170
  bic: z.ZodString;
171
171
  phoneVerified: z.ZodBoolean;
172
172
  }, "strip", z.ZodTypeAny, {
173
+ email: string;
173
174
  id: string | number;
174
175
  userId: string | number;
175
176
  firstName: string;
176
177
  lastName: string;
177
178
  birthDate: Date;
178
- email: string;
179
179
  idNumber: string;
180
180
  phone: string;
181
181
  iban: string;
182
182
  bic: string;
183
183
  phoneVerified: boolean;
184
184
  }, {
185
+ email: string;
185
186
  id: string | number;
186
187
  userId: string | number;
187
188
  firstName: string;
188
189
  lastName: string;
189
190
  birthDate: Date;
190
- email: string;
191
191
  idNumber: string;
192
192
  phone: string;
193
193
  iban: string;
@@ -355,12 +355,12 @@ export declare const CreatedItemsSchema: z.ZodObject<{
355
355
  } | null | undefined;
356
356
  }[] | null | undefined;
357
357
  customer?: {
358
+ email: string;
358
359
  id: string | number;
359
360
  userId: string | number;
360
361
  firstName: string;
361
362
  lastName: string;
362
363
  birthDate: Date;
363
- email: string;
364
364
  idNumber: string;
365
365
  phone: string;
366
366
  iban: string;
@@ -464,12 +464,12 @@ export declare const CreatedItemsSchema: z.ZodObject<{
464
464
  } | null | undefined;
465
465
  }[] | null | undefined;
466
466
  customer?: {
467
+ email: string;
467
468
  id: string | number;
468
469
  userId: string | number;
469
470
  firstName: string;
470
471
  lastName: string;
471
472
  birthDate: Date;
472
- email: string;
473
473
  idNumber: string;
474
474
  phone: string;
475
475
  iban: string;
@@ -594,12 +594,12 @@ export declare const CreatedItemsSchema: z.ZodObject<{
594
594
  } | null | undefined;
595
595
  }[] | null | undefined;
596
596
  customer?: {
597
+ email: string;
597
598
  id: string | number;
598
599
  userId: string | number;
599
600
  firstName: string;
600
601
  lastName: string;
601
602
  birthDate: Date;
602
- email: string;
603
603
  idNumber: string;
604
604
  phone: string;
605
605
  iban: string;
@@ -712,12 +712,12 @@ export declare const CreatedItemsSchema: z.ZodObject<{
712
712
  } | null | undefined;
713
713
  }[] | null | undefined;
714
714
  customer?: {
715
+ email: string;
715
716
  id: string | number;
716
717
  userId: string | number;
717
718
  firstName: string;
718
719
  lastName: string;
719
720
  birthDate: Date;
720
- email: string;
721
721
  idNumber: string;
722
722
  phone: string;
723
723
  iban: string;
@@ -169,24 +169,24 @@ export declare const ItemSchema: z.ZodObject<{
169
169
  bic: z.ZodString;
170
170
  phoneVerified: z.ZodBoolean;
171
171
  }, "strip", z.ZodTypeAny, {
172
+ email: string;
172
173
  id: string | number;
173
174
  userId: string | number;
174
175
  firstName: string;
175
176
  lastName: string;
176
177
  birthDate: Date;
177
- email: string;
178
178
  idNumber: string;
179
179
  phone: string;
180
180
  iban: string;
181
181
  bic: string;
182
182
  phoneVerified: boolean;
183
183
  }, {
184
+ email: string;
184
185
  id: string | number;
185
186
  userId: string | number;
186
187
  firstName: string;
187
188
  lastName: string;
188
189
  birthDate: Date;
189
- email: string;
190
190
  idNumber: string;
191
191
  phone: string;
192
192
  iban: string;
@@ -354,12 +354,12 @@ export declare const ItemSchema: z.ZodObject<{
354
354
  } | null | undefined;
355
355
  }[] | null | undefined;
356
356
  customer?: {
357
+ email: string;
357
358
  id: string | number;
358
359
  userId: string | number;
359
360
  firstName: string;
360
361
  lastName: string;
361
362
  birthDate: Date;
362
- email: string;
363
363
  idNumber: string;
364
364
  phone: string;
365
365
  iban: string;
@@ -463,12 +463,12 @@ export declare const ItemSchema: z.ZodObject<{
463
463
  } | null | undefined;
464
464
  }[] | null | undefined;
465
465
  customer?: {
466
+ email: string;
466
467
  id: string | number;
467
468
  userId: string | number;
468
469
  firstName: string;
469
470
  lastName: string;
470
471
  birthDate: Date;
471
- email: string;
472
472
  idNumber: string;
473
473
  phone: string;
474
474
  iban: string;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare const ItemFiltersContextSchema: z.ZodObject<{
3
- sort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE", "LATEST_ACTIVITY"]>>>;
3
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE"]>>>;
4
4
  sold: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
5
5
  categoriesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
6
6
  brandsId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
@@ -17,7 +17,7 @@ export declare const ItemFiltersContextSchema: z.ZodObject<{
17
17
  searchQuery: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
18
  readyToPublish: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
19
19
  }, "strip", z.ZodTypeAny, {
20
- sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | "LATEST_ACTIVITY" | null | undefined;
20
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
21
21
  sex?: string[] | null | undefined;
22
22
  sold?: boolean | null | undefined;
23
23
  categoriesId?: number[] | null | undefined;
@@ -34,7 +34,7 @@ export declare const ItemFiltersContextSchema: z.ZodObject<{
34
34
  searchQuery?: string | null | undefined;
35
35
  readyToPublish?: boolean | null | undefined;
36
36
  }, {
37
- sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | "LATEST_ACTIVITY" | null | undefined;
37
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
38
38
  sex?: string[] | null | undefined;
39
39
  sold?: boolean | null | undefined;
40
40
  categoriesId?: number[] | null | undefined;
@@ -1,3 +1,3 @@
1
1
  import { z } from "zod";
2
- export declare const ItemSortSchema: z.ZodEnum<["MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE", "LATEST_ACTIVITY"]>;
2
+ export declare const ItemSortSchema: z.ZodEnum<["MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE"]>;
3
3
  export type ItemSort = z.infer<typeof ItemSortSchema>;
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemSortSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.ItemSortSchema = zod_1.z.enum([
6
- "MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE", "LATEST_ACTIVITY"
6
+ "MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE"
7
7
  ]);
@@ -1,6 +1,6 @@
1
1
  import {z} from "zod"
2
2
 
3
3
  export const ItemSortSchema = z.enum([
4
- "MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE", "LATEST_ACTIVITY"
4
+ "MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE"
5
5
  ])
6
6
  export type ItemSort = z.infer<typeof ItemSortSchema>
@@ -172,24 +172,24 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
172
172
  bic: z.ZodString;
173
173
  phoneVerified: z.ZodBoolean;
174
174
  }, "strip", z.ZodTypeAny, {
175
+ email: string;
175
176
  id: string | number;
176
177
  userId: string | number;
177
178
  firstName: string;
178
179
  lastName: string;
179
180
  birthDate: Date;
180
- email: string;
181
181
  idNumber: string;
182
182
  phone: string;
183
183
  iban: string;
184
184
  bic: string;
185
185
  phoneVerified: boolean;
186
186
  }, {
187
+ email: string;
187
188
  id: string | number;
188
189
  userId: string | number;
189
190
  firstName: string;
190
191
  lastName: string;
191
192
  birthDate: Date;
192
- email: string;
193
193
  idNumber: string;
194
194
  phone: string;
195
195
  iban: string;
@@ -357,12 +357,12 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
357
357
  } | null | undefined;
358
358
  }[] | null | undefined;
359
359
  customer?: {
360
+ email: string;
360
361
  id: string | number;
361
362
  userId: string | number;
362
363
  firstName: string;
363
364
  lastName: string;
364
365
  birthDate: Date;
365
- email: string;
366
366
  idNumber: string;
367
367
  phone: string;
368
368
  iban: string;
@@ -466,12 +466,12 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
466
466
  } | null | undefined;
467
467
  }[] | null | undefined;
468
468
  customer?: {
469
+ email: string;
469
470
  id: string | number;
470
471
  userId: string | number;
471
472
  firstName: string;
472
473
  lastName: string;
473
474
  birthDate: Date;
474
- email: string;
475
475
  idNumber: string;
476
476
  phone: string;
477
477
  iban: string;
@@ -514,32 +514,6 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
514
514
  }>, "many">;
515
515
  currentPage: z.ZodNumber;
516
516
  totalPages: z.ZodNumber;
517
- fields: z.ZodArray<z.ZodObject<{
518
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
519
- userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
520
- name: z.ZodString;
521
- type: z.ZodEnum<["TEXT", "SPOT"]>;
522
- config: z.ZodOptional<z.ZodNullable<z.ZodString>>;
523
- defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
524
- section: z.ZodString;
525
- }, "strip", z.ZodTypeAny, {
526
- type: "TEXT" | "SPOT";
527
- id: string | number;
528
- name: string;
529
- userId: string | number;
530
- section: string;
531
- config?: string | null | undefined;
532
- defaultValue?: string | null | undefined;
533
- }, {
534
- type: "TEXT" | "SPOT";
535
- id: string | number;
536
- name: string;
537
- userId: string | number;
538
- section: string;
539
- config?: string | null | undefined;
540
- defaultValue?: string | null | undefined;
541
- }>, "many">;
542
- fieldsData: z.ZodRecord<z.ZodNumber, z.ZodArray<z.ZodString, "many">>;
543
517
  gettingStartedSteps: z.ZodOptional<z.ZodNullable<z.ZodObject<{
544
518
  isShown: z.ZodBoolean;
545
519
  addFirstItem: z.ZodBoolean;
@@ -560,15 +534,6 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
560
534
  add10Items: boolean;
561
535
  }>>>;
562
536
  }, "strip", z.ZodTypeAny, {
563
- fields: {
564
- type: "TEXT" | "SPOT";
565
- id: string | number;
566
- name: string;
567
- userId: string | number;
568
- section: string;
569
- config?: string | null | undefined;
570
- defaultValue?: string | null | undefined;
571
- }[];
572
537
  count: number;
573
538
  allItemsCount: number;
574
539
  rows: {
@@ -635,12 +600,12 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
635
600
  } | null | undefined;
636
601
  }[] | null | undefined;
637
602
  customer?: {
603
+ email: string;
638
604
  id: string | number;
639
605
  userId: string | number;
640
606
  firstName: string;
641
607
  lastName: string;
642
608
  birthDate: Date;
643
- email: string;
644
609
  idNumber: string;
645
610
  phone: string;
646
611
  iban: string;
@@ -683,7 +648,6 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
683
648
  }[];
684
649
  currentPage: number;
685
650
  totalPages: number;
686
- fieldsData: Record<number, string[]>;
687
651
  gettingStartedSteps?: {
688
652
  isShown: boolean;
689
653
  addFirstItem: boolean;
@@ -692,15 +656,6 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
692
656
  add10Items: boolean;
693
657
  } | null | undefined;
694
658
  }, {
695
- fields: {
696
- type: "TEXT" | "SPOT";
697
- id: string | number;
698
- name: string;
699
- userId: string | number;
700
- section: string;
701
- config?: string | null | undefined;
702
- defaultValue?: string | null | undefined;
703
- }[];
704
659
  count: number;
705
660
  allItemsCount: number;
706
661
  rows: {
@@ -767,12 +722,12 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
767
722
  } | null | undefined;
768
723
  }[] | null | undefined;
769
724
  customer?: {
725
+ email: string;
770
726
  id: string | number;
771
727
  userId: string | number;
772
728
  firstName: string;
773
729
  lastName: string;
774
730
  birthDate: Date;
775
- email: string;
776
731
  idNumber: string;
777
732
  phone: string;
778
733
  iban: string;
@@ -815,7 +770,6 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
815
770
  }[];
816
771
  currentPage: number;
817
772
  totalPages: number;
818
- fieldsData: Record<number, string[]>;
819
773
  gettingStartedSteps?: {
820
774
  isShown: boolean;
821
775
  addFirstItem: boolean;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ItemsWithFiltersSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const Item_1 = require("./Item");
6
- const Field_1 = require("../users/fields/Field");
7
6
  const GettingStartedSteps_1 = require("../users/GettingStartedSteps");
8
7
  exports.ItemsWithFiltersSchema = zod_1.z.object({
9
8
  count: zod_1.z.number(),
@@ -11,7 +10,5 @@ exports.ItemsWithFiltersSchema = zod_1.z.object({
11
10
  rows: zod_1.z.array(Item_1.ItemSchema),
12
11
  currentPage: zod_1.z.number(),
13
12
  totalPages: zod_1.z.number(),
14
- fields: zod_1.z.array(Field_1.FieldSchema),
15
- fieldsData: zod_1.z.record(zod_1.z.coerce.number(), zod_1.z.array(zod_1.z.string())),
16
13
  gettingStartedSteps: GettingStartedSteps_1.GettingStartedStepsSchema.nullish()
17
14
  });
@@ -1,6 +1,5 @@
1
1
  import {z} from "zod"
2
2
  import {ItemSchema} from "./Item"
3
- import {FieldSchema} from "../users/fields/Field"
4
3
  import {GettingStartedStepsSchema} from "../users/GettingStartedSteps"
5
4
 
6
5
  export const ItemsWithFiltersSchema = z.object({
@@ -9,8 +8,6 @@ export const ItemsWithFiltersSchema = z.object({
9
8
  rows: z.array(ItemSchema),
10
9
  currentPage: z.number(),
11
10
  totalPages: z.number(),
12
- fields: z.array(FieldSchema),
13
- fieldsData: z.record(z.coerce.number(), z.array(z.string())),
14
11
  gettingStartedSteps: GettingStartedStepsSchema.nullish()
15
12
  })
16
13
  export type ItemsWithFilters = z.infer<typeof ItemsWithFiltersSchema>
@@ -170,24 +170,24 @@ export declare const UpdatedItemSchema: z.ZodObject<{
170
170
  bic: z.ZodString;
171
171
  phoneVerified: z.ZodBoolean;
172
172
  }, "strip", z.ZodTypeAny, {
173
+ email: string;
173
174
  id: string | number;
174
175
  userId: string | number;
175
176
  firstName: string;
176
177
  lastName: string;
177
178
  birthDate: Date;
178
- email: string;
179
179
  idNumber: string;
180
180
  phone: string;
181
181
  iban: string;
182
182
  bic: string;
183
183
  phoneVerified: boolean;
184
184
  }, {
185
+ email: string;
185
186
  id: string | number;
186
187
  userId: string | number;
187
188
  firstName: string;
188
189
  lastName: string;
189
190
  birthDate: Date;
190
- email: string;
191
191
  idNumber: string;
192
192
  phone: string;
193
193
  iban: string;
@@ -355,12 +355,12 @@ export declare const UpdatedItemSchema: z.ZodObject<{
355
355
  } | null | undefined;
356
356
  }[] | null | undefined;
357
357
  customer?: {
358
+ email: string;
358
359
  id: string | number;
359
360
  userId: string | number;
360
361
  firstName: string;
361
362
  lastName: string;
362
363
  birthDate: Date;
363
- email: string;
364
364
  idNumber: string;
365
365
  phone: string;
366
366
  iban: string;
@@ -464,12 +464,12 @@ export declare const UpdatedItemSchema: z.ZodObject<{
464
464
  } | null | undefined;
465
465
  }[] | null | undefined;
466
466
  customer?: {
467
+ email: string;
467
468
  id: string | number;
468
469
  userId: string | number;
469
470
  firstName: string;
470
471
  lastName: string;
471
472
  birthDate: Date;
472
- email: string;
473
473
  idNumber: string;
474
474
  phone: string;
475
475
  iban: string;
@@ -601,12 +601,12 @@ export declare const UpdatedItemSchema: z.ZodObject<{
601
601
  } | null | undefined;
602
602
  }[] | null | undefined;
603
603
  customer?: {
604
+ email: string;
604
605
  id: string | number;
605
606
  userId: string | number;
606
607
  firstName: string;
607
608
  lastName: string;
608
609
  birthDate: Date;
609
- email: string;
610
610
  idNumber: string;
611
611
  phone: string;
612
612
  iban: string;
@@ -719,12 +719,12 @@ export declare const UpdatedItemSchema: z.ZodObject<{
719
719
  } | null | undefined;
720
720
  }[] | null | undefined;
721
721
  customer?: {
722
+ email: string;
722
723
  id: string | number;
723
724
  userId: string | number;
724
725
  firstName: string;
725
726
  lastName: string;
726
727
  birthDate: Date;
727
- email: string;
728
728
  idNumber: string;
729
729
  phone: string;
730
730
  iban: string;
@@ -180,24 +180,24 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
180
180
  bic: z.ZodString;
181
181
  phoneVerified: z.ZodBoolean;
182
182
  }, "strip", z.ZodTypeAny, {
183
+ email: string;
183
184
  id: string | number;
184
185
  userId: string | number;
185
186
  firstName: string;
186
187
  lastName: string;
187
188
  birthDate: Date;
188
- email: string;
189
189
  idNumber: string;
190
190
  phone: string;
191
191
  iban: string;
192
192
  bic: string;
193
193
  phoneVerified: boolean;
194
194
  }, {
195
+ email: string;
195
196
  id: string | number;
196
197
  userId: string | number;
197
198
  firstName: string;
198
199
  lastName: string;
199
200
  birthDate: Date;
200
- email: string;
201
201
  idNumber: string;
202
202
  phone: string;
203
203
  iban: string;
@@ -365,12 +365,12 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
365
365
  } | null | undefined;
366
366
  }[] | null | undefined;
367
367
  customer?: {
368
+ email: string;
368
369
  id: string | number;
369
370
  userId: string | number;
370
371
  firstName: string;
371
372
  lastName: string;
372
373
  birthDate: Date;
373
- email: string;
374
374
  idNumber: string;
375
375
  phone: string;
376
376
  iban: string;
@@ -474,12 +474,12 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
474
474
  } | null | undefined;
475
475
  }[] | null | undefined;
476
476
  customer?: {
477
+ email: string;
477
478
  id: string | number;
478
479
  userId: string | number;
479
480
  firstName: string;
480
481
  lastName: string;
481
482
  birthDate: Date;
482
- email: string;
483
483
  idNumber: string;
484
484
  phone: string;
485
485
  iban: string;
@@ -585,12 +585,12 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
585
585
  } | null | undefined;
586
586
  }[] | null | undefined;
587
587
  customer?: {
588
+ email: string;
588
589
  id: string | number;
589
590
  userId: string | number;
590
591
  firstName: string;
591
592
  lastName: string;
592
593
  birthDate: Date;
593
- email: string;
594
594
  idNumber: string;
595
595
  phone: string;
596
596
  iban: string;
@@ -700,12 +700,12 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
700
700
  } | null | undefined;
701
701
  }[] | null | undefined;
702
702
  customer?: {
703
+ email: string;
703
704
  id: string | number;
704
705
  userId: string | number;
705
706
  firstName: string;
706
707
  lastName: string;
707
708
  birthDate: Date;
708
- email: string;
709
709
  idNumber: string;
710
710
  phone: string;
711
711
  iban: string;
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const CreateUserPayloadSchema: z.ZodObject<{
3
+ username: z.ZodString;
4
+ anonymous: z.ZodBoolean;
5
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ password: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ password: string;
9
+ username: string;
10
+ anonymous: boolean;
11
+ email?: string | null | undefined;
12
+ }, {
13
+ password: string;
14
+ username: string;
15
+ anonymous: boolean;
16
+ email?: string | null | undefined;
17
+ }>;
18
+ export type CreateUserPayload = z.infer<typeof CreateUserPayloadSchema>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateUserPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CreateUserPayloadSchema = zod_1.z.object({
6
+ username: zod_1.z.string(),
7
+ anonymous: zod_1.z.boolean(),
8
+ email: zod_1.z.string().nullish(),
9
+ password: zod_1.z.string()
10
+ });
@@ -0,0 +1,9 @@
1
+ import {z} from "zod"
2
+
3
+ export const CreateUserPayloadSchema = z.object({
4
+ username: z.string(),
5
+ anonymous: z.boolean(),
6
+ email: z.string().nullish(),
7
+ password: z.string()
8
+ })
9
+ export type CreateUserPayload = z.infer<typeof CreateUserPayloadSchema>
@@ -4,6 +4,7 @@ export declare const UpdateUserPayloadSchema: z.ZodObject<{
4
4
  firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
5
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
6
  password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ anonymous: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
7
8
  affiliate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
9
  notificationToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
10
  phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -19,10 +20,11 @@ export declare const UpdateUserPayloadSchema: z.ZodObject<{
19
20
  defaultValue?: string | null | undefined;
20
21
  }>, "many">>>;
21
22
  }, "strip", z.ZodTypeAny, {
22
- username?: string | null | undefined;
23
+ email?: string | null | undefined;
23
24
  password?: string | null | undefined;
25
+ username?: string | null | undefined;
24
26
  firstName?: string | null | undefined;
25
- email?: string | null | undefined;
27
+ anonymous?: boolean | null | undefined;
26
28
  affiliate?: string | null | undefined;
27
29
  notificationToken?: string | null | undefined;
28
30
  phoneNumber?: string | null | undefined;
@@ -32,10 +34,11 @@ export declare const UpdateUserPayloadSchema: z.ZodObject<{
32
34
  defaultValue?: string | null | undefined;
33
35
  }[] | null | undefined;
34
36
  }, {
35
- username?: string | null | undefined;
37
+ email?: string | null | undefined;
36
38
  password?: string | null | undefined;
39
+ username?: string | null | undefined;
37
40
  firstName?: string | null | undefined;
38
- email?: string | null | undefined;
41
+ anonymous?: boolean | null | undefined;
39
42
  affiliate?: string | null | undefined;
40
43
  notificationToken?: string | null | undefined;
41
44
  phoneNumber?: string | null | undefined;
@@ -8,6 +8,7 @@ exports.UpdateUserPayloadSchema = zod_1.z.object({
8
8
  firstName: zod_1.z.string().nullish(),
9
9
  email: zod_1.z.string().nullish(),
10
10
  password: zod_1.z.string().nullish(),
11
+ anonymous: zod_1.z.boolean().nullish(),
11
12
  affiliate: zod_1.z.string().nullish(),
12
13
  notificationToken: zod_1.z.string().nullish(),
13
14
  phoneNumber: zod_1.z.string().nullish(),
@@ -6,6 +6,7 @@ export const UpdateUserPayloadSchema = z.object({
6
6
  firstName: z.string().nullish(),
7
7
  email: z.string().nullish(),
8
8
  password: z.string().nullish(),
9
+ anonymous: z.boolean().nullish(),
9
10
  affiliate: z.string().nullish(),
10
11
  notificationToken: z.string().nullish(),
11
12
  phoneNumber: z.string().nullish(),
@@ -23,24 +23,24 @@ export declare const UserSchema: z.ZodObject<{
23
23
  bic: z.ZodString;
24
24
  phoneVerified: z.ZodBoolean;
25
25
  }, "strip", z.ZodTypeAny, {
26
+ email: string;
26
27
  id: string | number;
27
28
  userId: string | number;
28
29
  firstName: string;
29
30
  lastName: string;
30
31
  birthDate: Date;
31
- email: string;
32
32
  idNumber: string;
33
33
  phone: string;
34
34
  iban: string;
35
35
  bic: string;
36
36
  phoneVerified: boolean;
37
37
  }, {
38
+ email: string;
38
39
  id: string | number;
39
40
  userId: string | number;
40
41
  firstName: string;
41
42
  lastName: string;
42
43
  birthDate: Date;
43
- email: string;
44
44
  idNumber: string;
45
45
  phone: string;
46
46
  iban: string;
@@ -67,9 +67,9 @@ export declare const UserSchema: z.ZodObject<{
67
67
  updatedAt: Date;
68
68
  anonymous: boolean;
69
69
  lastLoginAt: Date;
70
+ email?: string | null | undefined;
70
71
  password?: string | null | undefined;
71
72
  firstName?: string | null | undefined;
72
- email?: string | null | undefined;
73
73
  affiliate?: string | null | undefined;
74
74
  notificationToken?: string | null | undefined;
75
75
  phoneNumber?: string | null | undefined;
@@ -79,12 +79,12 @@ export declare const UserSchema: z.ZodObject<{
79
79
  defaultValue?: string | null | undefined;
80
80
  }[] | null | undefined;
81
81
  customers?: {
82
+ email: string;
82
83
  id: string | number;
83
84
  userId: string | number;
84
85
  firstName: string;
85
86
  lastName: string;
86
87
  birthDate: Date;
87
- email: string;
88
88
  idNumber: string;
89
89
  phone: string;
90
90
  iban: string;
@@ -98,9 +98,9 @@ export declare const UserSchema: z.ZodObject<{
98
98
  updatedAt: Date;
99
99
  anonymous: boolean;
100
100
  lastLoginAt: Date;
101
+ email?: string | null | undefined;
101
102
  password?: string | null | undefined;
102
103
  firstName?: string | null | undefined;
103
- email?: string | null | undefined;
104
104
  affiliate?: string | null | undefined;
105
105
  notificationToken?: string | null | undefined;
106
106
  phoneNumber?: string | null | undefined;
@@ -110,12 +110,12 @@ export declare const UserSchema: z.ZodObject<{
110
110
  defaultValue?: string | null | undefined;
111
111
  }[] | null | undefined;
112
112
  customers?: {
113
+ email: string;
113
114
  id: string | number;
114
115
  userId: string | number;
115
116
  firstName: string;
116
117
  lastName: string;
117
118
  birthDate: Date;
118
- email: string;
119
119
  idNumber: string;
120
120
  phone: string;
121
121
  iban: string;
@@ -13,15 +13,15 @@ export declare const FieldSchema: z.ZodObject<{
13
13
  name: string;
14
14
  userId: string | number;
15
15
  section: string;
16
- config?: string | null | undefined;
17
16
  defaultValue?: string | null | undefined;
17
+ config?: string | null | undefined;
18
18
  }, {
19
19
  type: "TEXT" | "SPOT";
20
20
  id: string | number;
21
21
  name: string;
22
22
  userId: string | number;
23
23
  section: string;
24
- config?: string | null | undefined;
25
24
  defaultValue?: string | null | undefined;
25
+ config?: string | null | undefined;
26
26
  }>;
27
27
  export type Field = z.infer<typeof FieldSchema>;
@@ -9,13 +9,13 @@ export declare const FieldPayloadSchema: z.ZodObject<{
9
9
  type: "TEXT" | "SPOT";
10
10
  name: string;
11
11
  section: string;
12
- config?: string | null | undefined;
13
12
  defaultValue?: string | null | undefined;
13
+ config?: string | null | undefined;
14
14
  }, {
15
15
  type: "TEXT" | "SPOT";
16
16
  name: string;
17
17
  section: string;
18
- config?: string | null | undefined;
19
18
  defaultValue?: string | null | undefined;
19
+ config?: string | null | undefined;
20
20
  }>;
21
21
  export type FieldPayload = z.infer<typeof FieldPayloadSchema>;
@@ -0,0 +1,52 @@
1
+ import { z } from "zod";
2
+ export declare const FieldsWithDataSchema: z.ZodObject<{
3
+ fields: z.ZodArray<z.ZodObject<{
4
+ id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
6
+ name: z.ZodString;
7
+ type: z.ZodEnum<["TEXT", "SPOT"]>;
8
+ config: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ section: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: "TEXT" | "SPOT";
13
+ id: string | number;
14
+ name: string;
15
+ userId: string | number;
16
+ section: string;
17
+ defaultValue?: string | null | undefined;
18
+ config?: string | null | undefined;
19
+ }, {
20
+ type: "TEXT" | "SPOT";
21
+ id: string | number;
22
+ name: string;
23
+ userId: string | number;
24
+ section: string;
25
+ defaultValue?: string | null | undefined;
26
+ config?: string | null | undefined;
27
+ }>, "many">;
28
+ fieldsData: z.ZodRecord<z.ZodNumber, z.ZodArray<z.ZodString, "many">>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ fields: {
31
+ type: "TEXT" | "SPOT";
32
+ id: string | number;
33
+ name: string;
34
+ userId: string | number;
35
+ section: string;
36
+ defaultValue?: string | null | undefined;
37
+ config?: string | null | undefined;
38
+ }[];
39
+ fieldsData: Record<number, string[]>;
40
+ }, {
41
+ fields: {
42
+ type: "TEXT" | "SPOT";
43
+ id: string | number;
44
+ name: string;
45
+ userId: string | number;
46
+ section: string;
47
+ defaultValue?: string | null | undefined;
48
+ config?: string | null | undefined;
49
+ }[];
50
+ fieldsData: Record<number, string[]>;
51
+ }>;
52
+ export type FieldsWithData = z.infer<typeof FieldsWithDataSchema>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsWithDataSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Field_1 = require("./Field");
6
+ exports.FieldsWithDataSchema = zod_1.z.object({
7
+ fields: zod_1.z.array(Field_1.FieldSchema),
8
+ fieldsData: zod_1.z.record(zod_1.z.coerce.number(), zod_1.z.array(zod_1.z.string()))
9
+ });
@@ -0,0 +1,8 @@
1
+ import {z} from "zod"
2
+ import {FieldSchema} from "./Field"
3
+
4
+ export const FieldsWithDataSchema = z.object({
5
+ fields: z.array(FieldSchema),
6
+ fieldsData: z.record(z.coerce.number(), z.array(z.string()))
7
+ })
8
+ export type FieldsWithData = z.infer<typeof FieldsWithDataSchema>
package/src/index.d.ts CHANGED
@@ -2,7 +2,9 @@ export * from "./com/controlresell/models/application/ControlResellEnvironment";
2
2
  export * from "./com/controlresell/models/application/RabbitMQRoutingKey";
3
3
  export * from "./com/controlresell/models/application/Versions";
4
4
  export * from "./com/controlresell/models/auth/AuthToken";
5
+ export * from "./com/controlresell/models/auth/LoginPayload";
5
6
  export * from "./com/controlresell/models/auth/RefreshTokenPayload";
7
+ export * from "./com/controlresell/models/auth/RegisterPayload";
6
8
  export * from "./com/controlresell/models/auth/SwitchAccountPayload";
7
9
  export * from "./com/controlresell/models/catalogs/Catalog";
8
10
  export * from "./com/controlresell/models/catalogs/CatalogRoot";
@@ -69,6 +71,7 @@ export * from "./com/controlresell/models/platforms/orders/Order";
69
71
  export * from "./com/controlresell/models/platforms/orders/UpdateOrderPayload";
70
72
  export * from "./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload";
71
73
  export * from "./com/controlresell/models/platforms/orders/items/ItemInOrder";
74
+ export * from "./com/controlresell/models/users/CreateUserPayload";
72
75
  export * from "./com/controlresell/models/users/GettingStartedSteps";
73
76
  export * from "./com/controlresell/models/users/UpdateUserPayload";
74
77
  export * from "./com/controlresell/models/users/User";
@@ -79,6 +82,7 @@ export * from "./com/controlresell/models/users/fields/Field";
79
82
  export * from "./com/controlresell/models/users/fields/FieldConfig";
80
83
  export * from "./com/controlresell/models/users/fields/FieldPayload";
81
84
  export * from "./com/controlresell/models/users/fields/FieldType";
85
+ export * from "./com/controlresell/models/users/fields/FieldsWithData";
82
86
  export * from "./com/controlresell/models/users/files/CreateFilePayload";
83
87
  export * from "./com/controlresell/models/users/files/File";
84
88
  export * from "./com/controlresell/models/users/platforms/CreateUserOnPlatformPayload";
package/src/index.js CHANGED
@@ -18,7 +18,9 @@ __exportStar(require("./com/controlresell/models/application/ControlResellEnviro
18
18
  __exportStar(require("./com/controlresell/models/application/RabbitMQRoutingKey"), exports);
19
19
  __exportStar(require("./com/controlresell/models/application/Versions"), exports);
20
20
  __exportStar(require("./com/controlresell/models/auth/AuthToken"), exports);
21
+ __exportStar(require("./com/controlresell/models/auth/LoginPayload"), exports);
21
22
  __exportStar(require("./com/controlresell/models/auth/RefreshTokenPayload"), exports);
23
+ __exportStar(require("./com/controlresell/models/auth/RegisterPayload"), exports);
22
24
  __exportStar(require("./com/controlresell/models/auth/SwitchAccountPayload"), exports);
23
25
  __exportStar(require("./com/controlresell/models/catalogs/Catalog"), exports);
24
26
  __exportStar(require("./com/controlresell/models/catalogs/CatalogRoot"), exports);
@@ -85,6 +87,7 @@ __exportStar(require("./com/controlresell/models/platforms/orders/Order"), expor
85
87
  __exportStar(require("./com/controlresell/models/platforms/orders/UpdateOrderPayload"), exports);
86
88
  __exportStar(require("./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload"), exports);
87
89
  __exportStar(require("./com/controlresell/models/platforms/orders/items/ItemInOrder"), exports);
90
+ __exportStar(require("./com/controlresell/models/users/CreateUserPayload"), exports);
88
91
  __exportStar(require("./com/controlresell/models/users/GettingStartedSteps"), exports);
89
92
  __exportStar(require("./com/controlresell/models/users/UpdateUserPayload"), exports);
90
93
  __exportStar(require("./com/controlresell/models/users/User"), exports);
@@ -95,6 +98,7 @@ __exportStar(require("./com/controlresell/models/users/fields/Field"), exports);
95
98
  __exportStar(require("./com/controlresell/models/users/fields/FieldConfig"), exports);
96
99
  __exportStar(require("./com/controlresell/models/users/fields/FieldPayload"), exports);
97
100
  __exportStar(require("./com/controlresell/models/users/fields/FieldType"), exports);
101
+ __exportStar(require("./com/controlresell/models/users/fields/FieldsWithData"), exports);
98
102
  __exportStar(require("./com/controlresell/models/users/files/CreateFilePayload"), exports);
99
103
  __exportStar(require("./com/controlresell/models/users/files/File"), exports);
100
104
  __exportStar(require("./com/controlresell/models/users/platforms/CreateUserOnPlatformPayload"), exports);
package/src/index.ts CHANGED
@@ -2,7 +2,9 @@ export * from "./com/controlresell/models/application/ControlResellEnvironment"
2
2
  export * from "./com/controlresell/models/application/RabbitMQRoutingKey"
3
3
  export * from "./com/controlresell/models/application/Versions"
4
4
  export * from "./com/controlresell/models/auth/AuthToken"
5
+ export * from "./com/controlresell/models/auth/LoginPayload"
5
6
  export * from "./com/controlresell/models/auth/RefreshTokenPayload"
7
+ export * from "./com/controlresell/models/auth/RegisterPayload"
6
8
  export * from "./com/controlresell/models/auth/SwitchAccountPayload"
7
9
  export * from "./com/controlresell/models/catalogs/Catalog"
8
10
  export * from "./com/controlresell/models/catalogs/CatalogRoot"
@@ -69,6 +71,7 @@ export * from "./com/controlresell/models/platforms/orders/Order"
69
71
  export * from "./com/controlresell/models/platforms/orders/UpdateOrderPayload"
70
72
  export * from "./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload"
71
73
  export * from "./com/controlresell/models/platforms/orders/items/ItemInOrder"
74
+ export * from "./com/controlresell/models/users/CreateUserPayload"
72
75
  export * from "./com/controlresell/models/users/GettingStartedSteps"
73
76
  export * from "./com/controlresell/models/users/UpdateUserPayload"
74
77
  export * from "./com/controlresell/models/users/User"
@@ -79,6 +82,7 @@ export * from "./com/controlresell/models/users/fields/Field"
79
82
  export * from "./com/controlresell/models/users/fields/FieldConfig"
80
83
  export * from "./com/controlresell/models/users/fields/FieldPayload"
81
84
  export * from "./com/controlresell/models/users/fields/FieldType"
85
+ export * from "./com/controlresell/models/users/fields/FieldsWithData"
82
86
  export * from "./com/controlresell/models/users/files/CreateFilePayload"
83
87
  export * from "./com/controlresell/models/users/files/File"
84
88
  export * from "./com/controlresell/models/users/platforms/CreateUserOnPlatformPayload"