@tesouro/embedded-components-react 0.7.26 → 0.7.29

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 (39) hide show
  1. package/dist/index.d.ts +1 -12
  2. package/dist/lib/CounterpartsWidget.d.ts +1 -12
  3. package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -12
  4. package/dist/lib/CustomersWidget.d.ts +0 -2
  5. package/dist/lib/ReceivablesWidget.d.ts +0 -2
  6. package/dist/lib/monite-sdk.d.ts +224 -236
  7. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +59 -38
  8. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsPanel.js +137 -0
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +86 -182
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +116 -0
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +16 -16
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +51 -108
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useRebaseOnRefresh.js +33 -0
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +40 -39
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +2 -65
  17. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +37 -181
  18. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +193 -502
  19. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +520 -0
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +2 -0
  21. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +9 -10
  22. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index20.js +1 -2
  23. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +0 -1
  24. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index53.js +1 -4
  25. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +3 -3
  26. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +31 -55
  27. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +98 -163
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -3
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +37 -32
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +86 -93
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +2 -0
  33. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +42 -173
  34. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +3 -12
  35. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +16 -16
  36. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +42 -42
  37. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +117 -125
  38. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  39. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4402,20 +4402,11 @@ interface CounterpartFormSheetLabels {
4402
4402
  interface BankAccountFormSheetLabels {
4403
4403
  createTitle: string;
4404
4404
  editTitle: string;
4405
- nameLabel: string;
4406
4405
  accountHolderNameLabel: string;
4407
4406
  accountNumberLabel: string;
4408
4407
  routingNumberLabel: string;
4409
- ibanLabel: string;
4410
- bicLabel: string;
4411
- sortCodeLabel: string;
4412
- currencyLabel: string;
4413
- currencyPlaceholder: string;
4414
- countryLabel: string;
4415
- countryValue: string;
4416
- isDefaultLabel: string;
4408
+ helperText: string;
4417
4409
  cancelButton: string;
4418
- createButton: string;
4419
4410
  saveButton: string;
4420
4411
  fieldMarkers: LabelLabels;
4421
4412
  }
@@ -4450,8 +4441,6 @@ interface CounterpartMessageLabels {
4450
4441
  cityRequired: string;
4451
4442
  stateRequired: string;
4452
4443
  postalCodeRequired: string;
4453
- bankAccountIdentifierRequired: string;
4454
- bankAccountCurrencyRequired: string;
4455
4444
  accountHolderNameRequired: string;
4456
4445
  routingNumberInvalid: string;
4457
4446
  accountNumberInvalid: string;
@@ -745,20 +745,11 @@ interface CounterpartFormSheetLabels {
745
745
  interface BankAccountFormSheetLabels {
746
746
  createTitle: string;
747
747
  editTitle: string;
748
- nameLabel: string;
749
748
  accountHolderNameLabel: string;
750
749
  accountNumberLabel: string;
751
750
  routingNumberLabel: string;
752
- ibanLabel: string;
753
- bicLabel: string;
754
- sortCodeLabel: string;
755
- currencyLabel: string;
756
- currencyPlaceholder: string;
757
- countryLabel: string;
758
- countryValue: string;
759
- isDefaultLabel: string;
751
+ helperText: string;
760
752
  cancelButton: string;
761
- createButton: string;
762
753
  saveButton: string;
763
754
  fieldMarkers: LabelLabels;
764
755
  }
@@ -793,8 +784,6 @@ interface CounterpartMessageLabels {
793
784
  cityRequired: string;
794
785
  stateRequired: string;
795
786
  postalCodeRequired: string;
796
- bankAccountIdentifierRequired: string;
797
- bankAccountCurrencyRequired: string;
798
787
  accountHolderNameRequired: string;
799
788
  routingNumberInvalid: string;
800
789
  accountNumberInvalid: string;
@@ -745,20 +745,11 @@ interface CounterpartFormSheetLabels {
745
745
  interface BankAccountFormSheetLabels {
746
746
  createTitle: string;
747
747
  editTitle: string;
748
- nameLabel: string;
749
748
  accountHolderNameLabel: string;
750
749
  accountNumberLabel: string;
751
750
  routingNumberLabel: string;
752
- ibanLabel: string;
753
- bicLabel: string;
754
- sortCodeLabel: string;
755
- currencyLabel: string;
756
- currencyPlaceholder: string;
757
- countryLabel: string;
758
- countryValue: string;
759
- isDefaultLabel: string;
751
+ helperText: string;
760
752
  cancelButton: string;
761
- createButton: string;
762
753
  saveButton: string;
763
754
  fieldMarkers: LabelLabels;
764
755
  }
@@ -793,8 +784,6 @@ interface CounterpartMessageLabels {
793
784
  cityRequired: string;
794
785
  stateRequired: string;
795
786
  postalCodeRequired: string;
796
- bankAccountIdentifierRequired: string;
797
- bankAccountCurrencyRequired: string;
798
787
  accountHolderNameRequired: string;
799
788
  routingNumberInvalid: string;
800
789
  accountNumberInvalid: string;
@@ -774,8 +774,6 @@ interface CounterpartMessageLabels {
774
774
  cityRequired: string;
775
775
  stateRequired: string;
776
776
  postalCodeRequired: string;
777
- bankAccountIdentifierRequired: string;
778
- bankAccountCurrencyRequired: string;
779
777
  accountHolderNameRequired: string;
780
778
  routingNumberInvalid: string;
781
779
  accountNumberInvalid: string;
@@ -849,8 +849,6 @@ interface CounterpartMessageLabels {
849
849
  cityRequired: string;
850
850
  stateRequired: string;
851
851
  postalCodeRequired: string;
852
- bankAccountIdentifierRequired: string;
853
- bankAccountCurrencyRequired: string;
854
852
  accountHolderNameRequired: string;
855
853
  routingNumberInvalid: string;
856
854
  accountNumberInvalid: string;
@@ -69856,80 +69856,10 @@ declare const FILTER_TYPE_SEARCH$3 = "search";
69856
69856
  declare const FILTER_TYPE_TYPE$1 = "type";
69857
69857
  declare const FILTER_TYPE_IS_CUSTOMER = "is_customer";
69858
69858
 
69859
- interface BaseCounterpartOCR {
69860
- email: string;
69861
- phone?: string;
69862
- isCustomer: boolean;
69863
- isVendor: boolean;
69864
- line1: string;
69865
- line2: string;
69866
- city: string;
69867
- state: string;
69868
- postalCode: string;
69869
- country?: components['schemas']['AllowedCountries'];
69870
- }
69871
- interface DefaultValuesOCR<T extends BaseCounterpartOCR> {
69872
- tax_id: string;
69873
- counterpart: T;
69874
- }
69875
- type DefaultValuesOCRIndividual = DefaultValuesOCR<BaseCounterpartOCR & {
69876
- firstName?: string;
69877
- lastName?: string;
69878
- }>;
69879
- type DefaultValuesOCROrganization = DefaultValuesOCR<BaseCounterpartOCR & {
69880
- companyName: string;
69881
- }>;
69882
69859
  /**
69883
69860
  * Represents the type of a counterpart in the system.
69884
69861
  */
69885
69862
  type CustomerType = 'customer' | 'vendor';
69886
- /**
69887
- * Array of available customer types, an array that should contain either customer, vendor, or both.
69888
- * This array can't be empty and if only one option is passed, the customer type section will be hidden
69889
- * and the default customer type will be the one passed.
69890
- * It is set to undefined at component level but defaults to ['customer', 'vendor'] through componentSettings
69891
- */
69892
- type CustomerTypes = CustomerType[];
69893
- interface GenericCounterpartContact {
69894
- id: string;
69895
- counterpart_id: string;
69896
- /**
69897
- * @description Is default contact person
69898
- */
69899
- is_default?: boolean;
69900
- /** @description The address of a contact person. */
69901
- address?: components['schemas']['CounterpartAddress'];
69902
- /**
69903
- * Format: email
69904
- * @description The email address of a contact person.
69905
- * @example contact@example.org
69906
- */
69907
- email?: string;
69908
- /**
69909
- * @description The person's first name.
69910
- * @example Adnan
69911
- */
69912
- first_name: string;
69913
- /** @description Indicates if the counterpart is a customer. */
69914
- is_customer: boolean;
69915
- /** @description Indicates if the counterpart is a vendor. */
69916
- is_vendor: boolean;
69917
- /**
69918
- * @description The person's last name.
69919
- * @example Singh
69920
- */
69921
- last_name: string;
69922
- /**
69923
- * @description The person's phone number.
69924
- * @example 5553211234
69925
- */
69926
- phone?: string;
69927
- /**
69928
- * @description The person's title or honorific. Examples: Mr., Ms., Dr., Prof.
69929
- * @example Mr.
69930
- */
69931
- title?: string;
69932
- }
69933
69863
  type Filters$1 = {
69934
69864
  [FILTER_TYPE_SEARCH$3]?: string | null;
69935
69865
  [FILTER_TYPE_TYPE$1]?: components['schemas']['CounterpartType'] | null;
@@ -69969,6 +69899,39 @@ type CounterPartProps = {
69969
69899
  };
69970
69900
  declare const Counterparts: (props: CounterPartProps) => _emotion_react_jsx_runtime.JSX.Element;
69971
69901
 
69902
+ type OptionalFields = {
69903
+ invoiceDate?: boolean;
69904
+ };
69905
+ type OcrRequiredField = 'currency' | 'invoiceDate' | 'counterpart' | 'invoiceNumber' | 'counterpartBankAccount' | 'document_issued_at_date' | 'dueDate' | 'counterpartName' | 'contactPerson' | 'issueDate' | 'amount' | 'appliedPolicy' | 'addedByUser' | 'addedOn' | 'updatedOn';
69906
+ type OcrRequiredFields = Partial<Record<OcrRequiredField, boolean>> | undefined;
69907
+ type PaymentRecordWithIntent = {
69908
+ intent: string;
69909
+ record: components['schemas']['PaymentRecordResponse'];
69910
+ };
69911
+ interface BaseCounterpartOCR {
69912
+ email: string;
69913
+ phone?: string;
69914
+ isCustomer: boolean;
69915
+ isVendor: boolean;
69916
+ line1: string;
69917
+ line2: string;
69918
+ city: string;
69919
+ state: string;
69920
+ postalCode: string;
69921
+ country?: components['schemas']['AllowedCountries'];
69922
+ }
69923
+ interface DefaultValuesOCR<T extends BaseCounterpartOCR> {
69924
+ tax_id: string;
69925
+ counterpart: T;
69926
+ }
69927
+ type DefaultValuesOCRIndividual = DefaultValuesOCR<BaseCounterpartOCR & {
69928
+ firstName?: string;
69929
+ lastName?: string;
69930
+ }>;
69931
+ type DefaultValuesOCROrganization = DefaultValuesOCR<BaseCounterpartOCR & {
69932
+ companyName: string;
69933
+ }>;
69934
+
69972
69935
  interface CounterpartsAutocompleteOptionProps {
69973
69936
  id: string;
69974
69937
  label: string;
@@ -70028,6 +69991,155 @@ interface CustomersTableProps {
70028
69991
  }
70029
69992
  declare const CustomersTable: (props: CustomersTableProps) => _emotion_react_jsx_runtime.JSX.Element;
70030
69993
 
69994
+ type CounterpartResponse = components['schemas']['CounterpartIndividualRootResponse'] | components['schemas']['CounterpartOrganizationRootResponse'];
69995
+ declare const useCounterpartList: (parameters?: Services["finops"]["getCounterparts"]["types"]["parameters"]) => _tanstack_react_query.UseQueryResult<{
69996
+ data: components["schemas"]["CounterpartResponse"][];
69997
+ next_pagination_token?: string;
69998
+ prev_pagination_token?: string;
69999
+ }, {
70000
+ error: components["schemas"]["ErrorSchema"];
70001
+ } | {
70002
+ detail?: components["schemas"]["ValidationError"][];
70003
+ } | Error>;
70004
+
70005
+ declare function getCounterpartName(counterpart: CounterpartResponse | undefined): string;
70006
+
70007
+ interface ApprovalPolicyDetailsProps {
70008
+ /** Approval policy ID */
70009
+ id?: string;
70010
+ /** Callback is fired when a policy is created and sync with server is successful
70011
+ *
70012
+ * @param id - the ID of the created policy
70013
+ */
70014
+ onCreated?: (id: string) => void;
70015
+ /** Callback is fired when a policy is updated and sync with server is successful
70016
+ *
70017
+ * @param id - the ID of the updated policy
70018
+ */
70019
+ onUpdated?: (id: string) => void;
70020
+ }
70021
+ /**
70022
+ * ApprovalPolicyDetails component
70023
+ *
70024
+ * This component renders the approval policy details form. It includes fields for the policy name, description, trigger, and script.
70025
+ * The `useApprovalPolicyDetails` hook is used to handle the creation of a new approval policy.
70026
+ *
70027
+ */
70028
+ declare const ApprovalPolicyDetails: ({ id, onCreated, onUpdated, }: ApprovalPolicyDetailsProps) => _emotion_react_jsx_runtime.JSX.Element;
70029
+
70030
+ type API = Services;
70031
+ interface CreateMoniteAPIClientResult {
70032
+ requestFn: typeof requestFn;
70033
+ api: API;
70034
+ version: string;
70035
+ }
70036
+ interface CreateMoniteAPIClientOptions {
70037
+ context?: Context<QraftContextValue>;
70038
+ /** Custom headers to include in every request (e.g. x-widget-token) */
70039
+ customHeaders?: Record<string, string>;
70040
+ }
70041
+ declare const createAPIClient: ({ customHeaders, ...qraftClientOptions }?: CreateMoniteAPIClientOptions | undefined) => CreateMoniteAPIClientResult;
70042
+
70043
+ type FilterTypes$1 = Partial<{
70044
+ [FILTER_TYPE_SEARCH$2]: string | null;
70045
+ [FILTER_TYPE_STATUS]: components['schemas']['PayableStateEnum'] | null;
70046
+ [FILTER_TYPE_DUE_DATE]: Date | null;
70047
+ [FILTER_TYPE_SUMMARY_CARD]: PayablesTabFilter | null;
70048
+ }>;
70049
+ type FilterValue$2 = components['schemas']['PayableStateEnum'] | 'all' | Date | string | null;
70050
+ type FieldValueTypes = 'counterpart_id' | 'document_id' | 'amount' | 'due_date' | 'was_created_by_user_id' | 'created_at' | 'issued_at' | 'status' | 'pay';
70051
+ interface MonitePayableTableProps {
70052
+ isShowingSummaryCards?: boolean;
70053
+ fieldOrder?: [FieldValueTypes, ...FieldValueTypes[]];
70054
+ summaryCardFilters?: Record<string, PayablesTabFilter | null>;
70055
+ requiredColumns?: [FieldValueTypes, ...FieldValueTypes[]];
70056
+ displayColumns?: [FieldValueTypes, ...FieldValueTypes[]];
70057
+ }
70058
+ type PayablesTabFilter = NonNullable<API['finops']['getPayables']['types']['parameters']['query']>;
70059
+
70060
+ declare const FILTER_TYPE_SEARCH$2 = "search";
70061
+ declare const FILTER_TYPE_STATUS = "status";
70062
+ declare const FILTER_TYPE_CREATED_AT = "created_at";
70063
+ declare const FILTER_TYPE_DUE_DATE = "due_date";
70064
+ declare const FILTER_TYPE_SUMMARY_CARD = "summary_card_filter";
70065
+
70066
+ declare const FILTER_TYPE_SEARCH$1 = "search";
70067
+ declare const FILTER_TYPE_CREATED_BY = "created_by";
70068
+
70069
+ type FilterTypes = {
70070
+ [FILTER_TYPE_SEARCH$1]?: string | null;
70071
+ [FILTER_TYPE_CREATED_AT]?: Date | null;
70072
+ [FILTER_TYPE_CREATED_BY]?: string | null;
70073
+ };
70074
+ type FilterValue$1 = Date | string | null;
70075
+
70076
+ interface onFilterChangeParams {
70077
+ field: keyof FilterTypes;
70078
+ value: FilterValue$1;
70079
+ }
70080
+ interface ApprovalPoliciesTableProps {
70081
+ onChangeFilter?: (filter: onFilterChangeParams) => void;
70082
+ onRowClick?: (id: string) => void;
70083
+ onCreateClick?: () => void;
70084
+ }
70085
+ /**
70086
+ * ApprovalPoliciesTable component
70087
+ *
70088
+ * This component renders a table of approval policies. It includes pagination and filtering functionality.
70089
+ */
70090
+ declare const ApprovalPoliciesTable: (props: ApprovalPoliciesTableProps) => _emotion_react_jsx_runtime.JSX.Element;
70091
+
70092
+ /**
70093
+ * ApprovalPolicies component
70094
+ * TODO: Check if this component is still needed
70095
+ *
70096
+ * This component renders the approval policies page. It includes a table of approval policies, a dialog for creating new approval policies,
70097
+ * and a header with a button for opening the create dialog.
70098
+ */
70099
+ declare const ApprovalPolicies: () => _emotion_react_jsx_runtime.JSX.Element;
70100
+
70101
+ declare const ApprovalRequests: () => _emotion_react_jsx_runtime.JSX.Element;
70102
+
70103
+ type ApprovalRequestsTableRowAction = 'approve' | 'reject';
70104
+ interface UseApprovalRequestActionsCellProps {
70105
+ /**
70106
+ * The event handler for an approval row action.
70107
+ * If not provided, the action menu will not be displayed.
70108
+ * @param props.id - The identifier of the clicked row, a string.
70109
+ * @param props.action - The action to be performed, an `InvoicesTableRowAction`.
70110
+ */
70111
+ onRowActionClick: (props: {
70112
+ id: string;
70113
+ action: ApprovalRequestsTableRowAction;
70114
+ }) => Promise<components['schemas']['ApprovalRequestResourceWithMetadata']> | undefined;
70115
+ }
70116
+
70117
+ interface ApprovalRequestsTableBaseProps {
70118
+ /**
70119
+ * The event handler for a row click.
70120
+ *
70121
+ * @param id - The identifier of the clicked row, a string.
70122
+ */
70123
+ onRowClick?: (id: string) => void;
70124
+ }
70125
+ type ApprovalRequestsTableProps = ApprovalRequestsTableBaseProps | (ApprovalRequestsTableBaseProps & UseApprovalRequestActionsCellProps);
70126
+ declare const ApprovalRequestsTable: (props: ApprovalRequestsTableProps) => _emotion_react_jsx_runtime.JSX.Element;
70127
+
70128
+ type FinanceStepListItem = {
70129
+ id: string;
70130
+ text: string;
70131
+ };
70132
+ type FinanceStep = {
70133
+ id: number | string;
70134
+ title: string;
70135
+ description: string;
70136
+ description2?: string;
70137
+ list?: {
70138
+ listTitle: string;
70139
+ listItems: FinanceStepListItem[];
70140
+ };
70141
+ };
70142
+
70031
70143
  declare const useCounterpartById: (id?: string) => _tanstack_react_query.UseQueryResult<{
70032
70144
  id: string;
70033
70145
  created_at: string;
@@ -70066,17 +70178,6 @@ declare const useCounterpartById: (id?: string) => _tanstack_react_query.UseQuer
70066
70178
  detail?: components["schemas"]["ValidationError"][];
70067
70179
  } | Error>;
70068
70180
 
70069
- type CounterpartResponse = components['schemas']['CounterpartIndividualRootResponse'] | components['schemas']['CounterpartOrganizationRootResponse'];
70070
- declare const useCounterpartList: (parameters?: Services["finops"]["getCounterparts"]["types"]["parameters"]) => _tanstack_react_query.UseQueryResult<{
70071
- data: components["schemas"]["CounterpartResponse"][];
70072
- next_pagination_token?: string;
70073
- prev_pagination_token?: string;
70074
- }, {
70075
- error: components["schemas"]["ErrorSchema"];
70076
- } | {
70077
- detail?: components["schemas"]["ValidationError"][];
70078
- } | Error>;
70079
-
70080
70181
  declare const useCounterpartAddresses: (counterpartId?: string) => _tanstack_react_query.UseQueryResult<{
70081
70182
  data: components["schemas"]["CounterpartAddressResponseWithCounterpartID"][];
70082
70183
  }, {
@@ -70108,6 +70209,46 @@ declare const useCounterpartContactList: (counterpartId: string | undefined) =>
70108
70209
  } | null;
70109
70210
  isLoading: boolean;
70110
70211
  };
70212
+ interface GenericCounterpartContact {
70213
+ id: string;
70214
+ counterpart_id: string;
70215
+ /**
70216
+ * @description Is default contact person
70217
+ */
70218
+ is_default?: boolean;
70219
+ /** @description The address of a contact person. */
70220
+ address?: components['schemas']['CounterpartAddress'];
70221
+ /**
70222
+ * Format: email
70223
+ * @description The email address of a contact person.
70224
+ * @example contact@example.org
70225
+ */
70226
+ email?: string;
70227
+ /**
70228
+ * @description The person's first name.
70229
+ * @example Adnan
70230
+ */
70231
+ first_name: string;
70232
+ /** @description Indicates if the counterpart is a customer. */
70233
+ is_customer: boolean;
70234
+ /** @description Indicates if the counterpart is a vendor. */
70235
+ is_vendor: boolean;
70236
+ /**
70237
+ * @description The person's last name.
70238
+ * @example Singh
70239
+ */
70240
+ last_name: string;
70241
+ /**
70242
+ * @description The person's phone number.
70243
+ * @example 5553211234
70244
+ */
70245
+ phone?: string;
70246
+ /**
70247
+ * @description The person's title or honorific. Examples: Mr., Ms., Dr., Prof.
70248
+ * @example Mr.
70249
+ */
70250
+ title?: string;
70251
+ }
70111
70252
 
70112
70253
  declare const useEntityUserById: (id: string | undefined) => _tanstack_react_query.UseQueryResult<{
70113
70254
  id: string;
@@ -70943,18 +71084,9 @@ declare const useMyEntity: () => {
70943
71084
  } | Error>>;
70944
71085
  fetchStatus: FetchStatus;
70945
71086
  };
71087
+ type EntityResponse = components['schemas']['EntityOrganizationResponse'] | components['schemas']['EntityIndividualResponse'];
70946
71088
  declare const getEntityName: (entity?: EntityResponse) => string;
70947
71089
 
70948
- type OptionalFields = {
70949
- invoiceDate?: boolean;
70950
- };
70951
- type OcrRequiredField = 'currency' | 'invoiceDate' | 'counterpart' | 'invoiceNumber' | 'counterpartBankAccount' | 'document_issued_at_date' | 'dueDate' | 'counterpartName' | 'contactPerson' | 'issueDate' | 'amount' | 'appliedPolicy' | 'addedByUser' | 'addedOn' | 'updatedOn';
70952
- type OcrRequiredFields = Partial<Record<OcrRequiredField, boolean>> | undefined;
70953
- type PaymentRecordWithIntent = {
70954
- intent: string;
70955
- record: components['schemas']['PaymentRecordResponse'];
70956
- };
70957
-
70958
71090
  declare const usePaymentRecords: (query: Services["finops"]["getPaymentRecords"]["types"]["parameters"]["query"], enabled?: boolean) => _tanstack_react_query.UseQueryResult<{
70959
71091
  data: components["schemas"]["PaymentRecordResponse"][];
70960
71092
  next_pagination_token?: string;
@@ -71385,145 +71517,6 @@ declare const useGetReceivablesAnalytics: (query: Services["finops"]["getAnalyti
71385
71517
  detail?: components["schemas"]["ValidationError"][];
71386
71518
  } | Error>;
71387
71519
 
71388
- declare function getCounterpartName(counterpart: CounterpartResponse | undefined): string;
71389
- type EntityResponse = components['schemas']['EntityOrganizationResponse'] | components['schemas']['EntityIndividualResponse'];
71390
-
71391
- interface ApprovalPolicyDetailsProps {
71392
- /** Approval policy ID */
71393
- id?: string;
71394
- /** Callback is fired when a policy is created and sync with server is successful
71395
- *
71396
- * @param id - the ID of the created policy
71397
- */
71398
- onCreated?: (id: string) => void;
71399
- /** Callback is fired when a policy is updated and sync with server is successful
71400
- *
71401
- * @param id - the ID of the updated policy
71402
- */
71403
- onUpdated?: (id: string) => void;
71404
- }
71405
- /**
71406
- * ApprovalPolicyDetails component
71407
- *
71408
- * This component renders the approval policy details form. It includes fields for the policy name, description, trigger, and script.
71409
- * The `useApprovalPolicyDetails` hook is used to handle the creation of a new approval policy.
71410
- *
71411
- */
71412
- declare const ApprovalPolicyDetails: ({ id, onCreated, onUpdated, }: ApprovalPolicyDetailsProps) => _emotion_react_jsx_runtime.JSX.Element;
71413
-
71414
- type API = Services;
71415
- interface CreateMoniteAPIClientResult {
71416
- requestFn: typeof requestFn;
71417
- api: API;
71418
- version: string;
71419
- }
71420
- interface CreateMoniteAPIClientOptions {
71421
- context?: Context<QraftContextValue>;
71422
- /** Custom headers to include in every request (e.g. x-widget-token) */
71423
- customHeaders?: Record<string, string>;
71424
- }
71425
- declare const createAPIClient: ({ customHeaders, ...qraftClientOptions }?: CreateMoniteAPIClientOptions | undefined) => CreateMoniteAPIClientResult;
71426
-
71427
- type FilterTypes$1 = Partial<{
71428
- [FILTER_TYPE_SEARCH$2]: string | null;
71429
- [FILTER_TYPE_STATUS]: components['schemas']['PayableStateEnum'] | null;
71430
- [FILTER_TYPE_DUE_DATE]: Date | null;
71431
- [FILTER_TYPE_SUMMARY_CARD]: PayablesTabFilter | null;
71432
- }>;
71433
- type FilterValue$2 = components['schemas']['PayableStateEnum'] | 'all' | Date | string | null;
71434
- type FieldValueTypes = 'counterpart_id' | 'document_id' | 'amount' | 'due_date' | 'was_created_by_user_id' | 'created_at' | 'issued_at' | 'status' | 'pay';
71435
- interface MonitePayableTableProps {
71436
- isShowingSummaryCards?: boolean;
71437
- fieldOrder?: [FieldValueTypes, ...FieldValueTypes[]];
71438
- summaryCardFilters?: Record<string, PayablesTabFilter | null>;
71439
- requiredColumns?: [FieldValueTypes, ...FieldValueTypes[]];
71440
- displayColumns?: [FieldValueTypes, ...FieldValueTypes[]];
71441
- }
71442
- type PayablesTabFilter = NonNullable<API['finops']['getPayables']['types']['parameters']['query']>;
71443
-
71444
- declare const FILTER_TYPE_SEARCH$2 = "search";
71445
- declare const FILTER_TYPE_STATUS = "status";
71446
- declare const FILTER_TYPE_CREATED_AT = "created_at";
71447
- declare const FILTER_TYPE_DUE_DATE = "due_date";
71448
- declare const FILTER_TYPE_SUMMARY_CARD = "summary_card_filter";
71449
-
71450
- declare const FILTER_TYPE_SEARCH$1 = "search";
71451
- declare const FILTER_TYPE_CREATED_BY = "created_by";
71452
-
71453
- type FilterTypes = {
71454
- [FILTER_TYPE_SEARCH$1]?: string | null;
71455
- [FILTER_TYPE_CREATED_AT]?: Date | null;
71456
- [FILTER_TYPE_CREATED_BY]?: string | null;
71457
- };
71458
- type FilterValue$1 = Date | string | null;
71459
-
71460
- interface onFilterChangeParams {
71461
- field: keyof FilterTypes;
71462
- value: FilterValue$1;
71463
- }
71464
- interface ApprovalPoliciesTableProps {
71465
- onChangeFilter?: (filter: onFilterChangeParams) => void;
71466
- onRowClick?: (id: string) => void;
71467
- onCreateClick?: () => void;
71468
- }
71469
- /**
71470
- * ApprovalPoliciesTable component
71471
- *
71472
- * This component renders a table of approval policies. It includes pagination and filtering functionality.
71473
- */
71474
- declare const ApprovalPoliciesTable: (props: ApprovalPoliciesTableProps) => _emotion_react_jsx_runtime.JSX.Element;
71475
-
71476
- /**
71477
- * ApprovalPolicies component
71478
- * TODO: Check if this component is still needed
71479
- *
71480
- * This component renders the approval policies page. It includes a table of approval policies, a dialog for creating new approval policies,
71481
- * and a header with a button for opening the create dialog.
71482
- */
71483
- declare const ApprovalPolicies: () => _emotion_react_jsx_runtime.JSX.Element;
71484
-
71485
- declare const ApprovalRequests: () => _emotion_react_jsx_runtime.JSX.Element;
71486
-
71487
- type ApprovalRequestsTableRowAction = 'approve' | 'reject';
71488
- interface UseApprovalRequestActionsCellProps {
71489
- /**
71490
- * The event handler for an approval row action.
71491
- * If not provided, the action menu will not be displayed.
71492
- * @param props.id - The identifier of the clicked row, a string.
71493
- * @param props.action - The action to be performed, an `InvoicesTableRowAction`.
71494
- */
71495
- onRowActionClick: (props: {
71496
- id: string;
71497
- action: ApprovalRequestsTableRowAction;
71498
- }) => Promise<components['schemas']['ApprovalRequestResourceWithMetadata']> | undefined;
71499
- }
71500
-
71501
- interface ApprovalRequestsTableBaseProps {
71502
- /**
71503
- * The event handler for a row click.
71504
- *
71505
- * @param id - The identifier of the clicked row, a string.
71506
- */
71507
- onRowClick?: (id: string) => void;
71508
- }
71509
- type ApprovalRequestsTableProps = ApprovalRequestsTableBaseProps | (ApprovalRequestsTableBaseProps & UseApprovalRequestActionsCellProps);
71510
- declare const ApprovalRequestsTable: (props: ApprovalRequestsTableProps) => _emotion_react_jsx_runtime.JSX.Element;
71511
-
71512
- type FinanceStepListItem = {
71513
- id: string;
71514
- text: string;
71515
- };
71516
- type FinanceStep = {
71517
- id: number | string;
71518
- title: string;
71519
- description: string;
71520
- description2?: string;
71521
- list?: {
71522
- listTitle: string;
71523
- listItems: FinanceStepListItem[];
71524
- };
71525
- };
71526
-
71527
71520
  type OcrMismatchField = keyof Pick<PayableResponseSchema$1, 'amount_to_pay' | 'counterpart_bank_account_id'>;
71528
71521
  type OcrMismatchFields = Partial<Record<OcrMismatchField, boolean>> | undefined;
71529
71522
  interface MonitePayableDetailsInfoProps {
@@ -71781,11 +71774,6 @@ interface ComponentSettings {
71781
71774
  } & TablePaginationSettings;
71782
71775
  counterparts: {
71783
71776
  pageSizeOptions: number[];
71784
- /**
71785
- * @see {@link CustomerTypes}
71786
- * @param customerTypes - Array of customer types, defaults to ['customer', 'vendor']
71787
- */
71788
- customerTypes?: CustomerTypes;
71789
71777
  } & TablePaginationSettings;
71790
71778
  payables: Partial<PayableSettings>;
71791
71779
  products: {
@@ -74341,4 +74329,4 @@ declare const MoniteAPIProvider: ({ children, APIContext, }: {
74341
74329
  }) => _emotion_react_jsx_runtime.JSX.Element;
74342
74330
 
74343
74331
  export { schema_d as APISchema, ApprovalPolicies, ApprovalPoliciesTable, ApprovalPolicyDetails, ApprovalRequests, ApprovalRequestsTable, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CounterpartAutocomplete, CounterpartDetails, Counterparts, CreateProduct, CustomersTable, Dialog, FinanceBanner, FinanceIntegrationCard, FinanceInvoice, FinanceTab, Integrations, LOGO_MAX_FILE_SIZE_IN_MB, LOGO_SUPPORTED_FORMATS, MoniteAPIProvider, MoniteProvider, MoniteScopedProviders, OCR_SUPPORTED_FORMATS, PageHeader, PayableDetails, Payables, PayablesTable, ProductDetails, Products, ProductsTable, RootElementsProvider, VendorsTable, breakpoints, countryCurrencyList, createAPIClient, dateStringToLocalDate, defaultAvailableCountries, defaultAvailableCurrencies, defaultCounterpartColumnWidth, filterOptions, formatDateRangeFilterChip, formatFilterChipMultiSelectValueSegment, getCounterpartName, getCountries, getCountriesArray, getCurrencies, getCurrenciesArray, getEntityName, getGroupTitleForOption, getIndividualName, getIndividualNameWithFallback, getPayableRefetchInterval, getUserDisplayName, rateMajorToMinor, rateMinorToMajor, sortCurrencyOptionsByGroup, useApprovalPolicyById, useAreCounterpartsLoading, useAutosizeGridColumns, useCancelPayableById, useComboboxAnchor, useComponentSettings, useCounterpartAddresses, useCounterpartById, useCounterpartContactList, useCounterpartList, useCounterpartVatList, useCreatePayable, useCreatePayableLineItem, useCreatePaymentRecord, useCurrencies, useDebounce, useDebounceCallback, useDeletePayable, useDeletePayableLineItem, useDialog, useEntitySettings, useEntityUserByAuthToken, useEntityUserById, useEntityUserNames, useFileById, useFileInput, useForceApprovePayable, useForceRejectPayable, useFormPersist, useGetPayableApprovalRequests, useGetPayableById, useGetPayableCounterpart, useGetPayableLineItems, useGetPayablesAnalytics, useGetReceivableById, useGetReceivables, useGetReceivablesAnalytics, useIsDesktopScreen, useIsExtraLargeDesktopScreen, useIsLargeDesktopScreen, useIsLargerThan, useIsMobile, useIsMobileScreen, useIsMounted, useIsSmallerThan, useIsTabletScreen, useLedgerAccounts, useLocalStorageFields, useMe, useMediaQuery, useMenuButton, useMoniteContext, useMyEntity, useOptionalFields, usePatchEntitiesIdSettings, usePayButtonVisibility, usePayableCallbacks, usePayableDetailsThemeProps, usePayablePaymentIntentsAndRecords, usePaymentIntentById, usePaymentRecordById, usePaymentRecords, useReopenPayable, useRootElements, useSubmitPayableForApproval, useUpdatePayable, useUpdatePayableLineItem };
74344
- export type { ApprovalPolicyDetailsProps, ComponentSettings, CounterpartResponse, CounterpartsAutocompleteOptionProps, CountriesType, CountryType, CreateMoniteAPIClientOptions, CreateMoniteAPIClientResult, CreateProductProps, CurrenciesType, CurrencyGroup, CurrencyType, CustomersTableProps, MoniteApprovalRequestStatusChipProps, MoniteApprovalStatusChipProps, MoniteCounterpartStatusChipProps, MoniteDialogProps, MoniteInvoiceRecurrenceIterationStatusChipProps, MoniteInvoiceRecurrenceStatusChipProps, MoniteInvoiceStatusChipProps, MonitePayableStatusChipProps, MoniteSettings, PaginationLayout, PaginationPosition, PayActionHandlers, PayablesDetailsProps, PayablesProps, ProductDetailsProps, ProductTableProps, ProductsProps, UseEntityUserNamesParams, UseFileInputOptions, VendorDetailsProps, VendorsTableProps };
74332
+ export type { ApprovalPolicyDetailsProps, ComponentSettings, CounterpartResponse, CounterpartsAutocompleteOptionProps, CountriesType, CountryType, CreateMoniteAPIClientOptions, CreateMoniteAPIClientResult, CreateProductProps, CurrenciesType, CurrencyGroup, CurrencyType, CustomersTableProps, GenericCounterpartContact, MoniteApprovalRequestStatusChipProps, MoniteApprovalStatusChipProps, MoniteCounterpartStatusChipProps, MoniteDialogProps, MoniteInvoiceRecurrenceIterationStatusChipProps, MoniteInvoiceRecurrenceStatusChipProps, MoniteInvoiceStatusChipProps, MonitePayableStatusChipProps, MoniteSettings, PaginationLayout, PaginationPosition, PayActionHandlers, PayablesDetailsProps, PayablesProps, ProductDetailsProps, ProductTableProps, ProductsProps, UseEntityUserNamesParams, UseFileInputOptions, VendorDetailsProps, VendorsTableProps };