@zeniai/client-epic-state 5.2.95-betaGS6 → 5.2.96

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.
Files changed (102) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -29
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -39
  3. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -32
  4. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +0 -11
  5. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -23
  6. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  7. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +3 -3
  8. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +2 -2
  9. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  10. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  11. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  12. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  13. package/lib/entity/tenant/tenantReducer.d.ts +30 -32
  14. package/lib/entity/tenant/tenantReducer.js +2 -13
  15. package/lib/entity/tenant/tenantState.d.ts +0 -1
  16. package/lib/entity/tenant/tenantTypes.d.ts +1 -1
  17. package/lib/entity/tenant/tenantTypes.js +0 -1
  18. package/lib/epic.d.ts +1 -8
  19. package/lib/epic.js +0 -14
  20. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -39
  21. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -18
  22. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +2 -2
  23. package/lib/esm/entity/tenant/tenantReducer.js +2 -13
  24. package/lib/esm/entity/tenant/tenantTypes.js +0 -1
  25. package/lib/esm/epic.js +0 -14
  26. package/lib/esm/index.js +4 -9
  27. package/lib/esm/reducer.js +0 -3
  28. package/lib/esm/view/accountList/accountListReducer.js +2 -0
  29. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +4 -9
  30. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +2 -6
  31. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -7
  32. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +7 -18
  33. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +4 -4
  34. package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -2
  35. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -13
  36. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -11
  37. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -3
  38. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -9
  39. package/lib/esm/view/transactionDetail/createTransaction/createTransactionSelector.js +6 -2
  40. package/lib/index.d.ts +5 -12
  41. package/lib/index.js +49 -84
  42. package/lib/reducer.d.ts +0 -1
  43. package/lib/reducer.js +0 -3
  44. package/lib/rootStateTypes.d.ts +0 -2
  45. package/lib/view/accountList/accountListReducer.js +2 -0
  46. package/lib/view/accountList/accountListState.d.ts +1 -1
  47. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +4 -9
  48. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +1 -2
  49. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +2 -6
  50. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +1 -2
  51. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -7
  52. package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.d.ts +1 -2
  53. package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +6 -17
  54. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +3 -3
  55. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +1 -2
  56. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -2
  57. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -13
  58. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +5 -6
  59. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -11
  60. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -2
  61. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -2
  62. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -5
  63. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -11
  64. package/lib/view/transactionDetail/createTransaction/createTransactionSelector.d.ts +9 -3
  65. package/lib/view/transactionDetail/createTransaction/createTransactionSelector.js +5 -1
  66. package/package.json +1 -1
  67. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/createCompensationAccrualEpic.js +0 -97
  68. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/deletePayrollCycleEpic.js +0 -20
  69. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationAccrualsEpic.js +0 -45
  70. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationPageEpic.js +0 -16
  71. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/fetchPayrollCyclesEpic.js +0 -18
  72. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/promoteCompensationAccrualEpic.js +0 -52
  73. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/compensation/upsertPayrollCycleEpic.js +0 -32
  74. package/lib/esm/view/expenseAutomationView/payload/compensationPayload.js +0 -178
  75. package/lib/esm/view/expenseAutomationView/reducers/compensationViewReducer.js +0 -203
  76. package/lib/esm/view/expenseAutomationView/selectorTypes/compensationViewSelectorTypes.js +0 -1
  77. package/lib/esm/view/expenseAutomationView/selectors/compensationViewSelector.js +0 -104
  78. package/lib/esm/view/expenseAutomationView/types/compensationViewState.js +0 -2
  79. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/createCompensationAccrualEpic.d.ts +0 -10
  80. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/createCompensationAccrualEpic.js +0 -101
  81. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/deletePayrollCycleEpic.d.ts +0 -9
  82. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/deletePayrollCycleEpic.js +0 -24
  83. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationAccrualsEpic.d.ts +0 -9
  84. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationAccrualsEpic.js +0 -49
  85. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationPageEpic.d.ts +0 -7
  86. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchCompensationPageEpic.js +0 -20
  87. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchPayrollCyclesEpic.d.ts +0 -8
  88. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/fetchPayrollCyclesEpic.js +0 -22
  89. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/promoteCompensationAccrualEpic.d.ts +0 -13
  90. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/promoteCompensationAccrualEpic.js +0 -56
  91. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/upsertPayrollCycleEpic.d.ts +0 -9
  92. package/lib/view/expenseAutomationView/epics/jeSchedule/compensation/upsertPayrollCycleEpic.js +0 -36
  93. package/lib/view/expenseAutomationView/payload/compensationPayload.d.ts +0 -120
  94. package/lib/view/expenseAutomationView/payload/compensationPayload.js +0 -186
  95. package/lib/view/expenseAutomationView/reducers/compensationViewReducer.d.ts +0 -50
  96. package/lib/view/expenseAutomationView/reducers/compensationViewReducer.js +0 -207
  97. package/lib/view/expenseAutomationView/selectorTypes/compensationViewSelectorTypes.d.ts +0 -44
  98. package/lib/view/expenseAutomationView/selectorTypes/compensationViewSelectorTypes.js +0 -2
  99. package/lib/view/expenseAutomationView/selectors/compensationViewSelector.d.ts +0 -12
  100. package/lib/view/expenseAutomationView/selectors/compensationViewSelector.js +0 -109
  101. package/lib/view/expenseAutomationView/types/compensationViewState.d.ts +0 -127
  102. package/lib/view/expenseAutomationView/types/compensationViewState.js +0 -5
