controlresell 2.1.14 → 2.2.0

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 (71) hide show
  1. package/package.json +3 -3
  2. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.d.ts +3 -3
  3. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.js +1 -1
  4. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.ts +1 -1
  5. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +5 -5
  6. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.d.ts +3 -0
  7. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.js +2 -1
  8. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.ts +2 -1
  9. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.d.ts +3 -0
  10. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.js +2 -1
  11. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.ts +2 -1
  12. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.d.ts +3 -0
  13. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.js +2 -1
  14. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.ts +2 -1
  15. package/src/com/controlresell/models/preferences/CreatePreferencePayload.d.ts +18 -0
  16. package/src/com/controlresell/models/preferences/CreatePreferencePayload.js +11 -0
  17. package/src/com/controlresell/models/preferences/CreatePreferencePayload.ts +10 -0
  18. package/src/com/controlresell/models/preferences/Preference.d.ts +52 -0
  19. package/src/com/controlresell/models/preferences/Preference.js +16 -0
  20. package/src/com/controlresell/models/preferences/Preference.ts +15 -0
  21. package/src/com/controlresell/models/preferences/PreferenceType.d.ts +3 -0
  22. package/src/com/controlresell/models/preferences/PreferenceType.js +7 -0
  23. package/src/com/controlresell/models/preferences/PreferenceType.ts +6 -0
  24. package/src/com/controlresell/models/preferences/UpdatePreferencePayload.d.ts +12 -0
  25. package/src/com/controlresell/models/preferences/UpdatePreferencePayload.js +8 -0
  26. package/src/com/controlresell/models/preferences/UpdatePreferencePayload.ts +7 -0
  27. package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +18 -0
  28. package/src/com/controlresell/models/preferences/cases/PreferenceCase.js +10 -0
  29. package/src/com/controlresell/models/preferences/cases/PreferenceCase.ts +9 -0
  30. package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.d.ts +12 -0
  31. package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.js +8 -0
  32. package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.ts +7 -0
  33. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts +12 -0
  34. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.js +9 -0
  35. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.ts +8 -0
  36. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.d.ts +3 -0
  37. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.js +7 -0
  38. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.ts +6 -0
  39. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.d.ts +27 -0
  40. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.js +9 -0
  41. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.ts +8 -0
  42. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +45 -0
  43. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.js +8 -0
  44. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.ts +7 -0
  45. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayload.d.ts +24 -0
  46. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayload.js +8 -0
  47. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayload.ts +7 -0
  48. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayloadFee.d.ts +12 -0
  49. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayloadFee.js +8 -0
  50. package/src/com/controlresell/models/preferences/payloads/fees/PreferenceFeesPayloadFee.ts +7 -0
  51. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayload.d.ts +18 -0
  52. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayload.js +12 -0
  53. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayload.ts +11 -0
  54. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadRoundType.d.ts +3 -0
  55. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadRoundType.js +7 -0
  56. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadRoundType.ts +6 -0
  57. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadType.d.ts +3 -0
  58. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadType.js +7 -0
  59. package/src/com/controlresell/models/preferences/payloads/prices/PreferencePricePayloadType.ts +6 -0
  60. package/src/com/controlresell/models/preferences/payloads/texts/PreferenceTextPayload.d.ts +9 -0
  61. package/src/com/controlresell/models/preferences/payloads/texts/PreferenceTextPayload.js +7 -0
  62. package/src/com/controlresell/models/preferences/payloads/texts/PreferenceTextPayload.ts +6 -0
  63. package/src/com/controlresell/models/preferences/payloads/vision/PreferenceVisionPayload.d.ts +45 -0
  64. package/src/com/controlresell/models/preferences/payloads/vision/PreferenceVisionPayload.js +19 -0
  65. package/src/com/controlresell/models/preferences/payloads/vision/PreferenceVisionPayload.ts +18 -0
  66. package/src/com/controlresell/models/users/platforms/PlatformJobUpdate.d.ts +3 -3
  67. package/src/com/controlresell/models/users/platforms/UserOnPlatformSessionMessage.d.ts +6 -6
  68. package/src/com/controlresell/models/users/preferences/UserPreference.d.ts +2 -2
  69. package/src/index.d.ts +17 -0
  70. package/src/index.js +36 -1
  71. package/src/index.ts +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "controlresell",
