@timardex/cluemart-shared 1.0.92 → 1.0.94

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,4 +1,4 @@
1
- import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-Bieh1fh8.mjs';
1
+ import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-D5MQQdDQ.mjs';
2
2
  import '../enums/index.mjs';
3
3
  import 'react-hook-form';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-By7aHQ1y.js';
1
+ import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-NGrcgZDJ.js';
2
2
  import '../enums/index.js';
3
3
  import 'react-hook-form';
4
4
 
@@ -1,4 +1,4 @@
1
- import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumUserLicence, EnumUserRole, EnumSocialMedia } from './enums/index.mjs';
1
+ import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumSocialMedia } from './enums/index.mjs';
2
2
  import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
3
3
 
4
4
  type RelationDate = {
@@ -169,52 +169,6 @@ interface SatllholderWithConnectionDatesType extends StallholderType {
169
169
  relationDates: RelationDate[] | undefined;
170
170
  }
171
171
 
172
- type UserFormData = {
173
- _id?: string;
174
- active: boolean;
175
- avatar?: ResourceImageType | null;
176
- avatarUpload?: ResourceImageType | null;
177
- confirmPassword: string;
178
- email: string;
179
- firstName: string;
180
- lastName: string;
181
- password: string;
182
- preferredRegion: string;
183
- role: EnumUserRole;
184
- };
185
- interface CreateUserFormData {
186
- control: Control<UserFormData, any>;
187
- fields: UserFormData;
188
- formState: {
189
- errors: FieldErrors<UserFormData>;
190
- };
191
- handleSubmit: UseFormHandleSubmit<UserFormData, any>;
192
- reset: UseFormReset<UserFormData>;
193
- setValue: UseFormSetValue<UserFormData>;
194
- watch: UseFormWatch<UserFormData>;
195
- }
196
- interface UserType {
197
- _id: string;
198
- active: boolean;
199
- avatar: ResourceImageType | null;
200
- createdAt: string;
201
- email: string;
202
- favourites: {
203
- markets: string[];
204
- stallholders: string[];
205
- };
206
- firstName: string;
207
- lastName: string;
208
- licences: EnumUserLicence[] | null;
209
- markets: string[] | null;
210
- password: string;
211
- preferredRegion: string;
212
- refreshToken: string | null;
213
- role: EnumUserRole;
214
- stallholder: string | null;
215
- updatedAt: string;
216
- }
217
-
218
172
  type Nullable<T> = {
219
173
  [K in keyof T]: T[K] | null | undefined;
220
174
  };
@@ -241,10 +195,17 @@ interface BaseResourceTypeFormData {
241
195
  region: string;
242
196
  socialMedia?: SocialMediaType[] | null;
243
197
  }
198
+ type OwnerType = {
199
+ _id: string;
200
+ avatar: string | null;
201
+ email: string;
202
+ licences: string[];
203
+ name: string;
204
+ };
244
205
  type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
245
206
  _id: string;
246
207
  createdAt: string;
247
- owner: Pick<UserType, "_id" | "email" | "licences">;
208
+ owner: OwnerType;
248
209
  relationIds: string[] | null;
249
210
  updatedAt: string;
250
211
  };
@@ -324,4 +285,4 @@ interface ResourceConnectionsType {
324
285
  stallholders: SatllholderWithConnectionDatesType[] | null;
325
286
  }
326
287
 
327
- 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, UserType as U, 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, UserFormData as o, CreateUserFormData as p, ResourceImageType as q, SocialMediaType as r, BaseResourceType as s, Region as t, MapMultiLocation as u, SubcategoryItems as v, Subcategory as w, DateTimeWithPriceType as x, MarketWithConnectionDatesType as y, RelationDate as z };
288
+ export type { StallholderAttributes as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, SatllholderWithConnectionDatesType as E, FormField as F, GeocodeLocation as G, 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, DateTimeWithPriceType as w, MarketWithConnectionDatesType as x, RelationDate as y, StallholderLocation as z };
@@ -1,4 +1,4 @@
1
- import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumUserLicence, EnumUserRole, EnumSocialMedia } from './enums/index.js';
1
+ import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumPaymentMethod, EnumSocialMedia } from './enums/index.js';
2
2
  import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
