@juhuu/sdk-ts 1.2.291 → 1.2.292

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
@@ -5602,96 +5602,25 @@ declare namespace JUHUU {
5602
5602
  }
5603
5603
  }
5604
5604
  namespace BenefitCard {
5605
- type BenefitCardType = "membership" | "loyalty" | "discount" | "cashback" | "premium" | "corporate";
5606
- type BenefitCardStatus = "active" | "inactive" | "suspended" | "expired" | "pending_activation";
5607
- type BenefitType = "percentage_discount" | "fixed_discount" | "cashback" | "points" | "free_shipping" | "priority_access";
5608
- type Benefit = {
5609
- type: BenefitType;
5610
- name: string;
5611
- description: string;
5612
- value: number;
5613
- unit: string;
5614
- conditions: string[];
5615
- validFrom: string | null;
5616
- validTo: string | null;
5617
- usageLimit: number | null;
5618
- usageCount: number;
5619
- minimumSpend: number | null;
5620
- maximumDiscount: number | null;
5621
- applicableCategories: string[];
5622
- excludedCategories: string[];
5623
- };
5624
- type BenefitCardLimits = {
5625
- dailyUsageLimit: number | null;
5626
- monthlyUsageLimit: number | null;
5627
- yearlyUsageLimit: number | null;
5628
- lifetimeUsageLimit: number | null;
5629
- dailySpendLimit: number | null;
5630
- monthlySpendLimit: number | null;
5631
- yearlySpendLimit: number | null;
5632
- perTransactionLimit: number | null;
5633
- };
5634
- type BenefitCardMetadata = {
5635
- issuer: string;
5636
- brand: string | null;
5637
- level: "bronze" | "silver" | "gold" | "platinum" | "diamond";
5638
- renewalDate: string | null;
5639
- memberSince: string;
5640
- referralCode: string | null;
5641
- partnerPrograms: string[];
5642
- tags: string[];
5643
- notes: string | null;
5644
- };
5645
5605
  type Object = {
5646
5606
  id: string;
5607
+ version: number;
5647
5608
  readonly object: "benefitCard";
5648
- userId: string;
5649
- cardNumber: string;
5650
- cardHolderName: string;
5651
- type: BenefitCardType;
5652
- status: BenefitCardStatus;
5653
- benefits: Benefit[];
5654
- limits: BenefitCardLimits;
5655
- metadata: BenefitCardMetadata;
5656
- pointsBalance: number;
5657
- cashbackBalance: number;
5658
- totalSavings: number;
5659
- totalSpent: number;
5660
- transactionCount: number;
5661
- lastUsedAt: string | null;
5662
- createdAt: string;
5663
- updatedAt: string;
5664
- activatedAt: string | null;
5665
- expiresAt: string | null;
5666
- isDigital: boolean;
5667
- isTransferable: boolean;
5668
- requiresPin: boolean;
5669
- pin: string | null;
5670
- qrCode: string | null;
5671
- barcode: string | null;
5609
+ readonly objectType: "dto";
5610
+ createdAt: Date;
5611
+ imageLight: string | null;
5612
+ imageDark: string | null;
5613
+ userId: string | null;
5614
+ propertyId: string;
5615
+ reference: string | null;
5672
5616
  };
5673
5617
  namespace Create {
5674
5618
  type Params = {
5675
- userId: string;
5676
- cardNumber: string;
5677
- cardHolderName: string;
5678
- type: BenefitCardType;
5679
- status: BenefitCardStatus;
5680
- benefits: Benefit[];
5681
- limits: BenefitCardLimits;
5682
- metadata: BenefitCardMetadata;
5683
- pointsBalance?: number;
5684
- cashbackBalance?: number;
5685
- totalSavings?: number;
5686
- totalSpent?: number;
5687
- transactionCount?: number;
5688
- expiresAt?: string | null;
5689
- isDigital?: boolean;
5690
- isTransferable?: boolean;
5691
- requiresPin?: boolean;
5692
- pin?: string | null;
5693
- qrCode?: string | null;
5694
- barcode?: string | null;
5619
+ propertyId: string;
5620
+ imageLight?: string | null;
5621
+ imageDark?: string | null;
5622
+ userId?: string | null;
5623
+ reference?: string | null;
5695
5624
  };
5696
5625
  type Options = JUHUU.RequestOptions;
5697
5626
  type Response = {
@@ -5709,17 +5638,7 @@ declare namespace JUHUU {
5709
5638
  }
5710
5639
  namespace List {
5711
5640
  type Params = {
5712
- userId?: string;
5713
- cardNumber?: string;
5714
- cardHolderName?: string;
5715
- type?: BenefitCardType;
5716
- status?: BenefitCardStatus;
5717
- issuer?: string;
5718
- brand?: string;
5719
- level?: "bronze" | "silver" | "gold" | "platinum" | "diamond";
5720
- isDigital?: boolean;
5721
- isTransferable?: boolean;
5722
- requiresPin?: boolean;
5641
+ propertyId: string;
5723
5642
  };
5724
5643
  type Options = {
5725
5644
  limit?: number;
@@ -5734,26 +5653,10 @@ declare namespace JUHUU {
5734
5653
  namespace Update {
5735
5654
  type Params = {
5736
5655
  benefitCardId: string;
5737
- userId?: string;
5738
- cardNumber?: string;
5739
- cardHolderName?: string;
5740
- type?: BenefitCardType;
5741
- status?: BenefitCardStatus;
5742
- benefits?: Benefit[];
5743
- limits?: BenefitCardLimits;
5744
- metadata?: BenefitCardMetadata;
5745
- pointsBalance?: number;
5746
- cashbackBalance?: number;
5747
- totalSavings?: number;
5748
- totalSpent?: number;
5749
- transactionCount?: number;
5750
- expiresAt?: string | null;
5751
- isDigital?: boolean;
5752
- isTransferable?: boolean;
5753
- requiresPin?: boolean;
5754
- pin?: string | null;
5755
- qrCode?: string | null;
5756
- barcode?: string | null;
5656
+ imageLight?: string | null;
5657
+ imageDark?: string | null;
5658
+ userId?: string | null;
5659
+ reference?: string | null;
5757
5660
  };
5758
5661
  type Options = JUHUU.RequestOptions;
5759
5662
  type Response = {
@@ -5765,7 +5668,9 @@ declare namespace JUHUU {
5765
5668
  benefitCardId: string;
5766
5669
  };
5767
5670
  type Options = JUHUU.RequestOptions;
5768
- type Response = JUHUU.BenefitCard.Object;
5671
+ type Response = {
5672
+ benefitCard: JUHUU.BenefitCard.Object;
5673
+ };
5769
5674
  }
5770
5675
  }
5771
5676
  namespace Catalog {
package/dist/index.d.ts CHANGED
@@ -5602,96 +5602,25 @@ declare namespace JUHUU {
5602
5602
  }
5603
5603
  }
5604
5604
  namespace BenefitCard {
5605
- type BenefitCardType = "membership" | "loyalty" | "discount" | "cashback" | "premium" | "corporate";
5606
- type BenefitCardStatus = "active" | "inactive" | "suspended" | "expired" | "pending_activation";
5607
- type BenefitType = "percentage_discount" | "fixed_discount" | "cashback" | "points" | "free_shipping" | "priority_access";
5608
- type Benefit = {
5609
- type: BenefitType;
5610
- name: string;
5611
- description: string;
5612
- value: number;
5613
- unit: string;
5614
- conditions: string[];
5615
- validFrom: string | null;
5616
- validTo: string | null;
5617
- usageLimit: number | null;
5618
- usageCount: number;
5619
- minimumSpend: number | null;
5620
- maximumDiscount: number | null;
5621
- applicableCategories: string[];
5622
- excludedCategories: string[];
5623
- };
5624
- type BenefitCardLimits = {
5625
- dailyUsageLimit: number | null;
5626
- monthlyUsageLimit: number | null;
5627
- yearlyUsageLimit: number | null;
5628
- lifetimeUsageLimit: number | null;
5629
- dailySpendLimit: number | null;
5630
- monthlySpendLimit: number | null;
5631
- yearlySpendLimit: number | null;
5632
- perTransactionLimit: number | null;
5633
- };
5634
- type BenefitCardMetadata = {
5635
- issuer: string;
5636
- brand: string | null;
5637
- level: "bronze" | "silver" | "gold" | "platinum" | "diamond";
5638
- renewalDate: string | null;
5639
- memberSince: string;
5640
- referralCode: string | null;
5641
- partnerPrograms: string[];
5642
- tags: string[];
5643
- notes: string | null;
5644
- };
5645
5605
  type Object = {
5646
5606
  id: string;
5607
+ version: number;
5647
5608
  readonly object: "benefitCard";
5648
- userId: string;
5649
- cardNumber: string;
5650
- cardHolderName: string;
5651
- type: BenefitCardType;
5652
- status: BenefitCardStatus;
5653
- benefits: Benefit[];
5654
- limits: BenefitCardLimits;
5655
- metadata: BenefitCardMetadata;
5656
- pointsBalance: number;
5657
- cashbackBalance: number;
5658
- totalSavings: number;
5659
- totalSpent: number;
5660
- transactionCount: number;
5661
- lastUsedAt: string | null;
5662
- createdAt: string;
5663
- updatedAt: string;
5664
- activatedAt: string | null;
5665
- expiresAt: string | null;
5666
- isDigital: boolean;
5667
- isTransferable: boolean;
5668
- requiresPin: boolean;
5669
- pin: string | null;
5670
- qrCode: string | null;
5671
- barcode: string | null;
5609
+ readonly objectType: "dto";
5610
+ createdAt: Date;
5611
+ imageLight: string | null;
5612
+ imageDark: string | null;
5613
+ userId: string | null;
5614
+ propertyId: string;
5615
+ reference: string | null;
5672
5616
  };
5673
5617
  namespace Create {
5674
5618
  type Params = {
5675
- userId: string;
5676
- cardNumber: string;
5677
- cardHolderName: string;
5678
- type: BenefitCardType;
5679
- status: BenefitCardStatus;
5680
- benefits: Benefit[];
5681
- limits: BenefitCardLimits;
5682
- metadata: BenefitCardMetadata;
5683
- pointsBalance?: number;
5684
- cashbackBalance?: number;
5685
- totalSavings?: number;
5686
- totalSpent?: number;
5687
- transactionCount?: number;
5688
- expiresAt?: string | null;
5689
- isDigital?: boolean;
5690
- isTransferable?: boolean;
5691
- requiresPin?: boolean;
5692
- pin?: string | null;
5693
- qrCode?: string | null;
5694
- barcode?: string | null;
5619
+ propertyId: string;
5620
+ imageLight?: string | null;
5621
+ imageDark?: string | null;
5622
+ userId?: string | null;
5623
+ reference?: string | null;
5695
5624
  };
5696
5625
  type Options = JUHUU.RequestOptions;
5697
5626
  type Response = {
@@ -5709,17 +5638,7 @@ declare namespace JUHUU {
5709
5638
  }
5710
5639
  namespace List {
5711
5640
  type Params = {
5712
- userId?: string;
5713
- cardNumber?: string;
5714
- cardHolderName?: string;
5715
- type?: BenefitCardType;
5716
- status?: BenefitCardStatus;
5717
- issuer?: string;
5718
- brand?: string;
5719
- level?: "bronze" | "silver" | "gold" | "platinum" | "diamond";
5720
- isDigital?: boolean;
5721
- isTransferable?: boolean;
5722
- requiresPin?: boolean;
5641
+ propertyId: string;
5723
5642
  };
5724
5643
  type Options = {
5725
5644
  limit?: number;
@@ -5734,26 +5653,10 @@ declare namespace JUHUU {
5734
5653
  namespace Update {
5735
5654
  type Params = {
5736
5655
  benefitCardId: string;
5737
- userId?: string;
5738
- cardNumber?: string;
5739
- cardHolderName?: string;
5740
- type?: BenefitCardType;
5741
- status?: BenefitCardStatus;
5742
- benefits?: Benefit[];
5743
- limits?: BenefitCardLimits;
5744
- metadata?: BenefitCardMetadata;
5745
- pointsBalance?: number;
5746
- cashbackBalance?: number;
5747
- totalSavings?: number;
5748
- totalSpent?: number;
5749
- transactionCount?: number;
5750
- expiresAt?: string | null;
5751
- isDigital?: boolean;
5752
- isTransferable?: boolean;
5753
- requiresPin?: boolean;
5754
- pin?: string | null;
5755
- qrCode?: string | null;
5756
- barcode?: string | null;
5656
+ imageLight?: string | null;
5657
+ imageDark?: string | null;
5658
+ userId?: string | null;
5659
+ reference?: string | null;
5757
5660
  };
5758
5661
  type Options = JUHUU.RequestOptions;
5759
5662
  type Response = {
@@ -5765,7 +5668,9 @@ declare namespace JUHUU {
5765
5668
  benefitCardId: string;
5766
5669
  };
5767
5670
  type Options = JUHUU.RequestOptions;
5768
- type Response = JUHUU.BenefitCard.Object;
5671
+ type Response = {
5672
+ benefitCard: JUHUU.BenefitCard.Object;
5673
+ };
5769
5674
  }
5770
5675
  }
5771
5676
  namespace Catalog {
package/dist/index.js CHANGED
@@ -4595,26 +4595,11 @@ var BenefitCardsService = class extends Service {
4595
4595
  method: "POST",
4596
4596
  url: "benefitCards",
4597
4597
  body: {
4598
+ propertyId: params.propertyId,
4599
+ imageLight: params.imageLight,
4600
+ imageDark: params.imageDark,
4598
4601
  userId: params.userId,
4599
- cardNumber: params.cardNumber,
4600
- cardHolderName: params.cardHolderName,
4601
- type: params.type,
4602
- status: params.status,
4603
- benefits: params.benefits,
4604
- limits: params.limits,
4605
- metadata: params.metadata,
4606
- pointsBalance: params.pointsBalance,
4607
- cashbackBalance: params.cashbackBalance,
4608
- totalSavings: params.totalSavings,
4609
- totalSpent: params.totalSpent,
4610
- transactionCount: params.transactionCount,
4611
- expiresAt: params.expiresAt,
4612
- isDigital: params.isDigital,
4613
- isTransferable: params.isTransferable,
4614
- requiresPin: params.requiresPin,
4615
- pin: params.pin,
4616
- qrCode: params.qrCode,
4617
- barcode: params.barcode
4602
+ reference: params.reference
4618
4603
  },
4619
4604
  authenticationNotOptional: true
4620
4605
  },
@@ -4623,38 +4608,8 @@ var BenefitCardsService = class extends Service {
4623
4608
  }
4624
4609
  async list(params, options) {
4625
4610
  const queryArray = [];
4626
- if (params?.userId !== void 0) {
4627
- queryArray.push("userId=" + params.userId);
4628
- }
4629
- if (params?.cardNumber !== void 0) {
4630
- queryArray.push("cardNumber=" + params.cardNumber);
4631
- }
4632
- if (params?.cardHolderName !== void 0) {
4633
- queryArray.push("cardHolderName=" + params.cardHolderName);
4634
- }
4635
- if (params?.type !== void 0) {
4636
- queryArray.push("type=" + params.type);
4637
- }
4638
- if (params?.status !== void 0) {
4639
- queryArray.push("status=" + params.status);
4640
- }
4641
- if (params?.issuer !== void 0) {
4642
- queryArray.push("issuer=" + params.issuer);
4643
- }
4644
- if (params?.brand !== void 0) {
4645
- queryArray.push("brand=" + params.brand);
4646
- }
4647
- if (params?.level !== void 0) {
4648
- queryArray.push("level=" + params.level);
4649
- }
4650
- if (params?.isDigital !== void 0) {
4651
- queryArray.push("isDigital=" + params.isDigital);
4652
- }
4653
- if (params?.isTransferable !== void 0) {
4654
- queryArray.push("isTransferable=" + params.isTransferable);
4655
- }
4656
- if (params?.requiresPin !== void 0) {
4657
- queryArray.push("requiresPin=" + params.requiresPin);
4611
+ if (params?.propertyId !== void 0) {
4612
+ queryArray.push("propertyId=" + params.propertyId);
4658
4613
  }
4659
4614
  if (options?.limit !== void 0) {
4660
4615
  queryArray.push("limit=" + options.limit);
@@ -4667,19 +4622,18 @@ var BenefitCardsService = class extends Service {
4667
4622
  method: "GET",
4668
4623
  url: "benefitCards?" + queryArray.join("&"),
4669
4624
  body: void 0,
4670
- authenticationNotOptional: false
4625
+ authenticationNotOptional: true
4671
4626
  },
4672
4627
  options
4673
4628
  );
4674
4629
  }
4675
4630
  async retrieve(params, options) {
4676
- const queryArray = [];
4677
4631
  return await super.sendRequest(
4678
4632
  {
4679
4633
  method: "GET",
4680
- url: "benefitCards/" + params.benefitCardId + "?" + queryArray.join("&"),
4634
+ url: "benefitCards/" + params.benefitCardId,
4681
4635
  body: void 0,
4682
- authenticationNotOptional: false
4636
+ authenticationNotOptional: true
4683
4637
  },
4684
4638
  options
4685
4639
  );
@@ -4690,26 +4644,10 @@ var BenefitCardsService = class extends Service {
4690
4644
  method: "PATCH",
4691
4645
  url: "benefitCards/" + params.benefitCardId,
4692
4646
  body: {
4647
+ imageLight: params.imageLight,
4648
+ imageDark: params.imageDark,
4693
4649
  userId: params.userId,
4694
- cardNumber: params.cardNumber,
4695
- cardHolderName: params.cardHolderName,
4696
- type: params.type,
4697
- status: params.status,
4698
- benefits: params.benefits,
4699
- limits: params.limits,
4700
- metadata: params.metadata,
4701
- pointsBalance: params.pointsBalance,
4702
- cashbackBalance: params.cashbackBalance,
4703
- totalSavings: params.totalSavings,
4704
- totalSpent: params.totalSpent,
4705
- transactionCount: params.transactionCount,
4706
- expiresAt: params.expiresAt,
4707
- isDigital: params.isDigital,
4708
- isTransferable: params.isTransferable,
4709
- requiresPin: params.requiresPin,
4710
- pin: params.pin,
4711
- qrCode: params.qrCode,
4712
- barcode: params.barcode
4650
+ reference: params.reference
4713
4651
  },
4714
4652
  authenticationNotOptional: true
4715
4653
  },
package/dist/index.mjs CHANGED
@@ -4551,26 +4551,11 @@ var BenefitCardsService = class extends Service {
4551
4551
  method: "POST",
4552
4552
  url: "benefitCards",
4553
4553
  body: {
4554
+ propertyId: params.propertyId,
4555
+ imageLight: params.imageLight,
4556
+ imageDark: params.imageDark,
4554
4557
  userId: params.userId,
4555
- cardNumber: params.cardNumber,
4556
- cardHolderName: params.cardHolderName,
4557
- type: params.type,
4558
- status: params.status,
4559
- benefits: params.benefits,
4560
- limits: params.limits,
4561
- metadata: params.metadata,
4562
- pointsBalance: params.pointsBalance,
4563
- cashbackBalance: params.cashbackBalance,
4564
- totalSavings: params.totalSavings,
4565
- totalSpent: params.totalSpent,
4566
- transactionCount: params.transactionCount,
4567
- expiresAt: params.expiresAt,
4568
- isDigital: params.isDigital,
4569
- isTransferable: params.isTransferable,
4570
- requiresPin: params.requiresPin,
4571
- pin: params.pin,
4572
- qrCode: params.qrCode,
4573
- barcode: params.barcode
4558
+ reference: params.reference
4574
4559
  },
4575
4560
  authenticationNotOptional: true
4576
4561
  },
@@ -4579,38 +4564,8 @@ var BenefitCardsService = class extends Service {
4579
4564
  }
4580
4565
  async list(params, options) {
4581
4566
  const queryArray = [];
4582
- if (params?.userId !== void 0) {
4583
- queryArray.push("userId=" + params.userId);
4584
- }
4585
- if (params?.cardNumber !== void 0) {
4586
- queryArray.push("cardNumber=" + params.cardNumber);
4587
- }
4588
- if (params?.cardHolderName !== void 0) {
4589
- queryArray.push("cardHolderName=" + params.cardHolderName);
4590
- }
4591
- if (params?.type !== void 0) {
4592
- queryArray.push("type=" + params.type);
4593
- }
4594
- if (params?.status !== void 0) {
4595
- queryArray.push("status=" + params.status);
4596
- }
4597
- if (params?.issuer !== void 0) {
4598
- queryArray.push("issuer=" + params.issuer);
4599
- }
4600
- if (params?.brand !== void 0) {
4601
- queryArray.push("brand=" + params.brand);
4602
- }
4603
- if (params?.level !== void 0) {
4604
- queryArray.push("level=" + params.level);
4605
- }
4606
- if (params?.isDigital !== void 0) {
4607
- queryArray.push("isDigital=" + params.isDigital);
4608
- }
4609
- if (params?.isTransferable !== void 0) {
4610
- queryArray.push("isTransferable=" + params.isTransferable);
4611
- }
4612
- if (params?.requiresPin !== void 0) {
4613
- queryArray.push("requiresPin=" + params.requiresPin);
4567
+ if (params?.propertyId !== void 0) {
4568
+ queryArray.push("propertyId=" + params.propertyId);
4614
4569
  }
4615
4570
  if (options?.limit !== void 0) {
4616
4571
  queryArray.push("limit=" + options.limit);
@@ -4623,19 +4578,18 @@ var BenefitCardsService = class extends Service {
4623
4578
  method: "GET",
4624
4579
  url: "benefitCards?" + queryArray.join("&"),
4625
4580
  body: void 0,
4626
- authenticationNotOptional: false
4581
+ authenticationNotOptional: true
4627
4582
  },
4628
4583
  options
4629
4584
  );
4630
4585
  }
4631
4586
  async retrieve(params, options) {
4632
- const queryArray = [];
4633
4587
  return await super.sendRequest(
4634
4588
  {
4635
4589
  method: "GET",
4636
- url: "benefitCards/" + params.benefitCardId + "?" + queryArray.join("&"),
4590
+ url: "benefitCards/" + params.benefitCardId,
4637
4591
  body: void 0,
4638
- authenticationNotOptional: false
4592
+ authenticationNotOptional: true
4639
4593
  },
4640
4594
  options
4641
4595
  );
@@ -4646,26 +4600,10 @@ var BenefitCardsService = class extends Service {
4646
4600
  method: "PATCH",
4647
4601
  url: "benefitCards/" + params.benefitCardId,
4648
4602
  body: {
4603
+ imageLight: params.imageLight,
4604
+ imageDark: params.imageDark,
4649
4605
  userId: params.userId,
4650
- cardNumber: params.cardNumber,
4651
- cardHolderName: params.cardHolderName,
4652
- type: params.type,
4653
- status: params.status,
4654
- benefits: params.benefits,
4655
- limits: params.limits,
4656
- metadata: params.metadata,
4657
- pointsBalance: params.pointsBalance,
4658
- cashbackBalance: params.cashbackBalance,
4659
- totalSavings: params.totalSavings,
4660
- totalSpent: params.totalSpent,
4661
- transactionCount: params.transactionCount,
4662
- expiresAt: params.expiresAt,
4663
- isDigital: params.isDigital,
4664
- isTransferable: params.isTransferable,
4665
- requiresPin: params.requiresPin,
4666
- pin: params.pin,
4667
- qrCode: params.qrCode,
4668
- barcode: params.barcode
4606
+ reference: params.reference
4669
4607
  },
4670
4608
  authenticationNotOptional: true
4671
4609
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.291",
3
+ "version": "1.2.292",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",