@zeniai/client-epic-state 4.10.6 → 4.10.8

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 (171) hide show
  1. package/lib/commonPayloadTypes/agingReportPayloadTypes.d.ts +1 -0
  2. package/lib/commonPayloadTypes/commonPayload.d.ts +8 -0
  3. package/lib/commonPayloadTypes/commonPayload.js +20 -0
  4. package/lib/commonPayloadTypes/subAccountView/subAccountPayloadHelper.js +2 -2
  5. package/lib/commonStateTypes/accountView/{getNestedAccountIDHeirarchyForReport.d.ts → getNestedAccountIDHierarchyForReport.d.ts} +2 -2
  6. package/lib/commonStateTypes/accountView/nestedAccountID.d.ts +2 -2
  7. package/lib/commonStateTypes/agingBalance/agingBalance.d.ts +4 -0
  8. package/lib/commonStateTypes/agingBalance/agingBalance.js +4 -1
  9. package/lib/commonStateTypes/classesView/getNestedClassIDHierarchyForReport.d.ts +2 -2
  10. package/lib/commonStateTypes/classesView/nestedClassID.d.ts +2 -2
  11. package/lib/commonStateTypes/customerView/getNestedCustomerHierarchy.d.ts +9 -0
  12. package/lib/commonStateTypes/customerView/getNestedCustomerHierarchy.js +46 -0
  13. package/lib/commonStateTypes/customerView/nestedCustomerID.d.ts +42 -0
  14. package/lib/commonStateTypes/customerView/nestedCustomerID.js +9 -0
  15. package/lib/commonStateTypes/selectorTypes/classesViewSelectorReport.d.ts +2 -2
  16. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +4 -7
  17. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  18. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  19. package/lib/entity/account/accountState.d.ts +1 -1
  20. package/lib/entity/account/subAccountSelector.d.ts +1 -1
  21. package/lib/entity/account/subAccountSelector.js +7 -7
  22. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  23. package/lib/entity/accountGroup/accountGroupV2Selector.js +3 -3
  24. package/lib/entity/class/classReducer.d.ts +4 -4
  25. package/lib/entity/class/classSelectorV2.d.ts +1 -1
  26. package/lib/entity/class/classSelectorV2.js +10 -10
  27. package/lib/entity/class/classState.d.ts +1 -1
  28. package/lib/entity/customer/customerPayload.d.ts +1 -1
  29. package/lib/entity/customer/customerPayload.js +1 -1
  30. package/lib/entity/customer/customerReducer.d.ts +1 -1
  31. package/lib/entity/customer/customerSelector.d.ts +1 -1
  32. package/lib/entity/customerIncome/customerIncomeTrend.d.ts +1 -1
  33. package/lib/entity/customerIncome/customerIncomeTrendReducer.d.ts +1 -1
  34. package/lib/entity/forecast/forecastState.d.ts +1 -1
  35. package/lib/entity/notification/notificationPayload.d.ts +46 -0
  36. package/lib/entity/notification/notificationPayload.js +144 -0
  37. package/lib/entity/notification/notificationReducer.d.ts +20 -0
  38. package/lib/entity/notification/notificationReducer.js +118 -0
  39. package/lib/entity/notification/notificationSelector.d.ts +9 -0
  40. package/lib/entity/notification/notificationSelector.js +36 -0
  41. package/lib/entity/notification/notificationState.d.ts +7 -0
  42. package/lib/entity/notification/notificationState.js +2 -0
  43. package/lib/entity/notification/types/notificationSelectorTypes.d.ts +8 -0
  44. package/lib/entity/notification/types/notificationSelectorTypes.js +2 -0
  45. package/lib/entity/notification/types/notificationStateTypes.d.ts +50 -0
  46. package/lib/entity/notification/types/notificationStateTypes.js +2 -0
  47. package/lib/entity/notification/types/notificationTypes.d.ts +24 -0
  48. package/lib/entity/notification/types/notificationTypes.js +58 -0
  49. package/lib/entity/sectionAccountsView/getNestedAccountIDHierarchyForSection.js +9 -9
  50. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  51. package/lib/entity/sectionAccountsView/sectionAccountsViewEpic.js +2 -2
  52. package/lib/entity/sectionAccountsView/sectionAccountsViewSelector.js +3 -3
  53. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  54. package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +2 -2
  55. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  56. package/lib/entity/sectionClassesViewV2/sectionClassesViewSelector.js +7 -7
  57. package/lib/entity/sectionClassesViewV2/selectorHelpers/getNestedClassIDHierarchyForSection.js +7 -7
  58. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  59. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  60. package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
  61. package/lib/entity/tenant/clearAllEpic.js +5 -1
  62. package/lib/entity/transaction/stateTypes/customerTransaction.d.ts +1 -1
  63. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  64. package/lib/epic.d.ts +7 -3
  65. package/lib/epic.js +5 -1
  66. package/lib/index.d.ts +24 -14
  67. package/lib/index.js +35 -13
  68. package/lib/reducer.d.ts +7 -1
  69. package/lib/reducer.js +6 -0
  70. package/lib/view/accountList/accountListReducer.js +2 -2
  71. package/lib/view/accountList/accountListSelector.d.ts +3 -3
  72. package/lib/view/accountList/accountListSelector.js +3 -3
  73. package/lib/view/accountList/accountListState.d.ts +2 -2
  74. package/lib/view/accountMappingView/accountMappingReducer.js +19 -19
  75. package/lib/view/accountMappingView/accountMappingState.d.ts +8 -8
  76. package/lib/view/accountMappingView/accountMappingViewSelector.d.ts +8 -8
  77. package/lib/view/accountMappingView/accountMappingViewSelector.js +7 -7
  78. package/lib/view/apAgingView/apAgingReport/apAgingReducer.d.ts +7 -5
  79. package/lib/view/apAgingView/apAgingReport/apAgingReducer.js +34 -15
  80. package/lib/view/apAgingView/apAgingReport/apAgingSelector.d.ts +1 -1
  81. package/lib/view/apAgingView/apAgingReport/apAgingSelector.js +29 -16
  82. package/lib/view/apAgingView/apAgingReport/apAgingState.d.ts +6 -3
  83. package/lib/view/apAgingView/apAgingReport/fetchApAgingEpic.js +11 -7
  84. package/lib/view/arAgingView/arAgingDetail/arAgingDetailSelector.d.ts +1 -1
  85. package/lib/view/arAgingView/arAgingReport/arAgingPayload.js +8 -1
  86. package/lib/view/arAgingView/arAgingReport/arAgingReducer.d.ts +13 -7
  87. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +49 -15
  88. package/lib/view/arAgingView/arAgingReport/arAgingSelector.d.ts +12 -6
  89. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +68 -35
  90. package/lib/view/arAgingView/arAgingReport/arAgingState.d.ts +12 -4
  91. package/lib/view/arAgingView/arAgingReport/fetchArAgingEpic.js +10 -7
  92. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  93. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  94. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  95. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  96. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  97. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  98. package/lib/view/classList/classListSelector.d.ts +3 -3
  99. package/lib/view/classList/classListSelector.js +3 -3
  100. package/lib/view/classList/classListState.d.ts +2 -2
  101. package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewSelector.d.ts +4 -4
  102. package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewSelector.js +4 -4
  103. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +4 -4
  104. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +4 -4
  105. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +4 -4
  106. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +4 -4
  107. package/lib/view/dashboard/dashboardEpic.js +6 -4
  108. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  109. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  110. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  111. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +3 -3
  112. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewSelector.js +3 -3
  113. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewState.d.ts +2 -2
  114. package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.d.ts +10 -0
  115. package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +39 -0
  116. package/lib/view/notificationView/epics/fetchNotificationViewEpic.d.ts +9 -0
  117. package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +56 -0
  118. package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts +9 -0
  119. package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.js +50 -0
  120. package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.d.ts +9 -0
  121. package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.js +86 -0
  122. package/lib/view/notificationView/notificationView.helpers.d.ts +2 -0
  123. package/lib/view/notificationView/notificationView.helpers.js +11 -0
  124. package/lib/view/notificationView/notificationViewPayload.d.ts +48 -0
  125. package/lib/view/notificationView/notificationViewPayload.js +2 -0
  126. package/lib/view/notificationView/notificationViewReducer.d.ts +64 -0
  127. package/lib/view/notificationView/notificationViewReducer.js +372 -0
  128. package/lib/view/notificationView/notificationViewSelector.d.ts +29 -0
  129. package/lib/view/notificationView/notificationViewSelector.js +89 -0
  130. package/lib/view/notificationView/notificationViewState.d.ts +31 -0
  131. package/lib/view/notificationView/notificationViewState.js +19 -0
  132. package/lib/view/opExClassesView/opExClassesViewReducer.js +3 -3
  133. package/lib/view/opExClassesView/opExClassesViewSelector.js +3 -3
  134. package/lib/view/opExClassesView/opExClassesViewState.d.ts +2 -2
  135. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  136. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  137. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  138. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  139. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  140. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +3 -3
  141. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -2
  142. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +2 -2
  143. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  144. package/lib/view/revenueClassesView/revenueClassesViewReducer.js +3 -3
  145. package/lib/view/revenueClassesView/revenueClassesViewSelector.js +3 -3
  146. package/lib/view/revenueClassesView/revenueClassesViewState.d.ts +2 -2
  147. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +5 -5
  148. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +5 -5
  149. package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +2 -2
  150. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.d.ts +2 -2
  151. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
  152. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  153. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -4
  154. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +4 -4
  155. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.d.ts +4 -4
  156. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -4
  157. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
  158. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +37 -5
  159. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  160. package/lib/view/topEx/topExSelector.d.ts +1 -1
  161. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +4 -4
  162. package/lib/view/transactionDetail/transactionDetailSelector.js +4 -4
  163. package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -1
  164. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +1 -1
  165. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +1 -1
  166. package/lib/zeniAPI.d.ts +2 -0
  167. package/lib/zeniAPI.js +8 -0
  168. package/package.json +2 -1
  169. package/lib/commonStateTypes/accountView/{getNestedAccountIDHeirarchyForReport.js → getNestedAccountIDHierarchyForReport.js} +0 -0
  170. package/lib/entity/customer/{customer.d.ts → customerState.d.ts} +4 -4
  171. /package/lib/entity/customer/{customer.js → customerState.js} +0 -0
