controlresell 0.0.17 → 0.0.19

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.
@@ -1,20 +1,20 @@
1
1
  import { z } from "zod";
2
- export declare const ItemHistoryTypeSchema: z.ZodEnum<["create", "update", "delete"]>;
2
+ export declare const ItemHistoryTypeSchema: z.ZodEnum<["CREATE", "UPDATE", "DELETE"]>;
3
3
  export type ItemHistoryType = z.infer<typeof ItemHistoryTypeSchema>;
4
4
  export declare const ItemHistorySchema: z.ZodObject<{
5
5
  id: z.ZodString;
6
6
  itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
7
- type: z.ZodEnum<["create", "update", "delete"]>;
7
+ type: z.ZodEnum<["CREATE", "UPDATE", "DELETE"]>;
8
8
  data: z.ZodString;
9
9
  createdAt: z.ZodDate;
10
10
  }, "strip", z.ZodTypeAny, {
11
- type: "create" | "update" | "delete";
11
+ type: "CREATE" | "UPDATE" | "DELETE";
12
12
  id: string;
13
13
  data: string;
14
14
  itemId: string | number;
15
15
  createdAt: Date;
16
16
  }, {
17
- type: "create" | "update" | "delete";
17
+ type: "CREATE" | "UPDATE" | "DELETE";
18
18
  id: string;
19
19
  data: string;
20
20
  itemId: string | number;
@@ -22,16 +22,13 @@ export declare const ItemHistorySchema: z.ZodObject<{
22
22
  }>;
23
23
  export type ItemHistory = z.infer<typeof ItemHistorySchema>;
24
24
  export declare const CreateItemHistoryPayloadSchema: z.ZodObject<{
25
- itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
26
- type: z.ZodEnum<["create", "update", "delete"]>;
25
+ type: z.ZodEnum<["CREATE", "UPDATE", "DELETE"]>;
27
26
  data: z.ZodString;
28
27
  }, "strip", z.ZodTypeAny, {
29
- type: "create" | "update" | "delete";
28
+ type: "CREATE" | "UPDATE" | "DELETE";
30
29
  data: string;
31
- itemId: string | number;
32
30
  }, {
33
- type: "create" | "update" | "delete";
31
+ type: "CREATE" | "UPDATE" | "DELETE";
34
32
  data: string;
35
- itemId: string | number;
36
33
  }>;
37
34
  export type CreateItemHistoryPayload = z.infer<typeof CreateItemHistoryPayloadSchema>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateItemHistoryPayloadSchema = exports.ItemHistorySchema = exports.ItemHistoryTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const primitives_1 = require("../primitives");
6
- exports.ItemHistoryTypeSchema = zod_1.z.enum(["create", "update", "delete"]);
6
+ exports.ItemHistoryTypeSchema = zod_1.z.enum(["CREATE", "UPDATE", "DELETE"]);
7
7
  exports.ItemHistorySchema = zod_1.z.object({
8
8
  id: zod_1.z.string().uuid(),
9
9
  itemId: primitives_1.IdSchema,
@@ -12,7 +12,6 @@ exports.ItemHistorySchema = zod_1.z.object({
12
12
  createdAt: zod_1.z.coerce.date(),
13
13
  });
14
14
  exports.CreateItemHistoryPayloadSchema = zod_1.z.object({
15
- itemId: primitives_1.IdSchema,
16
15
  type: exports.ItemHistoryTypeSchema,
17
16
  data: zod_1.z.string(),
18
17
  });
@@ -1,20 +1,23 @@
1
1
  import { z } from "zod";
2
- export declare const ItemOnPlatformStatusSchema: z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>;
2
+ export declare const ItemOnPlatformStatusSchema: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
3
3
  export type ItemOnPlatformStatus = z.infer<typeof ItemOnPlatformStatusSchema>;
4
4
  export declare const ItemOnPlatformSchema: z.ZodObject<{
5
+ id: z.ZodString;
5
6
  itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
6
7
  accountId: z.ZodString;
7
8
  platformId: z.ZodString;
8
9
  platformUrl: z.ZodString;
9
- status: z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>;
10
+ status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
10
11
  }, "strip", z.ZodTypeAny, {
11
- status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
12
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
13
+ id: string;
12
14
  accountId: string;
13
15
  itemId: string | number;
14
16
  platformId: string;
15
17
  platformUrl: string;
16
18
  }, {
17
- status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
19
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
20
+ id: string;
18
21
  accountId: string;
19
22
  itemId: string | number;
20
23
  platformId: string;
@@ -22,30 +25,27 @@ export declare const ItemOnPlatformSchema: z.ZodObject<{
22
25
  }>;
23
26
  export type ItemOnPlatform = z.infer<typeof ItemOnPlatformSchema>;
24
27
  export declare const CreateItemOnPlatformPayloadSchema: z.ZodObject<{
25
- itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
26
28
  accountId: z.ZodString;
27
29
  platformId: z.ZodString;
28
30
  platformUrl: z.ZodString;
29
- status: z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>;
31
+ status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
30
32
  }, "strip", z.ZodTypeAny, {
31
- status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
33
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
32
34
  accountId: string;
33
- itemId: string | number;
34
35
  platformId: string;
35
36
  platformUrl: string;
36
37
  }, {
37
- status: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute";
38
+ status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
38
39
  accountId: string;
39
- itemId: string | number;
40
40
  platformId: string;
41
41
  platformUrl: string;
42
42
  }>;
43
43
  export type CreateItemOnPlatformPayload = z.infer<typeof CreateItemOnPlatformPayloadSchema>;
44
44
  export declare const UpdateItemOnPlatformPayloadSchema: z.ZodObject<{
45
- status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute"]>>>;
45
+ status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>>>;
46
46
  }, "strip", z.ZodTypeAny, {
47
- status?: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute" | null | undefined;
47
+ status?: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE" | null | undefined;
48
48
  }, {
49
- status?: "online" | "draft" | "deleted" | "sold" | "hidden" | "pending" | "error" | "dispute" | null | undefined;
49
+ status?: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE" | null | undefined;
50
50
  }>;
51
51
  export type UpdateItemOnPlatformPayload = z.infer<typeof UpdateItemOnPlatformPayloadSchema>;
@@ -4,9 +4,10 @@ exports.UpdateItemOnPlatformPayloadSchema = exports.CreateItemOnPlatformPayloadS
4
4
  const zod_1 = require("zod");
5
5
  const primitives_1 = require("../primitives");
6
6
  exports.ItemOnPlatformStatusSchema = zod_1.z.enum([
7
- "online", "draft", "deleted", "sold", "hidden", "pending", "error", "dispute",
7
+ "ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE",
8
8
  ]);
9
9
  exports.ItemOnPlatformSchema = zod_1.z.object({
10
+ id: zod_1.z.string().uuid(),
10
11
  itemId: primitives_1.IdSchema,
11
12
  accountId: zod_1.z.string().uuid(),
12
13
  platformId: zod_1.z.string(),
@@ -14,7 +15,6 @@ exports.ItemOnPlatformSchema = zod_1.z.object({
14
15
  status: exports.ItemOnPlatformStatusSchema,
15
16
  });
16
17
  exports.CreateItemOnPlatformPayloadSchema = zod_1.z.object({
17
- itemId: primitives_1.IdSchema,
18
18
  accountId: zod_1.z.string().uuid(),
19
19
  platformId: zod_1.z.string(),
20
20
  platformUrl: zod_1.z.string().url(),
@@ -7,8 +7,8 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
7
7
  firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
8
  password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  anonymous: z.ZodBoolean;
10
- membership: z.ZodString;
11
- affiliate: z.ZodString;
10
+ membership: z.ZodEnum<["free", "monthly", "yearly", "apprentice_monthly", "apprentice_yearly", "confirmed_monthly", "confirmed_yearly"]>;
11
+ affiliate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
12
  notificationToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
14
  prevId: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
@@ -117,8 +117,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
117
117
  createdAt: Date;
118
118
  username: string;
119
119
  anonymous: boolean;
120
- membership: string;
121
- affiliate: string;
120
+ membership: "free" | "monthly" | "yearly" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
122
121
  wallet: {
123
122
  profit: number;
124
123
  revenue: number;
@@ -130,6 +129,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
130
129
  firstName?: string | null | undefined;
131
130
  email?: string | null | undefined;
132
131
  password?: string | null | undefined;
132
+ affiliate?: string | null | undefined;
133
133
  notificationToken?: string | null | undefined;
134
134
  token?: string | null | undefined;
135
135
  prevId?: string | number | null | undefined;
@@ -159,8 +159,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
159
159
  createdAt: Date;
160
160
  username: string;
161
161
  anonymous: boolean;
162
- membership: string;
163
- affiliate: string;
162
+ membership: "free" | "monthly" | "yearly" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
164
163
  wallet: {
165
164
  profit: number;
166
165
  revenue: number;
@@ -172,6 +171,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
172
171
  firstName?: string | null | undefined;
173
172
  email?: string | null | undefined;
174
173
  password?: string | null | undefined;
174
+ affiliate?: string | null | undefined;
175
175
  notificationToken?: string | null | undefined;
176
176
  token?: string | null | undefined;
177
177
  prevId?: string | number | null | undefined;
@@ -187,8 +187,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
187
187
  createdAt: Date;
188
188
  username: string;
189
189
  anonymous: boolean;
190
- membership: string;
191
- affiliate: string;
190
+ membership: "free" | "monthly" | "yearly" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
192
191
  wallet: {
193
192
  profit: number;
194
193
  revenue: number;
@@ -200,6 +199,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
200
199
  firstName?: string | null | undefined;
201
200
  email?: string | null | undefined;
202
201
  password?: string | null | undefined;
202
+ affiliate?: string | null | undefined;
203
203
  notificationToken?: string | null | undefined;
204
204
  token?: string | null | undefined;
205
205
  prevId?: string | number | null | undefined;
@@ -229,8 +229,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
229
229
  createdAt: Date;
230
230
  username: string;
231
231
  anonymous: boolean;
232
- membership: string;
233
- affiliate: string;
232
+ membership: "free" | "monthly" | "yearly" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
234
233
  wallet: {
235
234
  profit: number;
236
235
  revenue: number;
@@ -242,6 +241,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
242
241
  firstName?: string | null | undefined;
243
242
  email?: string | null | undefined;
244
243
  password?: string | null | undefined;
244
+ affiliate?: string | null | undefined;
245
245
  notificationToken?: string | null | undefined;
246
246
  token?: string | null | undefined;
247
247
  prevId?: string | number | null | undefined;
@@ -17,8 +17,8 @@ exports.UserSchema = (0, legacy_1.legacy)(zod_1.z.object({
17
17
  firstName: zod_1.z.string().nullish(),
18
18
  password: zod_1.z.string().nullish(),
19
19
  anonymous: zod_1.z.boolean(),
20
- membership: zod_1.z.string(),
21
- affiliate: zod_1.z.string(),
20
+ membership: exports.UserMembershipSchema,
21
+ affiliate: zod_1.z.string().nullish(),
22
22
  notificationToken: zod_1.z.string().nullish(),
23
23
  token: zod_1.z.string().nullish(),
24
24
  prevId: primitives_1.IdSchema.nullish(),
@@ -14,16 +14,13 @@ export declare const UserOnPlatformSchema: z.ZodObject<{
14
14
  }>;
15
15
  export type UserOnPlatform = z.infer<typeof UserOnPlatformSchema>;
16
16
  export declare const CreateUserOnPlatformPayloadSchema: z.ZodObject<{
17
- userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
18
17
  accountId: z.ZodString;
19
18
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
20
19
  }, "strip", z.ZodTypeAny, {
21
20
  platform: "VINTED" | "SHOPIFY";
22
21
  accountId: string;
23
- userId: string | number;
24
22
  }, {
25
23
  platform: "VINTED" | "SHOPIFY";
26
24
  accountId: string;
27
- userId: string | number;
28
25
  }>;
29
26
  export type CreateUserOnPlatformPayload = z.infer<typeof CreateUserOnPlatformPayloadSchema>;
@@ -10,7 +10,6 @@ exports.UserOnPlatformSchema = zod_1.z.object({
10
10
  platform: account_1.ConnectorAccountPlatformSchema,
11
11
  });
12
12
  exports.CreateUserOnPlatformPayloadSchema = zod_1.z.object({
13
- userId: primitives_1.IdSchema,
14
13
  accountId: zod_1.z.string().uuid(),
15
14
  platform: account_1.ConnectorAccountPlatformSchema,
16
15
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "controlresell",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",