@zeniai/client-epic-state 5.1.0 → 5.1.1-beta0ND
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/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +4 -0
- package/lib/entity/company/companyStateTypes.d.ts +4 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +18 -6
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +9 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +2 -2
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.d.ts +38 -25
- package/lib/entity/tenant/tenantReducer.js +70 -10
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +4 -2
- package/lib/epic.d.ts +8 -3
- package/lib/epic.js +9 -3
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +1 -1
- package/lib/esm/entity/company/companyPayload.js +4 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +18 -6
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +8 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
- package/lib/esm/entity/tenant/tenantReducer.js +68 -8
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +4 -2
- package/lib/esm/epic.js +9 -3
- package/lib/esm/index.js +12 -9
- package/lib/esm/reducer.js +3 -3
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +3 -3
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
- package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
- package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
- package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +218 -50
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +12 -2
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +1 -1
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -1
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +1 -3
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +1 -2
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +1 -1
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +77 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +207 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +106 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +41 -0
- package/lib/index.d.ts +15 -11
- package/lib/index.js +64 -44
- package/lib/reducer.d.ts +3 -3
- package/lib/reducer.js +3 -3
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +1 -1
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +2 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -1
- package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
- package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
- package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +44 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +220 -51
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +15 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -1
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +1 -3
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +1 -1
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +1 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +9 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +81 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +29 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +215 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +107 -53
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +154 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +46 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "DistributionDark" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "Recurring" | "RecurringDark" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Ripple" | "Secure" | "Target" | "TargetDark" | "UnlockCard" | "VeryHappy" | "ZeniAssist";
|
|
1
|
+
export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "DistributionDark" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "Recurring" | "RecurringDark" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Ripple" | "Secure" | "Target" | "TargetDark" | "UnlockCard" | "VeryHappy" | "Welcome" | "ZeniAssist";
|
|
2
2
|
export type AnimationFileName = ReturnType<typeof toAnimationsFileName>;
|
|
@@ -320,6 +320,10 @@ interface CompanyOnboardingInfoPayload {
|
|
|
320
320
|
is_subsidiary: boolean;
|
|
321
321
|
onboarding_user_ids: ID[];
|
|
322
322
|
parent_company_id: ID | null;
|
|
323
|
+
is_onboarding_ai_activation_viewed?: boolean;
|
|
324
|
+
is_onboarding_ai_finance_team_acknowledged?: boolean;
|
|
325
|
+
onboarding_ai_activation_viewed_by?: ID[];
|
|
326
|
+
onboarding_ai_finance_team_acknowledged_by?: ID[];
|
|
323
327
|
onboarding_info?: OnboardingInfoPayload;
|
|
324
328
|
subscription_billing_address_id?: ID;
|
|
325
329
|
}
|
|
@@ -333,7 +333,11 @@ const toCompanyOnboardingInfo = (payload) => ({
|
|
|
333
333
|
onboardingUserIds: payload.onboarding_user_ids,
|
|
334
334
|
isSubsidiary: payload.is_subsidiary,
|
|
335
335
|
parentCompanyId: payload.parent_company_id != null ? payload.parent_company_id : undefined,
|
|
336
|
+
isOnboardingAiFinanceTeamAcknowledged: payload.is_onboarding_ai_finance_team_acknowledged ?? false,
|
|
337
|
+
isOnboardingAiActivationViewed: payload.is_onboarding_ai_activation_viewed ?? false,
|
|
336
338
|
isOnboardingCompanyDetailsCompleted: payload.is_onboarding_company_details_step_completed,
|
|
339
|
+
onboardingAiFinanceTeamAcknowledgedBy: payload.onboarding_ai_finance_team_acknowledged_by ?? [],
|
|
340
|
+
onboardingAiActivationViewedBy: payload.onboarding_ai_activation_viewed_by ?? [],
|
|
337
341
|
onboardingInfo: (0, exports.toOnboardingInfo)(payload.onboarding_info),
|
|
338
342
|
isOnboardingCompleted: payload.is_onboarding_completed,
|
|
339
343
|
subscriptionBillingAddressId: payload.subscription_billing_address_id,
|
|
@@ -323,9 +323,13 @@ export interface OnboardingInfo extends OnboardingStepsInfo {
|
|
|
323
323
|
onboardingToQuoteSignMinutes?: number;
|
|
324
324
|
}
|
|
325
325
|
export interface CompanyOnboardingInfo {
|
|
326
|
+
isOnboardingAiActivationViewed: boolean;
|
|
327
|
+
isOnboardingAiFinanceTeamAcknowledged: boolean;
|
|
326
328
|
isOnboardingCompanyDetailsCompleted: boolean;
|
|
327
329
|
isOnboardingCompleted: boolean;
|
|
328
330
|
isSubsidiary: boolean;
|
|
331
|
+
onboardingAiActivationViewedBy: ID[];
|
|
332
|
+
onboardingAiFinanceTeamAcknowledgedBy: ID[];
|
|
329
333
|
onboardingUserIds: ID[];
|
|
330
334
|
onboardingInfo?: OnboardingInfo;
|
|
331
335
|
parentCompanyId?: ID;
|
|
@@ -155,28 +155,36 @@ function toJEScheduleAISummaries(payload) {
|
|
|
155
155
|
result.debitAccount = {
|
|
156
156
|
confidence: payload.debit_account.confidence,
|
|
157
157
|
reasoning: payload.debit_account.reasoning,
|
|
158
|
-
cot: Array.isArray(payload.debit_account.cot)
|
|
158
|
+
cot: Array.isArray(payload.debit_account.cot)
|
|
159
|
+
? payload.debit_account.cot
|
|
160
|
+
: undefined,
|
|
159
161
|
};
|
|
160
162
|
}
|
|
161
163
|
if (payload.credit_account != null) {
|
|
162
164
|
result.creditAccount = {
|
|
163
165
|
confidence: payload.credit_account.confidence,
|
|
164
166
|
reasoning: payload.credit_account.reasoning,
|
|
165
|
-
cot: Array.isArray(payload.credit_account.cot)
|
|
167
|
+
cot: Array.isArray(payload.credit_account.cot)
|
|
168
|
+
? payload.credit_account.cot
|
|
169
|
+
: undefined,
|
|
166
170
|
};
|
|
167
171
|
}
|
|
168
172
|
if (payload.debit_accounting_class != null) {
|
|
169
173
|
result.debitClass = {
|
|
170
174
|
confidence: payload.debit_accounting_class.confidence,
|
|
171
175
|
reasoning: payload.debit_accounting_class.reasoning,
|
|
172
|
-
cot: Array.isArray(payload.debit_accounting_class.cot)
|
|
176
|
+
cot: Array.isArray(payload.debit_accounting_class.cot)
|
|
177
|
+
? payload.debit_accounting_class.cot
|
|
178
|
+
: undefined,
|
|
173
179
|
};
|
|
174
180
|
}
|
|
175
181
|
if (payload.credit_accounting_class != null) {
|
|
176
182
|
result.creditClass = {
|
|
177
183
|
confidence: payload.credit_accounting_class.confidence,
|
|
178
184
|
reasoning: payload.credit_accounting_class.reasoning,
|
|
179
|
-
cot: Array.isArray(payload.credit_accounting_class.cot)
|
|
185
|
+
cot: Array.isArray(payload.credit_accounting_class.cot)
|
|
186
|
+
? payload.credit_accounting_class.cot
|
|
187
|
+
: undefined,
|
|
180
188
|
};
|
|
181
189
|
}
|
|
182
190
|
if (payload.period != null) {
|
|
@@ -190,14 +198,18 @@ function toJEScheduleAISummaries(payload) {
|
|
|
190
198
|
result.postingDate = {
|
|
191
199
|
confidence: payload.posting_date.confidence,
|
|
192
200
|
reasoning: payload.posting_date.reasoning,
|
|
193
|
-
cot: Array.isArray(payload.posting_date.cot)
|
|
201
|
+
cot: Array.isArray(payload.posting_date.cot)
|
|
202
|
+
? payload.posting_date.cot
|
|
203
|
+
: undefined,
|
|
194
204
|
};
|
|
195
205
|
}
|
|
196
206
|
if (payload.schedule_type != null) {
|
|
197
207
|
result.scheduleType = {
|
|
198
208
|
confidence: payload.schedule_type.confidence,
|
|
199
209
|
reasoning: payload.schedule_type.reasoning,
|
|
200
|
-
cot: Array.isArray(payload.schedule_type.cot)
|
|
210
|
+
cot: Array.isArray(payload.schedule_type.cot)
|
|
211
|
+
? payload.schedule_type.cot
|
|
212
|
+
: undefined,
|
|
201
213
|
};
|
|
202
214
|
}
|
|
203
215
|
return Object.keys(result).length > 0 ? result : undefined;
|
|
@@ -4,3 +4,4 @@ export declare function getPaymentAccountsByPaymentAccountIds(paymentAccountStat
|
|
|
4
4
|
export declare function getPaymentAccountByPaymentAccountId(paymentAccountState: PaymentAccountState, PaymentAccountId: ID): PaymentAccount | undefined;
|
|
5
5
|
export declare function getPaymentAccountByBankAccountId(paymentAccountState: PaymentAccountState, bankAccountId: ID): PaymentAccount | undefined;
|
|
6
6
|
export declare function getPaymentAccountsByBankAccountIds(paymentAccountState: PaymentAccountState, bankAccountIds: ID[]): PaymentAccount[];
|
|
7
|
+
export declare function getPlaidPaymentAccounts(paymentAccountState: PaymentAccountState): PaymentAccount[];
|
|
@@ -7,6 +7,7 @@ exports.getPaymentAccountsByPaymentAccountIds = getPaymentAccountsByPaymentAccou
|
|
|
7
7
|
exports.getPaymentAccountByPaymentAccountId = getPaymentAccountByPaymentAccountId;
|
|
8
8
|
exports.getPaymentAccountByBankAccountId = getPaymentAccountByBankAccountId;
|
|
9
9
|
exports.getPaymentAccountsByBankAccountIds = getPaymentAccountsByBankAccountIds;
|
|
10
|
+
exports.getPlaidPaymentAccounts = getPlaidPaymentAccounts;
|
|
10
11
|
const get_1 = __importDefault(require("lodash/get"));
|
|
11
12
|
const values_1 = __importDefault(require("lodash/values"));
|
|
12
13
|
function getPaymentAccountsByPaymentAccountIds(paymentAccountState, paymentAccountIds) {
|
|
@@ -28,3 +29,11 @@ function getPaymentAccountsByBankAccountIds(paymentAccountState, bankAccountIds)
|
|
|
28
29
|
.filter((value) => value != null);
|
|
29
30
|
return paymentAccounts;
|
|
30
31
|
}
|
|
32
|
+
function getPlaidPaymentAccounts(paymentAccountState) {
|
|
33
|
+
if (paymentAccountState?.paymentAccountByID == null) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
return (0, values_1.default)(paymentAccountState.paymentAccountByID)
|
|
37
|
+
.filter((account) => account != null)
|
|
38
|
+
.filter((account) => account.provider === 'plaid');
|
|
39
|
+
}
|
|
@@ -84,8 +84,6 @@ import { clearScheduleDetailView } from '../../view/scheduleView/scheduleDetailV
|
|
|
84
84
|
import { clearScheduleList } from '../../view/scheduleView/scheduleListView/scheduleListReducer';
|
|
85
85
|
import { clearSettingsView } from '../../view/settingsView/settingsViewReducer';
|
|
86
86
|
import { clearAutoTransferRules } from '../../view/spendManagement/autotransferRules/autoTransferRulesReducer';
|
|
87
|
-
import { clearAutoSweepFlow } from '../../view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
|
|
88
|
-
import { clearCashManagementOverview } from '../../view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
|
|
89
87
|
import { clearBillDetailView } from '../../view/spendManagement/billPay/billDetailView/billDetailViewReducer';
|
|
90
88
|
import { clearBillList } from '../../view/spendManagement/billPay/billList/billListReducer';
|
|
91
89
|
import { clearBillPayConfig } from '../../view/spendManagement/billPay/billPayConfig/billPayConfigReducer';
|
|
@@ -98,6 +96,8 @@ import { clearInternationalWire } from '../../view/spendManagement/billPay/inter
|
|
|
98
96
|
import { clearInternationalVerificationView } from '../../view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
99
97
|
import { clearPreviousBills } from '../../view/spendManagement/billPay/previousBills/previousBillsReducer';
|
|
100
98
|
import { clearWiseRedirectStatus } from '../../view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
|
|
99
|
+
import { clearAutoSweepFlow } from '../../view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer';
|
|
100
|
+
import { clearCashManagementOverview } from '../../view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer';
|
|
101
101
|
import { clearCardPolicyDetail } from '../../view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer';
|
|
102
102
|
import { clearCardPolicyList } from '../../view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
|
|
103
103
|
import { clearCreateCardPolicy } from '../../view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
|
|
@@ -88,8 +88,6 @@ const scheduleDetailReducer_1 = require("../../view/scheduleView/scheduleDetailV
|
|
|
88
88
|
const scheduleListReducer_1 = require("../../view/scheduleView/scheduleListView/scheduleListReducer");
|
|
89
89
|
const settingsViewReducer_1 = require("../../view/settingsView/settingsViewReducer");
|
|
90
90
|
const autoTransferRulesReducer_1 = require("../../view/spendManagement/autotransferRules/autoTransferRulesReducer");
|
|
91
|
-
const autoSweepFlowReducer_1 = require("../../view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer");
|
|
92
|
-
const cashManagementOverviewReducer_1 = require("../../view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer");
|
|
93
91
|
const billDetailViewReducer_1 = require("../../view/spendManagement/billPay/billDetailView/billDetailViewReducer");
|
|
94
92
|
const billListReducer_1 = require("../../view/spendManagement/billPay/billList/billListReducer");
|
|
95
93
|
const billPayConfigReducer_1 = require("../../view/spendManagement/billPay/billPayConfig/billPayConfigReducer");
|
|
@@ -102,6 +100,8 @@ const internationalWireReducer_1 = require("../../view/spendManagement/billPay/i
|
|
|
102
100
|
const internationalWireVerificationReducer_1 = require("../../view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer");
|
|
103
101
|
const previousBillsReducer_1 = require("../../view/spendManagement/billPay/previousBills/previousBillsReducer");
|
|
104
102
|
const wiseRedirectReducer_1 = require("../../view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer");
|
|
103
|
+
const autoSweepFlowReducer_1 = require("../../view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer");
|
|
104
|
+
const cashManagementOverviewReducer_1 = require("../../view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer");
|
|
105
105
|
const cardPolicyDetailReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer");
|
|
106
106
|
const cardPolicyListReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer");
|
|
107
107
|
const createCardPolicyReducer_1 = require("../../view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer");
|
|
@@ -7,7 +7,7 @@ export declare const deleteConnectionEpic: (actions$: ActionsObservable<ActionTy
|
|
|
7
7
|
payload: {
|
|
8
8
|
tenantId: string;
|
|
9
9
|
connectionId: string;
|
|
10
|
-
connectionType: "revenue" | "payments";
|
|
10
|
+
connectionType: "revenue" | "email" | "payments";
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/deleteConnectionSuccess";
|
|
13
13
|
} | {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
+
import { initEmailConnectOAuth, initEmailConnectOAuthFailure, initEmailConnectOAuthSuccess } from '../tenantReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof initEmailConnectOAuth> | ReturnType<typeof initEmailConnectOAuthSuccess> | ReturnType<typeof initEmailConnectOAuthFailure>;
|
|
6
|
+
export type NavigateFn = (url: string) => void;
|
|
7
|
+
export declare const initEmailConnectOAuthEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI, navigate?: NavigateFn) => import("rxjs").Observable<{
|
|
8
|
+
payload: {
|
|
9
|
+
tenantId: string;
|
|
10
|
+
provider: "gmail" | "outlook";
|
|
11
|
+
authorizationUrl: string;
|
|
12
|
+
};
|
|
13
|
+
type: "tenant/initEmailConnectOAuthSuccess";
|
|
14
|
+
} | {
|
|
15
|
+
payload: {
|
|
16
|
+
tenantId: string;
|
|
17
|
+
provider: "gmail" | "outlook";
|
|
18
|
+
status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
19
|
+
};
|
|
20
|
+
type: "tenant/initEmailConnectOAuthFailure";
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initEmailConnectOAuthEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const tenantReducer_1 = require("../tenantReducer");
|
|
8
|
+
const defaultNavigate = (url) => {
|
|
9
|
+
// Production path: full-page redirect. The user's session continues on the
|
|
10
|
+
// provider's consent screen and lands back on this app via auth's HTML
|
|
11
|
+
// callback page (which itself redirects to redirect_after_url with the
|
|
12
|
+
// result encoded as a query param).
|
|
13
|
+
if (typeof window !== 'undefined') {
|
|
14
|
+
window.location.href = url;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
// Backs the new POST /1.0/connectors/email/<provider>/init endpoint on the
|
|
18
|
+
// auth service. The endpoint creates a CSRF state token in the auth NDB
|
|
19
|
+
// store and returns the provider's authorization_url; this epic then drives
|
|
20
|
+
// a full-page redirect so the user lands on Google's / Microsoft's consent
|
|
21
|
+
// screen. After consent the user lands on auth's callback, which writes the
|
|
22
|
+
// resulting tokens through to tenant and redirects the browser back to
|
|
23
|
+
// ``redirectAfterUrl`` with ``?email_connect_result=<json>`` for the
|
|
24
|
+
// integrations page to consume on mount.
|
|
25
|
+
const initEmailConnectOAuthEpic = (actions$, _state$, zeniAPI,
|
|
26
|
+
// Test seam: callers can override to assert intended URL without actually
|
|
27
|
+
// navigating. Default is full-page redirect via window.location.
|
|
28
|
+
navigate = defaultNavigate) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.initEmailConnectOAuth.match), (0, operators_1.switchMap)((action) => zeniAPI
|
|
29
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/connectors/email/${action.payload.provider}/init`, { redirect_after_url: action.payload.redirectAfterUrl }, { 'zeni-tenant-id': action.payload.tenantId })
|
|
30
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
31
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
32
|
+
// Fire-and-forget side effect — once the browser navigates,
|
|
33
|
+
// any further state we'd dispatch here is irrelevant. We still
|
|
34
|
+
// emit the success action so subscribers (tests, analytics)
|
|
35
|
+
// can observe the URL the epic decided to navigate to.
|
|
36
|
+
navigate(response.data.authorization_url);
|
|
37
|
+
return (0, rxjs_1.from)([
|
|
38
|
+
(0, tenantReducer_1.initEmailConnectOAuthSuccess)(action.payload.tenantId, action.payload.provider, response.data.authorization_url),
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
const status = response.status ??
|
|
42
|
+
(0, responsePayload_1.createZeniAPIStatus)(`Failed to start ${action.payload.provider} connection. Please try again.`);
|
|
43
|
+
return (0, rxjs_1.from)([
|
|
44
|
+
(0, tenantReducer_1.initEmailConnectOAuthFailure)(action.payload.tenantId, action.payload.provider, status),
|
|
45
|
+
]);
|
|
46
|
+
}), (0, operators_1.catchError)((error) => {
|
|
47
|
+
const message = error instanceof Error
|
|
48
|
+
? error.message
|
|
49
|
+
: `Unexpected error starting ${action.payload.provider} connection.`;
|
|
50
|
+
return (0, rxjs_1.from)([
|
|
51
|
+
(0, tenantReducer_1.initEmailConnectOAuthFailure)(action.payload.tenantId, action.payload.provider, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
52
|
+
]);
|
|
53
|
+
}))));
|
|
54
|
+
exports.initEmailConnectOAuthEpic = initEmailConnectOAuthEpic;
|
|
@@ -6,7 +6,7 @@ export type ActionType = ReturnType<typeof saveAPIKeyConnection> | ReturnType<ty
|
|
|
6
6
|
export declare const saveAPIKeyConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: {
|
|
8
8
|
tenantId: string;
|
|
9
|
-
connectionType: "revenue" | "payments";
|
|
9
|
+
connectionType: "revenue" | "email" | "payments";
|
|
10
10
|
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/saveAPIKeyConnectionSuccess";
|
|
@@ -6,15 +6,15 @@ export type ActionType = ReturnType<typeof saveConnectorCredentials> | ReturnTyp
|
|
|
6
6
|
export declare const saveConnectorCredentialsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: {
|
|
8
8
|
tenantId: string;
|
|
9
|
-
connectionType: "revenue" | "payments";
|
|
10
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
9
|
+
connectionType: "revenue" | "email" | "payments";
|
|
10
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
11
11
|
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
12
12
|
};
|
|
13
13
|
type: "tenant/saveConnectorCredentialsSuccess";
|
|
14
14
|
} | {
|
|
15
15
|
payload: {
|
|
16
16
|
tenantId: string;
|
|
17
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
17
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
18
18
|
status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
19
19
|
};
|
|
20
20
|
type: "tenant/saveConnectorCredentialsFailure";
|
|
@@ -6,7 +6,7 @@ export type ActionType = ReturnType<typeof saveOAuthConnection> | ReturnType<typ
|
|
|
6
6
|
export declare const saveOAuthConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
7
|
payload: {
|
|
8
8
|
tenantId: string;
|
|
9
|
-
connectionType: "revenue" | "payments";
|
|
9
|
+
connectionType: "revenue" | "email" | "payments";
|
|
10
10
|
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/saveOAuthConnectionSuccess";
|
|
@@ -13,9 +13,9 @@ export interface DoSignInPayload {
|
|
|
13
13
|
redirectUri: ZeniUrl;
|
|
14
14
|
sourceUri: ZeniUrl;
|
|
15
15
|
}
|
|
16
|
-
export declare const toExternalIntegrationType: (v: string) => "revenue" | "payments";
|
|
16
|
+
export declare const toExternalIntegrationType: (v: string) => "revenue" | "email" | "payments";
|
|
17
17
|
export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
|
|
18
|
-
export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
18
|
+
export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
19
19
|
export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
|
|
20
20
|
export type ConnectorCredentialsBySlug = {
|
|
21
21
|
connectionName: 'stripe';
|
|
@@ -101,26 +101,26 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
101
101
|
}, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
|
|
102
102
|
tenantId: string;
|
|
103
103
|
externalConnections: ConnectionsPayload;
|
|
104
|
-
}, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", credentials: {
|
|
104
|
+
}, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", credentials: {
|
|
105
105
|
api_key: string;
|
|
106
106
|
site: string;
|
|
107
107
|
}], {
|
|
108
108
|
tenantId: string;
|
|
109
109
|
connectionId: string;
|
|
110
|
-
connectionType: "revenue" | "payments";
|
|
111
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
110
|
+
connectionType: "revenue" | "email" | "payments";
|
|
111
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
112
112
|
credentials: {
|
|
113
113
|
api_key: string;
|
|
114
114
|
site: string;
|
|
115
115
|
};
|
|
116
|
-
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
116
|
+
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
117
117
|
tenantId: string;
|
|
118
|
-
connectionType: "revenue" | "payments";
|
|
118
|
+
connectionType: "revenue" | "email" | "payments";
|
|
119
119
|
connectionPayload: ConnectionDataPayload;
|
|
120
120
|
}, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
121
121
|
tenantId: string;
|
|
122
122
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
123
|
-
}, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", credentials: {
|
|
123
|
+
}, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", credentials: {
|
|
124
124
|
authorization_code: string;
|
|
125
125
|
client_id: string;
|
|
126
126
|
client_secret: string;
|
|
@@ -128,35 +128,35 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
128
128
|
}], {
|
|
129
129
|
tenantId: string;
|
|
130
130
|
connectionId: string;
|
|
131
|
-
connectionType: "revenue" | "payments";
|
|
132
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
131
|
+
connectionType: "revenue" | "email" | "payments";
|
|
132
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
133
133
|
credentials: {
|
|
134
134
|
authorization_code: string;
|
|
135
135
|
client_id: string;
|
|
136
136
|
client_secret: string;
|
|
137
137
|
redirect_uri: string;
|
|
138
138
|
};
|
|
139
|
-
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
139
|
+
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
140
140
|
tenantId: string;
|
|
141
|
-
connectionType: "revenue" | "payments";
|
|
141
|
+
connectionType: "revenue" | "email" | "payments";
|
|
142
142
|
connectionPayload: ConnectionDataPayload;
|
|
143
143
|
}, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
144
144
|
tenantId: string;
|
|
145
145
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
146
|
-
}, "tenant/saveOAuthConnectionFailure", never, never>, saveConnectorCredentials: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", args: ConnectorCredentialsBySlug], {
|
|
146
|
+
}, "tenant/saveOAuthConnectionFailure", never, never>, saveConnectorCredentials: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", args: ConnectorCredentialsBySlug], {
|
|
147
147
|
connectionName: "stripe";
|
|
148
148
|
credentials: {
|
|
149
149
|
api_key: string;
|
|
150
150
|
};
|
|
151
151
|
tenantId: string;
|
|
152
|
-
connectionType: "revenue" | "payments";
|
|
152
|
+
connectionType: "revenue" | "email" | "payments";
|
|
153
153
|
} | {
|
|
154
154
|
connectionName: "mercury";
|
|
155
155
|
credentials: {
|
|
156
156
|
api_key: string;
|
|
157
157
|
};
|
|
158
158
|
tenantId: string;
|
|
159
|
-
connectionType: "revenue" | "payments";
|
|
159
|
+
connectionType: "revenue" | "email" | "payments";
|
|
160
160
|
} | {
|
|
161
161
|
connectionName: "paypal";
|
|
162
162
|
credentials: {
|
|
@@ -164,24 +164,36 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
164
164
|
client_secret: string;
|
|
165
165
|
};
|
|
166
166
|
tenantId: string;
|
|
167
|
-
connectionType: "revenue" | "payments";
|
|
168
|
-
}, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", connectionPayload: ConnectionDataPayload], {
|
|
167
|
+
connectionType: "revenue" | "email" | "payments";
|
|
168
|
+
}, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", connectionPayload: ConnectionDataPayload], {
|
|
169
169
|
tenantId: string;
|
|
170
|
-
connectionType: "revenue" | "payments";
|
|
171
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
170
|
+
connectionType: "revenue" | "email" | "payments";
|
|
171
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
172
172
|
connectionPayload: ConnectionDataPayload;
|
|
173
|
-
}, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
173
|
+
}, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
174
174
|
tenantId: string;
|
|
175
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
175
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
176
176
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
177
|
-
}, "tenant/saveConnectorCredentialsFailure", never, never>,
|
|
177
|
+
}, "tenant/saveConnectorCredentialsFailure", never, never>, initEmailConnectOAuth: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", redirectAfterUrl: string], {
|
|
178
|
+
tenantId: string;
|
|
179
|
+
provider: "gmail" | "outlook";
|
|
180
|
+
redirectAfterUrl: string;
|
|
181
|
+
}, "tenant/initEmailConnectOAuth", never, never>, initEmailConnectOAuthSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", authorizationUrl: string], {
|
|
182
|
+
tenantId: string;
|
|
183
|
+
provider: "gmail" | "outlook";
|
|
184
|
+
authorizationUrl: string;
|
|
185
|
+
}, "tenant/initEmailConnectOAuthSuccess", never, never>, initEmailConnectOAuthFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
186
|
+
tenantId: string;
|
|
187
|
+
provider: "gmail" | "outlook";
|
|
188
|
+
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
189
|
+
}, "tenant/initEmailConnectOAuthFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments"], {
|
|
178
190
|
tenantId: string;
|
|
179
191
|
connectionId: string;
|
|
180
|
-
connectionType: "revenue" | "payments";
|
|
181
|
-
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments"], {
|
|
192
|
+
connectionType: "revenue" | "email" | "payments";
|
|
193
|
+
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments"], {
|
|
182
194
|
tenantId: string;
|
|
183
195
|
connectionId: string;
|
|
184
|
-
connectionType: "revenue" | "payments";
|
|
196
|
+
connectionType: "revenue" | "email" | "payments";
|
|
185
197
|
}, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
186
198
|
tenantId: string;
|
|
187
199
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
@@ -241,6 +253,7 @@ export declare const toRoleResource: (payload: RoleResourcePayload) => RoleResou
|
|
|
241
253
|
*/
|
|
242
254
|
export declare function mapConnectionsPayloadToState(connectionsPayload: ConnectionsPayload): {
|
|
243
255
|
accounting: Connection[];
|
|
256
|
+
email: Connection[];
|
|
244
257
|
payments: Connection[];
|
|
245
258
|
revenue: Connection[];
|
|
246
259
|
};
|