@timardex/cluemart-server-shared 1.1.18 → 1.1.20

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.
@@ -4924,6 +4924,12 @@ var OWNER_FIELDS_FRAGMENT = gql`
4924
4924
  userId
4925
4925
  }
4926
4926
  `;
4927
+ var PRODUCT_COUPON_FIELDS_FRAGMENT = gql`
4928
+ fragment ProductCouponFields on ProductCouponType {
4929
+ couponDocumentId
4930
+ couponId
4931
+ }
4932
+ `;
4927
4933
  var CATEGORY_FIELDS_FRAGMENT = gql`
4928
4934
  fragment CategoryFields on CategoryType {
4929
4935
  id
@@ -5397,109 +5403,6 @@ var GET_EVENT_INFO = gql`
5397
5403
  }
5398
5404
  ${EVENT_INFO}
5399
5405
  `;
5400
- var PRODUCT_COUPON_FIELDS_FRAGMENT = gql`
5401
- fragment ProductCouponFields on ProductCouponType {
5402
- couponDocumentId
5403
- couponId
5404
- }
5405
- `;
5406
- var COUPON_CODE_FIELDS_FRAGMENT = gql`
5407
- fragment CouponCodeFields on CouponCodeType {
5408
- code
5409
- qrCode {
5410
- ...ResourceImageFields
5411
- }
5412
- }
5413
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5414
- `;
5415
- var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
5416
- fragment CouponParticipantUserFields on CouponParticipantUserType {
5417
- couponCollectedCount
5418
- couponRedeemedAt
5419
- createdAt
5420
- updatedAt
5421
- userId
5422
- }
5423
- `;
5424
- var COUPON_OPTION_FIELDS_FRAGMENT = gql`
5425
- fragment CouponOptionFields on CouponOptionType {
5426
- type
5427
- buy
5428
- get
5429
- unit
5430
- visits
5431
- }
5432
- `;
5433
- var COUPON_REWARD_FIELDS_FRAGMENT = gql`
5434
- fragment CouponRewardFields on CouponRewardType {
5435
- vendorId
5436
- productId
5437
- quantity
5438
- unit
5439
- }
5440
- `;
5441
- var COUPON_DATA_FIELDS_FRAGMENT = gql`
5442
- fragment CouponDataFields on CouponDataType {
5443
- _id
5444
- active
5445
- couponCode {
5446
- ...CouponCodeFields
5447
- }
5448
- couponDescription
5449
- couponOption {
5450
- ...CouponOptionFields
5451
- }
5452
- couponRewards {
5453
- ...CouponRewardFields
5454
- }
5455
- createdAt
5456
- endDate
5457
- participantUsers {
5458
- ...CouponParticipantUserFields
5459
- }
5460
- resourceId
5461
- resourceType
5462
- startDate
5463
- updatedAt
5464
- }
5465
- ${COUPON_CODE_FIELDS_FRAGMENT}
5466
- ${COUPON_OPTION_FIELDS_FRAGMENT}
5467
- ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
5468
- ${COUPON_REWARD_FIELDS_FRAGMENT}
5469
- `;
5470
- var COUPON = gql`
5471
- fragment CouponFields on CouponType {
5472
- _id
5473
- active
5474
- couponData {
5475
- ...CouponDataFields
5476
- }
5477
- createdAt
5478
- deletedAt
5479
- owner {
5480
- ...OwnerFields
5481
- }
5482
- updatedAt
5483
- }
5484
- ${OWNER_FIELDS_FRAGMENT}
5485
- ${COUPON_DATA_FIELDS_FRAGMENT}
5486
- `;
5487
- var GET_COUPONS = gql`
5488
- query getCoupons {
5489
- coupons {
5490
- ...CouponFields
5491
- }
5492
- }
5493
- ${COUPON}
5494
- `;
5495
- var GET_COUPON = gql`
5496
- query getCoupon($_id: ID!) {
5497
- coupon(_id: $_id) {
5498
- ...CouponFields
5499
- }
5500
- }
5501
- ${COUPON}
5502
- `;
5503
5406
  var VENDOR_DATETIME_FIELDS_FRAGMENT = gql`
5504
5407
  fragment VendorDateTimeFields on VendorDateTimeType {
5505
5408
  dateStatus
@@ -5526,6 +5429,15 @@ var VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = gql`
5526
5429
  }
