@timardex/cluemart-server-shared 1.0.276 → 1.0.279

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.mjs CHANGED
@@ -7382,8 +7382,17 @@ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = gql`
7382
7382
  }
7383
7383
  ${AFFILIATE_REWARD_FIELDS_FRAGMENT}
7384
7384
  `;
7385
+ var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = gql`
7386
+ fragment AffiliateBankAccountDetailsFields on AffiliateBankAccountDetailsType {
7387
+ accountHolderName
7388
+ accountNumber
7389
+ }
7390
+ `;
7385
7391
  var AFFILIATE_DETAILS_FIELDS_FRAGMENT = gql`
7386
7392
  fragment AffiliateDetailsFields on AffiliateDetailsType {
7393
+ bankAccountDetails {
7394
+ ...AffiliateBankAccountDetailsFields
7395
+ }
7387
7396
  contactDetails {
7388
7397
  mobilePhone
7389
7398
  }
@@ -7395,6 +7404,7 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = gql`
7395
7404
  ...TermsAgreementFields
7396
7405
  }
7397
7406
  }
7407
+ ${AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT}
7398
7408
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
7399
7409
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
7400
7410
  `;
@@ -7411,6 +7421,8 @@ var AFFILIATE_FIELDS_FRAGMENT = gql`
7411
7421
  }
7412
7422
  createdAt
7413
7423
  deletedAt
7424
+ lastRewardRedemptionAt
7425
+ lastRewardRedemptionPoints
7414
7426
  overallPoints
7415
7427
  owner {
7416
7428
  ...OwnerFields
@@ -7437,6 +7449,22 @@ var GET_AFFILIATES = gql`
7437
7449
  }
7438
7450
  ${AFFILIATE_FIELDS_FRAGMENT}
7439
7451
  `;
7452
+ var UPDATE_AFFILIATE_DETAILS_MUTATION = gql`
7453
+ mutation updateAffiliateDetails(
7454
+ $input: AffiliateDetailsInputType!
7455
+ $affiliateId: ID!
7456
+ ) {
7457
+ updateAffiliateDetails(input: $input, affiliateId: $affiliateId) {
7458
+ ...AffiliateFields
7459
+ }
7460
+ }
7461
+ ${AFFILIATE_FIELDS_FRAGMENT}
7462
+ `;
7463
+ var DELETE_AFFILIATE_MUTATION = gql`
7464
+ mutation deleteAffiliate($_id: ID!) {
7465
+ deleteAffiliate(_id: $_id)
7466
+ }
7467
+ `;
7440
7468
  var PKG = "@timardex/cluemart-shared";
7441
7469
  var IMAGE_EXTENSION = ".webp";
7442
7470
  var posterIds = [
@@ -9201,8 +9229,19 @@ var affiliateContactDetailsSchema = new MongooseSchema25(
9201
9229
  },
9202
9230
  { _id: false }
9203
9231
  );
9232
+ var affiliateBankAccountDetailsSchema = new MongooseSchema25(
9233
+ {
9234
+ accountHolderName: { required: true, type: String },
9235
+ accountNumber: { required: true, type: String }
9236
+ },
9237
+ { _id: false }
9238
+ );
9204
9239
  var affiliateDetailsSchema = new MongooseSchema25(
9205
9240
  {
9241
+ bankAccountDetails: {
9242
+ required: true,
9243
+ type: affiliateBankAccountDetailsSchema
9244
+ },
9206
9245
  contactDetails: { required: true, type: affiliateContactDetailsSchema },
9207
9246
  region: { required: true, type: String },
9208
9247
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
@@ -9221,6 +9260,12 @@ var schema17 = new MongooseSchema25(
9221
9260
  type: [affiliateResourceSchema]
9222
9261
  },
9223
9262
  deletedAt: { default: null, required: false, type: Date },
9263
+ lastRewardRedemptionAt: { default: null, required: false, type: Date },
9264
+ lastRewardRedemptionPoints: {
9265
+ default: null,
9266
+ required: false,
9267
+ type: Number
9268
+ },
9224
9269
  overallPoints: { default: 0, required: true, type: Number },
9225
9270
  owner: {
9226
9271
  required: true,