@zeniai/client-epic-state 4.19.96-betaRD4 → 4.19.96-betaSS2

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 (46) hide show
  1. package/lib/coreEpics.js +1 -4
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +9 -6
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.js +36 -2
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -2
  5. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -2
  6. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +26 -2
  7. package/lib/entity/tenant/tenantPayload.d.ts +0 -2
  8. package/lib/entity/tenant/tenantReducer.d.ts +1 -60
  9. package/lib/entity/tenant/tenantReducer.js +3 -143
  10. package/lib/entity/tenant/tenantState.d.ts +0 -8
  11. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  12. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  13. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  14. package/lib/epic.js +1 -4
  15. package/lib/esm/coreEpics.js +1 -4
  16. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +36 -2
  17. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -2
  18. package/lib/esm/entity/tenant/tenantReducer.js +2 -139
  19. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  20. package/lib/esm/epic.js +1 -4
  21. package/lib/esm/index.js +2 -2
  22. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  23. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  24. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +11 -3
  25. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +11 -3
  26. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +22 -9
  27. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +12 -6
  28. package/lib/index.d.ts +4 -4
  29. package/lib/index.js +29 -40
  30. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  31. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  32. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +11 -3
  33. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +11 -3
  34. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +22 -9
  35. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -5
  36. package/package.json +1 -1
  37. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +0 -19
  38. package/lib/entity/tenant/epic/deleteConnectionEpic.js +0 -29
  39. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +0 -19
  40. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +0 -31
  41. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +0 -19
  42. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +0 -33
  43. package/lib/esm/entity/tenant/epic/deleteConnectionEpic.js +0 -25
  44. package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +0 -27
  45. package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +0 -29
  46. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
