@timardex/cluemart-shared 1.0.64 → 1.0.66

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/index.d.mts CHANGED
@@ -199,6 +199,7 @@ type RelationDate = {
199
199
  interface RelationType {
200
200
  _id?: string;
201
201
  apiMessage?: string;
202
+ chatId?: string;
202
203
  createdAt?: string;
203
204
  lastUpdateBy: EnumResourceType;
204
205
  marketId: string;
@@ -266,8 +267,8 @@ interface CreateMarketFormData {
266
267
  watch: UseFormWatch<MarketFormData>;
267
268
  }
268
269
  interface MarketType extends BaseResourceType {
269
- dateTime: MarketFormData["dateTime"];
270
- location: MarketFormData["location"];
270
+ dateTime: DateTimeType[];
271
+ location: LocationType;
271
272
  marketInfoId: string;
272
273
  provider: string;
273
274
  tags: string[];
package/dist/index.d.ts CHANGED
@@ -199,6 +199,7 @@ type RelationDate = {
199
199
  interface RelationType {
200
200
  _id?: string;
201
201
  apiMessage?: string;
202
+ chatId?: string;
202
203
  createdAt?: string;
203
204
  lastUpdateBy: EnumResourceType;
204
205
  marketId: string;
@@ -266,8 +267,8 @@ interface CreateMarketFormData {
266
267
  watch: UseFormWatch<MarketFormData>;
267
268
  }
268
269
  interface MarketType extends BaseResourceType {
269
- dateTime: MarketFormData["dateTime"];
270
- location: MarketFormData["location"];
270
+ dateTime: DateTimeType[];
271
+ location: LocationType;
271
272
  marketInfoId: string;
272
273
  provider: string;
273
274
  tags: string[];
package/dist/index.mjs CHANGED
@@ -423,7 +423,23 @@ var globalResourceSchema = yup.object().shape({
423
423
  import * as yup2 from "yup";
424
424
  var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
425
425
  var marketSchema = globalResourceSchema.shape({
426
- dateTime: yup2.array().of(dateTimeSchema).required("DateTime is required"),
426
+ dateTime: yup2.array().of(dateTimeSchema).min(1, "At least one Market date required").required("DateTime is required").test(
427
+ "unique-start-date-time",
428
+ "Start Date and Time must be unique",
429
+ function(value) {
430
+ if (!value) return true;
431
+ const seen = /* @__PURE__ */ new Set();
432
+ for (const item of value) {
433
+ if (!item.startDate || !item.startTime) continue;
434
+ const key = `${item.startDate}-${item.startTime}`;
435
+ if (seen.has(key)) {
436
+ return false;
437
+ }
438
+ seen.add(key);
439
+ }
440
+ return true;
441
+ }
442
+ ),
427
443
  location: locationSchema,
428
444
  provider: yup2.string().label("Provider").trim().min(3).required("Provider is required"),
429
445
  tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
@@ -2298,6 +2314,7 @@ var RELATION_FIELDS_FRAGMENT = gql10`
2298
2314
  fragment RelationFields on RelationType {
2299
2315
  _id
2300
2316
  apiMessage
2317
+ chatId
2301
2318
  createdAt
2302
2319
  lastUpdateBy
2303
2320
  marketId