@npm-zenwork/tax-remittance-ui 0.1.13 → 0.1.15

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.
@@ -1,4 +1,4 @@
1
- import { CreateStatePaymentRequest, StatePaymentFormMetadata, StatePaymentReasonOption, StatePaymentResponse, StatePaymentStateOption, UpdateStatePaymentRequest } from '../types/statePayment';
1
+ import { CreateStatePaymentRequest, StatePaymentFormMetadata, StatePaymentFormReferences, StatePaymentReasonOption, StatePaymentResponse, StatePaymentStateOption, UpdateStatePaymentRequest } from '../types/statePayment';
2
2
  import { PagedResult } from '../types/pagination';
3
3
  import { PaymentStatus } from '../components/payments/paymentsTableConfig';
4
4
  export interface StatePaymentStatusCounts {
@@ -17,6 +17,7 @@ export interface GetStatePaymentsQuery {
17
17
  export declare function getStatePaymentStates(signal?: AbortSignal): Promise<StatePaymentStateOption[]>;
18
18
  export declare function getStatePaymentReasons(entityId: number, state: string, signal?: AbortSignal): Promise<StatePaymentReasonOption[]>;
19
19
  export declare function getStatePaymentValidationMetadata(entityId: number, state: string, reason: string, signal?: AbortSignal): Promise<StatePaymentFormMetadata>;
20
+ export declare function getStatePaymentFormReferences(entityId: number, state: string, reason: string, signal?: AbortSignal): Promise<StatePaymentFormReferences>;
20
21
  export declare function getStatePayments({ entityId, status, pageNumber, pageSize, }: GetStatePaymentsQuery): Promise<PagedResult<StatePaymentResponse>>;
21
22
  export declare function getStatePaymentStatusCounts(entityId: number): Promise<StatePaymentStatusCounts>;
22
23
  export declare function getStatePaymentById(statePaymentDetailId: number): Promise<StatePaymentResponse>;
@@ -0,0 +1,11 @@
1
+ import { CreateTaxAccountRequest, TaxAccountDetailResponse, UpdateTaxAccountRequest } from '../types/taxAccountDetails';
2
+ import { PagedResult } from '../types/pagination';
3
+ export interface GetTaxAccountsQuery {
4
+ entityId: number;
5
+ pageNumber?: number;
6
+ pageSize?: number;
7
+ }
8
+ export declare function getTaxAccounts({ entityId, pageNumber, pageSize, }: GetTaxAccountsQuery): Promise<PagedResult<TaxAccountDetailResponse>>;
9
+ export declare function getTaxAccount(taxAccountDetailId: number): Promise<TaxAccountDetailResponse>;
10
+ export declare function createTaxAccount(request: CreateTaxAccountRequest): Promise<TaxAccountDetailResponse>;
11
+ export declare function updateTaxAccount(taxAccountDetailId: number, request: UpdateTaxAccountRequest): Promise<TaxAccountDetailResponse>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaxAccountDetailResponse } from '../../types/taxAccountDetails';
2
3
  declare const taxAccountSchema: z.ZodObject<{
3
4
  state: z.ZodString;
4
5
  city: z.ZodString;
@@ -17,8 +18,15 @@ declare const taxAccountSchema: z.ZodObject<{
17
18
  }, z.core.$strip>;
18
19
  export type TaxAccountFormValues = z.infer<typeof taxAccountSchema>;
19
20
  interface AddTaxAccountFormProps {
21
+ entityId: number;
22
+ /** When set, the form edits this tax account (PATCH) instead of creating one. */
23
+ taxAccountDetailId?: number;
24
+ initialValues?: TaxAccountFormValues;
20
25
  onCancel: () => void;
21
- onSuccess?: (values: TaxAccountFormValues) => void;
26
+ onSuccess?: () => void;
22
27
  }
23
- export declare function AddTaxAccountForm({ onCancel, onSuccess }: AddTaxAccountFormProps): import("react").JSX.Element;
28
+ export declare const emptyTaxAccountValues: TaxAccountFormValues;
29
+ /** Maps a fetched tax account into form values for editing. */
30
+ export declare function toTaxAccountFormValues(account: TaxAccountDetailResponse): TaxAccountFormValues;
31
+ export declare function AddTaxAccountForm({ entityId, taxAccountDetailId, initialValues, onCancel, onSuccess, }: AddTaxAccountFormProps): import("react").JSX.Element;
24
32
  export {};
@@ -1,9 +1,5 @@
1
- import { TaxAccountResponse } from '../../types/taxAccount';
2
1
  interface TaxAccountsSectionProps {
3
2
  entityId: number | null;
4
- accounts?: TaxAccountResponse[];
5
- isLoading?: boolean;
6
- isError?: boolean;
7
3
  }
8
- export declare function TaxAccountsSection({ entityId, accounts, isLoading, isError, }: TaxAccountsSectionProps): import("react").JSX.Element;
4
+ export declare function TaxAccountsSection({ entityId }: TaxAccountsSectionProps): import("react").JSX.Element;
9
5
  export {};