@@ -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 { CompensationAccrualDetails, JEAccruedScheduledTransactionState, JEOneTimeAccrualState, JEScheduledTransactionState, ScheduledJournalEntryState } from './jeSchedulesState';
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 { DayCountPolicyType, JEOneTimeAccrualKey, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, OneTimeAccrualAutomationTierType, OneTimeAccrualOriginType, OneTimeAccrualReversalPolicyType, OneTimeAccrualReversalTriggerType, OneTimeAccrualStatusCodeType, OneTimeAccrualType, PayrollCycleSourceType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
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.toPayrollCycleSourceType = exports.PAYROLL_CYCLE_SOURCES = exports.toDayCountPolicyType = exports.DAY_COUNT_POLICIES = exports.toPayCadenceType = exports.PAY_CADENCES = exports.toOneTimeAccrualType = 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;
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,28 +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 = [
85
- 'vendor_accrual',
86
- 'compensation_accrual',
87
- ];
88
- const toOneTimeAccrualType = (v) => (0, stringToUnion_1.stringToUnion)(v, ONE_TIME_ACCRUAL_TYPE);
89
- exports.toOneTimeAccrualType = toOneTimeAccrualType;
90
- exports.PAY_CADENCES = [
91
- 'weekly',
92
- 'biweekly',
93
- 'semimonthly',
94
- 'monthly',
95
- ];
96
- const toPayCadenceType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.PAY_CADENCES);
97
- exports.toPayCadenceType = toPayCadenceType;
98
- exports.DAY_COUNT_POLICIES = ['calendar', 'business'];
99
- const toDayCountPolicyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.DAY_COUNT_POLICIES);
100
- exports.toDayCountPolicyType = toDayCountPolicyType;
101
- exports.PAYROLL_CYCLE_SOURCES = ['gusto', 'manual'];
102
- const toPayrollCycleSourceType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.PAYROLL_CYCLE_SOURCES);
103
- exports.toPayrollCycleSourceType = toPayrollCycleSourceType;
104
82
  // Why a human told the AI Accountant not to accrue this month. The gateway validates against
105
83
  // exactly this set, so it is a union rather than a free-text string.
106
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" | "payroll" | "payments";
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 { ConnectorOAuthProvider, initEmailConnectOAuth, initEmailConnectOAuthFailure, initEmailConnectOAuthSuccess } from '../tenantReducer';
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: ConnectorOAuthProvider;
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: ConnectorOAuthProvider;
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" | "payroll" | "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" | "email" | "payroll" | "payments";
10
- connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
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: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
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" | "payroll" | "payments";
9
+ connectionType: "revenue" | "email" | "payments";
10
10
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
11
  };
12
12
  type: "tenant/saveOAuthConnectionSuccess";
@@ -164,7 +164,6 @@ interface ConnectionsPayload {
164
164
  accounting: ConnectionDataPayload[];
165
165
  payments: ConnectionDataPayload[];
166
166
  email?: ConnectionDataPayload[];
167
- payroll?: ConnectionDataPayload[];
168
167
  revenue?: ConnectionDataPayload[];
169
168
  };
