@opexa/portal-sdk 0.59.30 → 0.59.34

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
@@ -149,11 +149,17 @@ var MEMBER_REBATES_QUERY = gql`
149
149
  }
150
150
  description
151
151
  name
152
+ rebatePercentage
153
+ rebateSettingsPerMemberLevel {
154
+ level
155
+ percentage
156
+ }
152
157
  type
153
158
  dateTimeCreated
154
159
  }
155
160
 
156
161
  amount
162
+ percentage
157
163
  status
158
164
  expirationDateTime
159
165
  dateTimeClaimed
@@ -8825,10 +8831,16 @@ var Transformer = class {
8825
8831
  } : void 0,
8826
8832
  description: data.rebateProgram.description,
8827
8833
  name: data.rebateProgram.name,
8834
+ rebatePercentage: parseDecimal(data.rebateProgram.rebatePercentage),
8835
+ rebateSettingsPerMemberLevel: data.rebateProgram.rebateSettingsPerMemberLevel?.map((settings) => ({
8836
+ level: settings.level,
8837
+ percentage: parseDecimal(settings.percentage, 0)
8838
+ })),
8828
8839
  type: data.rebateProgram.type,
8829
8840
  dateTimeCreated: data.rebateProgram.dateTimeCreated ? new Date(data.rebateProgram.dateTimeCreated) : void 0
8830
8841
  },
8831
8842
  amount: parseDecimal(data.amount, 0),
8843
+ percentage: parseDecimal(data.percentage),
8832
8844
  status: data.status,
8833
8845
  expirationDateTime: data.expirationDateTime ? new Date(data.expirationDateTime) : void 0,
8834
8846
  dateTimeClaimed: data.dateTimeClaimed ? new Date(data.dateTimeClaimed) : void 0,
@@ -9197,6 +9209,12 @@ var Transformer = class {
9197
9209
  };
9198
9210
 
9199
9211
  // src/sdk/sdk.ts
9212
+ function toDecimalVariable(value) {
9213
+ if (!Number.isFinite(value)) {
9214
+ throw new TypeError("Account limit must be a finite number.");
9215
+ }
9216
+ return value;
9217
+ }
9200
9218
  var defaultConfig = {
9201
9219
  environment: "development",
9202
9220
  logs: false
@@ -10024,28 +10042,28 @@ var Sdk = class {
10024
10042
  async updateDailyBetLimit(input) {
10025
10043
  return await this.accountService.updateDailyBetLimit({
10026
10044
  input: {
10027
- dailyBetLimit: input.dailyBetLimit.toString()
10045
+ dailyBetLimit: toDecimalVariable(input.dailyBetLimit)
10028
10046
  }
10029
10047
  });
10030
10048
  }
10031
10049
  async updateMonthlyBetLimit(input) {
10032
10050
  return await this.accountService.updateMonthlyBetLimit({
10033
10051
  input: {
10034
- monthlyBetLimit: input.monthlyBetLimit.toString()
10052
+ monthlyBetLimit: toDecimalVariable(input.monthlyBetLimit)
10035
10053
  }
10036
10054
  });
10037
10055
  }
10038
10056
  async updateDailyDepositLimit(input) {
10039
10057
  return await this.accountService.updateDailyDepositLimit({
10040
10058
  input: {
10041
- dailyDepositLimit: input.dailyDepositLimit.toString()
10059
+ dailyDepositLimit: toDecimalVariable(input.dailyDepositLimit)
10042
10060
  }
10043
10061
  });
10044
10062
  }
10045
10063
  async updateMonthlyDepositLimit(input) {
10046
10064
  return await this.accountService.updateMonthlyDepositLimit({
10047
10065
  input: {
10048
- monthlyDepositLimit: input.monthlyDepositLimit.toString()
10066
+ monthlyDepositLimit: toDecimalVariable(input.monthlyDepositLimit)
10049
10067
  }
10050
10068
  });
10051
10069
  }