@timardex/cluemart-server-shared 1.0.301 → 1.0.303

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.cjs CHANGED
@@ -31,7 +31,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  ACTIVE_NOT_DELETED_FILTER: () => ACTIVE_NOT_DELETED_FILTER,
34
- AFFILIATE_REWARDS: () => AFFILIATE_REWARDS,
35
34
  APP_SETTINGS_ID: () => APP_SETTINGS_ID,
36
35
  AdModel: () => AdModel,
37
36
  AffiliateModel: () => AffiliateModel,
@@ -67,7 +66,6 @@ __export(index_exports, {
67
66
  baseResourceFields: () => baseResourceFields,
68
67
  connectToDatabase: () => connectToDatabase,
69
68
  convertObjectIdsToStrings: () => convertObjectIdsToStrings,
70
- createAffiliateReward: () => createAffiliateReward,
71
69
  dateTimeSchema: () => dateTimeSchema2,
72
70
  didRemoveAnyEventDates: () => didRemoveAnyEventDates,
73
71
  express: () => import_express.default,
@@ -7496,6 +7494,38 @@ var REDEEM_AFFILIATE_REWARD_MUTATION = gql`
7496
7494
  }
7497
7495
  ${AFFILIATE_FIELDS_FRAGMENT}
7498
7496
  `;
7497
+ var ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION = gql`
7498
+ mutation assignAffiliateResourceReward(
7499
+ $affiliateId: ID!
7500
+ $resourceId: ID!
7501
+ $resourceType: ResourceTypeEnum!
7502
+ $rewardType: AffiliateRewardEnumType!
7503
+ ) {
7504
+ assignAffiliateResourceReward(
7505
+ affiliateId: $affiliateId
7506
+ resourceId: $resourceId
7507
+ resourceType: $resourceType
7508
+ rewardType: $rewardType
7509
+ ) {
7510
+ ...AffiliateFields
7511
+ }
7512
+ }
7513
+ ${AFFILIATE_FIELDS_FRAGMENT}
7514
+ `;
7515
+ var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = gql`
7516
+ mutation assignAffiliateBonusReward(
7517
+ $affiliateId: ID!
7518
+ $rewardType: AffiliateRewardEnumType!
7519
+ ) {
7520
+ assignAffiliateBonusReward(
7521
+ affiliateId: $affiliateId
7522
+ rewardType: $rewardType
7523
+ ) {
7524
+ ...AffiliateFields
7525
+ }
7526
+ }
7527
+ ${AFFILIATE_FIELDS_FRAGMENT}
7528
+ `;
7499
7529
  var PKG = "@timardex/cluemart-shared";
7500
7530
  var IMAGE_EXTENSION = ".webp";
7501
7531
  var posterIds = [
@@ -8298,12 +8328,60 @@ schema4.index({ createdAt: -1, userId: 1 });
8298
8328
  var NotificationModel = import_mongoose8.default.models.Notification || import_mongoose8.default.model("Notification", schema4);
8299
8329
 
8300
8330
  // node_modules/@timardex/cluemart-shared/dist/chunk-X3OLM35T.mjs
8331
+ var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
8332
+ EnumInviteStatus22["ACCEPTED"] = "Accepted";
8333
+ EnumInviteStatus22["COMPLETED"] = "Completed";
8334
+ EnumInviteStatus22["EXPIRED"] = "Expired";
8335
+ EnumInviteStatus22["NO_STATUS"] = "No_Status";
8336
+ EnumInviteStatus22["PENDING"] = "Pending";
8337
+ EnumInviteStatus22["REJECTED"] = "Rejected";
8338
+ EnumInviteStatus22["UNAVAILABLE"] = "Unavailable";
8339
+ return EnumInviteStatus22;
8340
+ })(EnumInviteStatus2 || {});
8341
+ var EnumPaymentMethod2 = /* @__PURE__ */ ((EnumPaymentMethod22) => {
8342
+ EnumPaymentMethod22["CASH"] = "cash";
8343
+ EnumPaymentMethod22["EFTPOS"] = "eftpos";
8344
+ EnumPaymentMethod22["BANK_TRANSFER"] = "bank_transfer";
8345
+ EnumPaymentMethod22["PAYPAL"] = "paypal";
8346
+ EnumPaymentMethod22["STRIPE"] = "stripe";
8347
+ return EnumPaymentMethod22;
8348
+ })(EnumPaymentMethod2 || {});
8301
8349
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
8302
8350
  EnumOSPlatform22["ANDROID"] = "android";
8303
8351
  EnumOSPlatform22["IOS"] = "ios";
8304
8352
  EnumOSPlatform22["WEB"] = "web";
8305
8353
  return EnumOSPlatform22;
8306
8354
  })(EnumOSPlatform2 || {});
8355
+ var EnumRegions2 = /* @__PURE__ */ ((EnumRegions22) => {
8356
+ EnumRegions22["All"] = "All Regions";
8357
+ EnumRegions22["Auckland"] = "Auckland";
8358
+ EnumRegions22["BayOfPlentyGisborne"] = "Bay of Plenty & Gisborne";
8359
+ EnumRegions22["CanterburyWestCoast"] = "Canterbury & West Coast";
8360
+ EnumRegions22["HawkesBay"] = "Hawke's Bay";
8361
+ EnumRegions22["ManawatuWanganui"] = "Manawatu-Wanganui";
8362
+ EnumRegions22["MarlboroughNelsonTasman"] = "Marlborough & Nelson & Tasman";
8363
+ EnumRegions22["Northland"] = "Northland";
8364
+ EnumRegions22["Otago"] = "Otago";
8365
+ EnumRegions22["Southland"] = "Southland";
8366
+ EnumRegions22["Taranaki"] = "Taranaki";
8367
+ EnumRegions22["Waikato"] = "Waikato";
8368
+ EnumRegions22["Wellington"] = "Wellington";
8369
+ return EnumRegions22;
8370
+ })(EnumRegions2 || {});
8371
+ var EnumEventDateStatus2 = /* @__PURE__ */ ((EnumEventDateStatus22) => {
8372
+ EnumEventDateStatus22["STARTING_SOON"] = "Starting_Soon";
8373
+ EnumEventDateStatus22["STARTED"] = "Started";
8374
+ EnumEventDateStatus22["TODAY"] = "Today";
8375
+ EnumEventDateStatus22["TOMORROW"] = "Tomorrow";
8376
+ EnumEventDateStatus22["THIS_WEEK"] = "This_Week";
8377
+ EnumEventDateStatus22["NEXT_WEEK"] = "Next_Week";
8378
+ EnumEventDateStatus22["UPCOMING"] = "Upcoming";
8379
+ EnumEventDateStatus22["ENDED"] = "Ended";
8380
+ EnumEventDateStatus22["RE_SCHEDULED"] = "Rescheduled";
8381
+ EnumEventDateStatus22["CANCELED"] = "Canceled";
8382
+ EnumEventDateStatus22["INVALID"] = "Invalid";
8383
+ return EnumEventDateStatus22;
8384
+ })(EnumEventDateStatus2 || {});
8307
8385
 
8308
8386
  // src/mongoose/PushToken.ts
8309
8387
  var import_mongoose9 = __toESM(require("mongoose"));
@@ -9279,183 +9357,1346 @@ async function activeAffiliateCodeExists(affiliateCode) {
9279
9357
  return existing !== null;
9280
9358
  }
9281
9359
 