170
169
  }
@@ -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" | "payroll" | "payments";
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" | "payroll" | "payments", connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", credentials: {
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" | "payroll" | "payments";
110
- connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
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" | "payroll" | "payments", connectionPayload: ConnectionDataPayload], {
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" | "payroll" | "payments";
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" | "payroll" | "payments", connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", credentials: {
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" | "payroll" | "payments";
131
- connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
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" | "payroll" | "payments", connectionPayload: ConnectionDataPayload], {
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" | "payroll" | "payments";
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" | "payroll" | "payments", args: ConnectorCredentialsBySlug], {
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" | "payroll" | "payments";
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" | "payroll" | "payments";
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" | "payroll" | "payments";
167
- }, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payroll" | "payments", connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", connectionPayload: ConnectionDataPayload], {
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" | "payroll" | "payments";
170
- connectionName: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
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: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
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: "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
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: ConnectorOAuthProvider, redirectAfterUrl: string], {
175
+ }, "tenant/saveConnectorCredentialsFailure", never, never>, initEmailConnectOAuth: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", redirectAfterUrl: string], {
177
176
  tenantId: string;
178
- provider: ConnectorOAuthProvider;
177
+ provider: "gmail" | "outlook";
179
178
  redirectAfterUrl: string;
180
- }, "tenant/initEmailConnectOAuth", never, never>, initEmailConnectOAuthSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: ConnectorOAuthProvider, authorizationUrl: string], {
179
+ }, "tenant/initEmailConnectOAuth", never, never>, initEmailConnectOAuthSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", authorizationUrl: string], {
181
180
  tenantId: string;
182
- provider: ConnectorOAuthProvider;
181
+ provider: "gmail" | "outlook";
183
182
  authorizationUrl: string;
184
- }, "tenant/initEmailConnectOAuthSuccess", never, never>, initEmailConnectOAuthFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: ConnectorOAuthProvider, status: ZeniAPIStatus<Record<string, unknown>>], {
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: ConnectorOAuthProvider;
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" | "payroll" | "payments"], {
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" | "payroll" | "payments";
192
- }, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payroll" | "payments"], {
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" | "payroll" | "payments";
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, payroll, revenue } = mapConnectionsPayloadToState(action.payload.externalConnections);
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',
@@ -1134,9 +1126,6 @@ function mapConnectionsPayloadToState(connectionsPayload) {
1134
1126
  // tenant deploys (or disabled-everywhere envs) don't blow up here.
1135
1127
  email: (connections.email ?? []).map((payload) => (0, exports.toConnection)(payload)),
1136
1128
  payments: connections.payments.map((payload) => (0, exports.toConnection)(payload)),
1137
- // Same back-compat shape as `email`: tenant materializes gusto under
1138
- // `payroll` only when the slug is enabled in third_party_enabled_connectors.
1139
- payroll: (connections.payroll ?? []).map((payload) => (0, exports.toConnection)(payload)),
1140
1129
  revenue: (connections.revenue ?? []).map((payload) => (0, exports.toConnection)(payload)),
1141
1130
  };
1142
1131
  }
@@ -16,7 +16,6 @@ export interface TenantExternalConnections {
16
16
  email: Connection[];
17
17
  fetchState: FetchState;
18
18
  payments: Connection[];
19
- payroll: Connection[];
20
19
  revenue: Connection[];
21
20
  saveAPIKeyConnectionState: FetchState;
22
21
  saveConnectionState: FetchState;
@@ -1,3 +1,3 @@
1
1
  export type AuthProvider = 'google' | 'microsoft' | 'email';
2
- export declare const toExternalSupportedTool: (v: string) => "gusto" | "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
2
+ export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
3
3
  export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
@@ -10,7 +10,6 @@ const EXTERNAL_SUPPORTED_TOOLS = [
10
10
  'paypal',
11
11
  'gmail',
12
12
  'outlook',
13
- 'gusto',
14
13
  ];
15
14
  const toExternalSupportedTool = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_SUPPORTED_TOOLS);
16
15
  exports.toExternalSupportedTool = toExternalSupportedTool;