controlresell 2.1.14 → 2.2.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 (100) hide show
  1. package/package.json +3 -3
  2. package/src/com/controlresell/models/filters/SavedFilters.d.ts +133 -0
  3. package/src/com/controlresell/models/filters/SavedFilters.js +13 -0
  4. package/src/com/controlresell/models/filters/SavedFilters.ts +12 -0
  5. package/src/com/controlresell/models/filters/SavedFiltersPayload.d.ts +127 -0
  6. package/src/com/controlresell/models/filters/SavedFiltersPayload.js +10 -0
  7. package/src/com/controlresell/models/filters/SavedFiltersPayload.ts +9 -0
  8. package/src/com/controlresell/models/items/CreatedItems.d.ts +70 -70
  9. package/src/com/controlresell/models/items/Item.d.ts +36 -36
  10. package/src/com/controlresell/models/items/ItemFiltersContext.d.ts +2 -2
  11. package/src/com/controlresell/models/items/ItemPayload.d.ts +2 -2
  12. package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +70 -70
  13. package/src/com/controlresell/models/items/UpdatedItem.d.ts +70 -70
  14. package/src/com/controlresell/models/items/platforms/CreateItemOnPlatformPayload.d.ts +2 -2
  15. package/src/com/controlresell/models/items/platforms/ItemOnPlatform.d.ts +2 -2
  16. package/src/com/controlresell/models/items/platforms/ItemOnPlatformUpdateRequest.d.ts +4 -4
  17. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.d.ts +3 -3
  18. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.js +1 -1
  19. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.ts +1 -1
  20. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +5 -5
  21. package/src/com/controlresell/models/items/platforms/UpdateItemOnPlatformPayload.d.ts +2 -2
  22. package/src/com/controlresell/models/platforms/PlatformFiltersContext.d.ts +12 -0
  23. package/src/com/controlresell/models/platforms/PlatformFiltersContext.js +9 -0
  24. package/src/com/controlresell/models/platforms/PlatformFiltersContext.ts +8 -0
  25. package/src/com/controlresell/models/platforms/conversations/ConversationOnPlatformUpdateRequest.d.ts +6 -6
  26. package/src/com/controlresell/models/platforms/orders/Order.d.ts +6 -6
  27. package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.d.ts +4 -4
  28. package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.d.ts +78 -78
  29. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.d.ts +3 -0
  30. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.js +2 -1
  31. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.ts +2 -1
  32. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.d.ts +3 -0
  33. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.js +2 -1
  34. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.ts +2 -1
  35. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.d.ts +3 -0
  36. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.js +2 -1
  37. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.ts +2 -1
  38. package/src/com/controlresell/models/platforms/transactions/Transaction.d.ts +6 -6
  39. package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.d.ts +4 -4
  40. package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.d.ts +78 -78
  41. package/src/com/controlresell/models/preferences/CreatePreferencePayload.d.ts +18 -0
  42. package/src/com/controlresell/models/preferences/CreatePreferencePayload.js +11 -0
  43. package/src/com/controlresell/models/preferences/CreatePreferencePayload.ts +10 -0
  44. package/src/com/controlresell/models/preferences/Preference.d.ts +52 -0
  45. package/src/com/controlresell/models/preferences/Preference.js +16 -0
  46. package/src/com/controlresell/models/preferences/Preference.ts +15 -0
  47. package/src/com/controlresell/models/preferences/PreferenceType.d.ts +3 -0
  48. package/src/com/controlresell/models/preferences/PreferenceType.js +7 -0
  49. package/src/com/controlresell/models/preferences/PreferenceType.ts +6 -0
  50. package/src/com/controlresell/models/preferences/UpdatePreferencePayload.d.ts +12 -0
  51. package/src/com/controlresell/models/preferences/UpdatePreferencePayload.js +8 -0
  52. package/src/com/controlresell/models/preferences/UpdatePreferencePayload.ts +7 -0
  53. package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +18 -0
  54. package/src/com/controlresell/models/preferences/cases/PreferenceCase.js +10 -0
  55. package/src/com/controlresell/models/preferences/cases/PreferenceCase.ts +9 -0
  56. package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.d.ts +12 -0
  57. package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.js +8 -0
  58. package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.ts +7 -0
  59. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts +12 -0
  60. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.js +9 -0
  61. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.ts +8 -0
  62. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.d.ts +3 -0
  63. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.js +7 -0
  64. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.ts +6 -0
  65. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.d.ts +27 -0
  66. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.js +9 -0
  67. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.ts +8 -0
  68. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +45 -0
  69. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.js +8 -0
  70. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.ts +7 -0
  71. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayload.d.ts +24 -0
  72. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayload.js +8 -0
  73. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayload.ts +7 -0
  74. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayloadFee.d.ts +12 -0
  75. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayloadFee.js +8 -0
  76. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayloadFee.ts +7 -0
  77. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePriceNegotiationProfile.d.ts +3 -0
  78. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePriceNegotiationProfile.js +7 -0
  79. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePriceNegotiationProfile.ts +6 -0
  80. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayload.d.ts +21 -0
  81. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayload.js +14 -0
  82. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayload.ts +13 -0
  83. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadRoundType.d.ts +3 -0
  84. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadRoundType.js +7 -0
  85. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadRoundType.ts +6 -0
  86. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadType.d.ts +3 -0
  87. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadType.js +7 -0
  88. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadType.ts +6 -0
  89. package/src/com/controlresell/models/preferences/payloads/texts/PreferenceTextPayload.d.ts +9 -0
  90. package/src/com/controlresell/models/preferences/payloads/texts/PreferenceTextPayload.js +7 -0
  91. package/src/com/controlresell/models/preferences/payloads/texts/PreferenceTextPayload.ts +6 -0
  92. package/src/com/controlresell/models/preferences/payloads/vision/PreferenceVisionPayload.d.ts +45 -0
  93. package/src/com/controlresell/models/preferences/payloads/vision/PreferenceVisionPayload.js +19 -0
  94. package/src/com/controlresell/models/preferences/payloads/vision/PreferenceVisionPayload.ts +18 -0
  95. package/src/com/controlresell/models/users/platforms/PlatformJobUpdate.d.ts +3 -3
  96. package/src/com/controlresell/models/users/platforms/UserOnPlatformSessionMessage.d.ts +6 -6
  97. package/src/com/controlresell/models/users/preferences/UserPreference.d.ts +2 -2
  98. package/src/index.d.ts +21 -0
  99. package/src/index.js +46 -3
  100. package/src/index.ts +21 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "controlresell",