3
- "version": "2.1.14",
3
+ "version": "2.2.0",
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
  }
@@ -3,16 +3,16 @@ export declare const ItemOnPlatformsRequestSchema: z.ZodObject<{
3
3
  accountsId: z.ZodArray<z.ZodString, "many">;
4
4
  publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
5
5
  disableGetDraft: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
6
- overrideFileIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
6
+ locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
7
  }, "strip", z.ZodTypeAny, {
8
8
  accountsId: string[];
9
9
  publishingDate?: Date | null | undefined;
10
10
  disableGetDraft?: boolean | null | undefined;
11
- overrideFileIds?: string[] | null | undefined;
11
+ locale?: string | null | undefined;
12
12
  }, {
13
13
  accountsId: string[];
14
14
  publishingDate?: Date | null | undefined;
15
15
  disableGetDraft?: boolean | null | undefined;
16
- overrideFileIds?: string[] | null | undefined;
16
+ locale?: string | null | undefined;
17
17
  }>;
18
18
  export type ItemOnPlatformsRequest = z.infer<typeof ItemOnPlatformsRequestSchema>;
@@ -6,5 +6,5 @@ exports.ItemOnPlatformsRequestSchema = zod_1.z.object({
6
6
  accountsId: zod_1.z.array(zod_1.z.string().uuid()),
7
7
  publishingDate: zod_1.z.coerce.date().nullish(),
8
8
  disableGetDraft: zod_1.z.boolean().nullish(),
9
- overrideFileIds: zod_1.z.array(zod_1.z.string().uuid()).nullish()
9
+ locale: zod_1.z.string().nullish()
10
10
  });
@@ -4,6 +4,6 @@ export const ItemOnPlatformsRequestSchema = z.object({
4
4
  accountsId: z.array(z.string().uuid()),
5
5
  publishingDate: z.coerce.date().nullish(),
6
6
  disableGetDraft: z.boolean().nullish(),
7
- overrideFileIds: z.array(z.string().uuid()).nullish()
7
+ locale: z.string().nullish()
8
8
  })
9
9
  export type ItemOnPlatformsRequest = z.infer<typeof ItemOnPlatformsRequestSchema>
@@ -4,17 +4,17 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
4
4
  accountsId: z.ZodArray<z.ZodString, "many">;
5
5
  publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
6
6
  disableGetDraft: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
7
- overrideFileIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
7
+ locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  accountsId: string[];
10
10
  publishingDate?: Date | null | undefined;
11
11
  disableGetDraft?: boolean | null | undefined;
12
- overrideFileIds?: string[] | null | undefined;
12
+ locale?: string | null | undefined;
13
13
  }, {
14
14
  accountsId: string[];
15
15
  publishingDate?: Date | null | undefined;
16
16
  disableGetDraft?: boolean | null | undefined;
17
- overrideFileIds?: string[] | null | undefined;
17
+ locale?: string | null | undefined;
18
18
  }>;
19
19
  itemId: z.ZodNumber;
20
20
  userId: z.ZodNumber;
@@ -25,7 +25,7 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
25
25
  accountsId: string[];
26
26
  publishingDate?: Date | null | undefined;
27
27
  disableGetDraft?: boolean | null | undefined;
28
- overrideFileIds?: string[] | null | undefined;
28
+ locale?: string | null | undefined;
29
29
  };
30
30
  }, {
31
31
  userId: number;
@@ -34,7 +34,7 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
34
34
  accountsId: string[];
35
35
  publishingDate?: Date | null | undefined;
36
36
  disableGetDraft?: boolean | null | undefined;
37
- overrideFileIds?: string[] | null | undefined;
37
+ locale?: string | null | undefined;
38
38
  };
