@zeniai/client-epic-state 5.2.79-betaGS3 → 5.2.80
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/entity/invoicing/dunningCase/dunningCasePayload.d.ts +2 -0
- package/lib/entity/invoicing/dunningCase/dunningCasePayload.js +1 -0
- package/lib/entity/invoicing/dunningCase/dunningCaseState.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -29
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -39
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -32
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +0 -11
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -20
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +2 -2
- 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 +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +30 -32
- package/lib/entity/tenant/tenantReducer.js +2 -13
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/tenant/tenantTypes.d.ts +1 -1
- package/lib/entity/tenant/tenantTypes.js +0 -1
- package/lib/epic.d.ts +1 -8
- package/lib/epic.js +0 -14
- package/lib/esm/entity/invoicing/dunningCase/dunningCasePayload.js +1 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -39
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -15
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +2 -2
- package/lib/esm/entity/tenant/tenantReducer.js +2 -13
- package/lib/esm/entity/tenant/tenantTypes.js +0 -1
- package/lib/esm/epic.js +0 -14
- package/lib/esm/index.js +4 -9
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +4 -9
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -7
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +5 -16
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +3 -3
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -2
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -13
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -11
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -3
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -9
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningCaseDetailPageEpic.js +6 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +4 -1
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/epics/fetchInvoicingDunningCaseListPageEpic.js +7 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +23 -1
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +3 -0
- package/lib/index.d.ts +6 -13
- package/lib/index.js +48 -83
- package/lib/reducer.d.ts +0 -1
- package/lib/reducer.js +0 -3
- package/lib/rootStateTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +4 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +2 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -7
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +4 -15
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +1 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -13
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +5 -6
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -11
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -2
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -11
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningCaseDetailPageEpic.d.ts +2 -1
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningCaseDetailPageEpic.js +6 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +3 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +4 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/epics/fetchInvoicingDunningCaseListPageEpic.d.ts +2 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/epics/fetchInvoicingDunningCaseListPageEpic.js +7 -0
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.d.ts +18 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +25 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +3 -0
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/createCompensationAccrualEpic.js +0 -84
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/deletePayrollCycleEpic.js +0 -20
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationAccrualsEpic.js +0 -45
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationPageEpic.js +0 -16
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/fetchPayrollCyclesEpic.js +0 -18
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/promoteCompensationAccrualEpic.js +0 -52
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/upsertPayrollCycleEpic.js +0 -32
- package/lib/esm/view/expenseAutomationView/payload/compensationPayload.js +0 -163
- package/lib/esm/view/expenseAutomationView/reducers/compensationViewReducer.js +0 -204
- package/lib/esm/view/expenseAutomationView/selectorTypes/compensationViewSelectorTypes.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/compensationViewSelector.js +0 -87
- package/lib/esm/view/expenseAutomationView/types/compensationViewState.js +0 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/createCompensationAccrualEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/createCompensationAccrualEpic.js +0 -88
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/deletePayrollCycleEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/deletePayrollCycleEpic.js +0 -24
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationAccrualsEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationAccrualsEpic.js +0 -49
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationPageEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationPageEpic.js +0 -20
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchPayrollCyclesEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchPayrollCyclesEpic.js +0 -22
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/promoteCompensationAccrualEpic.d.ts +0 -13
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/promoteCompensationAccrualEpic.js +0 -56
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/upsertPayrollCycleEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/upsertPayrollCycleEpic.js +0 -36
- package/lib/view/expenseAutomationView/payload/compensationPayload.d.ts +0 -108
- package/lib/view/expenseAutomationView/payload/compensationPayload.js +0 -171
- package/lib/view/expenseAutomationView/reducers/compensationViewReducer.d.ts +0 -50
- package/lib/view/expenseAutomationView/reducers/compensationViewReducer.js +0 -208
- package/lib/view/expenseAutomationView/selectorTypes/compensationViewSelectorTypes.d.ts +0 -41
- package/lib/view/expenseAutomationView/selectorTypes/compensationViewSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectors/compensationViewSelector.d.ts +0 -12
- package/lib/view/expenseAutomationView/selectors/compensationViewSelector.js +0 -92
- package/lib/view/expenseAutomationView/types/compensationViewState.d.ts +0 -113
- package/lib/view/expenseAutomationView/types/compensationViewState.js +0 -5
|
@@ -21,6 +21,8 @@ export interface InvoicingDunningCasePayload {
|
|
|
21
21
|
next_retry?: string;
|
|
22
22
|
paused_reason?: string;
|
|
23
23
|
paused_until?: string;
|
|
24
|
+
/** The dunning schedule step a retry runs next. */
|
|
25
|
+
schedule_step?: number | null;
|
|
24
26
|
subscription_id?: string;
|
|
25
27
|
}
|
|
26
28
|
export declare const mapInvoicingDunningCasePayloadToState: (payload: InvoicingDunningCasePayload) => InvoicingDunningCase;
|
|
@@ -30,6 +30,7 @@ const mapInvoicingDunningCasePayloadToState = (payload) => {
|
|
|
30
30
|
nextRetry: payload.next_retry != null ? (0, zeniDayJS_1.date)(payload.next_retry) : undefined,
|
|
31
31
|
pausedReason: payload.paused_reason,
|
|
32
32
|
pausedUntil: payload.paused_until != null ? (0, zeniDayJS_1.date)(payload.paused_until) : undefined,
|
|
33
|
+
scheduleStep: payload.schedule_step ?? undefined,
|
|
33
34
|
subscriptionID: payload.subscription_id,
|
|
34
35
|
};
|
|
35
36
|
};
|
|
@@ -22,6 +22,8 @@ export interface InvoicingDunningCase {
|
|
|
22
22
|
nextRetry?: ZeniDate;
|
|
23
23
|
pausedReason?: string;
|
|
24
24
|
pausedUntil?: ZeniDate;
|
|
25
|
+
/** The dunning schedule step a retry runs next. */
|
|
26
|
+
scheduleStep?: number;
|
|
25
27
|
subscriptionID?: ID;
|
|
26
28
|
}
|
|
27
29
|
export interface InvoicingDunningCaseState {
|
|
@@ -7,7 +7,7 @@ import { TransactionIDPayload } from '../transaction/payloadTypes/transactionIDP
|
|
|
7
7
|
import { TransactionCategory } from '../transaction/stateTypes/transactionType';
|
|
8
8
|
import { UserPayload } from '../user/userPayload';
|
|
9
9
|
import { VendorPayload } from '../vendor/vendorPayload';
|
|
10
|
-
import {
|
|
10
|
+
import { JEAccruedScheduledTransactionState, JEOneTimeAccrualState, JEScheduledTransactionState, ScheduledJournalEntryState } from './jeSchedulesState';
|
|
11
11
|
import { JEScheduleKey, JEScheduleTransactionKey } from './jeSchedulesTypes';
|
|
12
12
|
export interface JEScheduleOtherAttributesPayload {
|
|
13
13
|
asset_id?: string | null;
|
|
@@ -155,25 +155,6 @@ export interface JEOneTimeAccrualMatchSuggestionPayload {
|
|
|
155
155
|
matched_transaction_type?: string | null;
|
|
156
156
|
resolution?: string | null;
|
|
157
157
|
}
|
|
158
|
-
export interface CompensationAccrualLinePayload {
|
|
159
|
-
account_id: ID | null;
|
|
160
|
-
account_name: string;
|
|
161
|
-
amount: number;
|
|
162
|
-
accounting_class_id?: ID | null;
|
|
163
|
-
accounting_class_name?: string | null;
|
|
164
|
-
daily_rate?: number | null;
|
|
165
|
-
}
|
|
166
|
-
export interface CompensationPayPeriodPayload {
|
|
167
|
-
day_count_policy: string;
|
|
168
|
-
end: string;
|
|
169
|
-
period_len_days: number;
|
|
170
|
-
start: string;
|
|
171
|
-
}
|
|
172
|
-
export interface CompensationUncoveredPayload {
|
|
173
|
-
days: number;
|
|
174
|
-
end: string;
|
|
175
|
-
start: string;
|
|
176
|
-
}
|
|
177
158
|
export interface JEOneTimeAccrualPayload {
|
|
178
159
|
_id: ID;
|
|
179
160
|
estimated_amount: number;
|
|
@@ -182,7 +163,6 @@ export interface JEOneTimeAccrualPayload {
|
|
|
182
163
|
status: string;
|
|
183
164
|
vendor_id: ID;
|
|
184
165
|
vendor_name: string;
|
|
185
|
-
accrual_type?: string | null;
|
|
186
166
|
actual_post_date?: string | null;
|
|
187
167
|
actual_reversal_post_date?: string | null;
|
|
188
168
|
ai_suggestion?: JEOneTimeAccrualAiSuggestionPayload | null;
|
|
@@ -200,12 +180,8 @@ export interface JEOneTimeAccrualPayload {
|
|
|
200
180
|
je_debit_account_name?: string | null;
|
|
201
181
|
je_debit_accounting_class_id?: ID | null;
|
|
202
182
|
je_debit_accounting_class_name?: string | null;
|
|
203
|
-
lines?: CompensationAccrualLinePayload[] | null;
|
|
204
183
|
match_suggestion?: JEOneTimeAccrualMatchSuggestionPayload | null;
|
|
205
184
|
memo?: string | null;
|
|
206
|
-
pay_group_id?: ID | null;
|
|
207
|
-
pay_group_name?: string | null;
|
|
208
|
-
pay_period?: CompensationPayPeriodPayload | null;
|
|
209
185
|
posting_date?: string | null;
|
|
210
186
|
profile_snapshot?: JEOneTimeAccrualProfileSnapshotPayload | null;
|
|
211
187
|
reversal_policy?: string | null;
|
|
@@ -214,11 +190,8 @@ export interface JEOneTimeAccrualPayload {
|
|
|
214
190
|
reversal_transaction_integration_id?: ID | null;
|
|
215
191
|
reversal_trigger?: string | null;
|
|
216
192
|
reversed_by_user?: UserPayload | null;
|
|
217
|
-
review_reasons?: string[] | null;
|
|
218
|
-
source?: string | null;
|
|
219
193
|
transaction_id?: ID | null;
|
|
220
194
|
transaction_integration_id?: ID | null;
|
|
221
|
-
uncovered?: CompensationUncoveredPayload | null;
|
|
222
195
|
}
|
|
223
196
|
export interface ScheduledJournalEntryPayload {
|
|
224
197
|
actual_post_date: string | null;
|
|
@@ -250,5 +223,4 @@ export declare function getJEScheduleTransactionDetailKeyPayload(payload: Schedu
|
|
|
250
223
|
export declare function getJEScheduleKey(payload: JEAccruedScheduledTransactionPayload): JEScheduleKey;
|
|
251
224
|
export declare function toJEScheduledTransaction(payload: JEScheduledTransactionPayload): JEScheduledTransactionState;
|
|
252
225
|
export declare function toJEAccruedScheduledTransaction(payload: JEAccruedScheduledTransactionPayload): JEAccruedScheduledTransactionState;
|
|
253
|
-
export declare function toCompensationAccrual(payload: JEOneTimeAccrualPayload): CompensationAccrualDetails | undefined;
|
|
254
226
|
export declare function toJEOneTimeAccrual(payload: JEOneTimeAccrualPayload): JEOneTimeAccrualState;
|
|
@@ -8,7 +8,6 @@ exports.getJEScheduleTransactionDetailKeyPayload = getJEScheduleTransactionDetai
|
|
|
8
8
|
exports.getJEScheduleKey = getJEScheduleKey;
|
|
9
9
|
exports.toJEScheduledTransaction = toJEScheduledTransaction;
|
|
10
10
|
exports.toJEAccruedScheduledTransaction = toJEAccruedScheduledTransaction;
|
|
11
|
-
exports.toCompensationAccrual = toCompensationAccrual;
|
|
12
11
|
exports.toJEOneTimeAccrual = toJEOneTimeAccrual;
|
|
13
12
|
const amount_1 = require("../../commonStateTypes/amount");
|
|
14
13
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
@@ -504,47 +503,9 @@ function toJEOneTimeAccrualMatchSuggestion(payload, currencyCode) {
|
|
|
504
503
|
matchedTransactionSyncToken: payload.matched_transaction_sync_token ?? undefined,
|
|
505
504
|
};
|
|
506
505
|
}
|
|
507
|
-
function toCompensationAccrual(payload) {
|
|
508
|
-
if (payload.accrual_type !== 'compensation_accrual' ||
|
|
509
|
-
payload.pay_group_id == null ||
|
|
510
|
-
payload.pay_period == null ||
|
|
511
|
-
payload.uncovered == null) {
|
|
512
|
-
return undefined;
|
|
513
|
-
}
|
|
514
|
-
return {
|
|
515
|
-
payGroupId: payload.pay_group_id,
|
|
516
|
-
payGroupName: payload.pay_group_name ?? payload.vendor_name,
|
|
517
|
-
source: (0, jeSchedulesTypes_1.toPayrollCycleSourceType)(payload.source ?? 'manual'),
|
|
518
|
-
payPeriod: {
|
|
519
|
-
start: payload.pay_period.start,
|
|
520
|
-
end: payload.pay_period.end,
|
|
521
|
-
dayCountPolicy: (0, jeSchedulesTypes_1.toDayCountPolicyType)(payload.pay_period.day_count_policy),
|
|
522
|
-
periodLenDays: payload.pay_period.period_len_days,
|
|
523
|
-
},
|
|
524
|
-
uncovered: {
|
|
525
|
-
start: payload.uncovered.start,
|
|
526
|
-
end: payload.uncovered.end,
|
|
527
|
-
days: payload.uncovered.days,
|
|
528
|
-
},
|
|
529
|
-
reviewReasons: payload.review_reasons ?? [],
|
|
530
|
-
lines: (payload.lines ?? []).map((line) => ({
|
|
531
|
-
// An agent draft for an unmapped pay group carries no account yet.
|
|
532
|
-
accountId: line.account_id ?? '',
|
|
533
|
-
accountName: line.account_name,
|
|
534
|
-
amount: line.amount,
|
|
535
|
-
accountingClassId: line.accounting_class_id ?? undefined,
|
|
536
|
-
accountingClassName: line.accounting_class_name ?? undefined,
|
|
537
|
-
dailyRate: line.daily_rate ?? undefined,
|
|
538
|
-
})),
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
506
|
function toJEOneTimeAccrual(payload) {
|
|
542
507
|
return {
|
|
543
508
|
accrualId: payload._id,
|
|
544
|
-
accrualType: payload.accrual_type != null
|
|
545
|
-
? (0, jeSchedulesTypes_1.toOneTimeAccrualType)(payload.accrual_type)
|
|
546
|
-
: undefined,
|
|
547
|
-
compensation: toCompensationAccrual(payload),
|
|
548
509
|
vendorId: payload.vendor_id,
|
|
549
510
|
vendorName: payload.vendor_name,
|
|
550
511
|
serviceMonth: payload.service_month,
|
|
@@ -4,7 +4,7 @@ import { ScheduleDaysOfMonth } from '../../commonStateTypes/timePeriod';
|
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { ZeniUrl as Url } from '../../zeniUrl';
|
|
6
6
|
import { TransactionID } from '../transaction/stateTypes/transactionID';
|
|
7
|
-
import {
|
|
7
|
+
import { JEOneTimeAccrualKey, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, OneTimeAccrualAutomationTierType, OneTimeAccrualOriginType, OneTimeAccrualReversalPolicyType, OneTimeAccrualReversalTriggerType, OneTimeAccrualStatusCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
|
|
8
8
|
export interface ScheduleStatus {
|
|
9
9
|
code: ScheduleStatusCodeType;
|
|
10
10
|
label: string;
|
|
@@ -234,35 +234,6 @@ export interface JEOneTimeAccrualMatchSuggestion {
|
|
|
234
234
|
matchTier?: string;
|
|
235
235
|
resolution?: string;
|
|
236
236
|
}
|
|
237
|
-
export interface CompensationAccrualLine {
|
|
238
|
-
accountId: ID;
|
|
239
|
-
accountName: string;
|
|
240
|
-
amount: number;
|
|
241
|
-
accountingClassId?: ID;
|
|
242
|
-
accountingClassName?: string;
|
|
243
|
-
dailyRate?: number;
|
|
244
|
-
}
|
|
245
|
-
export interface CompensationPayPeriod {
|
|
246
|
-
dayCountPolicy: DayCountPolicyType;
|
|
247
|
-
end: string;
|
|
248
|
-
periodLenDays: number;
|
|
249
|
-
start: string;
|
|
250
|
-
}
|
|
251
|
-
export interface CompensationUncovered {
|
|
252
|
-
days: number;
|
|
253
|
-
end: string;
|
|
254
|
-
start: string;
|
|
255
|
-
}
|
|
256
|
-
/** Payroll-specific detail on a compensation accrual; undefined on vendor accruals. */
|
|
257
|
-
export interface CompensationAccrualDetails {
|
|
258
|
-
lines: CompensationAccrualLine[];
|
|
259
|
-
payGroupId: ID;
|
|
260
|
-
payGroupName: string;
|
|
261
|
-
payPeriod: CompensationPayPeriod;
|
|
262
|
-
reviewReasons: string[];
|
|
263
|
-
source: PayrollCycleSourceType;
|
|
264
|
-
uncovered: CompensationUncovered;
|
|
265
|
-
}
|
|
266
237
|
export interface JEOneTimeAccrualState {
|
|
267
238
|
accrualId: ID;
|
|
268
239
|
accrualStatus: OneTimeAccrualStatusCodeType;
|
|
@@ -278,13 +249,11 @@ export interface JEOneTimeAccrualState {
|
|
|
278
249
|
serviceMonth: string;
|
|
279
250
|
vendorId: ID;
|
|
280
251
|
vendorName: string;
|
|
281
|
-
accrualType?: OneTimeAccrualType;
|
|
282
252
|
actualPostDate?: ZeniDate;
|
|
283
253
|
actualReversalPostDate?: ZeniDate;
|
|
284
254
|
aiSuggestion?: JEOneTimeAccrualAiSuggestion;
|
|
285
255
|
automationTier?: OneTimeAccrualAutomationTierType;
|
|
286
256
|
cleared?: JEOneTimeAccrualCleared;
|
|
287
|
-
compensation?: CompensationAccrualDetails;
|
|
288
257
|
createdBy?: JEOneTimeAccrualCreator;
|
|
289
258
|
expectedReversalDate?: ZeniDate;
|
|
290
259
|
jeCreditAccountId?: ID;
|
|
@@ -25,17 +25,6 @@ export declare const toOneTimeAccrualReversalPolicyType: (v: string) => "on_bill
|
|
|
25
25
|
export type OneTimeAccrualReversalPolicyType = ReturnType<typeof toOneTimeAccrualReversalPolicyType>;
|
|
26
26
|
export declare const toOneTimeAccrualReversalTriggerType: (v?: string) => "scheduled_date" | "bill_match" | "manual_reverse" | undefined;
|
|
27
27
|
export type OneTimeAccrualReversalTriggerType = ReturnType<typeof toOneTimeAccrualReversalTriggerType>;
|
|
28
|
-
export declare const toOneTimeAccrualType: (v: string) => "vendor_accrual" | "compensation_accrual";
|
|
29
|
-
export type OneTimeAccrualType = ReturnType<typeof toOneTimeAccrualType>;
|
|
30
|
-
export declare const PAY_CADENCES: readonly ["weekly", "biweekly", "semimonthly", "monthly"];
|
|
31
|
-
export declare const toPayCadenceType: (v: string) => "weekly" | "biweekly" | "semimonthly" | "monthly";
|
|
32
|
-
export type PayCadenceType = ReturnType<typeof toPayCadenceType>;
|
|
33
|
-
export declare const DAY_COUNT_POLICIES: readonly ["calendar", "business"];
|
|
34
|
-
export declare const toDayCountPolicyType: (v: string) => "calendar" | "business";
|
|
35
|
-
export type DayCountPolicyType = ReturnType<typeof toDayCountPolicyType>;
|
|
36
|
-
export declare const PAYROLL_CYCLE_SOURCES: readonly ["gusto", "manual"];
|
|
37
|
-
export declare const toPayrollCycleSourceType: (v: string) => "manual" | "gusto";
|
|
38
|
-
export type PayrollCycleSourceType = ReturnType<typeof toPayrollCycleSourceType>;
|
|
39
28
|
export declare const toOneTimeAccrualIgnoreReasonType: (v: string) => "no_activity" | "paused" | "too_small" | "need_invoice" | "other_ignore";
|
|
40
29
|
export type OneTimeAccrualIgnoreReasonType = ReturnType<typeof toOneTimeAccrualIgnoreReasonType>;
|
|
41
30
|
export declare const ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS: readonly OneTimeAccrualIgnoreReasonType[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJournalEntryErrorCodeType = exports.ALL_ONE_TIME_ACCRUAL_REVERT_REASONS = exports.toOneTimeAccrualRevertReasonType = exports.ALL_JE_SCHEDULE_REVERT_REASONS = exports.toJEScheduleRevertReasonType = exports.ALL_JE_SCHEDULE_IGNORE_REASONS = exports.toJEScheduleIgnoreReasonType = exports.ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS = exports.toOneTimeAccrualIgnoreReasonType = exports.
|
|
3
|
+
exports.toJournalEntryErrorCodeType = exports.ALL_ONE_TIME_ACCRUAL_REVERT_REASONS = exports.toOneTimeAccrualRevertReasonType = exports.ALL_JE_SCHEDULE_REVERT_REASONS = exports.toJEScheduleRevertReasonType = exports.ALL_JE_SCHEDULE_IGNORE_REASONS = exports.toJEScheduleIgnoreReasonType = exports.ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS = exports.toOneTimeAccrualIgnoreReasonType = exports.toOneTimeAccrualReversalTriggerType = exports.toOneTimeAccrualReversalPolicyType = exports.toOneTimeAccrualAutomationTierType = exports.toOneTimeAccrualOriginType = exports.toOneTimeAccrualStatusCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
5
|
const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
|
|
6
6
|
exports.getJEScheduleTransactionKey = getJEScheduleTransactionKey;
|
|
@@ -79,25 +79,6 @@ const ONE_TIME_ACCRUAL_REVERSAL_TRIGGER = [
|
|
|
79
79
|
];
|
|
80
80
|
const toOneTimeAccrualReversalTriggerType = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', ONE_TIME_ACCRUAL_REVERSAL_TRIGGER);
|
|
81
81
|
exports.toOneTimeAccrualReversalTriggerType = toOneTimeAccrualReversalTriggerType;
|
|
82
|
-
// Discriminates a vendor (bill-driven) accrual from a payroll compensation accrual. Absent on
|
|
83
|
-
// older vendor documents, so the mapper leaves it undefined rather than defaulting.
|
|
84
|
-
const ONE_TIME_ACCRUAL_TYPE = ['vendor_accrual', 'compensation_accrual'];
|
|
85
|
-
const toOneTimeAccrualType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_TYPE);
|
|
86
|
-
exports.toOneTimeAccrualType = toOneTimeAccrualType;
|
|
87
|
-
exports.PAY_CADENCES = [
|
|
88
|
-
'weekly',
|
|
89
|
-
'biweekly',
|
|
90
|
-
'semimonthly',
|
|
91
|
-
'monthly',
|
|
92
|
-
];
|
|
93
|
-
const toPayCadenceType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.PAY_CADENCES);
|
|
94
|
-
exports.toPayCadenceType = toPayCadenceType;
|
|
95
|
-
exports.DAY_COUNT_POLICIES = ['calendar', 'business'];
|
|
96
|
-
const toDayCountPolicyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.DAY_COUNT_POLICIES);
|
|
97
|
-
exports.toDayCountPolicyType = toDayCountPolicyType;
|
|
98
|
-
exports.PAYROLL_CYCLE_SOURCES = ['gusto', 'manual'];
|
|
99
|
-
const toPayrollCycleSourceType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.PAYROLL_CYCLE_SOURCES);
|
|
100
|
-
exports.toPayrollCycleSourceType = toPayrollCycleSourceType;
|
|
101
82
|
// Why a human told the AI Accountant not to accrue this month. The gateway validates against
|
|
102
83
|
// exactly this set, so it is a union rather than a free-text string.
|
|
103
84
|
const ONE_TIME_ACCRUAL_IGNORE_REASON = [
|
|
@@ -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" | "email" | "
|
|
10
|
+
connectionType: "revenue" | "email" | "payments";
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/deleteConnectionSuccess";
|
|
13
13
|
} | {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../rootStateTypes';
|
|
3
3
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
-
import {
|
|
4
|
+
import { initEmailConnectOAuth, initEmailConnectOAuthFailure, initEmailConnectOAuthSuccess } from '../tenantReducer';
|
|
5
5
|
export type ActionType = ReturnType<typeof initEmailConnectOAuth> | ReturnType<typeof initEmailConnectOAuthSuccess> | ReturnType<typeof initEmailConnectOAuthFailure>;
|
|
6
6
|
export type NavigateFn = (url: string) => void;
|
|
7
7
|
export declare const initEmailConnectOAuthEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI, navigate?: NavigateFn) => import("rxjs").Observable<{
|
|
8
8
|
payload: {
|
|
9
9
|
tenantId: string;
|
|
10
|
-
provider:
|
|
10
|
+
provider: "gmail" | "outlook";
|
|
11
11
|
authorizationUrl: string;
|
|
12
12
|
};
|
|
13
13
|
type: "tenant/initEmailConnectOAuthSuccess";
|
|
14
14
|
} | {
|
|
15
15
|
payload: {
|
|
16
16
|
tenantId: string;
|
|
17
|
-
provider:
|
|
17
|
+
provider: "gmail" | "outlook";
|
|
18
18
|
status: import("../../../zeniAPIStatus").ZeniAPIStatus<Record<string, unknown>>;
|
|
19
19
|
};
|
|
20
20
|
type: "tenant/initEmailConnectOAuthFailure";
|
|
@@ -14,7 +14,7 @@ const defaultNavigate = (url) => {
|
|
|
14
14
|
window.location.href = url;
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
// Backs the POST /1.0/connectors/<provider>/init endpoint on the
|
|
17
|
+
// Backs the new POST /1.0/connectors/email/<provider>/init endpoint on the
|
|
18
18
|
// auth service. The endpoint creates a CSRF state token in the auth NDB
|
|
19
19
|
// store and returns the provider's authorization_url; this epic then drives
|
|
20
20
|
// a full-page redirect so the user lands on Google's / Microsoft's consent
|
|
@@ -31,7 +31,7 @@ navigate = defaultNavigate) => actions$.pipe((0, operators_1.filter)(tenantReduc
|
|
|
31
31
|
// the gmail provider's `saveConnectorCredentialsStateBySlug` in
|
|
32
32
|
// `In-Progress` forever. groupBy gives each provider its own stream.
|
|
33
33
|
(0, operators_1.groupBy)((action) => action.payload.provider), (0, operators_1.mergeMap)((perProvider$) => perProvider$.pipe((0, operators_1.switchMap)((action) => zeniAPI
|
|
34
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/connectors/${action.payload.provider}/init`, { redirect_after_url: action.payload.redirectAfterUrl }, { 'zeni-tenant-id': action.payload.tenantId })
|
|
34
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.authMicroServiceBaseUrl}/1.0/connectors/email/${action.payload.provider}/init`, { redirect_after_url: action.payload.redirectAfterUrl }, { 'zeni-tenant-id': action.payload.tenantId })
|
|
35
35
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
36
36
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
37
37
|
// Fire-and-forget side effect — once the browser navigates,
|
|
@@ -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" | "email" | "
|
|
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" | "email" | "
|
|
10
|
-
connectionName: "
|
|
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: "
|
|
17
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
18
18
|
status: import("../../../zeniAPIStatus").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" | "email" | "
|
|
9
|
+
connectionType: "revenue" | "email" | "payments";
|
|
10
10
|
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/saveOAuthConnectionSuccess";
|
|
@@ -13,9 +13,8 @@ export interface DoSignInPayload {
|
|
|
13
13
|
redirectUri: ZeniUrl;
|
|
14
14
|
sourceUri: ZeniUrl;
|
|
15
15
|
}
|
|
16
|
-
export declare const toExternalIntegrationType: (v: string) => "revenue" | "email" | "
|
|
16
|
+
export declare const toExternalIntegrationType: (v: string) => "revenue" | "email" | "payments";
|
|
17
17
|
export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
|
|
18
|
-
export type ConnectorOAuthProvider = 'gmail' | 'outlook' | 'gusto';
|
|
19
18
|
export type ConnectorCredentialsBySlug = {
|
|
20
19
|
connectionName: 'stripe';
|
|
21
20
|
credentials: {
|
|
@@ -100,26 +99,26 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
100
99
|
}, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
|
|
101
100
|
tenantId: string;
|
|
102
101
|
externalConnections: ConnectionsPayload;
|
|
103
|
-
}, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "
|
|
102
|
+
}, "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: {
|
|
104
103
|
api_key: string;
|
|
105
104
|
site: string;
|
|
106
105
|
}], {
|
|
107
106
|
tenantId: string;
|
|
108
107
|
connectionId: string;
|
|
109
|
-
connectionType: "revenue" | "email" | "
|
|
110
|
-
connectionName: "
|
|
108
|
+
connectionType: "revenue" | "email" | "payments";
|
|
109
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
111
110
|
credentials: {
|
|
112
111
|
api_key: string;
|
|
113
112
|
site: string;
|
|
114
113
|
};
|
|
115
|
-
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "
|
|
114
|
+
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
116
115
|
tenantId: string;
|
|
117
|
-
connectionType: "revenue" | "email" | "
|
|
116
|
+
connectionType: "revenue" | "email" | "payments";
|
|
118
117
|
connectionPayload: ConnectionDataPayload;
|
|
119
118
|
}, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
120
119
|
tenantId: string;
|
|
121
120
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
122
|
-
}, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "
|
|
121
|
+
}, "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: {
|
|
123
122
|
authorization_code: string;
|
|
124
123
|
client_id: string;
|
|
125
124
|
client_secret: string;
|
|
@@ -127,35 +126,35 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
127
126
|
}], {
|
|
128
127
|
tenantId: string;
|
|
129
128
|
connectionId: string;
|
|
130
|
-
connectionType: "revenue" | "email" | "
|
|
131
|
-
connectionName: "
|
|
129
|
+
connectionType: "revenue" | "email" | "payments";
|
|
130
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
132
131
|
credentials: {
|
|
133
132
|
authorization_code: string;
|
|
134
133
|
client_id: string;
|
|
135
134
|
client_secret: string;
|
|
136
135
|
redirect_uri: string;
|
|
137
136
|
};
|
|
138
|
-
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "
|
|
137
|
+
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
139
138
|
tenantId: string;
|
|
140
|
-
connectionType: "revenue" | "email" | "
|
|
139
|
+
connectionType: "revenue" | "email" | "payments";
|
|
141
140
|
connectionPayload: ConnectionDataPayload;
|
|
142
141
|
}, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
143
142
|
tenantId: string;
|
|
144
143
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
145
|
-
}, "tenant/saveOAuthConnectionFailure", never, never>, saveConnectorCredentials: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "
|
|
144
|
+
}, "tenant/saveOAuthConnectionFailure", never, never>, saveConnectorCredentials: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", args: ConnectorCredentialsBySlug], {
|
|
146
145
|
connectionName: "stripe";
|
|
147
146
|
credentials: {
|
|
148
147
|
api_key: string;
|
|
149
148
|
};
|
|
150
149
|
tenantId: string;
|
|
151
|
-
connectionType: "revenue" | "email" | "
|
|
150
|
+
connectionType: "revenue" | "email" | "payments";
|
|
152
151
|
} | {
|
|
153
152
|
connectionName: "mercury";
|
|
154
153
|
credentials: {
|
|
155
154
|
api_key: string;
|
|
156
155
|
};
|
|
157
156
|
tenantId: string;
|
|
158
|
-
connectionType: "revenue" | "email" | "
|
|
157
|
+
connectionType: "revenue" | "email" | "payments";
|
|
159
158
|
} | {
|
|
160
159
|
connectionName: "paypal";
|
|
161
160
|
credentials: {
|
|
@@ -163,36 +162,36 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
163
162
|
client_secret: string;
|
|
164
163
|
};
|
|
165
164
|
tenantId: string;
|
|
166
|
-
connectionType: "revenue" | "email" | "
|
|
167
|
-
}, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "
|
|
165
|
+
connectionType: "revenue" | "email" | "payments";
|
|
166
|
+
}, "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], {
|
|
168
167
|
tenantId: string;
|
|
169
|
-
connectionType: "revenue" | "email" | "
|
|
170
|
-
connectionName: "
|
|
168
|
+
connectionType: "revenue" | "email" | "payments";
|
|
169
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
171
170
|
connectionPayload: ConnectionDataPayload;
|
|
172
|
-
}, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionName: "
|
|
171
|
+
}, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
173
172
|
tenantId: string;
|
|
174
|
-
connectionName: "
|
|
173
|
+
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
175
174
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
176
|
-
}, "tenant/saveConnectorCredentialsFailure", never, never>, initEmailConnectOAuth: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider:
|
|
175
|
+
}, "tenant/saveConnectorCredentialsFailure", never, never>, initEmailConnectOAuth: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", redirectAfterUrl: string], {
|
|
177
176
|
tenantId: string;
|
|
178
|
-
provider:
|
|
177
|
+
provider: "gmail" | "outlook";
|
|
179
178
|
redirectAfterUrl: string;
|
|
180
|
-
}, "tenant/initEmailConnectOAuth", never, never>, initEmailConnectOAuthSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider:
|
|
179
|
+
}, "tenant/initEmailConnectOAuth", never, never>, initEmailConnectOAuthSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", authorizationUrl: string], {
|
|
181
180
|
tenantId: string;
|
|
182
|
-
provider:
|
|
181
|
+
provider: "gmail" | "outlook";
|
|
183
182
|
authorizationUrl: string;
|
|
184
|
-
}, "tenant/initEmailConnectOAuthSuccess", never, never>, initEmailConnectOAuthFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider:
|
|
183
|
+
}, "tenant/initEmailConnectOAuthSuccess", never, never>, initEmailConnectOAuthFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
185
184
|
tenantId: string;
|
|
186
|
-
provider:
|
|
185
|
+
provider: "gmail" | "outlook";
|
|
187
186
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
188
|
-
}, "tenant/initEmailConnectOAuthFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "
|
|
187
|
+
}, "tenant/initEmailConnectOAuthFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments"], {
|
|
189
188
|
tenantId: string;
|
|
190
189
|
connectionId: string;
|
|
191
|
-
connectionType: "revenue" | "email" | "
|
|
192
|
-
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "
|
|
190
|
+
connectionType: "revenue" | "email" | "payments";
|
|
191
|
+
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments"], {
|
|
193
192
|
tenantId: string;
|
|
194
193
|
connectionId: string;
|
|
195
|
-
connectionType: "revenue" | "email" | "
|
|
194
|
+
connectionType: "revenue" | "email" | "payments";
|
|
196
195
|
}, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
197
196
|
tenantId: string;
|
|
198
197
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
@@ -259,7 +258,6 @@ export declare function mapConnectionsPayloadToState(connectionsPayload: Connect
|
|
|
259
258
|
accounting: Connection[];
|
|
260
259
|
email: Connection[];
|
|
261
260
|
payments: Connection[];
|
|
262
|
-
payroll: Connection[];
|
|
263
261
|
revenue: Connection[];
|
|
264
262
|
};
|
|
265
263
|
export declare const toConnection: (payload: ConnectionDataPayload) => Connection;
|
|
@@ -20,12 +20,7 @@ const netBurnOrIncomeStoryCardState_1 = require("../../view/netBurnOrIncomeStory
|
|
|
20
20
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
21
21
|
const subscriptionSummaryReducer_1 = require("../subscription/subscriptionSummary/subscriptionSummaryReducer");
|
|
22
22
|
const userRolePayload_1 = require("../userRole/userRolePayload");
|
|
23
|
-
const EXTERNAL_INTEGRATION_TYPES = [
|
|
24
|
-
'revenue',
|
|
25
|
-
'payments',
|
|
26
|
-
'email',
|
|
27
|
-
'payroll',
|
|
28
|
-
];
|
|
23
|
+
const EXTERNAL_INTEGRATION_TYPES = ['revenue', 'payments', 'email'];
|
|
29
24
|
const toExternalIntegrationType = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_INTEGRATION_TYPES);
|
|
30
25
|
exports.toExternalIntegrationType = toExternalIntegrationType;
|
|
31
26
|
exports.initialState = {
|
|
@@ -438,7 +433,6 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
438
433
|
accounting: [],
|
|
439
434
|
email: [],
|
|
440
435
|
payments: [],
|
|
441
|
-
payroll: [],
|
|
442
436
|
revenue: [],
|
|
443
437
|
saveConnectionState: 'Not-Started',
|
|
444
438
|
saveAPIKeyConnectionState: 'Not-Started',
|
|
@@ -455,13 +449,12 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
455
449
|
return { payload: { tenantId, externalConnections } };
|
|
456
450
|
},
|
|
457
451
|
reducer(draft, action) {
|
|
458
|
-
const { accounting, email, payments,
|
|
452
|
+
const { accounting, email, payments, revenue } = mapConnectionsPayloadToState(action.payload.externalConnections);
|
|
459
453
|
draft.externalConnectionsByTenant[action.payload.tenantId] = {
|
|
460
454
|
fetchState: 'Completed',
|
|
461
455
|
accounting,
|
|
462
456
|
email,
|
|
463
457
|
payments,
|
|
464
|
-
payroll,
|
|
465
458
|
revenue,
|
|
466
459
|
saveConnectionState: 'Completed',
|
|
467
460
|
saveAPIKeyConnectionState: 'Not-Started',
|
|
@@ -484,7 +477,6 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
484
477
|
accounting: [],
|
|
485
478
|
email: [],
|
|
486
479
|
payments: [],
|
|
487
|
-
payroll: [],
|
|
488
480
|
revenue: [],
|
|
489
481
|
saveConnectionState: 'Error',
|
|
490
482
|
saveAPIKeyConnectionState: 'Not-Started',
|
|
@@ -1133,9 +1125,6 @@ function mapConnectionsPayloadToState(connectionsPayload) {
|
|
|
1133
1125
|
// tenant deploys (or disabled-everywhere envs) don't blow up here.
|
|
1134
1126
|
email: (connections.email ?? []).map((payload) => (0, exports.toConnection)(payload)),
|
|
1135
1127
|
payments: connections.payments.map((payload) => (0, exports.toConnection)(payload)),
|
|
1136
|
-
// Same back-compat shape as `email`: tenant materializes gusto under
|
|
1137
|
-
// `payroll` only when the slug is enabled in third_party_enabled_connectors.
|
|
1138
|
-
payroll: (connections.payroll ?? []).map((payload) => (0, exports.toConnection)(payload)),
|
|
1139
1128
|
revenue: (connections.revenue ?? []).map((payload) => (0, exports.toConnection)(payload)),
|
|
1140
1129
|
};
|
|
1141
1130
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type AuthProvider = 'google' | 'microsoft' | 'email';
|
|
2
|
-
export declare const toExternalSupportedTool: (v: string) => "
|
|
2
|
+
export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
|
|
3
3
|
export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
|