5527
5430
  ${PRODUCT_COUPON_FIELDS_FRAGMENT}
5528
5431
  `;
5432
+ var VENDOR_PRODUCTS_FIELDS_FRAGMENT = gql`
5433
+ fragment VendorProductsFields on VendorProductsType {
5434
+ active
5435
+ productsList {
5436
+ ...VendorProductListFields
5437
+ }
5438
+ }
5439
+ ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
5440
+ `;
5529
5441
  var VENDOR = gql`
5530
5442
  fragment VendorFields on VendorType {
5531
5443
  _id
@@ -5575,10 +5487,7 @@ var VENDOR = gql`
5575
5487
  ...OwnerFields
5576
5488
  }
5577
5489
  products {
5578
- active
5579
- productsList {
5580
- ...VendorProductListFields
5581
- }
5490
+ ...VendorProductsFields
5582
5491
  }
5583
5492
  promoCodes
5584
5493
  posterUsage {
@@ -5620,7 +5529,7 @@ var VENDOR = gql`
5620
5529
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5621
5530
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5622
5531
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5623
- ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
5532
+ ${VENDOR_PRODUCTS_FIELDS_FRAGMENT}
5624
5533
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5625
5534
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5626
5535
  ${RELATION_DATES_FRAGMENT}
@@ -7826,6 +7735,146 @@ var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = gql`
7826
7735
  }
7827
7736
  ${AFFILIATE_FIELDS_FRAGMENT}
7828
7737
  `;
7738
+ var COUPON_CODE_FIELDS_FRAGMENT = gql`
7739
+ fragment CouponCodeFields on CouponCodeType {
7740
+ code
7741
+ qrCode {
7742
+ ...ResourceImageFields
7743
+ }
7744
+ }
7745
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
7746
+ `;
7747
+ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
7748
+ fragment CouponParticipantUserFields on CouponParticipantUserType {
7749
+ couponCollectedCount
7750
+ couponRedeemedAt
7751
+ createdAt
7752
+ updatedAt
7753
+ userId
7754
+ }
7755
+ `;
7756
+ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
7757
+ fragment CouponOptionFields on CouponOptionType {
7758
+ type
7759
+ buy
7760
+ get
7761
+ unit
7762
+ visits
7763
+ }
7764
+ `;
7765
+ var COUPON_REWARD_FIELDS_FRAGMENT = gql`
7766
+ fragment CouponRewardFields on CouponRewardType {
7767
+ vendorId
7768
+ productId
7769
+ quantity
7770
+ unit
7771
+ }
7772
+ `;
7773
+ var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
7774
+ fragment CouponDataProductsFields on CouponDataProductsType {
7775
+ active
7776
+ productsList {
7777
+ ...VendorProductListFields
7778
+ }
7779
+ vendorLogo {
7780
+ ...ResourceImageFields
7781
+ }
7782
+ vendorName
7783
+ }
7784
+ ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
7785
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
7786
+ `;
7787
+ var COUPON_DATA_FIELDS_FRAGMENT = gql`
7788
+ fragment CouponDataFields on CouponDataType {
7789
+ _id
7790
+ active
7791
+ couponCode {
7792
+ ...CouponCodeFields
7793
+ }
7794
+ couponDescription
7795
+ couponOption {
7796
+ ...CouponOptionFields
7797
+ }
7798
+ couponRewards {
7799
+ ...CouponRewardFields
7800
+ }
7801
+ createdAt
7802
+ endDate
7803
+ participantUsers {
7804
+ ...CouponParticipantUserFields
7805
+ }
7806
+ products {
7807
+ ...CouponDataProductsFields
7808
+ }
7809
+ resourceId
7810
+ resourceType
7811
+ startDate
7812
+ updatedAt
7813
+ }
7814
+ ${COUPON_CODE_FIELDS_FRAGMENT}
7815
+ ${COUPON_OPTION_FIELDS_FRAGMENT}
7816
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
7817
+ ${COUPON_REWARD_FIELDS_FRAGMENT}
7818
+ ${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
7819
+ `;
7820
+ var COUPON = gql`
7821
+ fragment CouponFields on CouponType {
7822
+ _id
7823
+ active
7824
+ couponData {
7825
+ ...CouponDataFields
7826
+ }
7827
+ createdAt
7828
+ deletedAt
7829
+ owner {
7830
+ ...OwnerFields
7831
+ }
7832
+ updatedAt
7833
+ }
7834
+ ${OWNER_FIELDS_FRAGMENT}
7835
+ ${COUPON_DATA_FIELDS_FRAGMENT}
7836
+ `;
7837
+ var GET_COUPONS = gql`
7838
+ query getCoupons {
7839
+ coupons {
7840
+ active {
7841
+ listName
7842
+ data {
7843
+ ...CouponFields
7844
+ }
7845
+ }
7846
+ owned {
7847
+ listName
7848
+ data {
7849
+ ...CouponFields
7850
+ }
7851
+ }
7852
+ scanned {
7853
+ listName
7854
+ data {
7855
+ ...CouponFields
7856
+ }
7857
+ }
7858
+ }
7859
+ }
7860
+ ${COUPON}
7861
+ `;
7862
+ var GET_COUPON = gql`
7863
+ query getCoupon($_id: ID!) {
7864
+ coupon(_id: $_id) {
7865
+ ...CouponFields
7866
+ }
7867
+ }
7868
+ ${COUPON}
7869
+ `;
7870
+ var GET_RESOURCE_COUPONS = gql`
7871
+ query getResourceCoupons($resourceId: ID!, $resourceType: ResourceTypeEnum!) {
7872
+ resourceCoupons(resourceId: $resourceId, resourceType: $resourceType) {
7873
+ ...CouponFields
7874
+ }
7875
+ }
7876
+ ${COUPON}
7877
+ `;
7829
7878
  var CREATE_COUPON_MUTATION = gql`
7830
7879
  mutation createCoupon($input: CouponInputType!) {
7831
7880
  createCoupon(input: $input) {
@@ -7838,8 +7887,16 @@ var CREATE_COUPON_MUTATION = gql`
7838
7887
  ${COUPON}
7839
7888
  `;
7840
7889
  var UPDATE_COUPON_MUTATION = gql`
7841
- mutation updateCoupon($_id: ID!, $input: CouponInputType!) {
7842
- updateCoupon(_id: $_id, input: $input) {
7890
+ mutation updateCoupon(
7891
+ $couponDocumentId: ID!
7892
+ $couponId: ID!
7893
+ $input: CouponInputType!
7894
+ ) {
7895
+ updateCoupon(
7896
+ couponDocumentId: $couponDocumentId
7897
+ couponId: $couponId
7898
+ input: $input
7899
+ ) {
7843
7900
  data {
7844
7901
  ...CouponFields
7845
7902
  }
@@ -7849,8 +7906,8 @@ var UPDATE_COUPON_MUTATION = gql`
7849
7906
  ${COUPON}
7850
7907
  `;
7851
7908
  var DELETE_COUPON_MUTATION = gql`
7852
- mutation deleteCoupon($_id: ID!) {
7853
- deleteCoupon(_id: $_id) {
7909
+ mutation deleteCoupon($couponDocumentId: ID!, $couponId: ID!) {
7910
+ deleteCoupon(couponDocumentId: $couponDocumentId, couponId: $couponId) {
7854
7911
  data
7855
7912
  message
7856
7913
  }
@@ -9116,7 +9173,7 @@ var vendorProductTypeSchema = new MongooseSchema14(
9116
9173
  );
9117
9174
  var productWrapperSchema = new MongooseSchema14(
9118
9175
  {
9119
- active: { default: false, required: true, type: Boolean },
9176
+ active: { default: false, required: false, type: Boolean },
9120
9177
  productsList: { required: false, type: [vendorProductTypeSchema] }
9121
9178
  },
9122
9179
  { _id: false }
@@ -9856,4 +9913,4 @@ export {
9856
9913
  SchoolModel,
9857
9914
  AffiliateModel
9858
9915
  };
9859
- //# sourceMappingURL=chunk-TDAUQKK7.mjs.map
9916
+ //# sourceMappingURL=chunk-WDKTIULG.mjs.map