3
3
 
4
4
  type RelationDate = {
@@ -169,52 +169,6 @@ interface SatllholderWithConnectionDatesType extends StallholderType {
169
169
  relationDates: RelationDate[] | undefined;
170
170
  }
171
171
 
172
- type UserFormData = {
173
- _id?: string;
174
- active: boolean;
175
- avatar?: ResourceImageType | null;
176
- avatarUpload?: ResourceImageType | null;
177
- confirmPassword: string;
178
- email: string;
179
- firstName: string;
180
- lastName: string;
181
- password: string;
182
- preferredRegion: string;
183
- role: EnumUserRole;
184
- };
185
- interface CreateUserFormData {
186
- control: Control<UserFormData, any>;
187
- fields: UserFormData;
188
- formState: {
189
- errors: FieldErrors<UserFormData>;
190
- };
191
- handleSubmit: UseFormHandleSubmit<UserFormData, any>;
192
- reset: UseFormReset<UserFormData>;
193
- setValue: UseFormSetValue<UserFormData>;
194
- watch: UseFormWatch<UserFormData>;
195
- }
196
- interface UserType {
197
- _id: string;
198
- active: boolean;
199
- avatar: ResourceImageType | null;
200
- createdAt: string;
201
- email: string;
202
- favourites: {
203
- markets: string[];
204
- stallholders: string[];
205
- };
206
- firstName: string;
207
- lastName: string;
208
- licences: EnumUserLicence[] | null;
209
- markets: string[] | null;
210
- password: string;
211
- preferredRegion: string;
212
- refreshToken: string | null;
213
- role: EnumUserRole;
214
- stallholder: string | null;
215
- updatedAt: string;
216
- }
217
-
218
172
  type Nullable<T> = {
219
173
  [K in keyof T]: T[K] | null | undefined;
220
174
  };
@@ -241,10 +195,17 @@ interface BaseResourceTypeFormData {
241
195
  region: string;
242
196
  socialMedia?: SocialMediaType[] | null;
243
197
  }
198
+ type OwnerType = {
199
+ _id: string;
200
+ avatar: string | null;
201
+ email: string;
202
+ licences: string[];
203
+ name: string;
204
+ };
244
205
  type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
245
206
  _id: string;
246
207
  createdAt: string;
247
- owner: Pick<UserType, "_id" | "email" | "licences">;
208
+ owner: OwnerType;
248
209
  relationIds: string[] | null;
249
210
  updatedAt: string;
250
211
  };
@@ -324,4 +285,4 @@ interface ResourceConnectionsType {
324
285
  stallholders: SatllholderWithConnectionDatesType[] | null;
325
286
  }
326
287
 
327
- 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, UserType as U, 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, UserFormData as o, CreateUserFormData as p, ResourceImageType as q, SocialMediaType as r, BaseResourceType as s, Region as t, MapMultiLocation as u, SubcategoryItems as v, Subcategory as w, DateTimeWithPriceType as x, MarketWithConnectionDatesType as y, RelationDate as z };
288
+ export type { StallholderAttributes as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, SatllholderWithConnectionDatesType as E, FormField as F, GeocodeLocation as G, 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, DateTimeWithPriceType as w, MarketWithConnectionDatesType as x, RelationDate as y, StallholderLocation as z };
@@ -129,8 +129,10 @@ var RESOURCE_IMAGE_FIELDS_FRAGMENT = import_client2.gql`
129
129
  var OWNER_FIELDS_FRAGMENT = import_client2.gql`
130
130
  fragment OwnerFields on OwnerType {
131
131
  _id
132
+ avatar
132
133
  email
133
134
  licences
135
+ name
134
136
  }
135
137
  `;
136
138
  var CATEGORY_FIELDS_FRAGMENT = import_client2.gql`
@@ -621,7 +623,11 @@ var CHAT_FIELDS_FRAGMENT = import_client8.gql`
621
623
  ...ChatMessageFields
622
624
  }
623
625
  name
624
- participants
626
+ participants {
627
+ userId
628
+ userName
629
+ userAvatar
630
+ }
625
631
  updatedAt
626
632
  }
627
633
  ${CHAT_MESSAGE_FIELDS_FRAGMENT}