@zeniai/client-epic-state 5.0.50-betaRD11 → 5.0.50-betaSS1
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/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantReducer.d.ts +16 -28
- package/lib/entity/tenant/tenantReducer.js +7 -81
- package/lib/entity/tenant/tenantState.d.ts +0 -2
- package/lib/epic.d.ts +9 -9
- package/lib/epic.js +11 -12
- package/lib/esm/entity/tenant/tenantReducer.js +5 -79
- package/lib/esm/epic.js +11 -12
- package/lib/esm/index.js +13 -12
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +4 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +6 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +71 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +9 -0
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
- package/lib/index.d.ts +14 -13
- package/lib/index.js +29 -28
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +4 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +6 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +8 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +72 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +2 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.js +13 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -4
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +27 -1
- package/package.json +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +0 -19
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.js +0 -37
- package/lib/esm/entity/tenant/epic/saveConnectorCredentialsEpic.js +0 -33
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
|
@@ -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"
|
|
10
|
+
connectionType: "revenue";
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/deleteConnectionSuccess";
|
|
13
13
|
} | {
|
|
@@ -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"
|
|
9
|
+
connectionType: "revenue";
|
|
10
10
|
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/saveAPIKeyConnectionSuccess";
|
|
@@ -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"
|
|
9
|
+
connectionType: "revenue";
|
|
10
10
|
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
11
|
};
|
|
12
12
|
type: "tenant/saveOAuthConnectionSuccess";
|
|
@@ -13,9 +13,9 @@ export interface DoSignInPayload {
|
|
|
13
13
|
redirectUri: ZeniUrl;
|
|
14
14
|
sourceUri: ZeniUrl;
|
|
15
15
|
}
|
|
16
|
-
export declare const toExternalIntegrationType: (v: string) => "revenue"
|
|
16
|
+
export declare const toExternalIntegrationType: (v: string) => "revenue";
|
|
17
17
|
export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
|
|
18
|
-
export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot"
|
|
18
|
+
export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot";
|
|
19
19
|
export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
|
|
20
20
|
export declare const initialState: TenantState;
|
|
21
21
|
export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenants: TenantPayload[], userTenantPayload?: TenantUserPayload | undefined, tenantUpdated?: any], {
|
|
@@ -84,26 +84,26 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
84
84
|
}, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
|
|
85
85
|
tenantId: string;
|
|
86
86
|
externalConnections: ConnectionsPayload;
|
|
87
|
-
}, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"
|
|
87
|
+
}, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue", connectionName: "chargebee" | "hubspot", credentials: {
|
|
88
88
|
api_key: string;
|
|
89
89
|
site: string;
|
|
90
90
|
}], {
|
|
91
91
|
tenantId: string;
|
|
92
92
|
connectionId: string;
|
|
93
|
-
connectionType: "revenue"
|
|
94
|
-
connectionName: "chargebee" | "hubspot"
|
|
93
|
+
connectionType: "revenue";
|
|
94
|
+
connectionName: "chargebee" | "hubspot";
|
|
95
95
|
credentials: {
|
|
96
96
|
api_key: string;
|
|
97
97
|
site: string;
|
|
98
98
|
};
|
|
99
|
-
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue"
|
|
99
|
+
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue", connectionPayload: ConnectionDataPayload], {
|
|
100
100
|
tenantId: string;
|
|
101
|
-
connectionType: "revenue"
|
|
101
|
+
connectionType: "revenue";
|
|
102
102
|
connectionPayload: ConnectionDataPayload;
|
|
103
103
|
}, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
104
104
|
tenantId: string;
|
|
105
105
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
106
|
-
}, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"
|
|
106
|
+
}, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue", connectionName: "chargebee" | "hubspot", credentials: {
|
|
107
107
|
authorization_code: string;
|
|
108
108
|
client_id: string;
|
|
109
109
|
client_secret: string;
|
|
@@ -111,41 +111,29 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
111
111
|
}], {
|
|
112
112
|
tenantId: string;
|
|
113
113
|
connectionId: string;
|
|
114
|
-
connectionType: "revenue"
|
|
115
|
-
connectionName: "chargebee" | "hubspot"
|
|
114
|
+
connectionType: "revenue";
|
|
115
|
+
connectionName: "chargebee" | "hubspot";
|
|
116
116
|
credentials: {
|
|
117
117
|
authorization_code: string;
|
|
118
118
|
client_id: string;
|
|
119
119
|
client_secret: string;
|
|
120
120
|
redirect_uri: string;
|
|
121
121
|
};
|
|
122
|
-
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue"
|
|
122
|
+
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue", connectionPayload: ConnectionDataPayload], {
|
|
123
123
|
tenantId: string;
|
|
124
|
-
connectionType: "revenue"
|
|
124
|
+
connectionType: "revenue";
|
|
125
125
|
connectionPayload: ConnectionDataPayload;
|
|
126
126
|
}, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
127
127
|
tenantId: string;
|
|
128
128
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
129
|
-
}, "tenant/saveOAuthConnectionFailure", never, never>,
|
|
130
|
-
tenantId: string;
|
|
131
|
-
connectionType: "revenue" | "payments";
|
|
132
|
-
connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
|
|
133
|
-
credentials: Record<string, string>;
|
|
134
|
-
}, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionPayload: ConnectionDataPayload], {
|
|
135
|
-
tenantId: string;
|
|
136
|
-
connectionType: "revenue" | "payments";
|
|
137
|
-
connectionPayload: ConnectionDataPayload;
|
|
138
|
-
}, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
139
|
-
tenantId: string;
|
|
140
|
-
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
141
|
-
}, "tenant/saveConnectorCredentialsFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments"], {
|
|
129
|
+
}, "tenant/saveOAuthConnectionFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"], {
|
|
142
130
|
tenantId: string;
|
|
143
131
|
connectionId: string;
|
|
144
|
-
connectionType: "revenue"
|
|
145
|
-
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"
|
|
132
|
+
connectionType: "revenue";
|
|
133
|
+
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"], {
|
|
146
134
|
tenantId: string;
|
|
147
135
|
connectionId: string;
|
|
148
|
-
connectionType: "revenue"
|
|
136
|
+
connectionType: "revenue";
|
|
149
137
|
}, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
150
138
|
tenantId: string;
|
|
151
139
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = exports.resendVerifyDeviceOTPSuccess = exports.resendVerifyDeviceOTP = exports.verifyDeviceWithTwoFAFailure = exports.verifyDeviceWithTwoFASuccess = exports.verifyDeviceWithTwoFA = exports.updateTenantMasterTOSInfo = exports.updateTenantAccountingClassesEnabled = exports.trigger2FA = exports.resetSignInState = exports.updateTreasuryVideoViewedForLoggedInUser = exports.updateReferViewedForLoggedInUser =
|
|
7
|
+
exports.updateTenantReimbursementInfo = exports.removeOnboardingTenant = exports.updateOnboardingTenants = exports.updateSubscriptionSummaryForTenantFailure = exports.updateSubscriptionSummaryForTenantSuccess = exports.fetchSubscriptionSummaryForTenant = exports.clearAll = exports.deleteConnectionFailure = exports.deleteConnectionSuccess = exports.deleteConnection = exports.saveOAuthConnectionFailure = exports.saveOAuthConnectionSuccess = exports.saveOAuthConnection = exports.saveAPIKeyConnectionFailure = exports.saveAPIKeyConnectionSuccess = exports.saveAPIKeyConnection = exports.fetchExternalConnectionsSuccess = exports.fetchExternalConnectionsFailure = exports.saveExternalConnectionFailure = exports.saveExternalConnectionSuccess = exports.saveExternalConnection = exports.fetchExternalConnections = exports.updateLoggedInUser = exports.sessionHeartbeatFailure = exports.sessionHeartbeatSuccess = exports.sendSessionHeartbeat = exports.signOutSuccess = exports.doSignOut = exports.updateSignInState = exports.sendEmailMagicLinkToUserFailure = exports.sendEmailMagicLinkToUserSuccess = exports.sendEmailMagicLinkToUser = exports.magicLinkSignInFailure = exports.magicLinkSignInSuccess = exports.doMagicLinkSignIn = exports.doSignIn = exports.updateExcludedResourcesFailure = exports.updateExcludedResourcesSuccess = exports.fetchExcludedResources = exports.updateCurrentTenant = exports.updateTenantFailure = exports.updateTenantSuccess = exports.fetchActiveTenant = exports.updateTenantsFailure = exports.updateTenantsSuccess = exports.fetchAllTenants = exports.updateTenants = exports.initialState = exports.toExternalSupportedTool = exports.toExternalIntegrationType = void 0;
|
|
8
|
+
exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = exports.resendVerifyDeviceOTPSuccess = exports.resendVerifyDeviceOTP = exports.verifyDeviceWithTwoFAFailure = exports.verifyDeviceWithTwoFASuccess = exports.verifyDeviceWithTwoFA = exports.updateTenantMasterTOSInfo = exports.updateTenantAccountingClassesEnabled = exports.trigger2FA = exports.resetSignInState = exports.updateTreasuryVideoViewedForLoggedInUser = exports.updateReferViewedForLoggedInUser = void 0;
|
|
9
9
|
exports.mapConnectionsPayloadToState = mapConnectionsPayloadToState;
|
|
10
10
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
11
11
|
const js_base64_1 = require("js-base64");
|
|
@@ -18,16 +18,10 @@ const netBurnOrIncomeStoryCardState_1 = require("../../view/netBurnOrIncomeStory
|
|
|
18
18
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
19
19
|
const subscriptionSummaryReducer_1 = require("../subscription/subscriptionSummary/subscriptionSummaryReducer");
|
|
20
20
|
const userRolePayload_1 = require("../userRole/userRolePayload");
|
|
21
|
-
const EXTERNAL_INTEGRATION_TYPES = ['revenue'
|
|
21
|
+
const EXTERNAL_INTEGRATION_TYPES = ['revenue'];
|
|
22
22
|
const toExternalIntegrationType = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_INTEGRATION_TYPES);
|
|
23
23
|
exports.toExternalIntegrationType = toExternalIntegrationType;
|
|
24
|
-
const EXTERNAL_SUPPORTED_TOOLS = [
|
|
25
|
-
'chargebee',
|
|
26
|
-
'hubspot',
|
|
27
|
-
'stripe',
|
|
28
|
-
'mercury',
|
|
29
|
-
'paypal',
|
|
30
|
-
];
|
|
24
|
+
const EXTERNAL_SUPPORTED_TOOLS = ['chargebee', 'hubspot'];
|
|
31
25
|
const toExternalSupportedTool = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_SUPPORTED_TOOLS);
|
|
32
26
|
exports.toExternalSupportedTool = toExternalSupportedTool;
|
|
33
27
|
exports.initialState = {
|
|
@@ -357,7 +351,6 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
357
351
|
revenue: [],
|
|
358
352
|
saveConnectionState: 'Not-Started',
|
|
359
353
|
saveAPIKeyConnectionState: 'Not-Started',
|
|
360
|
-
saveConnectorCredentialsState: 'Not-Started',
|
|
361
354
|
saveOAuthConnectionState: 'Not-Started',
|
|
362
355
|
deleteConnectionState: 'Not-Started',
|
|
363
356
|
error: undefined,
|
|
@@ -377,7 +370,6 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
377
370
|
revenue,
|
|
378
371
|
saveConnectionState: 'Completed',
|
|
379
372
|
saveAPIKeyConnectionState: 'Not-Started',
|
|
380
|
-
saveConnectorCredentialsState: 'Not-Started',
|
|
381
373
|
saveOAuthConnectionState: 'Not-Started',
|
|
382
374
|
deleteConnectionState: 'Not-Started',
|
|
383
375
|
error: undefined,
|
|
@@ -397,7 +389,6 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
397
389
|
revenue: [],
|
|
398
390
|
saveConnectionState: 'Error',
|
|
399
391
|
saveAPIKeyConnectionState: 'Not-Started',
|
|
400
|
-
saveConnectorCredentialsState: 'Not-Started',
|
|
401
392
|
saveOAuthConnectionState: 'Not-Started',
|
|
402
393
|
deleteConnectionState: 'Not-Started',
|
|
403
394
|
error: status,
|
|
@@ -447,15 +438,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
447
438
|
},
|
|
448
439
|
saveAPIKeyConnection: {
|
|
449
440
|
prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
|
|
450
|
-
return {
|
|
451
|
-
payload: {
|
|
452
|
-
tenantId,
|
|
453
|
-
connectionId,
|
|
454
|
-
connectionType,
|
|
455
|
-
connectionName,
|
|
456
|
-
credentials,
|
|
457
|
-
},
|
|
458
|
-
};
|
|
441
|
+
return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
|
|
459
442
|
},
|
|
460
443
|
reducer(draft, action) {
|
|
461
444
|
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
@@ -501,15 +484,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
501
484
|
},
|
|
502
485
|
saveOAuthConnection: {
|
|
503
486
|
prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
|
|
504
|
-
return {
|
|
505
|
-
payload: {
|
|
506
|
-
tenantId,
|
|
507
|
-
connectionId,
|
|
508
|
-
connectionType,
|
|
509
|
-
connectionName,
|
|
510
|
-
credentials,
|
|
511
|
-
},
|
|
512
|
-
};
|
|
487
|
+
return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
|
|
513
488
|
},
|
|
514
489
|
reducer(draft, action) {
|
|
515
490
|
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
@@ -549,55 +524,6 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
549
524
|
}
|
|
550
525
|
},
|
|
551
526
|
},
|
|
552
|
-
// saveConnectorCredentials — generic save action backing the new
|
|
553
|
-
// POST /1.0/connectors/<slug>/credentials endpoint. Used by Phase 1
|
|
554
|
-
// connectors (Stripe + Mercury api_key, PayPal client_credentials).
|
|
555
|
-
// ChargeBee + HubSpot continue using the legacy saveAPIKeyConnection /
|
|
556
|
-
// saveOAuthConnection actions that POST to /1.0/connections/<id>.
|
|
557
|
-
saveConnectorCredentials: {
|
|
558
|
-
prepare(tenantId, connectionType, connectionName, credentials) {
|
|
559
|
-
return {
|
|
560
|
-
payload: { tenantId, connectionType, connectionName, credentials },
|
|
561
|
-
};
|
|
562
|
-
},
|
|
563
|
-
reducer(draft, action) {
|
|
564
|
-
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
565
|
-
if (existing != null) {
|
|
566
|
-
existing.saveConnectorCredentialsState = 'In-Progress';
|
|
567
|
-
existing.saveConnectorCredentialsError = undefined;
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
saveConnectorCredentialsSuccess: {
|
|
572
|
-
prepare(tenantId, connectionType, connectionPayload) {
|
|
573
|
-
return { payload: { tenantId, connectionType, connectionPayload } };
|
|
574
|
-
},
|
|
575
|
-
reducer(draft, action) {
|
|
576
|
-
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
577
|
-
if (existing != null) {
|
|
578
|
-
existing.saveConnectorCredentialsState = 'Completed';
|
|
579
|
-
// Upsert by connection_name — see saveAPIKeyConnectionSuccess for
|
|
580
|
-
// the rationale on lazy bucket init + replace-or-append.
|
|
581
|
-
if (existing[action.payload.connectionType] == null) {
|
|
582
|
-
existing[action.payload.connectionType] = [];
|
|
583
|
-
}
|
|
584
|
-
replaceOrAppendConnectionByName(existing[action.payload.connectionType], (0, exports.toConnection)(action.payload.connectionPayload));
|
|
585
|
-
existing.saveConnectorCredentialsError = undefined;
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
},
|
|
589
|
-
saveConnectorCredentialsFailure: {
|
|
590
|
-
prepare(tenantId, status) {
|
|
591
|
-
return { payload: { tenantId, status } };
|
|
592
|
-
},
|
|
593
|
-
reducer(draft, action) {
|
|
594
|
-
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
595
|
-
if (existing != null) {
|
|
596
|
-
existing.saveConnectorCredentialsState = 'Error';
|
|
597
|
-
existing.saveConnectorCredentialsError = action.payload.status;
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
|
-
},
|
|
601
527
|
deleteConnection: {
|
|
602
528
|
prepare(tenantId, connectionId, connectionType) {
|
|
603
529
|
return { payload: { tenantId, connectionId, connectionType } };
|
|
@@ -786,7 +712,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
786
712
|
},
|
|
787
713
|
},
|
|
788
714
|
});
|
|
789
|
-
_a = tenant.actions, exports.updateTenants = _a.updateTenants, exports.fetchAllTenants = _a.fetchAllTenants, exports.updateTenantsSuccess = _a.updateTenantsSuccess, exports.updateTenantsFailure = _a.updateTenantsFailure, exports.fetchActiveTenant = _a.fetchActiveTenant, exports.updateTenantSuccess = _a.updateTenantSuccess, exports.updateTenantFailure = _a.updateTenantFailure, exports.updateCurrentTenant = _a.updateCurrentTenant, exports.fetchExcludedResources = _a.fetchExcludedResources, exports.updateExcludedResourcesSuccess = _a.updateExcludedResourcesSuccess, exports.updateExcludedResourcesFailure = _a.updateExcludedResourcesFailure, exports.doSignIn = _a.doSignIn, exports.doMagicLinkSignIn = _a.doMagicLinkSignIn, exports.magicLinkSignInSuccess = _a.magicLinkSignInSuccess, exports.magicLinkSignInFailure = _a.magicLinkSignInFailure, exports.sendEmailMagicLinkToUser = _a.sendEmailMagicLinkToUser, exports.sendEmailMagicLinkToUserSuccess = _a.sendEmailMagicLinkToUserSuccess, exports.sendEmailMagicLinkToUserFailure = _a.sendEmailMagicLinkToUserFailure, exports.updateSignInState = _a.updateSignInState, exports.doSignOut = _a.doSignOut, exports.signOutSuccess = _a.signOutSuccess, exports.sendSessionHeartbeat = _a.sendSessionHeartbeat, exports.sessionHeartbeatSuccess = _a.sessionHeartbeatSuccess, exports.sessionHeartbeatFailure = _a.sessionHeartbeatFailure, exports.updateLoggedInUser = _a.updateLoggedInUser, exports.fetchExternalConnections = _a.fetchExternalConnections, exports.saveExternalConnection = _a.saveExternalConnection, exports.saveExternalConnectionSuccess = _a.saveExternalConnectionSuccess, exports.saveExternalConnectionFailure = _a.saveExternalConnectionFailure, exports.fetchExternalConnectionsFailure = _a.fetchExternalConnectionsFailure, exports.fetchExternalConnectionsSuccess = _a.fetchExternalConnectionsSuccess, exports.saveAPIKeyConnection = _a.saveAPIKeyConnection, exports.saveAPIKeyConnectionSuccess = _a.saveAPIKeyConnectionSuccess, exports.saveAPIKeyConnectionFailure = _a.saveAPIKeyConnectionFailure, exports.saveOAuthConnection = _a.saveOAuthConnection, exports.saveOAuthConnectionSuccess = _a.saveOAuthConnectionSuccess, exports.saveOAuthConnectionFailure = _a.saveOAuthConnectionFailure, exports.
|
|
715
|
+
_a = tenant.actions, exports.updateTenants = _a.updateTenants, exports.fetchAllTenants = _a.fetchAllTenants, exports.updateTenantsSuccess = _a.updateTenantsSuccess, exports.updateTenantsFailure = _a.updateTenantsFailure, exports.fetchActiveTenant = _a.fetchActiveTenant, exports.updateTenantSuccess = _a.updateTenantSuccess, exports.updateTenantFailure = _a.updateTenantFailure, exports.updateCurrentTenant = _a.updateCurrentTenant, exports.fetchExcludedResources = _a.fetchExcludedResources, exports.updateExcludedResourcesSuccess = _a.updateExcludedResourcesSuccess, exports.updateExcludedResourcesFailure = _a.updateExcludedResourcesFailure, exports.doSignIn = _a.doSignIn, exports.doMagicLinkSignIn = _a.doMagicLinkSignIn, exports.magicLinkSignInSuccess = _a.magicLinkSignInSuccess, exports.magicLinkSignInFailure = _a.magicLinkSignInFailure, exports.sendEmailMagicLinkToUser = _a.sendEmailMagicLinkToUser, exports.sendEmailMagicLinkToUserSuccess = _a.sendEmailMagicLinkToUserSuccess, exports.sendEmailMagicLinkToUserFailure = _a.sendEmailMagicLinkToUserFailure, exports.updateSignInState = _a.updateSignInState, exports.doSignOut = _a.doSignOut, exports.signOutSuccess = _a.signOutSuccess, exports.sendSessionHeartbeat = _a.sendSessionHeartbeat, exports.sessionHeartbeatSuccess = _a.sessionHeartbeatSuccess, exports.sessionHeartbeatFailure = _a.sessionHeartbeatFailure, exports.updateLoggedInUser = _a.updateLoggedInUser, exports.fetchExternalConnections = _a.fetchExternalConnections, exports.saveExternalConnection = _a.saveExternalConnection, exports.saveExternalConnectionSuccess = _a.saveExternalConnectionSuccess, exports.saveExternalConnectionFailure = _a.saveExternalConnectionFailure, exports.fetchExternalConnectionsFailure = _a.fetchExternalConnectionsFailure, exports.fetchExternalConnectionsSuccess = _a.fetchExternalConnectionsSuccess, exports.saveAPIKeyConnection = _a.saveAPIKeyConnection, exports.saveAPIKeyConnectionSuccess = _a.saveAPIKeyConnectionSuccess, exports.saveAPIKeyConnectionFailure = _a.saveAPIKeyConnectionFailure, exports.saveOAuthConnection = _a.saveOAuthConnection, exports.saveOAuthConnectionSuccess = _a.saveOAuthConnectionSuccess, exports.saveOAuthConnectionFailure = _a.saveOAuthConnectionFailure, exports.deleteConnection = _a.deleteConnection, exports.deleteConnectionSuccess = _a.deleteConnectionSuccess, exports.deleteConnectionFailure = _a.deleteConnectionFailure, exports.clearAll = _a.clearAll, exports.fetchSubscriptionSummaryForTenant = _a.fetchSubscriptionSummaryForTenant, exports.updateSubscriptionSummaryForTenantSuccess = _a.updateSubscriptionSummaryForTenantSuccess, exports.updateSubscriptionSummaryForTenantFailure = _a.updateSubscriptionSummaryForTenantFailure, exports.updateOnboardingTenants = _a.updateOnboardingTenants, exports.removeOnboardingTenant = _a.removeOnboardingTenant, exports.updateTenantReimbursementInfo = _a.updateTenantReimbursementInfo, exports.updateReferViewedForLoggedInUser = _a.updateReferViewedForLoggedInUser, exports.updateTreasuryVideoViewedForLoggedInUser = _a.updateTreasuryVideoViewedForLoggedInUser, exports.resetSignInState = _a.resetSignInState, exports.trigger2FA = _a.trigger2FA, exports.updateTenantAccountingClassesEnabled = _a.updateTenantAccountingClassesEnabled, exports.updateTenantMasterTOSInfo = _a.updateTenantMasterTOSInfo, exports.verifyDeviceWithTwoFA = _a.verifyDeviceWithTwoFA, exports.verifyDeviceWithTwoFASuccess = _a.verifyDeviceWithTwoFASuccess, exports.verifyDeviceWithTwoFAFailure = _a.verifyDeviceWithTwoFAFailure, exports.resendVerifyDeviceOTP = _a.resendVerifyDeviceOTP, exports.resendVerifyDeviceOTPSuccess = _a.resendVerifyDeviceOTPSuccess, exports.resendVerifyDeviceOTPFailure = _a.resendVerifyDeviceOTPFailure;
|
|
790
716
|
exports.default = tenant.reducer;
|
|
791
717
|
/**
|
|
792
718
|
* Converts tenants payload to Tenant and User State
|
|
@@ -18,12 +18,10 @@ export interface TenantExternalConnections {
|
|
|
18
18
|
revenue: Connection[];
|
|
19
19
|
saveAPIKeyConnectionState: FetchState;
|
|
20
20
|
saveConnectionState: FetchState;
|
|
21
|
-
saveConnectorCredentialsState: FetchState;
|
|
22
21
|
saveOAuthConnectionState: FetchState;
|
|
23
22
|
deleteConnectionError?: ZeniAPIStatus;
|
|
24
23
|
error?: ZeniAPIStatus;
|
|
25
24
|
saveAPIKeyConnectionError?: ZeniAPIStatus;
|
|
26
|
-
saveConnectorCredentialsError?: ZeniAPIStatus;
|
|
27
25
|
saveOAuthConnectionError?: ZeniAPIStatus;
|
|
28
26
|
}
|
|
29
27
|
export interface TenantState extends FetchedState {
|
package/lib/epic.d.ts
CHANGED
|
@@ -182,8 +182,6 @@ import { ActionType as FetchExpenseAutomationSaveTransactionCategorizationAction
|
|
|
182
182
|
import { ActionType as TriggerReviewTabRefetchActionType } from './view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic';
|
|
183
183
|
import { ActionType as FetchExpenseAutomationUpdateTransactionCategorizationEpicActionType } from './view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic';
|
|
184
184
|
import { ActionType as UploadTransactionReceiptSuccessEpicActionType } from './view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic';
|
|
185
|
-
import { ActionType as FetchRegisteredInterestsActionType } from './view/featureNotificationView/epics/fetchRegisteredInterestsEpic';
|
|
186
|
-
import { ActionType as NotifyMeForFeatureActionType } from './view/featureNotificationView/epics/notifyMeForFeatureEpic';
|
|
187
185
|
import { ActionType as DeleteFileActionType } from './view/fileView/epic/deleteFileEpic';
|
|
188
186
|
import { ActionType as DeleteFileListActionType } from './view/fileView/epic/deleteFileListEpic';
|
|
189
187
|
import { ActionType as FetchFileActionType } from './view/fileView/epic/fetchFileEpic';
|
|
@@ -209,6 +207,8 @@ import { ActionType as FetchNotificationUnreadCountActionType } from './view/not
|
|
|
209
207
|
import { ActionType as FetchNotificationViewActionType } from './view/notificationView/epics/fetchNotificationViewEpic';
|
|
210
208
|
import { ActionType as UpdateNotificationViewAllNotificationsStatusActionType } from './view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic';
|
|
211
209
|
import { ActionType as UpdateNotificationViewNotificationStatusActionType } from './view/notificationView/epics/updateNotificationViewNotificationStatusEpic';
|
|
210
|
+
import { ActionType as FetchRegisteredInterestsActionType } from './view/featureNotificationView/epics/fetchRegisteredInterestsEpic';
|
|
211
|
+
import { ActionType as NotifyMeForFeatureActionType } from './view/featureNotificationView/epics/notifyMeForFeatureEpic';
|
|
212
212
|
import { ActionType as FetchCompanyOnboardingViewActionType } from './view/onboardingView/cockpitView/epic/fetchCompanyOnboardingViewEpic';
|
|
213
213
|
import { ActionType as FetchOnboardingCompletedCompaniesActionType } from './view/onboardingView/cockpitView/epic/fetchOnboardingCompletedCompaniesEpic';
|
|
214
214
|
import { ActionType as FetchQBOConnectionPoolActionType } from './view/onboardingView/cockpitView/epic/fetchQBOConnectionPoolEpic';
|
|
@@ -495,18 +495,15 @@ import { ActionType as SaveSubscriptionUpdatesActionType } from './view/subscrip
|
|
|
495
495
|
import { ActionType as CreateTagActionType } from './view/tagView/epics/createTagEpic';
|
|
496
496
|
import { ActionType as DeleteTagActionType } from './view/tagView/epics/deleteTagEpic';
|
|
497
497
|
import { ActionType as FetchAllTagsActionType } from './view/tagView/epics/fetchAllTagsEpic';
|
|
498
|
-
import { ActionType as DeleteCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic';
|
|
499
|
-
import { ActionType as FetchCannedResponsesActionType } from './view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic';
|
|
500
|
-
import { ActionType as SaveCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic';
|
|
501
498
|
import { ActionType as ArchiveTaskActionType } from './view/taskManager/taskDetailView/epics/archiveTaskEpic';
|
|
502
499
|
import { ActionType as DeleteTaskActionType } from './view/taskManager/taskDetailView/epics/deleteTaskEpic';
|
|
500
|
+
import { ActionType as SnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/snoozeTaskEpic';
|
|
501
|
+
import { ActionType as UnsnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/unsnoozeTaskEpic';
|
|
503
502
|
import { ActionType as FetchTaskDetailActionType } from './view/taskManager/taskDetailView/epics/fetchTaskDetailEpic';
|
|
504
503
|
import { ActionType as FetchTaskDetailPageActionType } from './view/taskManager/taskDetailView/epics/fetchTaskDetailPageEpic';
|
|
505
504
|
import { ActionType as FetchTaskHistoryActionType } from './view/taskManager/taskDetailView/epics/fetchTaskHistoryEpic';
|
|
506
505
|
import { ActionType as InitializeTaskToLocalStoreActionType } from './view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic';
|
|
507
506
|
import { ActionType as SaveTaskDetailActionType } from './view/taskManager/taskDetailView/epics/saveTaskDetailEpic';
|
|
508
|
-
import { ActionType as SnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/snoozeTaskEpic';
|
|
509
|
-
import { ActionType as UnsnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/unsnoozeTaskEpic';
|
|
510
507
|
import { ActionType as CreateTaskFromTaskGroupTemplateActionType } from './view/taskManager/taskGroupTemplateView/epics/createTaskFromTaskGroupTemplateEpic';
|
|
511
508
|
import { ActionType as FetchTaskGroupTemplatesActionType } from './view/taskManager/taskGroupTemplateView/epics/fetchTaskGroupTemplatesEpic';
|
|
512
509
|
import { ActionType as CreateNewTaskGroupActionType } from './view/taskManager/taskGroupView/epics/createNewTaskGroupEpic';
|
|
@@ -518,6 +515,9 @@ import { ActionType as DragNDropTasksActionType } from './view/taskManager/taskL
|
|
|
518
515
|
import { ActionType as FetchTaskListActionType } from './view/taskManager/taskListView/epics/fetchTaskListEpic';
|
|
519
516
|
import { ActionType as FetchTaskListPageActionType } from './view/taskManager/taskListView/epics/fetchTaskListPageEpic';
|
|
520
517
|
import { ActionType as UpdateTaskFromListViewActionType } from './view/taskManager/taskListView/epics/updateTaskFromListViewEpic';
|
|
518
|
+
import { ActionType as FetchCannedResponsesActionType } from './view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic';
|
|
519
|
+
import { ActionType as SaveCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic';
|
|
520
|
+
import { ActionType as DeleteCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic';
|
|
521
521
|
import { ActionType as FetchTasksCardActionType } from './view/tasksCard/fetchTasksCardEpic';
|
|
522
522
|
import { ActionType as TopExActionType } from './view/topEx/topExEpic';
|
|
523
523
|
import { ActionType as FetchTransactionActivityLogActionType } from './view/transactionActivityLogView/fetchTransactionActivityLogEpic';
|
|
@@ -531,13 +531,13 @@ import { ActionType as UpdateTransactionDetailActionType } from './view/transact
|
|
|
531
531
|
import { ActionType as UpdateTransactionOnUploadSuccessActionType } from './view/transactionDetail/epics/uploadMissingAttachmentSuccessEpic';
|
|
532
532
|
import { ActionType as FetchTransactionListByAccountActionType } from './view/transactionList/fetchTransactionListByAccountEpic';
|
|
533
533
|
import { ActionType as FetchTransactionListByClassActionType } from './view/transactionList/fetchTransactionListByClassEpic';
|
|
534
|
-
import { ActionType as FetchTransactionListByEntityActionType } from './view/transactionList/fetchTransactionListByEntityEpic';
|
|
535
534
|
import { ActionType as FetchTransactionListByProjectActionType } from './view/transactionList/fetchTransactionListByProjectEpic';
|
|
535
|
+
import { ActionType as FetchTransactionListByEntityActionType } from './view/transactionList/fetchTransactionListByEntityEpic';
|
|
536
536
|
import { ActionType as FetchTransactionsListByCategoryTypeActionType } from './view/transactionList/fetchTransactionsListByCategoryTypeEpic';
|
|
537
537
|
import { ActionType as ParallelFetchAccountTransactionListActionType } from './view/transactionList/parallelFetchAccountTransactionListEpic';
|
|
538
538
|
import { ActionType as ParallelFetchClassTransactionListActionType } from './view/transactionList/parallelFetchClassTransactionListEpic';
|
|
539
|
-
import { ActionType as ParallelFetchEntityTransactionListActionType } from './view/transactionList/parallelFetchEntityTransactionListEpic';
|
|
540
539
|
import { ActionType as ParallelFetchProjectTransactionListActionType } from './view/transactionList/parallelFetchProjectTransactionListEpic';
|
|
540
|
+
import { ActionType as ParallelFetchEntityTransactionListActionType } from './view/transactionList/parallelFetchEntityTransactionListEpic';
|
|
541
541
|
import { ActionType as ParallelFetchTransactionListByCategoryTypeActionType } from './view/transactionList/parallelFetchTransactionListByCategoryTypeEpic';
|
|
542
542
|
import { ActionType as FetchExpenseTrendActionType } from './view/trend/fetchExpenseTrendEpic';
|
|
543
543
|
import { ActionType as FetchIncomeTrendActionType } from './view/trend/fetchIncomeTrendEpic';
|