controlresell 0.0.32 → 0.0.34

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<["IMPORT", "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<["IMPORT", "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: "IMPORT" | "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: "IMPORT" | "CREATE" | "UPDATE" | "DELETE";
18
18
  id: string;
19
19
  data: string;
20
20
  itemId: string | number;
@@ -22,13 +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
- type: z.ZodEnum<["CREATE", "UPDATE", "DELETE"]>;
25
+ type: z.ZodEnum<["IMPORT", "CREATE", "UPDATE", "DELETE"]>;
26
26
  data: z.ZodString;
27
27
  }, "strip", z.ZodTypeAny, {
28
- type: "CREATE" | "UPDATE" | "DELETE";
28
+ type: "IMPORT" | "CREATE" | "UPDATE" | "DELETE";
29
29
  data: string;
30
30
  }, {
31
- type: "CREATE" | "UPDATE" | "DELETE";
31
+ type: "IMPORT" | "CREATE" | "UPDATE" | "DELETE";
32
32
  data: string;
33
33
  }>;
34
34
  export type CreateItemHistoryPayload = z.infer<typeof CreateItemHistoryPayloadSchema>;
@@ -3,7 +3,9 @@ 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([
7
+ "IMPORT", "CREATE", "UPDATE", "DELETE",
8
+ ]);
7
9
  exports.ItemHistorySchema = zod_1.z.object({
8
10
  id: zod_1.z.string().uuid(),
9
11
  itemId: primitives_1.IdSchema,
@@ -14,7 +14,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
14
14
  prevId: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
15
15
  phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
16
  countryDialCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
- wallet: z.ZodObject<{
17
+ wallet: z.ZodOptional<z.ZodNullable<z.ZodObject<{
18
18
  profit: z.ZodNumber;
19
19
  revenue: z.ZodNumber;
20
20
  currentMonthProfit: z.ZodNumber;
@@ -26,7 +26,7 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
26
26
  profit: number;
27
27
  revenue: number;
28
28
  currentMonthProfit: number;
29
- }>;
29
+ }>>>;
30
30
  isPro: z.ZodBoolean;
31
31
  isShop: z.ZodBoolean;
32
32
  customers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -119,11 +119,6 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
119
119
  username: string;
120
120
  anonymous: boolean;
121
121
  membership: "monthly" | "yearly" | "free" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
122
- wallet: {
123
- profit: number;
124
- revenue: number;
125
- currentMonthProfit: number;
126
- };
127
122
  isPro: boolean;
128
123
  isShop: boolean;
129
124
  firstName?: string | null | undefined;
@@ -139,6 +134,11 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
139
134
  prevId?: string | number | null | undefined;
140
135
  phoneNumber?: string | null | undefined;
141
136
  countryDialCode?: string | null | undefined;
137
+ wallet?: {
138
+ profit: number;
139
+ revenue: number;
140
+ currentMonthProfit: number;
141
+ } | null | undefined;
142
142
  customers?: {
143
143
  id: string | number;
144
144
  userId: string | number;
@@ -161,11 +161,6 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
161
161
  username: string;
162
162
  anonymous: boolean;
163
163
  membership: "monthly" | "yearly" | "free" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
164
- wallet: {
165
- profit: number;
166
- revenue: number;
167
- currentMonthProfit: number;
168
- };
169
164
  isPro: boolean;
170
165
  isShop: boolean;
171
166
  firstName?: string | null | undefined;
@@ -181,6 +176,11 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
181
176
  prevId?: string | number | null | undefined;
182
177
  phoneNumber?: string | null | undefined;
183
178
  countryDialCode?: string | null | undefined;
179
+ wallet?: {
180
+ profit: number;
181
+ revenue: number;
182
+ currentMonthProfit: number;
183
+ } | null | undefined;
184
184
  customers?: unknown[] | null | undefined;
185
185
  }>, {
186
186
  id: string | number;
@@ -189,11 +189,6 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
189
189
  username: string;
190
190
  anonymous: boolean;
191
191
  membership: "monthly" | "yearly" | "free" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
192
- wallet: {
193
- profit: number;
194
- revenue: number;
195
- currentMonthProfit: number;
196
- };
197
192
  isPro: boolean;
198
193
  isShop: boolean;
199
194
  firstName?: string | null | undefined;
@@ -209,6 +204,11 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
209
204
  prevId?: string | number | null | undefined;
210
205
  phoneNumber?: string | null | undefined;
211
206
  countryDialCode?: string | null | undefined;
207
+ wallet?: {
208
+ profit: number;
209
+ revenue: number;
210
+ currentMonthProfit: number;
211
+ } | null | undefined;
212
212
  customers?: {
213
213
  id: string | number;
214
214
  userId: string | number;
@@ -231,11 +231,6 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
231
231
  username: string;
232
232
  anonymous: boolean;
233
233
  membership: "monthly" | "yearly" | "free" | "apprentice_monthly" | "apprentice_yearly" | "confirmed_monthly" | "confirmed_yearly";
234
- wallet: {
235
- profit: number;
236
- revenue: number;
237
- currentMonthProfit: number;
238
- };
239
234
  isPro: boolean;
240
235
  isShop: boolean;
241
236
  firstName?: string | null | undefined;
@@ -251,6 +246,11 @@ export declare const UserSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
251
246
  prevId?: string | number | null | undefined;
252
247
  phoneNumber?: string | null | undefined;
253
248
  countryDialCode?: string | null | undefined;
249
+ wallet?: {
250
+ profit: number;
251
+ revenue: number;
252
+ currentMonthProfit: number;
253
+ } | null | undefined;
254
254
  customers?: {
255
255
  id: string | number;
256
256
  userId: string | number;
@@ -24,7 +24,7 @@ exports.UserSchema = (0, legacy_1.legacy)(zod_1.z.object({
24
24
  prevId: primitives_1.IdSchema.nullish(),
25
25
  phoneNumber: zod_1.z.string().nullish(),
26
26
  countryDialCode: zod_1.z.string().nullish(),
27
- wallet: wallet_1.WalletSchema,
27
+ wallet: wallet_1.WalletSchema.nullish(),
28
28
  isPro: zod_1.z.boolean(),
29
29
  isShop: zod_1.z.boolean(),
30
30
  customers: zod_1.z.array(customer_1.CustomerSchema).nullish(),
@@ -24,3 +24,17 @@ export declare const CreateUserOnPlatformPayloadSchema: z.ZodObject<{
24
24
  accountId: string;
25
25
  }>;
26
26
  export type CreateUserOnPlatformPayload = z.infer<typeof CreateUserOnPlatformPayloadSchema>;
27
+ export declare const UserOnPlatformRequestSchema: z.ZodObject<{
28
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
29
+ credentials: z.ZodString;
30
+ name: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ platform: "VINTED" | "SHOPIFY";
33
+ credentials: string;
34
+ name: string;
35
+ }, {
36
+ platform: "VINTED" | "SHOPIFY";
37
+ credentials: string;
38
+ name: string;
39
+ }>;
40
+ export type UserOnPlatformRequest = z.infer<typeof UserOnPlatformRequestSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateUserOnPlatformPayloadSchema = exports.UserOnPlatformSchema = void 0;
3
+ exports.UserOnPlatformRequestSchema = exports.CreateUserOnPlatformPayloadSchema = exports.UserOnPlatformSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const primitives_1 = require("../primitives");
6
6
  const account_1 = require("../connector/account");
@@ -13,3 +13,8 @@ exports.CreateUserOnPlatformPayloadSchema = zod_1.z.object({
13
13
  accountId: zod_1.z.string().uuid(),
14
14
  platform: account_1.ConnectorAccountPlatformSchema,
15
15
  });
16
+ exports.UserOnPlatformRequestSchema = zod_1.z.object({
17
+ platform: account_1.ConnectorAccountPlatformSchema,
18
+ credentials: zod_1.z.string(),
19
+ name: zod_1.z.string(),
20
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "controlresell",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",