@zeniai/client-epic-state 4.17.75 → 4.17.77

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.
@@ -7,7 +7,6 @@ export interface ChargeCardRepayment {
7
7
  createTime: ZeniDate;
8
8
  dueAmount: Amount;
9
9
  dueDate: ZeniDate;
10
- isAutoPayEnabled: boolean;
11
10
  isDeleted: boolean;
12
11
  paidById: ID;
13
12
  paymentMethod: string;
@@ -22,6 +21,7 @@ export interface ChargeCardRepayment {
22
21
  statusDescription: string;
23
22
  updateTime: ZeniDate;
24
23
  zeniCreditAccountId: ID;
24
+ isAutoPayEnabled?: boolean;
25
25
  providerCounterpartyAccountId?: ID;
26
26
  thirdPartyTransactionId?: string;
27
27
  }
@@ -7,7 +7,6 @@ export interface ChargeCardRepaymentPayload {
7
7
  currency_symbol: string;
8
8
  due_amount: number;
9
9
  due_date: string;
10
- is_auto_pay_enabled: boolean;
11
10
  is_deleted: boolean;
12
11
  paid_by_user_id: string;
13
12
  payment_method: string;
@@ -24,5 +23,6 @@ export interface ChargeCardRepaymentPayload {
24
23
  third_party_transaction_id: string | null;
25
24
  update_time: string;
26
25
  zeni_credit_account_id: string;
26
+ is_auto_pay_enabled?: boolean;
27
27
  }
28
28
  export declare const mapChargeCardRepaymentPayloadToChargeCardRepayment: (payload: ChargeCardRepaymentPayload) => ChargeCardRepayment;
@@ -156,7 +156,7 @@ interface CompanyChargeCardInfoDataPayload {
156
156
  primary_funding_account: {
157
157
  account_id: string | null;
158
158
  account_type: string | null;
159
- is_auto_pay_enabled: boolean;
159
+ is_auto_pay_enabled?: boolean;
160
160
  };
161
161
  }
162
162
  interface CompanyDebitCardInfoDataPayload {
@@ -239,9 +239,9 @@ interface UserDebitCardInfo {
239
239
  }
240
240
  export interface CompanyChargeCardInfo extends UserChargeCardInfo {
241
241
  chargeCardsCreditAccountLimit: number;
242
- isAutoPayEnabled: boolean;
243
242
  isChargeCardEnabled: boolean;
244
243
  chargeCardTOSAcceptanceUserid?: ID;
244
+ isAutoPayEnabled?: boolean;
245
245
  primaryFundingAccount?: {
246
246
  accountId: ID;
247
247
  accountType: AccountTypeSubConfigCodeKeyType;
@@ -8,10 +8,11 @@ export declare const fetchChargeCardSetupView: import("@reduxjs/toolkit").Action
8
8
  }, "chargeCardSetupView/fetchChargeCardSetupView", never, never>, fetchChargeCardSetupViewSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/fetchChargeCardSetupViewSuccess">, fetchChargeCardSetupViewFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/fetchChargeCardSetupViewFailure", never, never>, enableChargeCardAutoPay: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, isAutoPayEnabled: boolean], {
9
9
  companyId: string;
10
10
  isAutoPayEnabled: boolean;
11
- }, "chargeCardSetupView/enableChargeCardAutoPay", never, never>, enableChargeCardAutoPaySuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/enableChargeCardAutoPaySuccess">, enableChargeCardAutoPayFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/enableChargeCardAutoPayFailure", never, never>, acceptChargeCardTerms: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, enableChargeCard: boolean, chargeCardSetupViewType: "charge_cards" | "debit_cards" | "charge_cards__debit_cards"], {
11
+ }, "chargeCardSetupView/enableChargeCardAutoPay", never, never>, enableChargeCardAutoPaySuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/enableChargeCardAutoPaySuccess">, enableChargeCardAutoPayFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/enableChargeCardAutoPayFailure", never, never>, acceptChargeCardTerms: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, enableChargeCard: boolean, chargeCardSetupViewType: "charge_cards" | "debit_cards" | "charge_cards__debit_cards", isEarlyPayEnabled: boolean], {
12
12
  companyId: string;
13
13
  enableChargeCard: boolean;
14
14
  chargeCardSetupViewType: "charge_cards" | "debit_cards" | "charge_cards__debit_cards";
15
+ isEarlyPayEnabled: boolean;
15
16
  }, "chargeCardSetupView/acceptChargeCardTerms", never, never>, acceptChargeCardTermsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/acceptChargeCardTermsSuccess">, acceptChargeCardTermsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/acceptChargeCardTermsFailure", never, never>, clearChargeCardSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/clearChargeCardSetupView">;
16
17
  declare const _default: import("redux").Reducer<ChargeCardSetupViewState>;
17
18
  export default _default;
@@ -87,9 +87,14 @@ const chargeCardSetupView = (0, toolkit_1.createSlice)({
87
87
  },
88
88
  });
89
89
  },
90
- prepare(companyId, enableChargeCard, chargeCardSetupViewType) {
90
+ prepare(companyId, enableChargeCard, chargeCardSetupViewType, isEarlyPayEnabled) {
91
91
  return {
92
- payload: { companyId, enableChargeCard, chargeCardSetupViewType },
92
+ payload: {
93
+ companyId,
94
+ enableChargeCard,
95
+ chargeCardSetupViewType,
96
+ isEarlyPayEnabled,
97
+ },
93
98
  };
94
99
  },
95
100
  },
@@ -10,21 +10,14 @@ const userRoleReducer_1 = require("../../../../../entity/userRole/userRoleReduce
10
10
  const responsePayload_1 = require("../../../../../responsePayload");
11
11
  const chargeCardSetUpViewReducer_1 = require("../chargeCardSetUpViewReducer");
12
12
  const acceptChargeCardTermsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardSetUpViewReducer_1.acceptChargeCardTerms.match), (0, operators_1.mergeMap)((action) => {
13
- const { companyId, enableChargeCard, chargeCardSetupViewType } = action.payload;
13
+ const { companyId, enableChargeCard, chargeCardSetupViewType, isEarlyPayEnabled, } = action.payload;
14
14
  let payload;
15
15
  switch (chargeCardSetupViewType) {
16
16
  case 'charge_cards':
17
- payload = Object.assign({ is_charge_cards_tos_accepted: true }, (enableChargeCard && {
18
- is_charge_cards_enabled: true,
19
- is_auto_pay_enabled: true,
20
- }));
17
+ payload = Object.assign({ is_charge_cards_tos_accepted: true }, (enableChargeCard && Object.assign({ is_charge_cards_enabled: true }, (isEarlyPayEnabled && { is_auto_pay_enabled: true }))));
21
18
  break;
22
19
  case 'charge_cards__debit_cards':
23
- payload = Object.assign({ is_charge_cards_tos_accepted: true, is_debit_cards_tos_accepted: true }, (enableChargeCard && {
24
- is_charge_cards_enabled: true,
25
- is_debit_cards_enabled: true,
26
- is_auto_pay_enabled: true,
27
- }));
20
+ payload = Object.assign({ is_charge_cards_tos_accepted: true, is_debit_cards_tos_accepted: true }, (enableChargeCard && Object.assign({ is_charge_cards_enabled: true, is_debit_cards_enabled: true }, (isEarlyPayEnabled && { is_auto_pay_enabled: true }))));
28
21
  break;
29
22
  case 'debit_cards':
30
23
  payload = Object.assign({ is_debit_cards_tos_accepted: true }, (enableChargeCard && { is_debit_cards_enabled: true }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.17.75",
3
+ "version": "4.17.77",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",