@timardex/cluemart-shared 1.1.28 → 1.1.30
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.
- package/dist/ad-CJzmTWSn.d.mts +123 -0
- package/dist/ad-p-iMUyA7.d.ts +123 -0
- package/dist/auth-BWdfPzae.d.ts +44 -0
- package/dist/auth-BiazhMfX.d.mts +44 -0
- package/dist/chunk-RNCMM53N.mjs +18 -0
- package/dist/chunk-RNCMM53N.mjs.map +1 -0
- package/dist/formFields/index.d.mts +2 -2
- package/dist/formFields/index.d.ts +2 -2
- package/dist/{global-BWyNs7d9.d.ts → global-3BBlxnva.d.ts} +18 -46
- package/dist/{global-44_9bbnH.d.mts → global-DPGWQCsT.d.mts} +18 -46
- package/dist/graphql/index.cjs +184 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +45 -4
- package/dist/graphql/index.d.ts +45 -4
- package/dist/graphql/index.mjs +178 -0
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +176 -5
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +7 -5
- package/dist/hooks/index.d.ts +7 -5
- package/dist/hooks/index.mjs +164 -5
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +364 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +128 -134
- package/dist/index.d.ts +128 -134
- package/dist/index.mjs +355 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{notification-BdeLHjVo.d.mts → notification-BCTdNYCc.d.mts} +1 -1
- package/dist/{notification-0bjZIx2v.d.ts → notification-Bg5iTdb5.d.ts} +1 -1
- package/dist/types/index.cjs +26 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.mjs +8 -0
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/auth-D13Gd2TA.d.ts +0 -104
- package/dist/auth-D8fGJCGz.d.mts +0 -104
- package/dist/user-D_ji1aP6.d.mts +0 -85
- package/dist/user-nZ_jJwZp.d.ts +0 -85
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
|
|
2
|
+
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-DPGWQCsT.mjs';
|
|
3
|
+
|
|
4
|
+
type TestersFormData = {
|
|
5
|
+
email: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
osType: EnumOSPlatform;
|
|
9
|
+
resourceType: EnumResourceType;
|
|
10
|
+
categories: Category[] | null;
|
|
11
|
+
};
|
|
12
|
+
type CreateTestersFormData = CreateFormData<TestersFormData>;
|
|
13
|
+
type TesterType = {
|
|
14
|
+
_id: string;
|
|
15
|
+
active: boolean;
|
|
16
|
+
categories: Category[] | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
email: string;
|
|
19
|
+
firstName: string;
|
|
20
|
+
lastName: string;
|
|
21
|
+
osType: EnumOSPlatform;
|
|
22
|
+
resourceType: EnumResourceType;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type UserFormData = {
|
|
27
|
+
_id?: string;
|
|
28
|
+
active: boolean;
|
|
29
|
+
avatar?: ResourceImageType | null;
|
|
30
|
+
avatarUpload?: ResourceImageType | null;
|
|
31
|
+
confirmPassword: string;
|
|
32
|
+
email: string;
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
password: string;
|
|
36
|
+
platform?: EnumOSPlatform;
|
|
37
|
+
preferredRegion: string;
|
|
38
|
+
role: EnumUserRole;
|
|
39
|
+
};
|
|
40
|
+
type CreateUserFormData = CreateFormData<UserFormData>;
|
|
41
|
+
interface UserType {
|
|
42
|
+
_id: string;
|
|
43
|
+
active: boolean;
|
|
44
|
+
avatar: ResourceImageType | null;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
email: string;
|
|
47
|
+
favourites: {
|
|
48
|
+
markets: string[];
|
|
49
|
+
stallholders: string[];
|
|
50
|
+
};
|
|
51
|
+
firstName: string;
|
|
52
|
+
lastName: string;
|
|
53
|
+
licences: EnumUserLicence[] | null;
|
|
54
|
+
markets: string[] | null;
|
|
55
|
+
password: string;
|
|
56
|
+
platform: EnumOSPlatform | null;
|
|
57
|
+
preferredRegion: string;
|
|
58
|
+
refreshToken: string | null;
|
|
59
|
+
role: EnumUserRole;
|
|
60
|
+
stallholder: string | null;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare enum EnumAdStatus {
|
|
65
|
+
ACTIVE = "active",
|
|
66
|
+
PAUSED = "paused",
|
|
67
|
+
EXPIRED = "expired"
|
|
68
|
+
}
|
|
69
|
+
declare enum EnumAdMediaType {
|
|
70
|
+
IMAGE = "image",
|
|
71
|
+
VIDEO = "video"
|
|
72
|
+
}
|
|
73
|
+
interface AdFormData {
|
|
74
|
+
_id?: string;
|
|
75
|
+
ctaText?: string | null;
|
|
76
|
+
ctaUrl?: string | null;
|
|
77
|
+
end: string;
|
|
78
|
+
media?: {
|
|
79
|
+
type: EnumAdMediaType;
|
|
80
|
+
url: string;
|
|
81
|
+
}[] | null;
|
|
82
|
+
resourceCover: string;
|
|
83
|
+
resourceDescription: string;
|
|
84
|
+
resourceId: string;
|
|
85
|
+
resourceLogo?: string | null;
|
|
86
|
+
resourceName: string;
|
|
87
|
+
resourceRegion: string;
|
|
88
|
+
resourceType: EnumResourceType;
|
|
89
|
+
socialMedia?: SocialMediaType[] | null;
|
|
90
|
+
start: string;
|
|
91
|
+
status: EnumAdStatus;
|
|
92
|
+
targetRegion: string;
|
|
93
|
+
}
|
|
94
|
+
type CreateAdFormData = CreateFormData<AdFormData>;
|
|
95
|
+
interface AdType {
|
|
96
|
+
_id?: string;
|
|
97
|
+
clicks?: number;
|
|
98
|
+
clui?: string;
|
|
99
|
+
createdAt?: Date;
|
|
100
|
+
ctaText?: string;
|
|
101
|
+
ctaUrl?: string;
|
|
102
|
+
end: Date;
|
|
103
|
+
impressions?: number;
|
|
104
|
+
media?: {
|
|
105
|
+
type: EnumAdMediaType;
|
|
106
|
+
url: string;
|
|
107
|
+
}[] | null;
|
|
108
|
+
resourceCover: string;
|
|
109
|
+
resourceDescription: string;
|
|
110
|
+
resourceId: string;
|
|
111
|
+
resourceLogo: string | null;
|
|
112
|
+
resourceName: string;
|
|
113
|
+
resourceRegion: string;
|
|
114
|
+
resourceType: EnumResourceType;
|
|
115
|
+
socialMedia: SocialMediaType[];
|
|
116
|
+
start: Date;
|
|
117
|
+
status: EnumAdStatus;
|
|
118
|
+
targetInterests?: string[];
|
|
119
|
+
targetRegion?: string;
|
|
120
|
+
updatedAt?: Date;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdMediaType as f };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
|
|
2
|
+
import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-3BBlxnva.js';
|
|
3
|
+
|
|
4
|
+
type TestersFormData = {
|
|
5
|
+
email: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
osType: EnumOSPlatform;
|
|
9
|
+
resourceType: EnumResourceType;
|
|
10
|
+
categories: Category[] | null;
|
|
11
|
+
};
|
|
12
|
+
type CreateTestersFormData = CreateFormData<TestersFormData>;
|
|
13
|
+
type TesterType = {
|
|
14
|
+
_id: string;
|
|
15
|
+
active: boolean;
|
|
16
|
+
categories: Category[] | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
email: string;
|
|
19
|
+
firstName: string;
|
|
20
|
+
lastName: string;
|
|
21
|
+
osType: EnumOSPlatform;
|
|
22
|
+
resourceType: EnumResourceType;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type UserFormData = {
|
|
27
|
+
_id?: string;
|
|
28
|
+
active: boolean;
|
|
29
|
+
avatar?: ResourceImageType | null;
|
|
30
|
+
avatarUpload?: ResourceImageType | null;
|
|
31
|
+
confirmPassword: string;
|
|
32
|
+
email: string;
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
password: string;
|
|
36
|
+
platform?: EnumOSPlatform;
|
|
37
|
+
preferredRegion: string;
|
|
38
|
+
role: EnumUserRole;
|
|
39
|
+
};
|
|
40
|
+
type CreateUserFormData = CreateFormData<UserFormData>;
|
|
41
|
+
interface UserType {
|
|
42
|
+
_id: string;
|
|
43
|
+
active: boolean;
|
|
44
|
+
avatar: ResourceImageType | null;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
email: string;
|
|
47
|
+
favourites: {
|
|
48
|
+
markets: string[];
|
|
49
|
+
stallholders: string[];
|
|
50
|
+
};
|
|
51
|
+
firstName: string;
|
|
52
|
+
lastName: string;
|
|
53
|
+
licences: EnumUserLicence[] | null;
|
|
54
|
+
markets: string[] | null;
|
|
55
|
+
password: string;
|
|
56
|
+
platform: EnumOSPlatform | null;
|
|
57
|
+
preferredRegion: string;
|
|
58
|
+
refreshToken: string | null;
|
|
59
|
+
role: EnumUserRole;
|
|
60
|
+
stallholder: string | null;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare enum EnumAdStatus {
|
|
65
|
+
ACTIVE = "active",
|
|
66
|
+
PAUSED = "paused",
|
|
67
|
+
EXPIRED = "expired"
|
|
68
|
+
}
|
|
69
|
+
declare enum EnumAdMediaType {
|
|
70
|
+
IMAGE = "image",
|
|
71
|
+
VIDEO = "video"
|
|
72
|
+
}
|
|
73
|
+
interface AdFormData {
|
|
74
|
+
_id?: string;
|
|
75
|
+
ctaText?: string | null;
|
|
76
|
+
ctaUrl?: string | null;
|
|
77
|
+
end: string;
|
|
78
|
+
media?: {
|
|
79
|
+
type: EnumAdMediaType;
|
|
80
|
+
url: string;
|
|
81
|
+
}[] | null;
|
|
82
|
+
resourceCover: string;
|
|
83
|
+
resourceDescription: string;
|
|
84
|
+
resourceId: string;
|
|
85
|
+
resourceLogo?: string | null;
|
|
86
|
+
resourceName: string;
|
|
87
|
+
resourceRegion: string;
|
|
88
|
+
resourceType: EnumResourceType;
|
|
89
|
+
socialMedia?: SocialMediaType[] | null;
|
|
90
|
+
start: string;
|
|
91
|
+
status: EnumAdStatus;
|
|
92
|
+
targetRegion: string;
|
|
93
|
+
}
|
|
94
|
+
type CreateAdFormData = CreateFormData<AdFormData>;
|
|
95
|
+
interface AdType {
|
|
96
|
+
_id?: string;
|
|
97
|
+
clicks?: number;
|
|
98
|
+
clui?: string;
|
|
99
|
+
createdAt?: Date;
|
|
100
|
+
ctaText?: string;
|
|
101
|
+
ctaUrl?: string;
|
|
102
|
+
end: Date;
|
|
103
|
+
impressions?: number;
|
|
104
|
+
media?: {
|
|
105
|
+
type: EnumAdMediaType;
|
|
106
|
+
url: string;
|
|
107
|
+
}[] | null;
|
|
108
|
+
resourceCover: string;
|
|
109
|
+
resourceDescription: string;
|
|
110
|
+
resourceId: string;
|
|
111
|
+
resourceLogo: string | null;
|
|
112
|
+
resourceName: string;
|
|
113
|
+
resourceRegion: string;
|
|
114
|
+
resourceType: EnumResourceType;
|
|
115
|
+
socialMedia: SocialMediaType[];
|
|
116
|
+
start: Date;
|
|
117
|
+
status: EnumAdStatus;
|
|
118
|
+
targetInterests?: string[];
|
|
119
|
+
targetRegion?: string;
|
|
120
|
+
updatedAt?: Date;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, EnumAdMediaType as f };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { w as CreateFormData } from './global-3BBlxnva.js';
|
|
2
|
+
import { EnumOSPlatform } from './enums/index.js';
|
|
3
|
+
|
|
4
|
+
type ContactUsFormData = {
|
|
5
|
+
email: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
11
|
+
|
|
12
|
+
type LoginFormData = {
|
|
13
|
+
email: string;
|
|
14
|
+
isAdminPage?: boolean;
|
|
15
|
+
password: string;
|
|
16
|
+
platform?: EnumOSPlatform;
|
|
17
|
+
};
|
|
18
|
+
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
19
|
+
type RegisterFormData = {
|
|
20
|
+
email: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
password: string;
|
|
24
|
+
platform?: EnumOSPlatform;
|
|
25
|
+
preferredRegion: string;
|
|
26
|
+
};
|
|
27
|
+
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
28
|
+
type RequestPasswordResetFormData = {
|
|
29
|
+
email: string;
|
|
30
|
+
};
|
|
31
|
+
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
32
|
+
type ResetPasswordFormData = {
|
|
33
|
+
confirmPassword: string;
|
|
34
|
+
email: string;
|
|
35
|
+
password: string;
|
|
36
|
+
};
|
|
37
|
+
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
38
|
+
type ValidateVerificationTokenFormData = {
|
|
39
|
+
email: string;
|
|
40
|
+
verificationToken: string;
|
|
41
|
+
};
|
|
42
|
+
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
43
|
+
|
|
44
|
+
export type { CreateLoginFormData as C, LoginFormData as L, RegisterFormData as R, ValidateVerificationTokenFormData as V, CreateRegisterFormData as a, CreateRequestPasswordResetFormData as b, CreateValidateVerificationTokenFormData as c, CreateResetPasswordFormData as d, ContactUsFormData as e, CreateContactUsFormData as f, RequestPasswordResetFormData as g, ResetPasswordFormData as h };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { w as CreateFormData } from './global-DPGWQCsT.mjs';
|
|
2
|
+
import { EnumOSPlatform } from './enums/index.mjs';
|
|
3
|
+
|
|
4
|
+
type ContactUsFormData = {
|
|
5
|
+
email: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
11
|
+
|
|
12
|
+
type LoginFormData = {
|
|
13
|
+
email: string;
|
|
14
|
+
isAdminPage?: boolean;
|
|
15
|
+
password: string;
|
|
16
|
+
platform?: EnumOSPlatform;
|
|
17
|
+
};
|
|
18
|
+
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
19
|
+
type RegisterFormData = {
|
|
20
|
+
email: string;
|
|
21
|
+
firstName: string;
|
|
22
|
+
lastName: string;
|
|
23
|
+
password: string;
|
|
24
|
+
platform?: EnumOSPlatform;
|
|
25
|
+
preferredRegion: string;
|
|
26
|
+
};
|
|
27
|
+
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
28
|
+
type RequestPasswordResetFormData = {
|
|
29
|
+
email: string;
|
|
30
|
+
};
|
|
31
|
+
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
32
|
+
type ResetPasswordFormData = {
|
|
33
|
+
confirmPassword: string;
|
|
34
|
+
email: string;
|
|
35
|
+
password: string;
|
|
36
|
+
};
|
|
37
|
+
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
38
|
+
type ValidateVerificationTokenFormData = {
|
|
39
|
+
email: string;
|
|
40
|
+
verificationToken: string;
|
|
41
|
+
};
|
|
42
|
+
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
43
|
+
|
|
44
|
+
export type { CreateLoginFormData as C, LoginFormData as L, RegisterFormData as R, ValidateVerificationTokenFormData as V, CreateRegisterFormData as a, CreateRequestPasswordResetFormData as b, CreateValidateVerificationTokenFormData as c, CreateResetPasswordFormData as d, ContactUsFormData as e, CreateContactUsFormData as f, RequestPasswordResetFormData as g, ResetPasswordFormData as h };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/types/ad.ts
|
|
2
|
+
var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
|
|
3
|
+
EnumAdStatus2["ACTIVE"] = "active";
|
|
4
|
+
EnumAdStatus2["PAUSED"] = "paused";
|
|
5
|
+
EnumAdStatus2["EXPIRED"] = "expired";
|
|
6
|
+
return EnumAdStatus2;
|
|
7
|
+
})(EnumAdStatus || {});
|
|
8
|
+
var EnumAdMediaType = /* @__PURE__ */ ((EnumAdMediaType2) => {
|
|
9
|
+
EnumAdMediaType2["IMAGE"] = "image";
|
|
10
|
+
EnumAdMediaType2["VIDEO"] = "video";
|
|
11
|
+
return EnumAdMediaType2;
|
|
12
|
+
})(EnumAdMediaType || {});
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
EnumAdStatus,
|
|
16
|
+
EnumAdMediaType
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-RNCMM53N.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/ad.ts"],"sourcesContent":["import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdStatus {\n ACTIVE = \"active\",\n PAUSED = \"paused\",\n EXPIRED = \"expired\",\n}\n\nexport enum EnumAdMediaType {\n IMAGE = \"image\",\n VIDEO = \"video\",\n}\n\nexport interface AdFormData {\n _id?: string;\n ctaText?: string | null;\n ctaUrl?: string | null;\n end: string; // ISO date string\n media?: { type: EnumAdMediaType; url: string }[] | null;\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n socialMedia?: SocialMediaType[] | null;\n start: string; // ISO date string\n status: EnumAdStatus;\n targetRegion: string; // same format as resourceRegion\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType {\n _id?: string;\n clicks?: number; // How many times the ad was clicked\n clui?: string;\n createdAt?: Date;\n ctaText?: string; // e.g., \"Visit Stall\"\n ctaUrl?: string; // link the ad directs to\n end: Date;\n impressions?: number; // How often the ad was seen\n media?: { type: EnumAdMediaType; url: string }[] | null;\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n socialMedia: SocialMediaType[];\n start: Date;\n status: EnumAdStatus;\n targetInterests?: string[]; // e.g., [\"organic food\", \"crafts\"]\n targetRegion?: string; // same format as resourceRegion\n updatedAt?: Date;\n}\n"],"mappings":";AAIO,IAAK,eAAL,kBAAKA,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,WAAQ;AACR,EAAAA,iBAAA,WAAQ;AAFE,SAAAA;AAAA,GAAA;","names":["EnumAdStatus","EnumAdMediaType"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
2
|
-
import '../enums/index.mjs';
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-DPGWQCsT.mjs';
|
|
3
2
|
import 'react-hook-form';
|
|
3
|
+
import '../enums/index.mjs';
|
|
4
4
|
|
|
5
5
|
declare const stallholderBasicInfoFields: FormField[];
|
|
6
6
|
declare const stallholderMultiLocation: FormField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
2
|
-
import '../enums/index.js';
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-3BBlxnva.js';
|
|
3
2
|
import 'react-hook-form';
|
|
3
|
+
import '../enums/index.js';
|
|
4
4
|
|
|
5
5
|
declare const stallholderBasicInfoFields: FormField[];
|
|
6
6
|
declare const stallholderMultiLocation: FormField;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { FieldValues, Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
1
2
|
import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumSocialMedia } from './enums/index.js';
|
|
2
|
-
import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
3
|
|
|
4
4
|
type RelationDate = {
|
|
5
5
|
lastUpdateBy: string;
|
|
@@ -63,28 +63,8 @@ interface MarketFormData extends BaseResourceTypeFormData {
|
|
|
63
63
|
rainOrShine: boolean;
|
|
64
64
|
tags: string[];
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
fields: MarketInfoFormData;
|
|
69
|
-
formState: {
|
|
70
|
-
errors: FieldErrors<MarketInfoFormData>;
|
|
71
|
-
};
|
|
72
|
-
handleSubmit: UseFormHandleSubmit<MarketInfoFormData, any>;
|
|
73
|
-
reset: UseFormReset<MarketInfoFormData>;
|
|
74
|
-
setValue: UseFormSetValue<MarketInfoFormData>;
|
|
75
|
-
watch: UseFormWatch<MarketInfoFormData>;
|
|
76
|
-
}
|
|
77
|
-
interface CreateMarketFormData {
|
|
78
|
-
control: Control<MarketFormData, any>;
|
|
79
|
-
fields: MarketFormData;
|
|
80
|
-
formState: {
|
|
81
|
-
errors: FieldErrors<MarketFormData>;
|
|
82
|
-
};
|
|
83
|
-
handleSubmit: UseFormHandleSubmit<MarketFormData, any>;
|
|
84
|
-
reset: UseFormReset<MarketFormData>;
|
|
85
|
-
setValue: UseFormSetValue<MarketFormData>;
|
|
86
|
-
watch: UseFormWatch<MarketFormData>;
|
|
87
|
-
}
|
|
66
|
+
type CreateMarketInfoFormData = CreateFormData<MarketInfoFormData>;
|
|
67
|
+
type CreateMarketFormData = CreateFormData<MarketFormData>;
|
|
88
68
|
interface MarketType extends BaseResourceType {
|
|
89
69
|
dateTime: DateTimeType[];
|
|
90
70
|
location: LocationType;
|
|
@@ -115,17 +95,7 @@ interface StallholderFormData extends BaseResourceTypeFormData {
|
|
|
115
95
|
products: string[];
|
|
116
96
|
specialities?: string[] | null;
|
|
117
97
|
}
|
|
118
|
-
|
|
119
|
-
control: Control<StallholderFormData, any>;
|
|
120
|
-
fields: StallholderFormData;
|
|
121
|
-
formState: {
|
|
122
|
-
errors: FieldErrors<StallholderFormData>;
|
|
123
|
-
};
|
|
124
|
-
handleSubmit: UseFormHandleSubmit<StallholderFormData, any>;
|
|
125
|
-
reset: UseFormReset<StallholderFormData>;
|
|
126
|
-
setValue: UseFormSetValue<StallholderFormData>;
|
|
127
|
-
watch: UseFormWatch<StallholderFormData>;
|
|
128
|
-
}
|
|
98
|
+
type CreateStallholderFormData = CreateFormData<StallholderFormData>;
|
|
129
99
|
type StallholderAttributes = {
|
|
130
100
|
details?: string | null;
|
|
131
101
|
isRequired: boolean;
|
|
@@ -150,17 +120,7 @@ type StallholderInfoFormData = {
|
|
|
150
120
|
};
|
|
151
121
|
table: StallholderAttributes;
|
|
152
122
|
};
|
|
153
|
-
|
|
154
|
-
control: Control<StallholderInfoFormData, any>;
|
|
155
|
-
fields: StallholderInfoFormData;
|
|
156
|
-
formState: {
|
|
157
|
-
errors: FieldErrors<StallholderInfoFormData>;
|
|
158
|
-
};
|
|
159
|
-
handleSubmit: UseFormHandleSubmit<StallholderInfoFormData, any>;
|
|
160
|
-
reset: UseFormReset<StallholderInfoFormData>;
|
|
161
|
-
setValue: UseFormSetValue<StallholderInfoFormData>;
|
|
162
|
-
watch: UseFormWatch<StallholderInfoFormData>;
|
|
163
|
-
}
|
|
123
|
+
type CreateStallholderInfoFormData = CreateFormData<StallholderInfoFormData>;
|
|
164
124
|
interface StallholderType extends BaseResourceType {
|
|
165
125
|
stallholderInfoId: string;
|
|
166
126
|
categories: StallholderFormData["categories"];
|
|
@@ -209,6 +169,7 @@ type OwnerType = {
|
|
|
209
169
|
};
|
|
210
170
|
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
211
171
|
_id: string;
|
|
172
|
+
adId?: string | null;
|
|
212
173
|
createdAt: string;
|
|
213
174
|
owner: OwnerType;
|
|
214
175
|
relationIds: string[] | null;
|
|
@@ -289,5 +250,16 @@ interface ResourceConnectionsType {
|
|
|
289
250
|
markets: MarketWithConnectionDatesType[] | null;
|
|
290
251
|
stallholders: SatllholderWithConnectionDatesType[] | null;
|
|
291
252
|
}
|
|
253
|
+
interface CreateFormData<T extends FieldValues> {
|
|
254
|
+
control: Control<T, any>;
|
|
255
|
+
fields: T;
|
|
256
|
+
formState: {
|
|
257
|
+
errors: FieldErrors<T>;
|
|
258
|
+
};
|
|
259
|
+
handleSubmit: UseFormHandleSubmit<T, any>;
|
|
260
|
+
reset: UseFormReset<T>;
|
|
261
|
+
setValue: UseFormSetValue<T>;
|
|
262
|
+
watch: UseFormWatch<T>;
|
|
263
|
+
}
|
|
292
264
|
|
|
293
|
-
export type {
|
|
265
|
+
export type { StallholderLocation as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, StallholderAttributes as E, FormField as F, GeocodeLocation as G, SatllholderWithConnectionDatesType as H, ImageObjectType as I, LocationType as L, MarketType as M, Nullable as N, OptionItem as O, PaymentInfoType as P, Requirement as R, StallType as S, FormDateField as a, MarketInfoType as b, RelationType as c, ResourceConnectionsType as d, StallholderType as e, StallholderInfoType as f, StallholderFormData as g, CreateStallholderFormData as h, StallholderInfoFormData as i, CreateStallholderInfoFormData as j, MarketFormData as k, CreateMarketFormData as l, MarketInfoFormData as m, CreateMarketInfoFormData as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, BaseResourceType as r, Region as s, MapMultiLocation as t, SubcategoryItems as u, Subcategory as v, CreateFormData as w, DateTimeWithPriceType as x, MarketWithConnectionDatesType as y, RelationDate as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { FieldValues, Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
1
2
|
import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumSocialMedia } from './enums/index.mjs';
|
|
2
|
-
import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
3
|
|
|
4
4
|
type RelationDate = {
|
|
5
5
|
lastUpdateBy: string;
|
|
@@ -63,28 +63,8 @@ interface MarketFormData extends BaseResourceTypeFormData {
|
|
|
63
63
|
rainOrShine: boolean;
|
|
64
64
|
tags: string[];
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
fields: MarketInfoFormData;
|
|
69
|
-
formState: {
|
|
70
|
-
errors: FieldErrors<MarketInfoFormData>;
|
|
71
|
-
};
|
|
72
|
-
handleSubmit: UseFormHandleSubmit<MarketInfoFormData, any>;
|
|
73
|
-
reset: UseFormReset<MarketInfoFormData>;
|
|
74
|
-
setValue: UseFormSetValue<MarketInfoFormData>;
|
|
75
|
-
watch: UseFormWatch<MarketInfoFormData>;
|
|
76
|
-
}
|
|
77
|
-
interface CreateMarketFormData {
|
|
78
|
-
control: Control<MarketFormData, any>;
|
|
79
|
-
fields: MarketFormData;
|
|
80
|
-
formState: {
|
|
81
|
-
errors: FieldErrors<MarketFormData>;
|
|
82
|
-
};
|
|
83
|
-
handleSubmit: UseFormHandleSubmit<MarketFormData, any>;
|
|
84
|
-
reset: UseFormReset<MarketFormData>;
|
|
85
|
-
setValue: UseFormSetValue<MarketFormData>;
|
|
86
|
-
watch: UseFormWatch<MarketFormData>;
|
|
87
|
-
}
|
|
66
|
+
type CreateMarketInfoFormData = CreateFormData<MarketInfoFormData>;
|
|
67
|
+
type CreateMarketFormData = CreateFormData<MarketFormData>;
|
|
88
68
|
interface MarketType extends BaseResourceType {
|
|
89
69
|
dateTime: DateTimeType[];
|
|
90
70
|
location: LocationType;
|
|
@@ -115,17 +95,7 @@ interface StallholderFormData extends BaseResourceTypeFormData {
|
|
|
115
95
|
products: string[];
|
|
116
96
|
specialities?: string[] | null;
|
|
117
97
|
}
|
|
118
|
-
|
|
119
|
-
control: Control<StallholderFormData, any>;
|
|
120
|
-
fields: StallholderFormData;
|
|
121
|
-
formState: {
|
|
122
|
-
errors: FieldErrors<StallholderFormData>;
|
|
123
|
-
};
|
|
124
|
-
handleSubmit: UseFormHandleSubmit<StallholderFormData, any>;
|
|
125
|
-
reset: UseFormReset<StallholderFormData>;
|
|
126
|
-
setValue: UseFormSetValue<StallholderFormData>;
|
|
127
|
-
watch: UseFormWatch<StallholderFormData>;
|
|
128
|
-
}
|
|
98
|
+
type CreateStallholderFormData = CreateFormData<StallholderFormData>;
|
|
129
99
|
type StallholderAttributes = {
|
|
130
100
|
details?: string | null;
|
|
131
101
|
isRequired: boolean;
|
|
@@ -150,17 +120,7 @@ type StallholderInfoFormData = {
|
|
|
150
120
|
};
|
|
151
121
|
table: StallholderAttributes;
|
|
152
122
|
};
|
|
153
|
-
|
|
154
|
-
control: Control<StallholderInfoFormData, any>;
|
|
155
|
-
fields: StallholderInfoFormData;
|
|
156
|
-
formState: {
|
|
157
|
-
errors: FieldErrors<StallholderInfoFormData>;
|
|
158
|
-
};
|
|
159
|
-
handleSubmit: UseFormHandleSubmit<StallholderInfoFormData, any>;
|
|
160
|
-
reset: UseFormReset<StallholderInfoFormData>;
|
|
161
|
-
setValue: UseFormSetValue<StallholderInfoFormData>;
|
|
162
|
-
watch: UseFormWatch<StallholderInfoFormData>;
|
|
163
|
-
}
|
|
123
|
+
type CreateStallholderInfoFormData = CreateFormData<StallholderInfoFormData>;
|
|
164
124
|
interface StallholderType extends BaseResourceType {
|
|
165
125
|
stallholderInfoId: string;
|
|
166
126
|
categories: StallholderFormData["categories"];
|
|
@@ -209,6 +169,7 @@ type OwnerType = {
|
|
|
209
169
|
};
|
|
210
170
|
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
211
171
|
_id: string;
|
|
172
|
+
adId?: string | null;
|
|
212
173
|
createdAt: string;
|
|
213
174
|
owner: OwnerType;
|
|
214
175
|
relationIds: string[] | null;
|
|
@@ -289,5 +250,16 @@ interface ResourceConnectionsType {
|
|
|
289
250
|
markets: MarketWithConnectionDatesType[] | null;
|
|
290
251
|
stallholders: SatllholderWithConnectionDatesType[] | null;
|
|
291
252
|
}
|
|
253
|
+
interface CreateFormData<T extends FieldValues> {
|
|
254
|
+
control: Control<T, any>;
|
|
255
|
+
fields: T;
|
|
256
|
+
formState: {
|
|
257
|
+
errors: FieldErrors<T>;
|
|
258
|
+
};
|
|
259
|
+
handleSubmit: UseFormHandleSubmit<T, any>;
|
|
260
|
+
reset: UseFormReset<T>;
|
|
261
|
+
setValue: UseFormSetValue<T>;
|
|
262
|
+
watch: UseFormWatch<T>;
|
|
263
|
+
}
|
|
292
264
|
|
|
293
|
-
export type {
|
|
265
|
+
export type { StallholderLocation as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, StallholderAttributes as E, FormField as F, GeocodeLocation as G, SatllholderWithConnectionDatesType as H, ImageObjectType as I, LocationType as L, MarketType as M, Nullable as N, OptionItem as O, PaymentInfoType as P, Requirement as R, StallType as S, FormDateField as a, MarketInfoType as b, RelationType as c, ResourceConnectionsType as d, StallholderType as e, StallholderInfoType as f, StallholderFormData as g, CreateStallholderFormData as h, StallholderInfoFormData as i, CreateStallholderInfoFormData as j, MarketFormData as k, CreateMarketFormData as l, MarketInfoFormData as m, CreateMarketInfoFormData as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, BaseResourceType as r, Region as s, MapMultiLocation as t, SubcategoryItems as u, Subcategory as v, CreateFormData as w, DateTimeWithPriceType as x, MarketWithConnectionDatesType as y, RelationDate as z };
|