@@ -6,7 +6,7 @@ export declare const getZeniAccountsPromoCard: (state: RootState) => {
6
6
  maxCashBalanceAvailable: number | undefined;
7
7
  maxInsuredAmount: number;
8
8
  depositAccountId: string | undefined;
9
- reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets";
9
+ reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification";
10
10
  reportTitle: string;
11
11
  firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
12
12
  fetchState: import("../..").FetchState;
package/lib/zeniAPI.d.ts CHANGED
@@ -28,6 +28,7 @@ export interface ZeniAPI<ResponseType = FetchResponse> {
28
28
  postAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
29
29
  deleteAndGetJSON<T>(path: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
30
30
  putAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
31
+ patchAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
31
32
  }
32
33
  export declare class ZeniAPIClient implements ZeniAPI {
33
34
  readonly apiEndPoints: RESTAPIEndpoints;
@@ -41,6 +42,7 @@ export declare class ZeniAPIClient implements ZeniAPI {
41
42
  postAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
42
43
  deleteAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
43
44
  putAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
45
+ patchAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
44
46
  private apiHeaders;
45
47
  }
46
48
  export {};
package/lib/zeniAPI.js CHANGED
@@ -59,5 +59,13 @@ class ZeniAPIClient {
59
59
  }).then((response) => response.json());
60
60
  return (0, rxjs_1.from)(promise);
61
61
  }
62
+ patchAndGetJSON(restEndPoint, body, headers) {
63
+ const promise = (0, cross_fetch_1.fetch)(restEndPoint, {
64
+ method: 'PATCH',
65
+ body: body != null ? JSON.stringify(body) : undefined,
66
+ headers: Object.assign({ 'Content-Type': 'application/json' }, this.apiHeaders(headers)),
67
+ }).then((response) => response.json());
68
+ return (0, rxjs_1.from)(promise);
69
+ }
62
70
  }