39
39
  }>;
40
40
  export type ItemOnPlatformsRequestWithItem = z.infer<typeof ItemOnPlatformsRequestWithItemSchema>;
@@ -9,6 +9,7 @@ export declare const CreatePlatformPreferencePayloadSchema: z.ZodObject<{
9
9
  targetHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10
10
  newBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
11
  newBackgroundUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ descriptionTemplate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
13
  }, "strip", z.ZodTypeAny, {
13
14
  doRemoveBackground: boolean;
14
15
  doSmartCrop: boolean;
@@ -19,6 +20,7 @@ export declare const CreatePlatformPreferencePayloadSchema: z.ZodObject<{
19
20
  targetHeight?: number | null | undefined;
20
21
  newBackgroundColor?: string | null | undefined;
21
22
  newBackgroundUrl?: string | null | undefined;
23
+ descriptionTemplate?: string | null | undefined;
22
24
  }, {
23
25
  doRemoveBackground: boolean;
24
26
  doSmartCrop: boolean;
@@ -29,5 +31,6 @@ export declare const CreatePlatformPreferencePayloadSchema: z.ZodObject<{
29
31
  targetHeight?: number | null | undefined;
30
32
  newBackgroundColor?: string | null | undefined;
31
33
  newBackgroundUrl?: string | null | undefined;
34
+ descriptionTemplate?: string | null | undefined;
32
35
  }>;
33
36
  export type CreatePlatformPreferencePayload = z.infer<typeof CreatePlatformPreferencePayloadSchema>;
@@ -12,5 +12,6 @@ exports.CreatePlatformPreferencePayloadSchema = zod_1.z.object({
12
12
  targetWidth: zod_1.z.number().int().nullish(),
13
13
  targetHeight: zod_1.z.number().int().nullish(),
14
14
  newBackgroundColor: zod_1.z.string().nullish(),
15
- newBackgroundUrl: zod_1.z.string().nullish()
15
+ newBackgroundUrl: zod_1.z.string().nullish(),
16
+ descriptionTemplate: zod_1.z.string().nullish()
16
17
  });
@@ -10,6 +10,7 @@ export const CreatePlatformPreferencePayloadSchema = z.object({
10
10
  targetWidth: z.number().int().nullish(),
11
11
  targetHeight: z.number().int().nullish(),
12
12
  newBackgroundColor: z.string().nullish(),
13
- newBackgroundUrl: z.string().nullish()
13
+ newBackgroundUrl: z.string().nullish(),
14
+ descriptionTemplate: z.string().nullish()
14
15
  })
15
16
  export type CreatePlatformPreferencePayload = z.infer<typeof CreatePlatformPreferencePayloadSchema>
@@ -11,6 +11,7 @@ export declare const PlatformPreferenceSchema: z.ZodObject<{
11
11
  targetHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12
12
  newBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  newBackgroundUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ descriptionTemplate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
15
  }, "strip", z.ZodTypeAny, {
15
16
  id: string;
16
17
  userId: string | number;
@@ -23,6 +24,7 @@ export declare const PlatformPreferenceSchema: z.ZodObject<{
23
24
  targetHeight?: number | null | undefined;
24
25
  newBackgroundColor?: string | null | undefined;
25
26
  newBackgroundUrl?: string | null | undefined;
27
+ descriptionTemplate?: string | null | undefined;
26
28
  }, {
27
29
  id: string;
28
30
  userId: string | number;
@@ -35,5 +37,6 @@ export declare const PlatformPreferenceSchema: z.ZodObject<{
35
37
  targetHeight?: number | null | undefined;
36
38
  newBackgroundColor?: string | null | undefined;
37
39
  newBackgroundUrl?: string | null | undefined;
40
+ descriptionTemplate?: string | null | undefined;
38
41
  }>;
39
42
  export type PlatformPreference = z.infer<typeof PlatformPreferenceSchema>;
@@ -15,5 +15,6 @@ exports.PlatformPreferenceSchema = zod_1.z.object({
15
15
  targetWidth: zod_1.z.number().int().nullish(),
16
16
  targetHeight: zod_1.z.number().int().nullish(),
17
17
  newBackgroundColor: zod_1.z.string().nullish(),
18
- newBackgroundUrl: zod_1.z.string().nullish()
18
+ newBackgroundUrl: zod_1.z.string().nullish(),
19
+ descriptionTemplate: zod_1.z.string().nullish()
19
20
  });
@@ -13,6 +13,7 @@ export const PlatformPreferenceSchema = z.object({
13
13
  targetWidth: z.number().int().nullish(),
14
14
  targetHeight: z.number().int().nullish(),
15
15
  newBackgroundColor: z.string().nullish(),
16
- newBackgroundUrl: z.string().nullish()
16
+ newBackgroundUrl: z.string().nullish(),
17
+ descriptionTemplate: z.string().nullish()
17
18
  })
18
19
  export type PlatformPreference = z.infer<typeof PlatformPreferenceSchema>
@@ -7,6 +7,7 @@ export declare const UpdatePlatformPreferencePayloadSchema: z.ZodObject<{
7
7
  targetHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8
8
  newBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  newBackgroundUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ descriptionTemplate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
11
  }, "strip", z.ZodTypeAny, {
11
12
  doRemoveBackground: boolean;
12
13
  doSmartCrop: boolean;
@@ -15,6 +16,7 @@ export declare const UpdatePlatformPreferencePayloadSchema: z.ZodObject<{
15
16
  targetHeight?: number | null | undefined;
16
17
  newBackgroundColor?: string | null | undefined;
17
18
  newBackgroundUrl?: string | null | undefined;
19
+ descriptionTemplate?: string | null | undefined;
18
20
  }, {
19
21
  doRemoveBackground: boolean;
20
22
  doSmartCrop: boolean;
@@ -23,5 +25,6 @@ export declare const UpdatePlatformPreferencePayloadSchema: z.ZodObject<{
23
25
  targetHeight?: number | null | undefined;
24
26
  newBackgroundColor?: string | null | undefined;
25
27
  newBackgroundUrl?: string | null | undefined;
28
+ descriptionTemplate?: string | null | undefined;
26
29
  }>;
27
30
  export type UpdatePlatformPreferencePayload = z.infer<typeof UpdatePlatformPreferencePayloadSchema>;
@@ -9,5 +9,6 @@ exports.UpdatePlatformPreferencePayloadSchema = zod_1.z.object({
9
9
  targetWidth: zod_1.z.number().int().nullish(),
10
10
  targetHeight: zod_1.z.number().int().nullish(),
11
11
  newBackgroundColor: zod_1.z.string().nullish(),
12
- newBackgroundUrl: zod_1.z.string().nullish()
12
+ newBackgroundUrl: zod_1.z.string().nullish(),
13
+ descriptionTemplate: zod_1.z.string().nullish()
13
14
  });
@@ -7,6 +7,7 @@ export const UpdatePlatformPreferencePayloadSchema = z.object({
7
7
  targetWidth: z.number().int().nullish(),
8
8
  targetHeight: z.number().int().nullish(),
9
9
  newBackgroundColor: z.string().nullish(),
10
- newBackgroundUrl: z.string().nullish()
10
+ newBackgroundUrl: z.string().nullish(),
11
+ descriptionTemplate: z.string().nullish()
11
12
  })
12
13
  export type UpdatePlatformPreferencePayload = z.infer<typeof UpdatePlatformPreferencePayloadSchema>
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const CreatePreferencePayloadSchema: z.ZodObject<{
3
+ parentPreferenceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ type: z.ZodEnum<["NEGOTIATION", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"]>;
5
+ enabled: z.ZodBoolean;
6
+ testMode: z.ZodBoolean;
7
+ }, "strip", z.ZodTypeAny, {
8
+ type: "NEGOTIATION" | "VISION" | "TITLE" | "DESCRIPTION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
9
+ enabled: boolean;
10
+ testMode: boolean;
11
+ parentPreferenceId?: string | null | undefined;
12
+ }, {
13
+ type: "NEGOTIATION" | "VISION" | "TITLE" | "DESCRIPTION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
14
+ enabled: boolean;
15
+ testMode: boolean;
16
+ parentPreferenceId?: string | null | undefined;
17
+ }>;
18
+ export type CreatePreferencePayload = z.infer<typeof CreatePreferencePayloadSchema>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatePreferencePayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const PreferenceType_1 = require("./PreferenceType");
6
+ exports.CreatePreferencePayloadSchema = zod_1.z.object({
7
+ parentPreferenceId: zod_1.z.string().uuid().nullish(),
8
+ type: PreferenceType_1.PreferenceTypeSchema,
9
+ enabled: zod_1.z.boolean(),
10
+ testMode: zod_1.z.boolean()
11
+ });
@@ -0,0 +1,10 @@
1
+ import {z} from "zod"
2
+ import {PreferenceTypeSchema} from "./PreferenceType"
3
+
4
+ export const CreatePreferencePayloadSchema = z.object({
5
+ parentPreferenceId: z.string().uuid().nullish(),
6
+ type: PreferenceTypeSchema,
7
+ enabled: z.boolean(),
8
+ testMode: z.boolean()
9
+ })
10
+ export type CreatePreferencePayload = z.infer<typeof CreatePreferencePayloadSchema>
@@ -0,0 +1,52 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ parentPreferenceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
6
+ type: z.ZodEnum<["NEGOTIATION", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"]>;
7
+ enabled: z.ZodBoolean;
8
+ testMode: z.ZodBoolean;
9
+ cases: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
10
+ id: z.ZodString;
11
+ preferenceId: z.ZodString;
12
+ savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ payload: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ id: string;
16
+ payload: string;
17
+ preferenceId: string;
18
+ savedFiltersId?: string | null | undefined;
19
+ }, {
20
+ id: string;
21
+ payload: string;
22
+ preferenceId: string;
23
+ savedFiltersId?: string | null | undefined;
24
+ }>, "many">>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ type: "NEGOTIATION" | "VISION" | "TITLE" | "DESCRIPTION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
27
+ id: string;
28
+ userId: string | number;
29
+ enabled: boolean;
30
+ testMode: boolean;
31
+ parentPreferenceId?: string | null | undefined;
32
+ cases?: {
33
+ id: string;
34
+ payload: string;
35
+ preferenceId: string;
36
+ savedFiltersId?: string | null | undefined;
37
+ }[] | null | undefined;
38
+ }, {
39
+ type: "NEGOTIATION" | "VISION" | "TITLE" | "DESCRIPTION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
40
+ id: string;
41
+ userId: string | number;
42
+ enabled: boolean;
43
+ testMode: boolean;
44
+ parentPreferenceId?: string | null | undefined;
45
+ cases?: {
46
+ id: string;
47
+ payload: string;
48
+ preferenceId: string;
49
+ savedFiltersId?: string | null | undefined;
50
+ }[] | null | undefined;
51
+ }>;
52
+ export type Preference = z.infer<typeof PreferenceSchema>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const zodable_idschema_1 = require("zodable-idschema");
6
+ const PreferenceType_1 = require("./PreferenceType");
7
+ const PreferenceCase_1 = require("./cases/PreferenceCase");
8
+ exports.PreferenceSchema = zod_1.z.object({
9
+ id: zod_1.z.string().uuid(),
10
+ parentPreferenceId: zod_1.z.string().uuid().nullish(),
11
+ userId: zodable_idschema_1.IdSchema,
12
+ type: PreferenceType_1.PreferenceTypeSchema,
13
+ enabled: zod_1.z.boolean(),
14
+ testMode: zod_1.z.boolean(),
15
+ cases: zod_1.z.array(PreferenceCase_1.PreferenceCaseSchema).nullish()
16
+ });
@@ -0,0 +1,15 @@
1
+ import {z} from "zod"
2
+ import {IdSchema} from "zodable-idschema"
3
+ import {PreferenceTypeSchema} from "./PreferenceType"
4
+ import {PreferenceCaseSchema} from "./cases/PreferenceCase"
5
+
6
+ export const PreferenceSchema = z.object({
7
+ id: z.string().uuid(),
8
+ parentPreferenceId: z.string().uuid().nullish(),
9
+ userId: IdSchema,
10
+ type: PreferenceTypeSchema,
11
+ enabled: z.boolean(),
12
+ testMode: z.boolean(),
13
+ cases: z.array(PreferenceCaseSchema).nullish()
14
+ })
15
+ export type Preference = z.infer<typeof PreferenceSchema>
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceTypeSchema: z.ZodEnum<["NEGOTIATION", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"]>;
3
+ export type PreferenceType = z.infer<typeof PreferenceTypeSchema>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceTypeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PreferenceTypeSchema = zod_1.z.enum([
6
+ "NEGOTIATION", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"
7
+ ]);
@@ -0,0 +1,6 @@
1
+ import {z} from "zod"
2
+
3
+ export const PreferenceTypeSchema = z.enum([
4
+ "NEGOTIATION", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"
5
+ ])
6
+ export type PreferenceType = z.infer<typeof PreferenceTypeSchema>
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const UpdatePreferencePayloadSchema: z.ZodObject<{
3
+ enabled: z.ZodBoolean;
4
+ testMode: z.ZodBoolean;
5
+ }, "strip", z.ZodTypeAny, {
6
+ enabled: boolean;
7
+ testMode: boolean;
8
+ }, {
9
+ enabled: boolean;
10
+ testMode: boolean;
11
+ }>;
12
+ export type UpdatePreferencePayload = z.infer<typeof UpdatePreferencePayloadSchema>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePreferencePayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.UpdatePreferencePayloadSchema = zod_1.z.object({
6
+ enabled: zod_1.z.boolean(),
7
+ testMode: zod_1.z.boolean()
8
+ });
@@ -0,0 +1,7 @@
1
+ import {z} from "zod"
2
+
3
+ export const UpdatePreferencePayloadSchema = z.object({
4
+ enabled: z.boolean(),
5
+ testMode: z.boolean()
6
+ })
7
+ export type UpdatePreferencePayload = z.infer<typeof UpdatePreferencePayloadSchema>
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceCaseSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ preferenceId: z.ZodString;
5
+ savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ payload: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ id: string;
9
+ payload: string;
10
+ preferenceId: string;
11
+ savedFiltersId?: string | null | undefined;
12
+ }, {
13
+ id: string;
14
+ payload: string;
15
+ preferenceId: string;
16
+ savedFiltersId?: string | null | undefined;
17
+ }>;
18
+ export type PreferenceCase = z.infer<typeof PreferenceCaseSchema>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceCaseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PreferenceCaseSchema = zod_1.z.object({
6
+ id: zod_1.z.string().uuid(),
7
+ preferenceId: zod_1.z.string().uuid(),
8
+ savedFiltersId: zod_1.z.string().uuid().nullish(),
9
+ payload: zod_1.z.string()
10
+ });
@@ -0,0 +1,9 @@
1
+ import {z} from "zod"
2
+
3
+ export const PreferenceCaseSchema = z.object({
4
+ id: z.string().uuid(),
5
+ preferenceId: z.string().uuid(),
6
+ savedFiltersId: z.string().uuid().nullish(),
7
+ payload: z.string()
8
+ })
9
+ export type PreferenceCase = z.infer<typeof PreferenceCaseSchema>
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceCasePayloadSchema: z.ZodObject<{
3
+ savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ payload: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ payload: string;
7
+ savedFiltersId?: string | null | undefined;
8
+ }, {
9
+ payload: string;
10
+ savedFiltersId?: string | null | undefined;
11
+ }>;
12
+ export type PreferenceCasePayload = z.infer<typeof PreferenceCasePayloadSchema>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceCasePayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PreferenceCasePayloadSchema = zod_1.z.object({
6
+ savedFiltersId: zod_1.z.string().uuid().nullish(),
7
+ payload: zod_1.z.string()
8
+ });
@@ -0,0 +1,7 @@
1
+ import {z} from "zod"
2
+
3
+ export const PreferenceCasePayloadSchema = z.object({
4
+ savedFiltersId: z.string().uuid().nullish(),
5
+ payload: z.string()
6
+ })
7
+ export type PreferenceCasePayload = z.infer<typeof PreferenceCasePayloadSchema>
@@ -0,0 +1,12 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
3
+ type: z.ZodEnum<["WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"]>;
4
+ payload: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
7
+ payload: string;
8
+ }, {
9
+ type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
10
+ payload: string;
11
+ }>;
12
+ export type PreferenceActionPayload = z.infer<typeof PreferenceActionPayloadSchema>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceActionPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const PreferenceActionPayloadType_1 = require("./PreferenceActionPayloadType");
6
+ exports.PreferenceActionPayloadSchema = zod_1.z.object({
7
+ type: PreferenceActionPayloadType_1.PreferenceActionPayloadTypeSchema,
8
+ payload: zod_1.z.string()
9
+ });
@@ -0,0 +1,8 @@
1
+ import {z} from "zod"
2
+ import {PreferenceActionPayloadTypeSchema} from "./PreferenceActionPayloadType"
3
+
4
+ export const PreferenceActionPayloadSchema = z.object({
5
+ type: PreferenceActionPayloadTypeSchema,
6
+ payload: z.string()
7
+ })
8
+ export type PreferenceActionPayload = z.infer<typeof PreferenceActionPayloadSchema>
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceActionPayloadTypeSchema: z.ZodEnum<["WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"]>;
3
+ export type PreferenceActionPayloadType = z.infer<typeof PreferenceActionPayloadTypeSchema>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceActionPayloadTypeSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PreferenceActionPayloadTypeSchema = zod_1.z.enum([
6
+ "WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"
7
+ ]);
@@ -0,0 +1,6 @@
1
+ import {z} from "zod"
2
+
3
+ export const PreferenceActionPayloadTypeSchema = z.enum([
4
+ "WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"
5
+ ])
6
+ export type PreferenceActionPayloadType = z.infer<typeof PreferenceActionPayloadTypeSchema>
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceActionVariantPayloadSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ actions: z.ZodArray<z.ZodObject<{
5
+ type: z.ZodEnum<["WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"]>;
6
+ payload: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
9
+ payload: string;
10
+ }, {
11
+ type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
12
+ payload: string;
13
+ }>, "many">;
14
+ }, "strip", z.ZodTypeAny, {
15
+ name: string;
16
+ actions: {
17
+ type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
18
+ payload: string;
19
+ }[];
20
+ }, {
21
+ name: string;
22
+ actions: {
23
+ type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
24
+ payload: string;
25
+ }[];
26
+ }>;
27
+ export type PreferenceActionVariantPayload = z.infer<typeof PreferenceActionVariantPayloadSchema>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceActionVariantPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const PreferenceActionPayload_1 = require("./PreferenceActionPayload");
6
+ exports.PreferenceActionVariantPayloadSchema = zod_1.z.object({
7
+ name: zod_1.z.string(),
8
+ actions: zod_1.z.array(PreferenceActionPayload_1.PreferenceActionPayloadSchema)
9
+ });
@@ -0,0 +1,8 @@
1
+ import {z} from "zod"
2
+ import {PreferenceActionPayloadSchema} from "./PreferenceActionPayload"
3
+
4
+ export const PreferenceActionVariantPayloadSchema = z.object({
5
+ name: z.string(),
6
+ actions: z.array(PreferenceActionPayloadSchema)
7
+ })
8
+ export type PreferenceActionVariantPayload = z.infer<typeof PreferenceActionVariantPayloadSchema>