3
- "version": "2.1.14",
3
+ "version": "2.2.1",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -17,8 +17,8 @@
17
17
  "typescript": "^5.8.3"
18
18
  },
19
19
  "dependencies": {
20
- "controlresell-connector": "^0.3.4",
21
- "zod": "^3.25.51",
20
+ "controlresell-connector": "^0.3.6",
21
+ "zod": "^3.25.61",
22
22
  "zodable-idschema": "^1.0.0"
23
23
  }
24
24
  }
@@ -0,0 +1,133 @@
1
+ import { z } from "zod";
2
+ export declare const SavedFiltersSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
5
+ itemFilters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE"]>>>;
7
+ sold: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
8
+ categoriesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
9
+ brandsId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
10
+ sex: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
11
+ sizesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
12
+ labelsId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
13
+ purchasePlacesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
14
+ sellingPlacesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
15
+ states: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
16
+ purchasePrices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
17
+ sellingPrices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
18
+ estimatedPrices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
19
+ purchaseDates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodDate>>, "many">>>;
20
+ sellingDates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodDate>>, "many">>>;
21
+ searchQuery: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ lastHistoryType: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>, "many">>>;
23
+ readyToPublish: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
24
+ toBeSent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
27
+ sold?: boolean | null | undefined;
28
+ categoriesId?: number[] | null | undefined;
29
+ brandsId?: number[] | null | undefined;
30
+ sex?: string[] | null | undefined;
31
+ sizesId?: number[] | null | undefined;
32
+ labelsId?: number[] | null | undefined;
33
+ purchasePlacesId?: number[] | null | undefined;
34
+ sellingPlacesId?: number[] | null | undefined;
35
+ states?: number[] | null | undefined;
36
+ purchasePrices?: number[] | null | undefined;
37
+ sellingPrices?: number[] | null | undefined;
38
+ estimatedPrices?: number[] | null | undefined;
39
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
40
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
41
+ searchQuery?: string | null | undefined;
42
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
43
+ readyToPublish?: boolean | null | undefined;
44
+ toBeSent?: boolean | null | undefined;
45
+ }, {
46
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
47
+ sold?: boolean | null | undefined;
48
+ categoriesId?: number[] | null | undefined;
49
+ brandsId?: number[] | null | undefined;
50
+ sex?: string[] | null | undefined;
51
+ sizesId?: number[] | null | undefined;
52
+ labelsId?: number[] | null | undefined;
53
+ purchasePlacesId?: number[] | null | undefined;
54
+ sellingPlacesId?: number[] | null | undefined;
55
+ states?: number[] | null | undefined;
56
+ purchasePrices?: number[] | null | undefined;
57
+ sellingPrices?: number[] | null | undefined;
58
+ estimatedPrices?: number[] | null | undefined;
59
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
60
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
61
+ searchQuery?: string | null | undefined;
62
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
63
+ readyToPublish?: boolean | null | undefined;
64
+ toBeSent?: boolean | null | undefined;
65
+ }>>>;
66
+ platformFilters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
67
+ accountIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
68
+ platforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["VINTED", "SHOPIFY"]>, "many">>>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ accountIds?: string[] | null | undefined;
71
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
72
+ }, {
73
+ accountIds?: string[] | null | undefined;
74
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
75
+ }>>>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ id: string;
78
+ userId: string | number;
79
+ itemFilters?: {
80
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
81
+ sold?: boolean | null | undefined;
82
+ categoriesId?: number[] | null | undefined;
83
+ brandsId?: number[] | null | undefined;
84
+ sex?: string[] | null | undefined;
85
+ sizesId?: number[] | null | undefined;
86
+ labelsId?: number[] | null | undefined;
87
+ purchasePlacesId?: number[] | null | undefined;
88
+ sellingPlacesId?: number[] | null | undefined;
89
+ states?: number[] | null | undefined;
90
+ purchasePrices?: number[] | null | undefined;
91
+ sellingPrices?: number[] | null | undefined;
92
+ estimatedPrices?: number[] | null | undefined;
93
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
94
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
95
+ searchQuery?: string | null | undefined;
96
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
97
+ readyToPublish?: boolean | null | undefined;
98
+ toBeSent?: boolean | null | undefined;
99
+ } | null | undefined;
100
+ platformFilters?: {
101
+ accountIds?: string[] | null | undefined;
102
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
103
+ } | null | undefined;
104
+ }, {
105
+ id: string;
106
+ userId: string | number;
107
+ itemFilters?: {
108
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
109
+ sold?: boolean | null | undefined;
110
+ categoriesId?: number[] | null | undefined;
111
+ brandsId?: number[] | null | undefined;
112
+ sex?: string[] | null | undefined;
113
+ sizesId?: number[] | null | undefined;
114
+ labelsId?: number[] | null | undefined;
115
+ purchasePlacesId?: number[] | null | undefined;
116
+ sellingPlacesId?: number[] | null | undefined;
117
+ states?: number[] | null | undefined;
118
+ purchasePrices?: number[] | null | undefined;
119
+ sellingPrices?: number[] | null | undefined;
120
+ estimatedPrices?: number[] | null | undefined;
121
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
122
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
123
+ searchQuery?: string | null | undefined;
124
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
125
+ readyToPublish?: boolean | null | undefined;
126
+ toBeSent?: boolean | null | undefined;
127
+ } | null | undefined;
128
+ platformFilters?: {
129
+ accountIds?: string[] | null | undefined;
130
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
131
+ } | null | undefined;
132
+ }>;
133
+ export type SavedFilters = z.infer<typeof SavedFiltersSchema>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SavedFiltersSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const zodable_idschema_1 = require("zodable-idschema");
6
+ const ItemFiltersContext_1 = require("../items/ItemFiltersContext");
7
+ const PlatformFiltersContext_1 = require("../platforms/PlatformFiltersContext");
8
+ exports.SavedFiltersSchema = zod_1.z.object({
9
+ id: zod_1.z.string().uuid(),
10
+ userId: zodable_idschema_1.IdSchema,
11
+ itemFilters: ItemFiltersContext_1.ItemFiltersContextSchema.nullish(),
12
+ platformFilters: PlatformFiltersContext_1.PlatformFiltersContextSchema.nullish()
13
+ });
@@ -0,0 +1,12 @@
1
+ import {z} from "zod"
2
+ import {IdSchema} from "zodable-idschema"
3
+ import {ItemFiltersContextSchema} from "../items/ItemFiltersContext"
4
+ import {PlatformFiltersContextSchema} from "../platforms/PlatformFiltersContext"
5
+
6
+ export const SavedFiltersSchema = z.object({
7
+ id: z.string().uuid(),
8
+ userId: IdSchema,
9
+ itemFilters: ItemFiltersContextSchema.nullish(),
10
+ platformFilters: PlatformFiltersContextSchema.nullish()
11
+ })
12
+ export type SavedFilters = z.infer<typeof SavedFiltersSchema>
@@ -0,0 +1,127 @@
1
+ import { z } from "zod";
2
+ export declare const SavedFiltersPayloadSchema: z.ZodObject<{
3
+ itemFilters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4
+ sort: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MOST_RECENT", "OLDEST", "HIGHEST_PRICE", "LOWEST_PRICE"]>>>;
5
+ sold: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6
+ categoriesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
7
+ brandsId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
8
+ sex: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
9
+ sizesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
10
+ labelsId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
11
+ purchasePlacesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
12
+ sellingPlacesId: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
13
+ states: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
14
+ purchasePrices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
15
+ sellingPrices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
16
+ estimatedPrices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
17
+ purchaseDates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodDate>>, "many">>>;
18
+ sellingDates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodDate>>, "many">>>;
19
+ searchQuery: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ lastHistoryType: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>, "many">>>;
21
+ readyToPublish: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
22
+ toBeSent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
25
+ sold?: boolean | null | undefined;
26
+ categoriesId?: number[] | null | undefined;
27
+ brandsId?: number[] | null | undefined;
28
+ sex?: string[] | null | undefined;
29
+ sizesId?: number[] | null | undefined;
30
+ labelsId?: number[] | null | undefined;
31
+ purchasePlacesId?: number[] | null | undefined;
32
+ sellingPlacesId?: number[] | null | undefined;
33
+ states?: number[] | null | undefined;
34
+ purchasePrices?: number[] | null | undefined;
35
+ sellingPrices?: number[] | null | undefined;
36
+ estimatedPrices?: number[] | null | undefined;
37
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
38
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
39
+ searchQuery?: string | null | undefined;
40
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
41
+ readyToPublish?: boolean | null | undefined;
42
+ toBeSent?: boolean | null | undefined;
43
+ }, {
44
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
45
+ sold?: boolean | null | undefined;
46
+ categoriesId?: number[] | null | undefined;
47
+ brandsId?: number[] | null | undefined;
48
+ sex?: string[] | null | undefined;
49
+ sizesId?: number[] | null | undefined;
50
+ labelsId?: number[] | null | undefined;
51
+ purchasePlacesId?: number[] | null | undefined;
52
+ sellingPlacesId?: number[] | null | undefined;
53
+ states?: number[] | null | undefined;
54
+ purchasePrices?: number[] | null | undefined;
55
+ sellingPrices?: number[] | null | undefined;
56
+ estimatedPrices?: number[] | null | undefined;
57
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
58
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
59
+ searchQuery?: string | null | undefined;
60
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
61
+ readyToPublish?: boolean | null | undefined;
62
+ toBeSent?: boolean | null | undefined;
63
+ }>>>;
64
+ platformFilters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
65
+ accountIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
66
+ platforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<["VINTED", "SHOPIFY"]>, "many">>>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ accountIds?: string[] | null | undefined;
69
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
70
+ }, {
71
+ accountIds?: string[] | null | undefined;
72
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
73
+ }>>>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ itemFilters?: {
76
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
77
+ sold?: boolean | null | undefined;
78
+ categoriesId?: number[] | null | undefined;
79
+ brandsId?: number[] | null | undefined;
80
+ sex?: string[] | null | undefined;
81
+ sizesId?: number[] | null | undefined;
82
+ labelsId?: number[] | null | undefined;
83
+ purchasePlacesId?: number[] | null | undefined;
84
+ sellingPlacesId?: number[] | null | undefined;
85
+ states?: number[] | null | undefined;
86
+ purchasePrices?: number[] | null | undefined;
87
+ sellingPrices?: number[] | null | undefined;
88
+ estimatedPrices?: number[] | null | undefined;
89
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
90
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
91
+ searchQuery?: string | null | undefined;
92
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
93
+ readyToPublish?: boolean | null | undefined;
94
+ toBeSent?: boolean | null | undefined;
95
+ } | null | undefined;
96
+ platformFilters?: {
97
+ accountIds?: string[] | null | undefined;
98
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
99
+ } | null | undefined;
100
+ }, {
101
+ itemFilters?: {
102
+ sort?: "MOST_RECENT" | "OLDEST" | "HIGHEST_PRICE" | "LOWEST_PRICE" | null | undefined;
103
+ sold?: boolean | null | undefined;
104
+ categoriesId?: number[] | null | undefined;
105
+ brandsId?: number[] | null | undefined;
106
+ sex?: string[] | null | undefined;
107
+ sizesId?: number[] | null | undefined;
108
+ labelsId?: number[] | null | undefined;
109
+ purchasePlacesId?: number[] | null | undefined;
110
+ sellingPlacesId?: number[] | null | undefined;
111
+ states?: number[] | null | undefined;
112
+ purchasePrices?: number[] | null | undefined;
113
+ sellingPrices?: number[] | null | undefined;
114
+ estimatedPrices?: number[] | null | undefined;
115
+ purchaseDates?: (Date | null | undefined)[] | null | undefined;
116
+ sellingDates?: (Date | null | undefined)[] | null | undefined;
117
+ searchQuery?: string | null | undefined;
118
+ lastHistoryType?: ("IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND")[] | null | undefined;
119
+ readyToPublish?: boolean | null | undefined;
120
+ toBeSent?: boolean | null | undefined;
121
+ } | null | undefined;
122
+ platformFilters?: {
123
+ accountIds?: string[] | null | undefined;
124
+ platforms?: ("VINTED" | "SHOPIFY")[] | null | undefined;
125
+ } | null | undefined;
126
+ }>;
127
+ export type SavedFiltersPayload = z.infer<typeof SavedFiltersPayloadSchema>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SavedFiltersPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const ItemFiltersContext_1 = require("../items/ItemFiltersContext");
6
+ const PlatformFiltersContext_1 = require("../platforms/PlatformFiltersContext");
7
+ exports.SavedFiltersPayloadSchema = zod_1.z.object({
8
+ itemFilters: ItemFiltersContext_1.ItemFiltersContextSchema.nullish(),
9
+ platformFilters: PlatformFiltersContext_1.PlatformFiltersContextSchema.nullish()
10
+ });
@@ -0,0 +1,9 @@
1
+ import {z} from "zod"
2
+ import {ItemFiltersContextSchema} from "../items/ItemFiltersContext"
3
+ import {PlatformFiltersContextSchema} from "../platforms/PlatformFiltersContext"
4
+
5
+ export const SavedFiltersPayloadSchema = z.object({
6
+ itemFilters: ItemFiltersContextSchema.nullish(),
7
+ platformFilters: PlatformFiltersContextSchema.nullish()
8
+ })
9
+ export type SavedFiltersPayload = z.infer<typeof SavedFiltersPayloadSchema>
@@ -264,7 +264,7 @@ export declare const CreatedItemsSchema: z.ZodObject<{
264
264
  accountId: string;
265
265
  }>>>;