9282
- // src/service/promoCode/normalizePromoCode.ts
9283
- function normalizePromoCode(decoratedPromoCode) {
9284
- const normalized = decoratedPromoCode?.trim().toUpperCase();
9285
- return normalized || null;
9286
- }
9287
-
9288
- // src/service/saveNotificationsInDb.ts
9289
- async function saveNotificationsInDb(payload) {
9290
- const { data, message, title, type, userIds } = payload;
9291
- console.log("NOTIFICATION DATA", JSON.stringify(payload, null, 2));
9292
- try {
9293
- const notifications = userIds.map((userId) => ({
9294
- data,
9295
- isRead: false,
9296
- message,
9297
- title,
9298
- type,
9299
- userId
9300
- }));
9301
- await NotificationModel.insertMany(notifications);
9302
- console.log(
9303
- `Created ${notifications.length} notifications for ${userIds.length} users`
9304
- );
9305
- return [...new Set(userIds)];
9306
- } catch (error) {
9307
- console.error("Failed to create notifications:", error);
9308
- return [];
9309
- }
9310
- }
9311
-
9312
- // src/service/sendPushNotifications.ts
9313
- var import_expo_server_sdk = require("expo-server-sdk");
9314
- var expo = new import_expo_server_sdk.Expo();
9315
- function extractTokensFromMessage(message) {
9316
- return Array.isArray(message.to) ? message.to : [message.to];
9317
- }
9318
- function createPushMessages({
9319
- tokens,
9320
- message,
9321
- title,
9322
- data
9323
- }) {
9324
- const messages = [];
9325
- const invalidTokens = [];
9326
- for (const token of tokens) {
9327
- if (!import_expo_server_sdk.Expo.isExpoPushToken(token)) {
9328
- invalidTokens.push(token);
9329
- continue;
9330
- }
9331
- messages.push({
9332
- body: message,
9333
- data: { ...data },
9334
- sound: "tui.wav",
9335
- title,
9336
- to: token
9337
- });
9338
- }
9339
- return { invalidTokens, messages };
9340
- }
9341
- function processChunkResults(tickets, chunk) {
9342
- let successCount = 0;
9343
- const failedTokens = [];
9344
- for (const [ticketIndex, ticket] of tickets.entries()) {
9345
- if (ticket.status === "error") {
9346
- const message = chunk[ticketIndex];
9347
- if (message) {
9348
- const tokens = extractTokensFromMessage(message);
9349
- if (ticket.details?.error === "DeviceNotRegistered") {
9350
- failedTokens.push(...tokens);
9351
- }
9352
- console.log("Push notification error", {
9353
- error: ticket.details?.error,
9354
- tokens
9355
- });
9356
- }
9357
- } else {
9358
- successCount++;
9359
- }
9360
- }
9361
- return { failedTokens, successCount };
9362
- }
9363
- async function sendChunk(chunk, chunkIndex) {
9364
- try {
9365
- const tickets = await expo.sendPushNotificationsAsync(chunk);
9366
- const { successCount, failedTokens } = processChunkResults(tickets, chunk);
9367
- console.log(
9368
- `Chunk ${chunkIndex + 1}: Sent ${successCount}/${chunk.length} notifications successfully`
9369
- );
9370
- return { failedTokens, successCount };
9371
- } catch (error) {
9372
- console.log("Error sending Expo push notification chunk", {
9373
- chunkIndex,
9374
- chunkSize: chunk.length,
9375
- error: error instanceof Error ? error.message : String(error)
9376
- });
9377
- return { failedTokens: [], successCount: 0 };
9378
- }
9379
- }
9380
- async function sendPushNotifications({
9381
- data,
9382
- message,
9383
- title,
9384
- userIds
9385
- }) {
9386
- const pushTokens = await PushTokenModel.find({ userId: { $in: userIds } });
9387
- const expoTokens = pushTokens.map((token) => token.token);
9388
- if (!data) return;
9389
- const { messages, invalidTokens } = createPushMessages({
9390
- data,
9391
- message,
9392
- title,
9393
- tokens: expoTokens
9394
- });
9395
- if (invalidTokens.length > 0) {
9396
- console.log(`Found ${invalidTokens.length} invalid push tokens`);
9397
- }
9398
- if (messages.length === 0) {
9399
- console.log("No valid messages to send after filtering tokens");
9400
- return;
9401
- }
9402
- const chunks = expo.chunkPushNotifications(messages);
9403
- let totalSuccessCount = 0;
9404
- const allFailedTokens = [];
9405
- for (const [chunkIndex, chunk] of chunks.entries()) {
9406
- const { successCount, failedTokens } = await sendChunk(
9407
- chunk,
9408
- chunkIndex + 1
9409
- );
9410
- totalSuccessCount += successCount;
9411
- allFailedTokens.push(...failedTokens);
9412
- }
9413
- console.log(
9414
- `Sent push notification to ${totalSuccessCount}/${messages.length} tokens across ${chunks.length} chunks`
9415
- );
9416
- if (allFailedTokens.length > 0) {
9417
- console.log(`Found ${allFailedTokens.length} failed push tokens`);
9418
- }
9419
- }
9360
+ // node_modules/@timardex/cluemart-shared/dist/chunk-SWWVD4J5.mjs
9361
+ var import_dayjs3 = __toESM(require("dayjs"), 1);
9362
+ var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
9363
+ var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"), 1);
9364
+ var import_timezone2 = __toESM(require("dayjs/plugin/timezone.js"), 1);
9365
+ var import_utc2 = __toESM(require("dayjs/plugin/utc.js"), 1);
9366
+ var mapArrayToOptions2 = (items) => items.map((item) => ({
9367
+ label: item,
9368
+ value: item
9369
+ }));
9370
+ import_dayjs3.default.extend(import_customParseFormat2.default);
9371
+ import_dayjs3.default.extend(import_utc2.default);
9372
+ import_dayjs3.default.extend(import_timezone2.default);
9373
+ import_dayjs3.default.extend(import_isSameOrAfter2.default);
9374
+ var futureTimePeriods2 = mapArrayToOptions2(
9375
+ Object.values(EnumEventDateStatus2)
9376
+ ).filter(
9377
+ (period) => period.value !== "Starting_Soon" && period.value !== "Canceled" && period.value !== "Rescheduled" && period.value !== "Started" && period.value !== "Ended" && period.value !== "Invalid"
9378
+ /* INVALID */
9379
+ ).map((period) => ({
9380
+ label: period.value.replaceAll("_", " "),
9381
+ value: period.value
9382
+ }));
9383
+ var RELATION_SHARE_INVITATION2 = "invitation";
9384
+ var RELATION_SHARE_APPLICATION2 = "application";
9385
+ var SHARE_SITE_URL2 = "https://cluemart.co.nz";
9386
+ var SHARE_CALENDAR_ICON2 = "\u{1F4C5}";
9387
+ var SHARE_MARKET_DATES_SECTION_HEADING2 = `${SHARE_CALENDAR_ICON2} Market dates:`;
9388
+ var SHARE_CHECKMARK_ICON2 = "\u2705";
9389
+ var SHARE_REQUIREMENTS_SECTION_HEADING2 = `${SHARE_CHECKMARK_ICON2} Requirements:`;
9390
+ var SHARE_INFO_ICON2 = "\u2139\uFE0F";
9391
+ var SHARE_TAGS_SECTION_HEADING2 = `${SHARE_INFO_ICON2} Tags:`;
9392
+ var SHARE_COMPLIANCE_PREFIX2 = `${SHARE_CHECKMARK_ICON2} Compliance:`;
9393
+ var SHARE_CATEGORY_ICON2 = "\u{1F3F7}\uFE0F";
9394
+ var SHARE_CATEGORIES_SECTION_HEADING2 = `${SHARE_CATEGORY_ICON2} Categories:`;
9395
+ var SHARE_RULER_ICON2 = "\u{1F4CF}";
9396
+ var SHARE_STALL_SIZE_PREFIX2 = `${SHARE_RULER_ICON2} Stall size:`;
9397
+ var SHARE_DOLLAR_ICON2 = "$";
9398
+ var SHARE_PRICE_RANGE_PREFIX2 = `${SHARE_DOLLAR_ICON2} Price range:`;
9399
+ var SHARE_CLOCK_ICON2 = "\u23F0";
9400
+ var SHARE_APPLICATION_DEADLINE_PREFIX2 = `${SHARE_CLOCK_ICON2} Application deadline:`;
9401
+ var DEFAULT_SHARE_OG_IMAGE2 = `${SHARE_SITE_URL2}/assets/logo.webp`;
9402
+ var SHARE_RESOURCE_LABEL2 = {
9403
+ [RELATION_SHARE_APPLICATION2]: "Application",
9404
+ [RELATION_SHARE_INVITATION2]: "Invitation",
9405
+ clue_bites: "Clue Bites",
9406
+ market_faces: "Market Faces",
9407
+ play_and_win: "Play & Win",
9408
+ market: "Market",
9409
+ partner: "Partner",
9410
+ stallholder: "Stallholder",
9411
+ affiliate: "Affiliate",
9412
+ school: "School"
9413
+ };
9420
9414
 