63
71
  exports.ZeniAPIClient = ZeniAPIClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.6",
3
+ "version": "4.10.8",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -25,6 +25,7 @@
25
25
  },
26
26
  "homepage": "https://github.com/zeni-ai/client-epic-state#readme",
27
27
  "devDependencies": {
28
+ "@cord-sdk/types": "^1.45.1",
28
29
  "@types/chai": "^4.2.11",
29
30
  "@types/jest": "^29.4.0",
30
31
  "@types/lodash": "^4.14.178",
@@ -9,6 +9,10 @@ export interface CustomerBase {
9
9
  logo?: Url;
10
10
  }
11
11
  export interface Customer extends CustomerBase {
12
+ isSubCustomer: boolean;
13
+ isTaxable: boolean;
14
+ isDeleted: boolean;
15
+ parentCustomerId?: ID;
12
16
  addressId?: ID;
13
17
  lastName?: string;
14
18
  paymentMethodId?: ID;
@@ -24,7 +28,6 @@ export interface Customer extends CustomerBase {
24
28
  syncToken?: string;
25
29
  email?: string;
26
30
  websiteUrl?: string;
27
- parentCustomerId?: ID;
28
31
  qboParentCustomerId?: ID;
29
32
  isBillWithParent: boolean;
30
33
  updateTime?: ZeniDate;
@@ -32,11 +35,8 @@ export interface Customer extends CustomerBase {
32
35
  phone?: string;
33
36
  bankAccountIds?: ID[];
34
37
  balance?: number;
35
- isDeleted: boolean;
36
38
  tenantId?: ID;
37
39
  title?: string;
38
- isSubCustomer: boolean;
39
- isTaxable: boolean;
40
40
  shippingAddressId?: ID;
41
41
  billingAddressId?: ID;
42
42
  currencySymbol?: string;