266
266
  }, "strip", z.ZodTypeAny, {
267
- status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
267
+ status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
268
268
  id: string;
269
269
  itemId: string | number;
270
270
  accountId: string;
@@ -279,7 +279,7 @@ export declare const CreatedItemsSchema: z.ZodObject<{
279
279
  accountId: string;
280
280
  } | null | undefined;
281
281
  }, {
282
- status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
282
+ status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
283
283
  id: string;
284
284
  itemId: string | number;
285
285
  accountId: string;
@@ -305,6 +305,7 @@ export declare const CreatedItemsSchema: z.ZodObject<{
305
305
  sold: boolean;
306
306
  description?: string | null | undefined;
307
307
  customerId?: string | number | null | undefined;
308
+ sex?: string | null | undefined;
308
309
  state?: number | null | undefined;
309
310
  colorIds?: number[] | null | undefined;
310
311
  packageSizeId?: number | null | undefined;
@@ -321,6 +322,22 @@ export declare const CreatedItemsSchema: z.ZodObject<{
321
322
  userId?: string | number | null | undefined;
322
323
  } | null | undefined;
323
324
  }[] | null | undefined;
325
+ platforms?: {
326
+ status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
327
+ id: string;
328
+ itemId: string | number;
329
+ accountId: string;
330
+ platformId: string;
331
+ platformUrl: string;
332
+ platformPrice: number;
333
+ account?: {
334
+ status: "ERROR" | "CONNECTED" | "DISCONNECTED";
335
+ userId: string | number;
336
+ name: string;
337
+ platform: "VINTED" | "SHOPIFY";
338
+ accountId: string;
339
+ } | null | undefined;
340
+ }[] | null | undefined;
324
341
  files?: {
325
342
  fileId: string;
326
343
  itemId: string | number;
@@ -335,7 +352,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
335
352
  }[] | null | undefined;
336
353
  categoryId?: number | null | undefined;
337
354
  brandId?: string | number | null | undefined;
338
- sex?: string | null | undefined;
339
355
  purchasePrice?: number | null | undefined;
340
356
  purchaseDate?: Date | null | undefined;
341
357
  purchasePlaceId?: string | number | null | undefined;
@@ -390,22 +406,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
390
406
  itemId: string | number;
391
407
  data?: string | null | undefined;
392
408
  } | null | undefined;