package/lib/coreEpics.js CHANGED
@@ -21,10 +21,7 @@ const fetchExcludedResourcesEpic_1 = require("./entity/tenant/epic/fetchExcluded
21
21
  const fetchExternalConnectionsEpic_1 = require("./entity/tenant/epic/fetchExternalConnectionsEpic");
22
22
  const fetchSubscriptionSummaryForTenantEpic_1 = require("./entity/tenant/epic/fetchSubscriptionSummaryForTenantEpic");
23
23
  const resendVerifyDeviceOTPEpic_1 = require("./entity/tenant/epic/resendVerifyDeviceOTPEpic");
24
- const deleteConnectionEpic_1 = require("./entity/tenant/epic/deleteConnectionEpic");
25
- const saveAPIKeyConnectionEpic_1 = require("./entity/tenant/epic/saveAPIKeyConnectionEpic");
26
24
  const saveExternalConnectionEpic_1 = require("./entity/tenant/epic/saveExternalConnectionEpic");
27
- const saveOAuthConnectionEpic_1 = require("./entity/tenant/epic/saveOAuthConnectionEpic");
28
25
  const sendEmailMagicLinkToUserEpic_1 = require("./entity/tenant/epic/sendEmailMagicLinkToUserEpic");
29
26
  const signInUserEpic_1 = require("./entity/tenant/epic/signInUserEpic");
30
27
  const signOutUserEpic_1 = require("./entity/tenant/epic/signOutUserEpic");
@@ -51,7 +48,7 @@ const verifyOtpEpic_1 = require("./view/twoFactorAuthentication/verifyOtpEpic");
51
48
  // RootActionType is only available in the dynamically imported epic.ts.
52
49
  const coreRootEpic = (0, redux_observable_1.combineEpics)(
53
50
  // Auth & tenant
54
- clearAllEpic_1.clearAllEpic, doMagicLinkSignInEpic_1.doMagicLinkSignInEpic, signInUserEpic_1.doSignInEpic, signOutUserEpic_1.doSignOutEpic, fetchActiveTenantEpic_1.fetchActiveTenantEpic, fetchAllTenantsEpic_1.fetchAllTenantsEpic, fetchExcludedResourcesEpic_1.fetchExcludedResourcesEpic, fetchExternalConnectionsEpic_1.fetchExternalConnectionsEpic, fetchSubscriptionSummaryForTenantEpic_1.fetchSubscriptionSummaryForTenantEpic, resendVerifyDeviceOTPEpic_1.resendVerifyDeviceOTPEpic, deleteConnectionEpic_1.deleteConnectionEpic, saveAPIKeyConnectionEpic_1.saveAPIKeyConnectionEpic, saveExternalConnectionEpic_1.saveExternalConnectionEpic, saveOAuthConnectionEpic_1.saveOAuthConnectionEpic, sendEmailMagicLinkToUserEpic_1.sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic_1.verifyDeviceWithTwoFAEpic,
51
+ clearAllEpic_1.clearAllEpic, doMagicLinkSignInEpic_1.doMagicLinkSignInEpic, signInUserEpic_1.doSignInEpic, signOutUserEpic_1.doSignOutEpic, fetchActiveTenantEpic_1.fetchActiveTenantEpic, fetchAllTenantsEpic_1.fetchAllTenantsEpic, fetchExcludedResourcesEpic_1.fetchExcludedResourcesEpic, fetchExternalConnectionsEpic_1.fetchExternalConnectionsEpic, fetchSubscriptionSummaryForTenantEpic_1.fetchSubscriptionSummaryForTenantEpic, resendVerifyDeviceOTPEpic_1.resendVerifyDeviceOTPEpic, saveExternalConnectionEpic_1.saveExternalConnectionEpic, sendEmailMagicLinkToUserEpic_1.sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic_1.verifyDeviceWithTwoFAEpic,
55
52
  // Toast
56
53
  pushToastNotificationEpic_1.pushToastNotificationEpic,
57
54
  // Collaboration
@@ -25,26 +25,28 @@ export interface JEScheduleAISummariesPayload {
25
25
  debit_accounting_class?: JEScheduleAISummaryFieldPayload;
26
26
  period?: JEScheduleAISummaryFieldPayload;
27
27
  posting_date?: JEScheduleAISummaryFieldPayload;
28
+ schedule_type?: JEScheduleAISummaryFieldPayload;
28
29
  }
29
30
  export interface JEScheduleRecommendationsPayload {
30
- amortization_days?: number | null;
31
- amortization_months_estimate?: number | null;
32
31
  credit_account_confidence?: number;
33
- credit_account_id?: string | null;
34
- credit_accounting_class_id?: string | null;
35
32
  credit_class_confidence?: number;
36
33
  debit_account_confidence?: number;
37
- debit_account_id?: string | null;
38
- debit_accounting_class_id?: string | null;
39
34
  debit_class_confidence?: number;
40
35
  end_date?: string | null;
36
+ je_credit_account_id?: string | null;
37
+ je_credit_accounting_class_id?: string | null;
38
+ je_debit_account_id?: string | null;
39
+ je_debit_accounting_class_id?: string | null;
41
40
  je_schedule_type?: string | null;
41
+ je_schedule_type_confidence?: number;
42
42
  period?: number | null;
43
43
  period_confidence?: number;
44
44
  posting_date?: string | null;
45
+ posting_date_confidence?: number;
45
46
  similar_transactions?: unknown[];
46
47
  start_date?: string | null;
47
48
  starting_month?: string | null;
49
+ starting_month_confidence?: number;
48
50
  }
49
51
  export interface JEScheduledTransactionPayload {
50
52
  balance: number | null;
@@ -69,6 +71,7 @@ export interface JEScheduledTransactionPayload {
69
71
  updated_by: UserPayload;
70
72
  vendor: VendorPayload;
71
73
  ai_summaries?: JEScheduleAISummariesPayload;
74
+ created_by?: UserPayload;
72
75
  end_date?: string | null;
73
76
  recommendations?: JEScheduleRecommendationsPayload;
74
77
  updated_at?: string | null;
@@ -146,7 +146,7 @@ function toJEScheduleOtherAttributes(payload) {
146
146
  assetId: payload.asset_id ?? undefined,
147
147
  };
148
148
  }
149
- function toJEScheduleAIRecommendations(payload) {
149
+ function toJEScheduleAISummaries(payload) {
150
150
  if (payload == null) {
151
151
  return undefined;
152
152
  }
@@ -187,8 +187,40 @@ function toJEScheduleAIRecommendations(payload) {
187
187
  reasoning: payload.posting_date.reasoning,
188
188
  };
189
189
  }
190
+ if (payload.schedule_type != null) {
191
+ result.scheduleType = {
192
+ confidence: payload.schedule_type.confidence,
193
+ reasoning: payload.schedule_type.reasoning,
194
+ };
195
+ }
190
196
  return Object.keys(result).length > 0 ? result : undefined;
191
197
  }
198
+ function toJEScheduleRecommendations(payload) {
199
+ if (payload == null) {
200
+ return undefined;
201
+ }
202
+ return {
203
+ creditAccountConfidence: payload.credit_account_confidence,
204
+ creditClassConfidence: payload.credit_class_confidence,
205
+ debitAccountConfidence: payload.debit_account_confidence,
206
+ debitClassConfidence: payload.debit_class_confidence,
207
+ endDate: payload.end_date ?? undefined,
208
+ jeCreditAccountId: payload.je_credit_account_id ?? undefined,
209
+ jeCreditAccountingClassId: payload.je_credit_accounting_class_id ?? undefined,
210
+ jeDebitAccountId: payload.je_debit_account_id ?? undefined,
211
+ jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
212
+ jeScheduleType: payload.je_schedule_type ?? undefined,
213
+ jeScheduleTypeConfidence: payload.je_schedule_type_confidence,
214
+ period: payload.period ?? undefined,
215
+ periodConfidence: payload.period_confidence,
216
+ postingDate: payload.posting_date ?? undefined,
217
+ postingDateConfidence: payload.posting_date_confidence,
218
+ similarTransactions: payload.similar_transactions,
219
+ startDate: payload.start_date ?? undefined,
220
+ startingMonth: payload.starting_month ?? undefined,
221
+ startingMonthConfidence: payload.starting_month_confidence,
222
+ };
223
+ }
192
224
  function toJEScheduledTransaction(payload) {
193
225
  return {
194
226
  jeScheduleId: payload.je_schedule_id ?? undefined,
@@ -233,7 +265,9 @@ function toJEScheduledTransaction(payload) {
233
265
  ? toJEScheduleOtherAttributes(payload.other_attributes)
234
266
  : {},
235
267
  scheduledJournalEntry: [],
236
- aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
268
+ aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
269
+ createdByUserID: payload.created_by?.user_id ?? undefined,
270
+ recommendations: toJEScheduleRecommendations(payload.recommendations),
237
271
  };
238
272
  }
239
273
  function toJEAccruedScheduledTransaction(payload) {
@@ -9,7 +9,7 @@ import { ScheduleTransaction } from '../transaction/stateTypes/scheduleTransacti
9
9
  import { TransactionID } from '../transaction/stateTypes/transaction';
10
10
  import { User } from '../user/userState';
11
11
  import { Vendor } from '../vendor/vendorState';
12
- import { JEScheduleAIRecommendations, JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
12
+ import { JEScheduleAISummaries, JEScheduleOtherAttributes, JEScheduleRecommendations, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
13
13
  import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleTypes } from './jeSchedulesTypes';
14
14
  export interface ScheduledJournalEntry {
15
15
  error: JournalEntryErrorCodeType[];
@@ -59,14 +59,16 @@ export interface JEScheduledTransaction {
59
59
  scheduledJournalEntry: ScheduledJournalEntry[];
60
60
  status: ScheduleStatus;
61
61
  vendor: Vendor;
62
- aiRecommendations?: JEScheduleAIRecommendations;
62
+ aiSummaries?: JEScheduleAISummaries;
63
63
  balanceAsOfToday?: Amount;
64
+ createdByUser?: User;
64
65
  dayOfPostingDate?: ScheduleDaysOfMonth;
65
66
  endDate?: ZeniDate;
66
67
  jeScheduleId?: ID;
67
68
  jeScheduleType?: ScheduleTypes;
68
69
  lastDayOfMonth?: boolean;
69
70
  period?: number;
71
+ recommendations?: JEScheduleRecommendations;
70
72
  startDate?: ZeniDate;
71
73
  updatedAt?: ZeniDate;
72
74
  updatedByUser?: User;
@@ -77,12 +77,13 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
77
77
  const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
78
78
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
79
79
  const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
80
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
80
+ const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
81
81
  const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
82
82
  if (vendorDetails == null) {
83
83
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
84
84
  }
85
85
  const userDetails = updatedBy != null ? (0, userSelector_1.getUserByUserId)(userState, updatedBy) : undefined;
86
+ const createdByUserDetails = createdBy != null ? (0, userSelector_1.getUserByUserId)(userState, createdBy) : undefined;
86
87
  const baseTransactionObject = (0, transactionSelector_1.getScheduleTransactionById)(transactionState, baseTransaction);
87
88
  if (baseTransactionObject == null) {
88
89
  throw Error('Base Schedule transaction cannot be null');
@@ -134,7 +135,9 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
134
135
  account: accountDebit,
135
136
  },
136
137
  scheduledJournalEntry,
137
- aiRecommendations,
138
+ aiSummaries,
139
+ createdByUser: createdByUserDetails,
140
+ recommendations,
138
141
  };
139
142
  };
140
143
  exports.getJEScheduledTransactionByJEScheduleTransactionKey = getJEScheduledTransactionByJEScheduleTransactionKey;
@@ -16,13 +16,35 @@ export interface JEScheduleFieldRecommendation {
16
16
  confidence: number;
17
17
  reasoning: string;
18
18
  }
19
- export interface JEScheduleAIRecommendations {
19
+ export interface JEScheduleAISummaries {
20
20
  creditAccount?: JEScheduleFieldRecommendation;
21
21
  creditClass?: JEScheduleFieldRecommendation;
22
22
  debitAccount?: JEScheduleFieldRecommendation;
23
23
  debitClass?: JEScheduleFieldRecommendation;
24
24
  period?: JEScheduleFieldRecommendation;
25
25
  postingDate?: JEScheduleFieldRecommendation;
26
+ scheduleType?: JEScheduleFieldRecommendation;
27
+ }
28
+ export interface JEScheduleRecommendations {
29
+ creditAccountConfidence?: number;
30
+ creditClassConfidence?: number;
31
+ debitAccountConfidence?: number;
32
+ debitClassConfidence?: number;
33
+ endDate?: string;
34
+ jeCreditAccountId?: string;
35
+ jeCreditAccountingClassId?: string;
36
+ jeDebitAccountId?: string;
37
+ jeDebitAccountingClassId?: string;
38
+ jeScheduleType?: string;
39
+ jeScheduleTypeConfidence?: number;
40
+ period?: number;
41
+ periodConfidence?: number;
42
+ postingDate?: string;
43
+ postingDateConfidence?: number;
44
+ similarTransactions?: unknown[];
45
+ startDate?: string;
46
+ startingMonth?: string;
47
+ startingMonthConfidence?: number;
26
48
  }
27
49
  export interface JEScheduleOtherAttributes {
28
50
  assetId?: string;
@@ -68,14 +90,16 @@ export interface JEScheduledTransactionState {
68
90
  scheduledJournalEntry: ScheduledJournalEntryState[];
69
91
  status: ScheduleStatus;
70
92
  vendorId: ID;
71
- aiRecommendations?: JEScheduleAIRecommendations;
93
+ aiSummaries?: JEScheduleAISummaries;
72
94
  balanceAsOfToday?: number;
95
+ createdByUserID?: ID;
73
96
  dayOfPostingDate?: ScheduleDaysOfMonth;
74
97
  endDate?: ZeniDate;
75
98
  jeScheduleId?: ID;
76
99
  jeScheduleType?: ScheduleTypes;
77
100
  lastDayOfMonth?: boolean;
78
101
  period?: number;
102
+ recommendations?: JEScheduleRecommendations;
79
103
  startDate?: ZeniDate;
80
104
  updatedAt?: ZeniDate;
81
105
  updatedByUserID?: ID;
@@ -138,9 +138,7 @@ type RoleResourcesResponse = ZeniAPIResponse<RoleResourcesData>;
138
138
  interface ConnectionsPayload {
139
139
  connections: {
140
140
  accounting: ConnectionDataPayload[];
141
- analytics: ConnectionDataPayload[];
142
141
  payments: ConnectionDataPayload[];
143
- crm?: ConnectionDataPayload[];
144
142
  };
145
143
  }
146
144
  interface ConnectionWithMetaPayload {
@@ -13,10 +13,6 @@ export interface DoSignInPayload {
13
13
  redirectUri: ZeniUrl;
14
14
  sourceUri: ZeniUrl;
15
15
  }
16
- export declare const toExternalIntegrationType: (v: string) => "analytics" | "crm";
17
- export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
18
- export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot";
19
- export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
20
16
  export declare const initialState: TenantState;
21
17
  export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenants: TenantPayload[], userTenantPayload?: TenantUserPayload | undefined, tenantUpdated?: any], {
22
18
  tenants: TenantPayload[];
@@ -80,60 +76,7 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
80
76
  }, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
81
77
  tenantId: string;
82
78
  externalConnections: ConnectionsPayload;
83
- }, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm", connectionName: "chargebee" | "hubspot", credentials: {
84
- api_key: string;
85
- site: string;
86
- }], {
87
- tenantId: string;
88
- connectionId: string;
89
- connectionType: "analytics" | "crm";
90
- connectionName: "chargebee" | "hubspot";
91
- credentials: {
92
- api_key: string;
93
- site: string;
94
- };
95
- }, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "analytics" | "crm", connectionPayload: ConnectionDataPayload], {
96
- tenantId: string;
97
- connectionType: "analytics" | "crm";
98
- connectionPayload: ConnectionDataPayload;
99
- }, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
100
- tenantId: string;
101
- status: ZeniAPIStatus<Record<string, unknown>>;
102
- }, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm", connectionName: "chargebee" | "hubspot", credentials: {
103
- authorization_code: string;
104
- client_id: string;
105
- client_secret: string;
106
- redirect_uri: string;
107
- }], {
108
- tenantId: string;
109
- connectionId: string;
110
- connectionType: "analytics" | "crm";
111
- connectionName: "chargebee" | "hubspot";
112
- credentials: {
113
- authorization_code: string;
114
- client_id: string;
115
- client_secret: string;
116
- redirect_uri: string;
117
- };
118
- }, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "analytics" | "crm", connectionPayload: ConnectionDataPayload], {
119
- tenantId: string;
120
- connectionType: "analytics" | "crm";
121
- connectionPayload: ConnectionDataPayload;
122
- }, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
123
- tenantId: string;
124
- status: ZeniAPIStatus<Record<string, unknown>>;
125
- }, "tenant/saveOAuthConnectionFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm"], {
126
- tenantId: string;
127
- connectionId: string;
128
- connectionType: "analytics" | "crm";
129
- }, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm"], {
130
- tenantId: string;
131
- connectionId: string;
132
- connectionType: "analytics" | "crm";
133
- }, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
134
- tenantId: string;
135
- status: ZeniAPIStatus<Record<string, unknown>>;
136
- }, "tenant/deleteConnectionFailure", never, never>, clearAll: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[keepTenantCompanyState?: boolean | undefined], {
79
+ }, "tenant/fetchExternalConnectionsSuccess", never, never>, clearAll: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[keepTenantCompanyState?: boolean | undefined], {
137
80
  keepTenantCompanyState: boolean;
138
81
  }, "tenant/clearAll", never, never>, fetchSubscriptionSummaryForTenant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string], {
139
82
  tenantId: string;
@@ -177,8 +120,6 @@ export declare const toRoleResource: (payload: RoleResourcePayload) => RoleResou
177
120
  */
178
121
  export declare function mapConnectionsPayloadToState(connectionsPayload: ConnectionsPayload): {
179
122
  accounting: Connection[];
180
- analytics: Connection[];
181
- crm: Connection[];
182
123
  payments: Connection[];
183
124
  };
184
125
  export declare const toConnection: (payload: ConnectionDataPayload) => Connection;
@@ -4,26 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  var _a;
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.resetSignInState = exports.updateTreasuryVideoViewedForLoggedInUser = exports.updateReferViewedForLoggedInUser = 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.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.trigger2FA = void 0;
7
+ exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = exports.resendVerifyDeviceOTPSuccess = exports.resendVerifyDeviceOTP = exports.verifyDeviceWithTwoFAFailure = exports.verifyDeviceWithTwoFASuccess = exports.verifyDeviceWithTwoFA = exports.updateTenantMasterTOSInfo = exports.trigger2FA = exports.resetSignInState = exports.updateTreasuryVideoViewedForLoggedInUser = exports.updateReferViewedForLoggedInUser = exports.updateTenantReimbursementInfo = exports.removeOnboardingTenant = exports.updateOnboardingTenants = exports.updateSubscriptionSummaryForTenantFailure = exports.updateSubscriptionSummaryForTenantSuccess = exports.fetchSubscriptionSummaryForTenant = exports.clearAll = exports.fetchExternalConnectionsSuccess = exports.fetchExternalConnectionsFailure = exports.saveExternalConnectionFailure = exports.saveExternalConnectionSuccess = exports.saveExternalConnection = exports.fetchExternalConnections = exports.updateLoggedInUser = 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 = void 0;
9
8
  exports.mapConnectionsPayloadToState = mapConnectionsPayloadToState;
10
9
  const toolkit_1 = require("@reduxjs/toolkit");
11
10
  const js_base64_1 = require("js-base64");
12
11
  const assignWith_1 = __importDefault(require("lodash/assignWith"));
13
12
  const urlPayload_1 = require("../../commonPayloadTypes/urlPayload");
14
- const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
15
13
  const timePeriod_1 = require("../../commonStateTypes/timePeriod");
16
14
  const netBurnOrIncomeStoryCardSelectorTypes_1 = require("../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelectorTypes");
17
15
  const netBurnOrIncomeStoryCardState_1 = require("../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState");
18
16
  const zeniDayJS_1 = require("../../zeniDayJS");
19
17
  const subscriptionSummaryReducer_1 = require("../subscription/subscriptionSummary/subscriptionSummaryReducer");
20
18
  const userRolePayload_1 = require("../userRole/userRolePayload");
21
- const EXTERNAL_INTEGRATIONS_TYPES = ['analytics', 'crm'];
22
- const toExternalIntegrationType = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_INTEGRATIONS_TYPES);
23
- exports.toExternalIntegrationType = toExternalIntegrationType;
24
- const EXTERNAL_SUPPORTED_TOOLS = ['chargebee', 'hubspot'];
25
- const toExternalSupportedTool = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_SUPPORTED_TOOLS);
26
- exports.toExternalSupportedTool = toExternalSupportedTool;
27
19
  exports.initialState = {
28
20
  fetchState: 'Not-Started',
29
21
  error: undefined,
@@ -341,13 +333,8 @@ const tenant = (0, toolkit_1.createSlice)({
341
333
  draft.externalConnectionsByTenant[action.payload.tenantId] = {
342
334
  fetchState: 'In-Progress',
343
335
  accounting: [],
344
- analytics: [],
345
- crm: [],
346
336
  payments: [],
347
337
  saveConnectionState: 'Not-Started',
348
- saveAPIKeyConnectionState: 'Not-Started',
349
- saveOAuthConnectionState: 'Not-Started',
350
- deleteConnectionState: 'Not-Started',
351
338
  error: undefined,
352
339
  };
353
340
  },
@@ -357,17 +344,12 @@ const tenant = (0, toolkit_1.createSlice)({
357
344
  return { payload: { tenantId, externalConnections } };
358
345
  },
359
346
  reducer(draft, action) {
360
- const { accounting, analytics, crm, payments } = mapConnectionsPayloadToState(action.payload.externalConnections);
347
+ const { accounting, payments } = mapConnectionsPayloadToState(action.payload.externalConnections);
361
348
  draft.externalConnectionsByTenant[action.payload.tenantId] = {
362
349
  fetchState: 'Completed',
363
350
  accounting,
364
- analytics,
365
- crm,
366
351
  payments,
367
352
  saveConnectionState: 'Completed',
368
- saveAPIKeyConnectionState: 'Not-Started',
369
- saveOAuthConnectionState: 'Not-Started',
370
- deleteConnectionState: 'Not-Started',
371
353
  error: undefined,
372
354
  };
373
355
  },
@@ -381,13 +363,8 @@ const tenant = (0, toolkit_1.createSlice)({
381
363
  draft.externalConnectionsByTenant[tenantId] = {
382
364
  fetchState: 'Error',
383
365
  accounting: [],
384
- analytics: [],
385
- crm: [],
386
366
  payments: [],
387
367
  saveConnectionState: 'Error',
388
- saveAPIKeyConnectionState: 'Not-Started',
389
- saveOAuthConnectionState: 'Not-Started',
390
- deleteConnectionState: 'Not-Started',
391
368
  error: status,
392
369
  };
393
370
  },
@@ -433,121 +410,6 @@ const tenant = (0, toolkit_1.createSlice)({
433
410
  });
434
411
  },
435
412
  },
436
- saveAPIKeyConnection: {
437
- prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
438
- return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
439
- },
440
- reducer(draft, action) {
441
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
442
- if (existing != null) {
443
- existing.saveAPIKeyConnectionState = 'In-Progress';
444
- existing.saveAPIKeyConnectionError = undefined;
445
- }
446
- },
447
- },
448
- saveAPIKeyConnectionSuccess: {
449
- prepare(tenantId, connectionType, connectionPayload) {
450
- return { payload: { tenantId, connectionType, connectionPayload } };
451
- },
452
- reducer(draft, action) {
453
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
454
- if (existing != null) {
455
- existing.saveAPIKeyConnectionState = 'Completed';
456
- existing[action.payload.connectionType] = [(0, exports.toConnection)(action.payload.connectionPayload)];
457
- existing.saveAPIKeyConnectionError = undefined;
458
- }
459
- },
460
- },
461
- saveAPIKeyConnectionFailure: {
462
- prepare(tenantId, status) {
463
- return { payload: { tenantId, status } };
464
- },
465
- reducer(draft, action) {
466
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
467
- if (existing != null) {
468
- existing.saveAPIKeyConnectionState = 'Error';
469
- existing.saveAPIKeyConnectionError = action.payload.status;
470
- }
471
- },
472
- },
473
- saveOAuthConnection: {
474
- prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
475
- return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
476
- },
477
- reducer(draft, action) {
478
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
479
- if (existing != null) {
480
- existing.saveOAuthConnectionState = 'In-Progress';
481
- existing.saveOAuthConnectionError = undefined;
482
- }
483
- },
484
- },
485
- saveOAuthConnectionSuccess: {
486
- prepare(tenantId, connectionType, connectionPayload) {
487
- return { payload: { tenantId, connectionType, connectionPayload } };
488
- },
489
- reducer(draft, action) {
490
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
491
- if (existing != null) {
492
- existing.saveOAuthConnectionState = 'Completed';
493
- existing[action.payload.connectionType] = [(0, exports.toConnection)(action.payload.connectionPayload)];
494
- existing.saveOAuthConnectionError = undefined;
495
- }
496
- },
497
- },
498
- saveOAuthConnectionFailure: {
499
- prepare(tenantId, status) {
500
- return { payload: { tenantId, status } };
501
- },
502
- reducer(draft, action) {
503
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
504
- if (existing != null) {
505
- existing.saveOAuthConnectionState = 'Error';
506
- existing.saveOAuthConnectionError = action.payload.status;
507
- }
508
- },
509
- },
510
- deleteConnection: {
511
- prepare(tenantId, connectionId, connectionType) {
512
- return { payload: { tenantId, connectionId, connectionType } };
513
- },
514
- reducer(draft, action) {
515
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
516
- if (existing != null) {
517
- existing.deleteConnectionState = 'In-Progress';
518
- existing.deleteConnectionError = undefined;
519
- }
520
- },
521
- },
522
- deleteConnectionSuccess: {
523
- prepare(tenantId, connectionId, connectionType) {
524
- return { payload: { tenantId, connectionId, connectionType } };
525
- },
526
- reducer(draft, action) {
527
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
528
- if (existing != null) {
529
- existing.deleteConnectionState = 'Completed';
530
- existing.deleteConnectionError = undefined;
531
- const arr = existing[action.payload.connectionType];
532
- const idx = arr.findIndex((c) => c.connectionId === action.payload.connectionId);
533
- if (idx !== -1) {
534
- arr[idx] = { ...arr[idx], isValid: false };
535
- }
536
- }
537
- },
538
- },
539
- deleteConnectionFailure: {
540
- prepare(tenantId, status) {
541
- return { payload: { tenantId, status } };
542
- },
543
- reducer(draft, action) {
544
- const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
545
- if (existing != null) {
546
- existing.deleteConnectionState = 'Error';
547
- existing.deleteConnectionError = action.payload.status;
548
- }
549
- },
550
- },
551
413
  doSignOut(draft) {
552
414
  draft.fetchState = 'Not-Started';
553
415
  draft.signInState = 'Not-Started';
@@ -675,7 +537,7 @@ const tenant = (0, toolkit_1.createSlice)({
675
537
  },
676
538
  },
677
539
  });