9421
- // src/service/affiliate/createAffiliateReward.ts
9422
- var AFFILIATE_REWARDS = {
9423
- [EnumAffiliateRewardType.NEW_EVENT_REGISTRATION]: {
9424
- description: "10 points for new event registration (one-time reward)",
9425
- value: 10
9415
+ // node_modules/@timardex/cluemart-shared/dist/chunk-43SLZVBF.mjs
9416
+ var PROMO_CODE_PREFIX2 = "CM-";
9417
+ var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9418
+ var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
9419
+ var gameScreenIdentifierList2 = [
9420
+ {
9421
+ clue: "Where your actions turn into a timeline.",
9422
+ id: "activities",
9423
+ match: "/profile/activities"
9426
9424
  },
9427
- [EnumAffiliateRewardType.NEW_VENDOR_REGISTRATION]: {
9428
- description: "5 points for new vendor registration (one-time reward)",
9429
- value: 5
9425
+ {
9426
+ clue: "Where conversations happen without speaking.",
9427
+ id: "chat",
9428
+ match: "/profile/chat"
9430
9429
  },
9431
- [EnumAffiliateRewardType.ACTIVE_VENDOR_PRO_SUBSCRIPTION]: {
9432
- description: "3 points for active vendor pro subscription (monthly reward)",
9433
- value: 3
9430
+ {
9431
+ clue: "The place to redefine who you are.",
9432
+ id: "edit-profile",
9433
+ match: "/profile/edit-profile"
9434
9434
  },
9435
- [EnumAffiliateRewardType.ACTIVE_VENDOR_STANDARD_SUBSCRIPTION]: {
9436
- description: "1 point for active vendor standard subscription (monthly reward)",
9437
- value: 1
9435
+ {
9436
+ clue: "A single moment worth showing up for.",
9437
+ id: "single-event",
9438
+ match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END2}`)
9438
9439
  },
9439
- [EnumAffiliateRewardType.ACTIVE_VENDOR_BONUS_REWARD]: {
9440
- description: "5 bonus points for every 10th active vendor (one-time reward)",
9441
- value: 5
9440
+ {
9441
+ clue: "What\u2019s happening around you, right now.",
9442
+ id: "events-near-me",
9443
+ match: "/events/events-near-me"
9442
9444
  },
9443
- [EnumAffiliateRewardType.ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS]: {
9444
- description: "50 points for active event with vendor registrations (one-time reward)",
9445
- value: 50
9446
- }
9447
- };
9448
- function createAffiliateReward(rewardType, createdAt) {
9449
- const reward = AFFILIATE_REWARDS[rewardType];
9450
- return {
9451
- createdAt,
9452
- redeemedAt: null,
9453
- rewardDescription: reward.description,
9445
+ {
9446
+ clue: "Where events appear as pins on a map.",
9447
+ id: "events-map",
9448
+ match: "/events/events-map"
9449
+ },
9450
+ {
9451
+ clue: "A collection of events worth attending.",
9452
+ id: "events",
9453
+ match: "/events"
9454
+ },
9455
+ {
9456
+ clue: "What\u2019s happening in a wider area \u2014 not just nearby.",
9457
+ id: "events-region",
9458
+ match: /^\/events\/region\/[^/]+$/
9459
+ },
9460
+ {
9461
+ clue: "Where fun becomes a challenge.",
9462
+ id: "games",
9463
+ match: "/games"
9464
+ },
9465
+ {
9466
+ clue: "Your starting point for everything.",
9467
+ id: "home",
9468
+ match: "/"
9469
+ },
9470
+ {
9471
+ clue: "Where the app whispers what you shouldn\u2019t miss.",
9472
+ id: "notifications",
9473
+ match: "/notifications"
9474
+ },
9475
+ {
9476
+ clue: "Where you fine-tune your experience.",
9477
+ id: "options",
9478
+ match: "/options"
9479
+ },
9480
+ {
9481
+ clue: "An organisation or creator supporting the community.",
9482
+ id: "single-partner",
9483
+ match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END2}`)
9484
+ },
9485
+ {
9486
+ clue: "Organisations and creators supporting the community.",
9487
+ id: "partners",
9488
+ match: "/partners"
9489
+ },
9490
+ {
9491
+ clue: "A single published post in full view.",
9492
+ id: "single-visitor-post",
9493
+ match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END2}`)
9494
+ },
9495
+ {
9496
+ clue: "Your identity, on display.",
9497
+ id: "profile",
9498
+ match: "/profile"
9499
+ },
9500
+ {
9501
+ clue: "One stallholder offering something valuable.",
9502
+ id: "single-vendor",
9503
+ match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END2}`)
9504
+ },
9505
+ {
9506
+ clue: "Where every stallholder waits under the right category.",
9507
+ id: "vendors",
9508
+ match: "/vendors"
9509
+ },
9510
+ {
9511
+ clue: "Where you browse articles and posts from around the platform.",
9512
+ id: "visitors",
9513
+ match: "/visitors"
9514
+ }
9515
+ ];
9516
+
9517
+ // node_modules/@timardex/cluemart-shared/dist/chunk-MLNJAQVM.mjs
9518
+ var import_dayjs4 = __toESM(require("dayjs"), 1);
9519
+ var statusOptions2 = [
9520
+ ...Object.values(EnumInviteStatus2).map((status) => ({
9521
+ label: status,
9522
+ value: status
9523
+ })).sort((a, b) => a.label.localeCompare(b.label))
9524
+ // Sort the options alphabetically
9525
+ ];
9526
+ var availableRegionTypes2 = Object.values(EnumRegions2);
9527
+ var availableRegionOptions2 = mapArrayToOptions2(availableRegionTypes2);
9528
+ var paymentMethodOptions2 = mapArrayToOptions2(
9529
+ Object.values(EnumPaymentMethod2)
9530
+ );
9531
+ var CM_SCHOOL_PROMO_CODE2 = `${PROMO_CODE_PREFIX2}SCHOOL`;
9532
+ var CM_AFFILIATE_PROMO_CODE2 = `${PROMO_CODE_PREFIX2}AFFILIATE`;
9533
+ var clothingAndFashion2 = [
9534
+ {
9535
+ id: "clothing-fashion",
9536
+ name: "Clothing & Fashion",
9537
+ description: "New, handmade, or upcycled clothing and accessories with a creative twist.",
9538
+ subcategories: [
9539
+ {
9540
+ id: "apparel-babywear",
9541
+ name: "Apparel & Babywear",
9542
+ items: [
9543
+ {
9544
+ id: "apparel",
9545
+ name: "Apparel",
9546
+ description: "Dresses, t-shirts, jumpers, rompers, sets, kidswear."
9547
+ },
9548
+ {
9549
+ id: "baby-toddler-apparel",
9550
+ name: "Baby & Toddler Apparel",
9551
+ description: "Handmade baby clothes, soft shoes, bibs, hats, knitted sets."
9552
+ },
9553
+ {
9554
+ id: "upcycled-fashion",
9555
+ name: "Upcycled Fashion",
9556
+ description: "Reworked garments, patchwork pieces, restyled vintage."
9557
+ },
9558
+ {
9559
+ id: "other-wearable-items",
9560
+ name: "Other wearable items",
9561
+ description: "Unique clothing not listed above."
9562
+ }
9563
+ ]
9564
+ },
9565
+ {
9566
+ id: "fashion-accessories",
9567
+ name: "Fashion Accessories",
9568
+ items: [
9569
+ {
9570
+ id: "accessories",
9571
+ name: "Accessories",
9572
+ description: "Scarves, belts, gloves, hats, headbands, caps."
9573
+ },
9574
+ {
9575
+ id: "shoes",
9576
+ name: "Shoes",
9577
+ description: "Handmade shoes, baby booties, sandals, slippers."
9578
+ },
9579
+ {
9580
+ id: "bags-wallets",
9581
+ name: "Bags & Wallets",
9582
+ description: "Leather bags, fabric purses, wallets, backpacks, totes."
9583
+ },
9584
+ {
9585
+ id: "other-accessories",
9586
+ name: "Other accessories",
9587
+ description: "Brooches, pins, or hybrid functional items."
9588
+ }
9589
+ ]
9590
+ },
9591
+ {
9592
+ id: "jewelry-creative-wearables",
9593
+ name: "Jewelry & Creative Wearables",
9594
+ items: [
9595
+ {
9596
+ id: "jewelry",
9597
+ name: "Jewelry",
9598
+ description: "Necklaces, earrings, bracelets, rings, anklets."
9599
+ },
9600
+ {
9601
+ id: "other-creative-wearables",
9602
+ name: "Other creative wearables",
9603
+ description: "Wearable art, statement pieces, bold handmade designs."
9604
+ }
9605
+ ]
9606
+ },
9607
+ {
9608
+ id: "traditional-cultural-clothing-accessories",
9609
+ name: "Traditional & Cultural Clothing and Accessories",
9610
+ items: [
9611
+ {
9612
+ id: "traditional-clothing-accessories",
9613
+ name: "Traditional Clothing & Accessories ",
9614
+ description: "raditional clothing, jewellery, accessories and footwear from around the world, including both handmade and non-handmade items."
9615
+ },
9616
+ {
9617
+ id: "other-traditional-cultural-items",
9618
+ name: "Other Traditional & Cultural Items",
9619
+ description: "traditional or culturally inspired wearables and decorative cultural pieces such as plates, table linens and similar items."
9620
+ }
9621
+ ]
9622
+ }
9623
+ ]
9624
+ }
9625
+ ];
9626
+ var electronicsAndTechnology2 = [
9627
+ {
9628
+ id: "electronics-technology",
9629
+ name: "Electronics & Technology",
9630
+ description: "New, second-hand, or handmade tech and digital items commonly found at markets.",
9631
+ subcategories: [
9632
+ {
9633
+ id: "mobile-everyday-tech",
9634
+ name: "Mobile & Everyday Tech",
9635
+ items: [
9636
+ {
9637
+ id: "mobile-phone-accessories",
9638
+ name: "Mobile & Phone Accessories",
9639
+ description: "Phone cases, holders, screen protectors, charging cables, power banks, grips."
9640
+ },
9641
+ {
9642
+ id: "other-mobile-gadgets",
9643
+ name: "Other mobile gadgets",
9644
+ description: "Stands, styluses, SIM tools, cleaning kits, wallet accessories."
9645
+ }
9646
+ ]
9647
+ },
9648
+ {
9649
+ id: "audio-music-creative-tech",
9650
+ name: "Audio, Music & Creative Tech",
9651
+ items: [
9652
+ {
9653
+ id: "audio-music-tech",
9654
+ name: "Audio & Music Tech",
9655
+ description: "Portable speakers, headphones, mini radios, Bluetooth adapters, sound accessories."
9656
+ },
9657
+ {
9658
+ id: "instruments-music-gear",
9659
+ name: "Instruments & Music Gear",
9660
+ description: "Small electronic instruments, DIY synth kits, drum pads, loop machines."
9661
+ },
9662
+ {
9663
+ id: "recording-creative-devices",
9664
+ name: "Recording & Creative Devices",
9665
+ description: "USB microphones, podcast tools, voice recorders, mobile lighting, content tools."
9666
+ },
9667
+ {
9668
+ id: "other-audio-music-items",
9669
+ name: "Other audio or music-related items",
9670
+ description: "Musical gadgets or creative gear not listed above."
9671
+ }
9672
+ ]
9673
+ },
9674
+ {
9675
+ id: "diy-gadgets-secondhand-finds",
9676
+ name: "DIY, Gadgets & Second-Hand Finds",
9677
+ items: [
9678
+ {
9679
+ id: "diy-electronics-tools",
9680
+ name: "DIY Electronics & Tools",
9681
+ description: "LED lights, USB gadgets, circuit boards, repair kits, tech-themed toys, novelty items."
9682
+ },
9683
+ {
9684
+ id: "other-tech-finds",
9685
+ name: "Other Tech Finds",
9686
+ description: "Used electronics, smart gadgets, wearable tech, calculators, tablet stands, e-waste upcycles."
9687
+ },
9688
+ {
9689
+ id: "other-technology-innovation-items",
9690
+ name: "Other technology or innovation-related items",
9691
+ description: "Anything not covered but clearly tech-driven."
9692
+ }
9693
+ ]
9694
+ }
9695
+ ]
9696
+ }
9697
+ ];
9698
+ var foodAndBeverages2 = [
9699
+ {
9700
+ id: "food-beverages",
9701
+ name: "Food & Beverages",
9702
+ description: "Fresh produce, drinks, sweet and savoury street food, ready-to-eat meals, and packaged goods.",
9703
+ subcategories: [
9704
+ {
9705
+ id: "fresh-food-groceries",
9706
+ name: "Fresh Food & Groceries",
9707
+ items: [
9708
+ {
9709
+ id: "fruits-vegetables",
9710
+ name: "Fruits & Vegetables",
9711
+ description: "Fresh seasonal fruit, organic vegetables, specialty produce, berries, tropical fruit, heritage varieties."
9712
+ },
9713
+ {
9714
+ id: "meat-seafood",
9715
+ name: "Meat & Seafood",
9716
+ description: "Butcher cuts, fresh fish, smoked meats, sausages, seafood platters, artisanal jerky."
9717
+ },
9718
+ {
9719
+ id: "dairy-eggs",
9720
+ name: "Dairy & Eggs",
9721
+ description: "Farm eggs, handmade cheeses, yoghurt, fresh milk, goat\u2019s milk products."
9722
+ },
9723
+ {
9724
+ id: "bakery-pastries",
9725
+ name: "Bakery & Pastries",
9726
+ description: "Freshly baked bread, sourdough, bagels, croissants, focaccia, traditional baked goods."
9727
+ },
9728
+ {
9729
+ id: "spices-condiments",
9730
+ name: "Spices & Condiments",
9731
+ description: "Dried herbs, spice blends, specialty salts, hot sauces, infused oils, chutneys."
9732
+ },
9733
+ {
9734
+ id: "packaged-specialty-foods",
9735
+ name: "Packaged & Specialty Foods",
9736
+ description: "Honey, jams, preserves, pickles, nut butters, sauces, pre-packaged snacks."
9737
+ },
9738
+ {
9739
+ id: "other-fresh-food-items",
9740
+ name: "Other fresh food items",
9741
+ description: "Items that don\u2019t fit above, e.g. fermented foods, plant-based substitutes."
9742
+ }
9743
+ ]
9744
+ },
9745
+ {
9746
+ id: "beverages-specialty-drinks",
9747
+ name: "Beverages & Specialty Drinks",
9748
+ items: [
9749
+ {
9750
+ id: "fresh-juices-smoothies",
9751
+ name: "Fresh Juices & Smoothies",
9752
+ description: "Cold-pressed juices, detox blends, fruit smoothies, tropical mixes."
9753
+ },
9754
+ {
9755
+ id: "coffee-teas",
9756
+ name: "Coffee & Teas",
9757
+ description: "Espresso, pour-over coffee, herbal teas, matcha, bubble tea, locally blended tea."
9758
+ },
9759
+ {
9760
+ id: "dairy-plant-based-drinks",
9761
+ name: "Dairy & Plant-Based Drinks",
9762
+ description: "Milkshakes, lassis, almond/oat milk drinks, coconut water."
9763
+ },
9764
+ {
9765
+ id: "alcoholic-beverages",
9766
+ name: "Alcoholic Beverages",
9767
+ description: "Local wines, craft beer, mead, cider, infused spirits, cocktail kits."
9768
+ },
9769
+ {
9770
+ id: "other-beverages",
9771
+ name: "Other beverages",
9772
+ description: "Kombucha, kefir, energy drinks, non-alcoholic wines or beers."
9773
+ }
9774
+ ]
9775
+ },
9776
+ {
9777
+ id: "savoury-prepared-foods-street-food",
9778
+ name: "Savoury Prepared Foods & Street Food",
9779
+ items: [
9780
+ {
9781
+ id: "local-specialties",
9782
+ name: "Local Specialties",
9783
+ description: "Meat pies, hangi, seafood chowder, fry bread, traditional NZ dishes."
9784
+ },
9785
+ {
9786
+ id: "asian-cuisine",
9787
+ name: "Asian Cuisine",
9788
+ description: "Sushi, bao buns, dumplings, ramen, satay, spring rolls, fried rice."
9789
+ },
9790
+ {
9791
+ id: "mediterranean-cuisine",
9792
+ name: "Mediterranean Cuisine",
9793
+ description: "Falafel, hummus wraps, souvlaki, Greek salad, dolma."
9794
+ },
9795
+ {
9796
+ id: "italian-delights",
9797
+ name: "Italian Delights",
9798
+ description: "Pizza, calzone, focaccia, fresh pasta, arancini."
9799
+ },
9800
+ {
9801
+ id: "bbq-grilled-foods",
9802
+ name: "BBQ & Grilled Foods",
9803
+ description: "Kebabs, grilled chicken, ribs, burgers, sausages."
9804
+ },
9805
+ {
9806
+ id: "savoury-crepes-pancakes",
9807
+ name: "Savoury Crepes & Pancakes",
9808
+ description: "Filled savoury crepes, mini savoury pancakes."
9809
+ },
9810
+ {
9811
+ id: "savoury-baked-goods-pastries",
9812
+ name: "Savoury Baked Goods & Pastries",
9813
+ description: "Quiches, savoury muffins, filled savoury pastries, empanadas."
9814
+ },
9815
+ {
9816
+ id: "vegan-vegetarian-dishes",
9817
+ name: "Vegan & Vegetarian Dishes",
9818
+ description: "Buddha bowls, plant-based burgers, salads, vegan sushi."
9819
+ },
9820
+ {
9821
+ id: "other-savoury-foods",
9822
+ name: "Other Savoury Foods",
9823
+ description: "Fusion dishes, mixed platters, savoury meal kits."
9824
+ }
9825
+ ]
9826
+ },
9827
+ {
9828
+ id: "sweet-prepared-foods",
9829
+ name: "Sweet Prepared Foods",
9830
+ items: [
9831
+ {
9832
+ id: "sweet-crepes-pancakes-fried-treats",
9833
+ name: "Sweet Crepes, Pancakes & Fried Treats",
9834
+ description: "Crepes, waffles, mini pancakes, muffins, doughnuts."
9835
+ },
9836
+ {
9837
+ id: "sweet-baked-goods-desserts",
9838
+ name: "Sweet Baked Goods & Desserts",
9839
+ description: "Cakes, pastries, slices, trifles, layered desserts."
9840
+ },
9841
+ {
9842
+ id: "fruit-based-snacks",
9843
+ name: "Fruit-Based Snacks",
9844
+ description: "Fruit skewers, dried fruit packs, chocolate-dipped fruit."
9845
+ },
9846
+ {
9847
+ id: "candy-confectionery",
9848
+ name: "Candy & Confectionery",
9849
+ description: "Fudge, handmade candies, toffee, nougat, brittle."
9850
+ },
9851
+ {
9852
+ id: "other-sweet-foods",
9853
+ name: "Other Sweet Foods",
9854
+ description: "Fusion desserts, sweet platters, sweet meal kits."
9855
+ }
9856
+ ]
9857
+ }
9858
+ ]
9859
+ }
9860
+ ];
9861
+ var handmadeAndLocalProducts2 = [
9862
+ {
9863
+ id: "handmade-local-products",
9864
+ name: "Handmade & Local Products",
9865
+ description: "Unique, handmade, or locally produced artisan goods.",
9866
+ subcategories: [
9867
+ {
9868
+ id: "home-living",
9869
+ name: "Home & Living",
9870
+ items: [
9871
+ {
9872
+ id: "ceramics-pottery",
9873
+ name: "Ceramics & Pottery",
9874
+ description: "Handmade mugs, vases, bowls, decorative plates, plant pots."
9875
+ },
9876
+ {
9877
+ id: "candles-home-scents",
9878
+ name: "Candles & Home Scents",
9879
+ description: "Soy candles, beeswax candles, wax melts, incense sticks, room sprays and herbal sachets."
9880
+ },
9881
+ {
9882
+ id: "botanical-crafts",
9883
+ name: "Botanical Crafts",
9884
+ description: "Dried-flower d\xE9cor and pressed-flower crafts"
9885
+ },
9886
+ {
9887
+ id: "textiles-embroidery",
9888
+ name: "Textiles & Embroidery",
9889
+ description: "Handsewn items, embroidered napkins, home linens, aprons, fabric gift wraps, handmade fabric bags, quilted goods, personalized textile gifts."
9890
+ },
9891
+ {
9892
+ id: "woodcraft-metalcraft",
9893
+ name: "Woodcraft & Metalcraft",
9894
+ description: "Wooden boards, handmade frames, sculptures, metal signs, furniture."
9895
+ },
9896
+ {
9897
+ id: "handmade-soaps-natural-body-goods",
9898
+ name: "Handmade Soaps & Natural Body Goods",
9899
+ description: "Handmade soaps, balms, oils, bath items"
9900
+ },
9901
+ {
9902
+ id: "seasonal-festive-crafts",
9903
+ name: "Seasonal & Festive Crafts",
9904
+ description: "Christmas, Easter and seasonal handmade decor"
9905
+ },
9906
+ {
9907
+ id: "other-home-living-products",
9908
+ name: "Other home & living products",
9909
+ description: "Items that don't fit above but serve home-related purposes."
9910
+ }
9911
+ ]
9912
+ },
9913
+ {
9914
+ id: "art-personal-expression",
9915
+ name: "Art & Personal Expression",
9916
+ items: [
9917
+ {
9918
+ id: "paintings-illustrations",
9919
+ name: "Paintings & Illustrations",
9920
+ description: "Paintings, canvas art, hand-drawn illustrations, digital prints, graphic art and calligraphy pieces."
9921
+ },
9922
+ {
9923
+ id: "sculptures-carvings",
9924
+ name: "Sculptures & Carvings ",
9925
+ description: "Sculptures made from wood, stone, metal, clay or resin, carved decorative pieces and artistic 3D works."
9926
+ },
9927
+ {
9928
+ id: "creative-handmade-alternative-art",
9929
+ name: "Creative Handmade & Alternative Art",
9930
+ description: "Handmade textile d\xE9cor, fabric ornaments, mixed-media art, creative craft pieces and modern handmade artworks."
9931
+ },
9932
+ {
9933
+ id: "handmade-mini-figures-decor",
9934
+ name: "Handmade Mini Figures & D\xE9cor",
9935
+ description: "Small handmade figures, tiny houses and crafted mini decorative items."
9936
+ },
9937
+ {
9938
+ id: "other-artistic-expressive-products",
9939
+ name: "Other Artistic or Expressive Products",
9940
+ description: "Custom artworks, specialty handmade d\xE9cor, unique crafts."
9941
+ }
9942
+ ]
9943
+ },
9944
+ {
9945
+ id: "handmade-jewellery-accessories-cultural-crafts",
9946
+ name: "Handmade Jewellery, Accessories & Cultural Crafts",
9947
+ items: [
9948
+ {
9949
+ id: "jewellery-handmade-items-nz-traditional-materials",
9950
+ name: "Jewellery & Handmade Items from NZ Traditional Materials",
9951
+ description: "Handmade jewellery and decorative or functional items crafted from pounamu, bone, wood and other traditional New Zealand materials."
9952
+ },
9953
+ {
9954
+ id: "maori-pasifika-cultural-crafts-clothing",
9955
+ name: "M\u0101ori & Pasifika Cultural Crafts and Clothing",
9956
+ description: "Culturally inspired handmade items, accessories and garments featuring M\u0101ori or Pasifika motifs, traditional patterns and regional craftsmanship."
9957
+ },
9958
+ {
9959
+ id: "traditional-handmade-clothing-jewellery-crafts-global-cultures",
9960
+ name: "Traditional Handmade Clothing, Jewellery & Crafts from Global Cultures",
9961
+ description: "Handcrafted clothing, jewellery and cultural items from diverse traditions \u2014 including Asian, African, European, Middle Eastern, Indian, Chinese, Japanese, Pacific, and other culturally significant handmade pieces."
9962
+ },
9963
+ {
9964
+ id: "other-handmade-cultural-items",
9965
+ name: "Other Handmade Cultural Items",
9966
+ description: "Unique or culturally inspired handmade pieces not specifically covered in the categories above."
9967
+ }
9968
+ ]
9969
+ },
9970
+ {
9971
+ id: "gift-ideas-accessories",
9972
+ name: "Gift Ideas & Accessories",
9973
+ items: [
9974
+ {
9975
+ id: "handmade-pens-keychains-fridge-magnets",
9976
+ name: "Handmade Pens, Keychains and Fridge Magnets",
9977
+ description: null
9978
+ },
9979
+ {
9980
+ id: "gift-packaging-wrapping-accessories",
9981
+ name: "Gift Packaging & Wrapping Accessories",
9982
+ description: null
9983
+ },
9984
+ {
9985
+ id: "handmade-crochet-knitting-fibre-crafts",
9986
+ name: "Handmade Crochet, Knitting & Fibre Crafts",
9987
+ description: "Handmade crochet and knitted items, fabric-based crafts, small decorative pieces, creative fibre artworks and unique handcrafted accessories."
9988
+ },
9989
+ {
9990
+ id: "handmade-toys-mini-play-items",
9991
+ name: "Handmade Toys & Mini Play Items",
9992
+ description: "small handmade toys, soft toys, wooden miniatures, crochet or felt play pieces"
9993
+ },
9994
+ {
9995
+ id: "other-small-handmade-gifts-accessories",
9996
+ name: "Other small handmade gifts or accessories",
9997
+ description: "Compact creative items made to surprise or delight."
9998
+ }
9999
+ ]
10000
+ }
10001
+ ]
10002
+ }
10003
+ ];
10004
+ var healthAndWellness2 = [
10005
+ {
10006
+ id: "health-wellness",
10007
+ name: "Health & Wellness",
10008
+ description: "Natural products and services that promote wellbeing, body care, and holistic health.",
10009
+ subcategories: [
10010
+ {
10011
+ id: "body-skincare",
10012
+ name: "Body & Skincare",
10013
+ items: [
10014
+ {
10015
+ id: "skincare-body-products",
10016
+ name: "Skincare & Body Products",
10017
+ description: "Soaps, creams, lip balms, bath salts, bath bombs, body oils, natural deodorants."
10018
+ },
10019
+ {
10020
+ id: "other-body-care-items",
10021
+ name: "Other body care items",
10022
+ description: "Additional handmade or eco-conscious personal care goods."
10023
+ }
10024
+ ]
10025
+ },
10026
+ {
10027
+ id: "aromatherapy-herbal-wellness",
10028
+ name: "Aromatherapy & Herbal Wellness",
10029
+ items: [
10030
+ {
10031
+ id: "aromatherapy-herbal-remedies",
10032
+ name: "Aromatherapy & Herbal Remedies",
10033
+ description: "Essential oils, herbal balms, massage oils, salves, natural teas, rollers."
10034
+ },
10035
+ {
10036
+ id: "other-herbal-aroma-products",
10037
+ name: "Other herbal or aroma-based products",
10038
+ description: "Wellness blends, herb sachets, custom infusions."
10039
+ }
10040
+ ]
10041
+ },
10042
+ {
10043
+ id: "wellness-tools-accessories",
10044
+ name: "Wellness Tools & Accessories",
10045
+ items: [
10046
+ {
10047
+ id: "wellness-accessories",
10048
+ name: "Wellness Accessories",
10049
+ description: "Yoga mats, meditation cushions, eye pillows, incense, smudging sticks, eco water bottles, wellness journals."
10050
+ },
10051
+ {
10052
+ id: "spiritual-tools-crystals",
10053
+ name: "Spiritual Tools & Crystals",
10054
+ description: "Healing crystals, gemstone bracelets, pendulums, sprays, spiritual kits, altar decor."
10055
+ },
10056
+ {
10057
+ id: "other-wellness-spiritual-items",
10058
+ name: "Other wellness or spiritual items",
10059
+ description: "Items that aid relaxation, focus, or inner work."
10060
+ }
10061
+ ]
10062
+ }
10063
+ ]
10064
+ }
10065
+ ];
10066
+ var homeGardenHousehold2 = [
10067
+ {
10068
+ id: "home-garden-household-goods",
10069
+ name: "Home, Garden & Household Goods",
10070
+ description: "Functional, decorative, and eco-conscious products designed for everyday use indoors and outdoors.",
10071
+ subcategories: [
10072
+ {
10073
+ id: "home-decor-living",
10074
+ name: "Home Decor & Living",
10075
+ items: [
10076
+ {
10077
+ id: "home-decor",
10078
+ name: "Home Decor",
10079
+ description: "Cushions, wall art, table runners, vases, trays, mirrors, handmade centerpieces."
10080
+ },
10081
+ {
10082
+ id: "kitchenware-dining",
10083
+ name: "Kitchenware & Dining",
10084
+ description: "Mugs, bowls, cutting boards, utensils, jars, coasters, kitchen textiles."
10085
+ },
10086
+ {
10087
+ id: "mini-figures-decor",
10088
+ name: "Mini Figures & D\xE9cor",
10089
+ description: "handmade or non-handmade small figures, tiny houses and miniature decorative items."
10090
+ },
10091
+ {
10092
+ id: "other-indoor-home-items",
10093
+ name: "Other indoor home items",
10094
+ description: "Any decorative or practical household items not listed above."
10095
+ }
10096
+ ]
10097
+ },
10098
+ {
10099
+ id: "cleaning-eco-essentials",
10100
+ name: "Cleaning & Eco Essentials",
10101
+ items: [
10102
+ {
10103
+ id: "cleaning-eco-supplies",
10104
+ name: "Cleaning & Eco Supplies",
10105
+ description: "Beeswax wraps, reusable cloths, brushes, natural soaps, detergent bars, eco sponges."
10106
+ },
10107
+ {
10108
+ id: "other-eco-cleaning-items",
10109
+ name: "Other eco or cleaning items",
10110
+ description: "Environmentally friendly goods not listed above."
10111
+ }
10112
+ ]
10113
+ },
10114
+ {
10115
+ id: "garden-outdoor-living",
10116
+ name: "Garden & Outdoor Living",
10117
+ items: [
10118
+ {
10119
+ id: "plants-botanical-decor",
10120
+ name: "Plants & Botanical Decor",
10121
+ description: "Potted herbs, succulents, dried flowers, terrariums, plant-based ornaments."
10122
+ },
10123
+ {
10124
+ id: "fresh-flowers-botanical-bouquets",
10125
+ name: "Fresh Flowers & Botanical Bouquets",
10126
+ description: "Cut flowers, seasonal bouquets, simple floral arrangements, native flower selections, and other fresh botanical items."
10127
+ },
10128
+ {
10129
+ id: "natural-decor-nature-inspired-elements",
10130
+ name: "Natural Decor & Nature-Inspired Elements",
10131
+ description: "Seashell d\xE9cor, driftwood pieces, sand ornaments, natural wood accents, stone or mineral decorations, and other nature-based decorative items."
10132
+ },
10133
+ {
10134
+ id: "garden-tools-outdoor-items",
10135
+ name: "Garden Tools & Outdoor Items",
10136
+ description: "Plant markers, garden signs, stakes, small tools, wind chimes, gifts."
10137
+ },
10138
+ {
10139
+ id: "other-outdoor-garden-products",
10140
+ name: "Other outdoor or garden products",
10141
+ description: "Functional or decorative items for outside use."
10142
+ }
10143
+ ]
10144
+ }
10145
+ ]
10146
+ }
10147
+ ];
10148
+ var petProductsAndAnimalGoods2 = [
10149
+ {
10150
+ id: "pet-products-animal-goods",
10151
+ name: "Pet Products & Animal Goods",
10152
+ description: "Items for pets, pet lovers, or animal-themed market stalls.",
10153
+ subcategories: [
10154
+ {
10155
+ id: "products-for-pets",
10156
+ name: "Products for Pets",
10157
+ items: [
10158
+ {
10159
+ id: "pet-food-treats",
10160
+ name: "Pet Food & Treats",
10161
+ description: "Homemade dog biscuits, cat snacks, natural chews, pet-safe cakes, training treats."
10162
+ },
10163
+ {
10164
+ id: "apparel-toys-accessories",
10165
+ name: "Apparel, Toys & Accessories",
10166
+ description: "Leashes, collars, harnesses, toys, grooming tools, beds, travel gear, jumpers, bandanas."
10167
+ },
10168
+ {
10169
+ id: "other-pet-products",
10170
+ name: "Other pet products",
10171
+ description: "Any pet-related items not listed above."
10172
+ }
10173
+ ]
10174
+ },
10175
+ {
10176
+ id: "small-pets-birds-exotic-animals",
10177
+ name: "Small Pets, Birds & Exotic Animals",
10178
+ items: [
10179
+ {
10180
+ id: "products-small-pets-birds-exotics",
10181
+ name: "Products for Small Pets, Birds & Exotics",
10182
+ description: "Toys, enclosures, perches, feeding bowls, bedding, habitat decor, transport gear, and care items for birds, rabbits, hamsters, reptiles, turtles, aquarium pets, and other exotic species."
10183
+ },
10184
+ {
10185
+ id: "other-small-exotic-animal-items",
10186
+ name: "Other small or exotic animal items",
10187
+ description: "Unusual accessories for non-mainstream pets."
10188
+ }
10189
+ ]
10190
+ },
10191
+ {
10192
+ id: "farm-working-animals",
10193
+ name: "Farm & Working Animals",
10194
+ items: [
10195
+ {
10196
+ id: "goods-for-farm-working-animals",
10197
+ name: "Goods for Farm & Working Animals",
10198
+ description: "Treats, care products, equipment, signage and accessories for chickens, goats, alpacas, horses, and other livestock."
10199
+ },
10200
+ {
10201
+ id: "other-farm-animal-items",
10202
+ name: "Other farm animal-related items",
10203
+ description: "Rural, barnyard, or utility-specific gear not listed above."
10204
+ }
10205
+ ]
10206
+ },
10207
+ {
10208
+ id: "animal-themed-gifts-custom-items",
10209
+ name: "Animal-Themed Gifts & Custom Items",
10210
+ items: [
10211
+ {
10212
+ id: "pet-art-custom-gifts",
10213
+ name: "Pet Art & Custom Gifts",
10214
+ description: "Pet portraits, name tags, personalized bowls, breed-specific items, pet-themed home decor and stationery."
10215
+ },
10216
+ {
10217
+ id: "other-animal-themed-gifts",
10218
+ name: "Other animal-themed gifts",
10219
+ description: "Artistic or sentimental items made for animal lovers."
10220
+ }
10221
+ ]
10222
+ }
10223
+ ]
10224
+ }
10225
+ ];
10226
+ var serviceAndExperience2 = [
10227
+ {
10228
+ id: "services-experiences",
10229
+ name: "Services & Experiences",
10230
+ description: "On-site offerings that provide entertainment, personal care, learning, or interactive activities beyond products.",
10231
+ subcategories: [
10232
+ {
10233
+ id: "personal-care-body-art",
10234
+ name: "Personal Care & Body Art",
10235
+ items: [
10236
+ {
10237
+ id: "nails-handcare",
10238
+ name: "Nails & Handcare",
10239
+ description: "Nail painting, decoration, quick manicures, temporary nail extensions."
10240
+ },
10241
+ {
10242
+ id: "hair-styling-braiding",
10243
+ name: "Hair Styling & Braiding",
10244
+ description: "Hair braiding, plaits, child-friendly festival hairstyles."
10245
+ },
10246
+ {
10247
+ id: "face-body-decoration",
10248
+ name: "Face & Body Decoration",
10249
+ description: "Henna, glitter tattoos, face painting, light makeup, eyelash styling, professional tattooing (where permitted)."
10250
+ },
10251
+ {
10252
+ id: "other-beauty-grooming-services",
10253
+ name: "Other beauty or grooming services",
10254
+ description: "Small-scale personal care options offered on-site."
10255
+ }
10256
+ ]
10257
+ },
10258
+ {
10259
+ id: "practical-wellness-services",
10260
+ name: "Practical & Wellness Services",
10261
+ items: [
10262
+ {
10263
+ id: "mobile-practical-services",
10264
+ name: "Mobile & Practical Services",
10265
+ description: "Shoe repair, phone repairs, knife sharpening, key cutting, battery replacement, bike repairs, engraving."
10266
+ },
10267
+ {
10268
+ id: "wellness-alternative-therapies",
10269
+ name: "Wellness & Alternative Therapies",
10270
+ description: "Massage, aromatherapy, reflexology, energy healing (e.g. Reiki), natural consultations."
10271
+ },
10272
+ {
10273
+ id: "other-service-based-offerings",
10274
+ name: "Other service-based offerings",
10275
+ description: "Wellness or functional services not listed above."
10276
+ }
10277
+ ]
10278
+ },
10279
+ {
10280
+ id: "creative-educational-experiences",
10281
+ name: "Creative & Educational Experiences",
10282
+ items: [
10283
+ {
10284
+ id: "creative-workshops-maker-services",
10285
+ name: "Creative Workshops & Maker Services",
10286
+ description: "Candle making, pottery, jewelry crafting, soap or balm workshops, calligraphy, seasonal crafts."
10287
+ },
10288
+ {
10289
+ id: "education-awareness-stalls",
10290
+ name: "Education & Awareness Stalls",
10291
+ description: "Eco awareness, cultural storytelling, local history, first aid demos, health booths, sustainability education, kids\u2019 science displays."
10292
+ },
10293
+ {
10294
+ id: "other-creative-educational-services",
10295
+ name: "Other creative or educational services",
10296
+ description: "Informal learning, demonstrations, or community-focused sessions."
10297
+ }
10298
+ ]
10299
+ },
10300
+ {
10301
+ id: "kids-activities-family-fun",
10302
+ name: "Kids\u2019 Activities & Family Fun",
10303
+ items: [
10304
+ {
10305
+ id: "kids-activities-fun",
10306
+ name: "Kids\u2019 Activities & Fun",
10307
+ description: "Face painting, glitter tattoos, pony rides, bouncy castles, small amusement rides, balloon twisting, animal petting zones."
10308
+ },
10309
+ {
10310
+ id: "other-family-oriented-activities",
10311
+ name: "Other family-oriented activities",
10312
+ description: "On-site entertainment that engages children or family groups."
10313
+ }
10314
+ ]
10315
+ }
10316
+ ]
10317
+ }
10318
+ ];
10319
+ var toysChildren2 = [
10320
+ {
10321
+ id: "toys-childrens-items",
10322
+ name: "Toys & Children\u2019s Items",
10323
+ description: "Products and services made for or inspired by children.",
10324
+ subcategories: [
10325
+ {
10326
+ id: "toys-playthings",
10327
+ name: "Toys & Playthings",
10328
+ items: [
10329
+ {
10330
+ id: "toys-classic-electric-character",
10331
+ name: "Toys \u2013 Classic, Electric & Character-Based",
10332
+ description: "Building blocks, dolls, puzzles, plush animals, toy vehicles, remote-control toys, light-up gadgets, character figurines, themed playsets."
10333
+ },
10334
+ {
10335
+ id: "handmade-toys-crafty-playthings",
10336
+ name: "Handmade Toys & Crafty Playthings",
10337
+ description: "Wooden puzzles, crocheted animals, felt toys, fabric dolls, DIY kits, nature-inspired games, sensory toys."
10338
+ },
10339
+ {
10340
+ id: "other-play-items",
10341
+ name: "Other play items",
10342
+ description: "Toys not listed above, including limited-edition or hybrid items."
10343
+ }
10344
+ ]
10345
+ },
10346
+ {
10347
+ id: "educational-developmental",
10348
+ name: "Educational & Developmental",
10349
+ items: [
10350
+ {
10351
+ id: "educational-developmental-tools",
10352
+ name: "Educational & Developmental Tools",
10353
+ description: "STEM kits, Montessori toys, storybooks, picture books, flashcards, early learning games, language tools."
10354
+ },
10355
+ {
10356
+ id: "other-educational-experience-based-items",
10357
+ name: "Other educational or experience-based items",
10358
+ description: "Creative experiences or learning aids not listed above."
10359
+ }
10360
+ ]
10361
+ },
10362
+ {
10363
+ id: "baby-kidswear-accessories",
10364
+ name: "Baby & Kidswear + Accessories",
10365
+ items: [
10366
+ {
10367
+ id: "baby-kidswear-accessories",
10368
+ name: "Baby & Kidswear + Accessories",
10369
+ description: "Handmade baby clothes, toddler outfits, bibs, hats, headbands, bags, pacifier clips, soft shoes."
10370
+ },
10371
+ {
10372
+ id: "baby-developmental-soft-toys",
10373
+ name: "Baby Developmental Soft Toys",
10374
+ description: "Sensory toys, rattles, fabric books, teething items, high-contrast cards, and early-skill. Montessori materials designed to support infants\u2019 cognitive and motor development."
10375
+ },
10376
+ {
10377
+ id: "other-childrens-clothing-accessories",
10378
+ name: "Other children\u2019s clothing or accessories",
10379
+ description: "Unique fashion or functional pieces for kids."
10380
+ }
10381
+ ]
10382
+ }
10383
+ ]
10384
+ }
10385
+ ];
10386
+ var vintageAndAntique2 = [
10387
+ {
10388
+ id: "vintage-antique",
10389
+ name: "Vintage & Antique",
10390
+ description: "Unique, historic, or nostalgic items with collectible or decorative value.",
10391
+ subcategories: [
10392
+ {
10393
+ id: "vintage-antique-clothing-accessories",
10394
+ name: "Vintage & Antique Clothing & Accessories",
10395
+ items: [
10396
+ {
10397
+ id: "clothing-vintage-fashion",
10398
+ name: "Clothing and wearable items from past eras",
10399
+ description: "Vintage dresses, jackets, hats, gloves, belts, bags, shoes, jewellery."
10400
+ },
10401
+ {
10402
+ id: "other-clothing-accessory-items",
10403
+ name: "Other clothing-related items",
10404
+ description: "Hair clips, brooches, pins, scarf rings, small fashion accessories."
10405
+ }
10406
+ ]
10407
+ },
10408
+ {
10409
+ id: "collectibles-memorabilia",
10410
+ name: "Collectibles & Memorabilia",
10411
+ items: [
10412
+ {
10413
+ id: "small-collectible-items",
10414
+ name: "Small collectible items with historical or nostalgic significance",
10415
+ description: "Coins, stamps, toys, postcards, comics, sports cards, vintage packaging."
10416
+ },
10417
+ {
10418
+ id: "other-collectible-items",
10419
+ name: "Other collectible items",
10420
+ description: "Rare small objects, miniature figurines, special-edition items."
10421
+ }
10422
+ ]
10423
+ },
10424
+ {
10425
+ id: "homewares-decor-curiosities",
10426
+ name: "Homewares, Decor & Curiosities",
10427
+ items: [
10428
+ {
10429
+ id: "decorative-functional-vintage-items",
10430
+ name: "Decorative or functional items with a vintage or antique aesthetic",
10431
+ description: "Teacups, plates, vases, mirrors, clocks, furniture, old tools, lanterns, typewriters, curiosities."
10432
+ },
10433
+ {
10434
+ id: "handmade-vintage-art",
10435
+ name: "Handmade vintage art",
10436
+ description: "Paintings, sculptures, crafted pieces."
10437
+ },
10438
+ {
10439
+ id: "other-home-decor-items",
10440
+ name: "Other home or decor items",
10441
+ description: "Decorative pieces not listed above, unique household objects."
10442
+ }
10443
+ ]
10444
+ },
10445
+ {
10446
+ id: "vintage-media-printed-nostalgia",
10447
+ name: "Vintage Media & Printed Nostalgia",
10448
+ items: [
10449
+ {
10450
+ id: "older-media-printed-works",
10451
+ name: "Older media formats and printed works",
10452
+ description: "Vinyl records, cassette tapes, CDs, DVDs, books, magazines, board games, posters."
10453
+ },
10454
+ {
10455
+ id: "other-media-printed-items",
10456
+ name: "Other media or printed items",
10457
+ description: "Maps, manuals, leaflets, out-of-print materials."
10458
+ }
10459
+ ]
10460
+ },
10461
+ {
10462
+ id: "other-vintage-antique-items",
10463
+ name: "Other Vintage & Antique Items",
10464
+ items: [
10465
+ {
10466
+ id: "any-vintage-antique-items-not-listed",
10467
+ name: "Any vintage or antique items not listed above",
10468
+ description: "Unique, rare or uncategorised pieces."
10469
+ }
10470
+ ]
10471
+ }
10472
+ ]
10473
+ }
10474
+ ];
10475
+ var categoryColors2 = {
10476
+ "clothing-fashion": "#9D4EDD",
10477
+ "electronics-technology": "#3AF3FF",
10478
+ "food-beverages": "#FF0D1F",
10479
+ "handmade-local-products": "#EE7E54",
10480
+ "health-wellness": "#E23794",
10481
+ "home-garden-household-goods": "#067325",
10482
+ "pet-products-animal-goods": "#68E788",
10483
+ "services-experiences": "#2E16A5",
10484
+ "toys-childrens-items": "#FFF966",
10485
+ "vintage-antique": "#8D6748"
10486
+ };
10487
+ var assignColorToCategories2 = (categories) => {
10488
+ const result = categories.map((category) => ({
10489
+ ...category,
10490
+ color: categoryColors2[category.id]
10491
+ }));
10492
+ return result;
10493
+ };
10494
+ var availableCategories2 = assignColorToCategories2([
10495
+ ...foodAndBeverages2,
10496
+ ...handmadeAndLocalProducts2,
10497
+ ...clothingAndFashion2,
10498
+ ...homeGardenHousehold2,
10499
+ ...toysChildren2,
10500
+ ...healthAndWellness2,
10501
+ ...electronicsAndTechnology2,
10502
+ ...vintageAndAntique2,
10503
+ ...petProductsAndAnimalGoods2,
10504
+ ...serviceAndExperience2
10505
+ ]);
10506
+ var AFFILIATE_REWARDS = {
10507
+ [
10508
+ "NEW_EVENT_REGISTRATION"
10509
+ /* NEW_EVENT_REGISTRATION */
10510
+ ]: {
10511
+ description: "10 points for new event registration (one-time reward)",
10512
+ value: 10
10513
+ },
10514
+ [
10515
+ "NEW_VENDOR_REGISTRATION"
10516
+ /* NEW_VENDOR_REGISTRATION */
10517
+ ]: {
10518
+ description: "5 points for new vendor registration (one-time reward)",
10519
+ value: 5
10520
+ },
10521
+ [
10522
+ "ACTIVE_VENDOR_PRO_SUBSCRIPTION"
10523
+ /* ACTIVE_VENDOR_PRO_SUBSCRIPTION */
10524
+ ]: {
10525
+ description: "3 points for active vendor pro subscription (monthly reward)",
10526
+ value: 3
10527
+ },
10528
+ [
10529
+ "ACTIVE_VENDOR_STANDARD_SUBSCRIPTION"
10530
+ /* ACTIVE_VENDOR_STANDARD_SUBSCRIPTION */
10531
+ ]: {
10532
+ description: "1 point for active vendor standard subscription (monthly reward)",
10533
+ value: 1
10534
+ },
10535
+ [
10536
+ "ACTIVE_VENDOR_BONUS_REWARD"
10537
+ /* ACTIVE_VENDOR_BONUS_REWARD */
10538
+ ]: {
10539
+ description: "5 bonus points for every 10th active vendor (one-time reward)",
10540
+ value: 5
10541
+ },
10542
+ [
10543
+ "ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS"
10544
+ /* ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS */
10545
+ ]: {
10546
+ description: "40 points for active event with vendor registrations (one-time reward)",
10547
+ value: 40
10548
+ }
10549
+ };
10550
+ function createAffiliateReward(rewardType, createdAt) {
10551
+ const reward = AFFILIATE_REWARDS[rewardType];
10552
+ return {
10553
+ createdAt,
10554
+ redeemedAt: null,
10555
+ rewardDescription: reward.description,
9454
10556
  rewardType,
9455
10557
  rewardValue: reward.value
9456
10558
  };
9457
10559
  }
9458
10560
 
10561
+ // src/service/promoCode/normalizePromoCode.ts
10562
+ function normalizePromoCode(decoratedPromoCode) {
10563
+ const normalized = decoratedPromoCode?.trim().toUpperCase();
10564
+ return normalized || null;
10565
+ }
10566
+
10567
+ // src/service/saveNotificationsInDb.ts
10568
+ async function saveNotificationsInDb(payload) {
10569
+ const { data, message, title, type, userIds } = payload;
10570
+ console.log("NOTIFICATION DATA", JSON.stringify(payload, null, 2));
10571
+ try {
10572
+ const notifications = userIds.map((userId) => ({
10573
+ data,
10574
+ isRead: false,
10575
+ message,
10576
+ title,
10577
+ type,
10578
+ userId
10579
+ }));
10580
+ await NotificationModel.insertMany(notifications);
10581
+ console.log(
10582
+ `Created ${notifications.length} notifications for ${userIds.length} users`
10583
+ );
10584
+ return [...new Set(userIds)];
10585
+ } catch (error) {
10586
+ console.error("Failed to create notifications:", error);
10587
+ return [];
10588
+ }
10589
+ }
10590
+
10591
+ // src/service/sendPushNotifications.ts
10592
+ var import_expo_server_sdk = require("expo-server-sdk");
10593
+ var expo = new import_expo_server_sdk.Expo();
10594
+ function extractTokensFromMessage(message) {
10595
+ return Array.isArray(message.to) ? message.to : [message.to];
10596
+ }
10597
+ function createPushMessages({
10598
+ tokens,
10599
+ message,
10600
+ title,
10601
+ data
10602
+ }) {
10603
+ const messages = [];
10604
+ const invalidTokens = [];
10605
+ for (const token of tokens) {
10606
+ if (!import_expo_server_sdk.Expo.isExpoPushToken(token)) {
10607
+ invalidTokens.push(token);
10608
+ continue;
10609
+ }
10610
+ messages.push({
10611
+ body: message,
10612
+ data: { ...data },
10613
+ sound: "tui.wav",
10614
+ title,
10615
+ to: token
10616
+ });
10617
+ }
10618
+ return { invalidTokens, messages };
10619
+ }
10620
+ function processChunkResults(tickets, chunk) {
10621
+ let successCount = 0;
10622
+ const failedTokens = [];
10623
+ for (const [ticketIndex, ticket] of tickets.entries()) {
10624
+ if (ticket.status === "error") {
10625
+ const message = chunk[ticketIndex];
10626
+ if (message) {
10627
+ const tokens = extractTokensFromMessage(message);
10628
+ if (ticket.details?.error === "DeviceNotRegistered") {
10629
+ failedTokens.push(...tokens);
10630
+ }
10631
+ console.log("Push notification error", {
10632
+ error: ticket.details?.error,
10633
+ tokens
10634
+ });
10635
+ }
10636
+ } else {
10637
+ successCount++;
10638
+ }
10639
+ }
10640
+ return { failedTokens, successCount };
10641
+ }
10642
+ async function sendChunk(chunk, chunkIndex) {
10643
+ try {
10644
+ const tickets = await expo.sendPushNotificationsAsync(chunk);
10645
+ const { successCount, failedTokens } = processChunkResults(tickets, chunk);
10646
+ console.log(
10647
+ `Chunk ${chunkIndex + 1}: Sent ${successCount}/${chunk.length} notifications successfully`
10648
+ );
10649
+ return { failedTokens, successCount };
10650
+ } catch (error) {
10651
+ console.log("Error sending Expo push notification chunk", {
10652
+ chunkIndex,
10653
+ chunkSize: chunk.length,
10654
+ error: error instanceof Error ? error.message : String(error)
10655
+ });
10656
+ return { failedTokens: [], successCount: 0 };
10657
+ }
10658
+ }
10659
+ async function sendPushNotifications({
10660
+ data,
10661
+ message,
10662
+ title,
10663
+ userIds
10664
+ }) {
10665
+ const pushTokens = await PushTokenModel.find({ userId: { $in: userIds } });
10666
+ const expoTokens = pushTokens.map((token) => token.token);
10667
+ if (!data) return;
10668
+ const { messages, invalidTokens } = createPushMessages({
10669
+ data,
10670
+ message,
10671
+ title,
10672
+ tokens: expoTokens
10673
+ });
10674
+ if (invalidTokens.length > 0) {
10675
+ console.log(`Found ${invalidTokens.length} invalid push tokens`);
10676
+ }
10677
+ if (messages.length === 0) {
10678
+ console.log("No valid messages to send after filtering tokens");
10679
+ return;
10680
+ }
10681
+ const chunks = expo.chunkPushNotifications(messages);
10682
+ let totalSuccessCount = 0;
10683
+ const allFailedTokens = [];
10684
+ for (const [chunkIndex, chunk] of chunks.entries()) {
10685
+ const { successCount, failedTokens } = await sendChunk(
10686
+ chunk,
10687
+ chunkIndex + 1
10688
+ );
10689
+ totalSuccessCount += successCount;
10690
+ allFailedTokens.push(...failedTokens);
10691
+ }
10692
+ console.log(
10693
+ `Sent push notification to ${totalSuccessCount}/${messages.length} tokens across ${chunks.length} chunks`
10694
+ );
10695
+ if (allFailedTokens.length > 0) {
10696
+ console.log(`Found ${allFailedTokens.length} failed push tokens`);
10697
+ }
10698
+ }
10699
+
9459
10700
  // src/service/affiliate/vendorSubscriptionRewards.ts
9460
10701
  function isPayingStripeSubscription(stripe) {
9461
10702
  if (!stripe?.subscriptionId) return false;
@@ -9865,11 +11106,11 @@ function convertObjectIdsToStrings(obj) {
9865
11106
  }
9866
11107
 
9867
11108
  // src/service/event/updateAllEventDateTimeStatuses.ts
9868
- var import_dayjs3 = __toESM(require("dayjs"));
9869
- var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat"));
11109
+ var import_dayjs5 = __toESM(require("dayjs"));
11110
+ var import_customParseFormat3 = __toESM(require("dayjs/plugin/customParseFormat"));
9870
11111
  var import_isoWeek = __toESM(require("dayjs/plugin/isoWeek"));
9871
- import_dayjs3.default.extend(import_customParseFormat2.default);
9872
- import_dayjs3.default.extend(import_isoWeek.default);
11112
+ import_dayjs5.default.extend(import_customParseFormat3.default);
11113
+ import_dayjs5.default.extend(import_isoWeek.default);
9873
11114
  function getFutureEventStatus(startDateTime, now) {
9874
11115
  const hoursUntilStart = startDateTime.diff(now, "hour", true);
9875
11116
  if (hoursUntilStart > 0 && hoursUntilStart <= 4) {
@@ -9889,14 +11130,14 @@ function getFutureEventStatus(startDateTime, now) {
9889
11130
  }
9890
11131
  return EnumEventDateStatus.UPCOMING;
9891
11132
  }
9892
- function updateSingleDateTimeStatus(dateTime, now = (0, import_dayjs3.default)()) {
11133
+ function updateSingleDateTimeStatus(dateTime, now = (0, import_dayjs5.default)()) {
9893
11134
  const dateTimeFormat = `${dateFormat} ${timeFormat}`;
9894
- const startDateTime = (0, import_dayjs3.default)(
11135
+ const startDateTime = (0, import_dayjs5.default)(
9895
11136
  `${dateTime.startDate} ${dateTime.startTime}`,
9896
11137
  dateTimeFormat,
9897
11138
  true
9898
11139
  );
9899
- const endDateTime = (0, import_dayjs3.default)(
11140
+ const endDateTime = (0, import_dayjs5.default)(
9900
11141
  `${dateTime.endDate} ${dateTime.endTime}`,
9901
11142
  dateTimeFormat,
9902
11143
  true
@@ -9978,7 +11219,7 @@ async function updateModelDateTimeStatuses(model, now) {
9978
11219
  return updated;
9979
11220
  }
9980
11221
  async function updateAllEventDateTimeStatuses() {
9981
- const now = (0, import_dayjs3.default)();
11222
+ const now = (0, import_dayjs5.default)();
9982
11223
  const [eventCount, marketCount] = await Promise.all([
9983
11224
  updateModelDateTimeStatuses(EventModel, now),
9984
11225
  updateModelDateTimeStatuses(
@@ -10029,7 +11270,6 @@ function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
10029
11270
  // Annotate the CommonJS export names for ESM import in node:
10030
11271
  0 && (module.exports = {
10031
11272
  ACTIVE_NOT_DELETED_FILTER,
10032
- AFFILIATE_REWARDS,
10033
11273
  APP_SETTINGS_ID,
10034
11274
  AdModel,
10035
11275
  AffiliateModel,
@@ -10065,7 +11305,6 @@ function updateRelationDatesToUnavailable(relationDates, eventDateTime) {
10065
11305
  baseResourceFields,
10066
11306
  connectToDatabase,
10067
11307
  convertObjectIdsToStrings,
10068
- createAffiliateReward,
10069
11308
  dateTimeSchema,
10070
11309
  didRemoveAnyEventDates,
10071
11310
  express,