393
- platforms?: {
394
- status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
395
- id: string;
396
- itemId: string | number;
397
- accountId: string;
398
- platformId: string;
399
- platformUrl: string;
400
- platformPrice: number;
401
- account?: {
402
- status: "ERROR" | "CONNECTED" | "DISCONNECTED";
403
- userId: string | number;
404
- name: string;
405
- platform: "VINTED" | "SHOPIFY";
406
- accountId: string;
407
- } | null | undefined;
408
- }[] | null | undefined;
409
409
  }, {
410
410
  id: string | number;
411
411
  userId: string | number;
@@ -415,6 +415,7 @@ export declare const CreatedItemsSchema: z.ZodObject<{
415
415
  sold: boolean;
416
416
  description?: string | null | undefined;
417
417
  customerId?: string | number | null | undefined;
418
+ sex?: string | null | undefined;
418
419
  state?: number | null | undefined;
419
420
  colorIds?: number[] | null | undefined;
420
421
  packageSizeId?: number | null | undefined;
@@ -431,6 +432,22 @@ export declare const CreatedItemsSchema: z.ZodObject<{
431
432
  userId?: string | number | null | undefined;
432
433
  } | null | undefined;
433
434
  }[] | null | undefined;
435
+ platforms?: {
436
+ status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
437
+ id: string;
438
+ itemId: string | number;
439
+ accountId: string;
440
+ platformId: string;
441
+ platformUrl: string;
442
+ platformPrice: number;
443
+ account?: {
444
+ status: "ERROR" | "CONNECTED" | "DISCONNECTED";
445
+ userId: string | number;
446
+ name: string;
447
+ platform: "VINTED" | "SHOPIFY";
448
+ accountId: string;
449
+ } | null | undefined;
450
+ }[] | null | undefined;
434
451
  files?: {
435
452
  fileId: string;
436
453
  itemId: string | number;
@@ -445,7 +462,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
445
462
  }[] | null | undefined;
446
463
  categoryId?: number | null | undefined;
447
464
  brandId?: string | number | null | undefined;
448
- sex?: string | null | undefined;
449
465
  purchasePrice?: number | null | undefined;
450
466
  purchaseDate?: Date | null | undefined;
451
467
  purchasePlaceId?: string | number | null | undefined;
@@ -500,22 +516,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
500
516
  itemId: string | number;
501
517
  data?: string | null | undefined;
502
518
  } | null | undefined;