678
- _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.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.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;
540
+ _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.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.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.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;
679
541
  exports.default = tenant.reducer;
680
542
  /**
681
543
  * Converts tenants payload to Tenant and User State
@@ -802,8 +664,6 @@ function mapConnectionsPayloadToState(connectionsPayload) {
802
664
  const { connections } = connectionsPayload;
803
665
  return {
804
666
  accounting: connections.accounting.map((payload) => (0, exports.toConnection)(payload)),
805
- analytics: (connections.analytics ?? []).map((payload) => (0, exports.toConnection)(payload)),
806
- crm: (connections.crm ?? []).map((payload) => (0, exports.toConnection)(payload)),
807
667
  payments: connections.payments.map((payload) => (0, exports.toConnection)(payload)),
808
668
  };
809
669
  }
@@ -12,18 +12,10 @@ import { UserRoleType } from '../userRole/userRoleType';
12
12
  import { AuthProvider } from './tenantReducer';
13
13
  export interface TenantExternalConnections {
14
14
  accounting: Connection[];
15
- analytics: Connection[];
16
- crm: Connection[];
17
- deleteConnectionState: FetchState;
18
15
  fetchState: FetchState;
19
16
  payments: Connection[];
20
- saveAPIKeyConnectionState: FetchState;
21
17
  saveConnectionState: FetchState;
22
- saveOAuthConnectionState: FetchState;
23
- deleteConnectionError?: ZeniAPIStatus;
24
18
  error?: ZeniAPIStatus;
25
- saveAPIKeyConnectionError?: ZeniAPIStatus;
26
- saveOAuthConnectionError?: ZeniAPIStatus;
27
19
  }
28
20
  export interface TenantState extends FetchedState {
29
21
  accountLocked: boolean;
@@ -2,12 +2,15 @@ import { AccountBasePayload } from '../../account/accountPayload';
2
2
  import { ClassBasePayload } from '../../class/classPayload';
3
3
  import { ScheduleTransaction } from '../stateTypes/scheduleTransaction';
4
4
  import { TransactionIDPayload } from './transactionIDPayload';
5
- export interface ScheduleTransactionPayload extends TransactionIDPayload, Omit<AccountBasePayload, 'qbo_id'>, Omit<ClassBasePayload, 'qbo_id' | 'labels'> {
5
+ export interface ScheduleTransactionPayload extends TransactionIDPayload, Omit<AccountBasePayload, 'qbo_id' | 'labels'>, Omit<ClassBasePayload, 'qbo_id' | 'labels'> {
6
6
  line_id: string;
7
7
  third_party_transaction_id: string;
8
8
  total_amount: number;
9
9
  transaction_date: string;
10
10
  transaction_memo: string;
11
11
  transaction_type_name: string;
12
+ labels?: string[];
13
+ sync_token?: number;
14
+ transaction_description?: string | null;
12
15
  }
13
16
  export declare const toScheduleTransaction: (payload: ScheduleTransactionPayload, currency_code: string, currency_symbol: string) => ScheduleTransaction;
@@ -32,6 +32,7 @@ const toScheduleTransaction = (payload, currency_code, currency_symbol) => {
32
32
  currencyCode: currency_code,
33
33
  currencySymbol: currency_symbol,
34
34
  },
35
+ description: payload.transaction_description ?? undefined,
35
36
  };
36
37
  };
37
38
  exports.toScheduleTransaction = toScheduleTransaction;
@@ -9,4 +9,5 @@ export interface ScheduleTransaction extends BaseTransaction {
9
9
  lineId: ID;
10
10
  thirdPartyTransactionId: ID;
11
11
  classBase?: ClassBase;
12
+ description?: string;
12
13
  }