503
- platforms?: {
504
- status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
505
- id: string;
506
- itemId: string | number;
507
- accountId: string;
508
- platformId: string;
509
- platformUrl: string;
510
- platformPrice: number;
511
- account?: {
512
- status: "ERROR" | "CONNECTED" | "DISCONNECTED";
513
- userId: string | number;
514
- name: string;
515
- platform: "VINTED" | "SHOPIFY";
516
- accountId: string;
517
- } | null | undefined;
518
- }[] | null | undefined;
519
519
  }>, "many">;
520
520
  newUserLabels: z.ZodArray<z.ZodObject<{
521
521
  id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -549,6 +549,7 @@ export declare const CreatedItemsSchema: z.ZodObject<{
549
549
  sold: boolean;
550
550
  description?: string | null | undefined;
551
551
  customerId?: string | number | null | undefined;
552
+ sex?: string | null | undefined;
552
553
  state?: number | null | undefined;
553
554
  colorIds?: number[] | null | undefined;
554
555
  packageSizeId?: number | null | undefined;
@@ -565,6 +566,22 @@ export declare const CreatedItemsSchema: z.ZodObject<{
565
566
  userId?: string | number | null | undefined;
566
567
  } | null | undefined;
567
568
  }[] | null | undefined;
569
+ platforms?: {
570
+ status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
571
+ id: string;
572
+ itemId: string | number;
573
+ accountId: string;
574
+ platformId: string;
575
+ platformUrl: string;
576
+ platformPrice: number;
577
+ account?: {
578
+ status: "ERROR" | "CONNECTED" | "DISCONNECTED";
579
+ userId: string | number;
580
+ name: string;
581
+ platform: "VINTED" | "SHOPIFY";
582
+ accountId: string;
583
+ } | null | undefined;
584
+ }[] | null | undefined;
568
585
  files?: {
569
586
  fileId: string;
570
587
  itemId: string | number;
@@ -579,7 +596,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
579
596
  }[] | null | undefined;
580
597
  categoryId?: number | null | undefined;
581
598
  brandId?: string | number | null | undefined;
582
- sex?: string | null | undefined;
583
599
  purchasePrice?: number | null | undefined;
584
600
  purchaseDate?: Date | null | undefined;
585
601
  purchasePlaceId?: string | number | null | undefined;
@@ -634,22 +650,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
634
650
  itemId: string | number;
635
651
  data?: string | null | undefined;
636
652
  } | null | undefined;
637
- platforms?: {
638
- status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
639
- id: string;
640
- itemId: string | number;
641
- accountId: string;
642
- platformId: string;
643
- platformUrl: string;
644
- platformPrice: number;
645
- account?: {
646
- status: "ERROR" | "CONNECTED" | "DISCONNECTED";
647
- userId: string | number;
648
- name: string;
649
- platform: "VINTED" | "SHOPIFY";
650
- accountId: string;
651
- } | null | undefined;
652
- }[] | null | undefined;
653
653
  }[];
654
654
  newUserLabels: {
655
655
  id: string | number;
@@ -669,6 +669,7 @@ export declare const CreatedItemsSchema: z.ZodObject<{
669
669
  sold: boolean;
670
670
  description?: string | null | undefined;
671
671
  customerId?: string | number | null | undefined;
672
+ sex?: string | null | undefined;
672
673
  state?: number | null | undefined;
673
674
  colorIds?: number[] | null | undefined;
674
675
  packageSizeId?: number | null | undefined;
@@ -685,6 +686,22 @@ export declare const CreatedItemsSchema: z.ZodObject<{
685
686
  userId?: string | number | null | undefined;
686
687
  } | null | undefined;
687
688
  }[] | null | undefined;
689
+ platforms?: {
690
+ status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
691
+ id: string;
692
+ itemId: string | number;
693
+ accountId: string;
694
+ platformId: string;
695
+ platformUrl: string;
696
+ platformPrice: number;
697
+ account?: {
698
+ status: "ERROR" | "CONNECTED" | "DISCONNECTED";
699
+ userId: string | number;
700
+ name: string;
701
+ platform: "VINTED" | "SHOPIFY";
702
+ accountId: string;
703
+ } | null | undefined;
704
+ }[] | null | undefined;
688
705
  files?: {
689
706
  fileId: string;
690
707
  itemId: string | number;
@@ -699,7 +716,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
699
716
  }[] | null | undefined;
700
717
  categoryId?: number | null | undefined;
701
718
  brandId?: string | number | null | undefined;
702
- sex?: string | null | undefined;
703
719
  purchasePrice?: number | null | undefined;
704
720
  purchaseDate?: Date | null | undefined;
705
721
  purchasePlaceId?: string | number | null | undefined;
@@ -754,22 +770,6 @@ export declare const CreatedItemsSchema: z.ZodObject<{
754
770
  itemId: string | number;
755
771
  data?: string | null | undefined;
756
772
  } | null | undefined;
757
- platforms?: {
758
- status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
759
- id: string;
760
- itemId: string | number;
761
- accountId: string;
762
- platformId: string;
763
- platformUrl: string;
764
- platformPrice: number;
765
- account?: {
766
- status: "ERROR" | "CONNECTED" | "DISCONNECTED";
767
- userId: string | number;
768
- name: string;
769
- platform: "VINTED" | "SHOPIFY";
770
- accountId: string;
771
- } | null | undefined;
772
- }[] | null | undefined;
773
773
  }[];
774
774
  newUserLabels: {
775
775
  id: string | number;