vesant-sdk 1.6.0 → 1.6.2

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 (65) hide show
  1. package/dist/{client-C4g596fI.d.mts → client-BlCxjbY2.d.mts} +8 -2
  2. package/dist/{client-Bd9a5o0C.d.ts → client-C_A7QLcB.d.ts} +8 -2
  3. package/dist/{client-CIon-bGS.d.mts → client-ePzhQKp9.d.mts} +2 -0
  4. package/dist/{client-CIon-bGS.d.ts → client-ePzhQKp9.d.ts} +2 -0
  5. package/dist/compliance/index.d.mts +12 -5
  6. package/dist/compliance/index.d.ts +12 -5
  7. package/dist/compliance/index.js +201 -69
  8. package/dist/compliance/index.js.map +1 -1
  9. package/dist/compliance/index.mjs +201 -69
  10. package/dist/compliance/index.mjs.map +1 -1
  11. package/dist/decisions/index.d.mts +1 -1
  12. package/dist/decisions/index.d.ts +1 -1
  13. package/dist/decisions/index.js +14 -1
  14. package/dist/decisions/index.js.map +1 -1
  15. package/dist/decisions/index.mjs +14 -1
  16. package/dist/decisions/index.mjs.map +1 -1
  17. package/dist/geolocation/index.d.mts +3 -3
  18. package/dist/geolocation/index.d.ts +3 -3
  19. package/dist/geolocation/index.js +56 -14
  20. package/dist/geolocation/index.js.map +1 -1
  21. package/dist/geolocation/index.mjs +56 -14
  22. package/dist/geolocation/index.mjs.map +1 -1
  23. package/dist/index.d.mts +6 -376
  24. package/dist/index.d.ts +6 -376
  25. package/dist/index.js +268 -278
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +268 -278
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/kyc/core.d.mts +1 -1
  30. package/dist/kyc/core.d.ts +1 -1
  31. package/dist/kyc/core.js +14 -1
  32. package/dist/kyc/core.js.map +1 -1
  33. package/dist/kyc/core.mjs +14 -1
  34. package/dist/kyc/core.mjs.map +1 -1
  35. package/dist/kyc/index.d.mts +1 -1
  36. package/dist/kyc/index.d.ts +1 -1
  37. package/dist/kyc/index.js +14 -1
  38. package/dist/kyc/index.js.map +1 -1
  39. package/dist/kyc/index.mjs +14 -1
  40. package/dist/kyc/index.mjs.map +1 -1
  41. package/dist/react.d.mts +2 -2
  42. package/dist/react.d.ts +2 -2
  43. package/dist/react.js +1 -1
  44. package/dist/react.js.map +1 -1
  45. package/dist/react.mjs +1 -1
  46. package/dist/react.mjs.map +1 -1
  47. package/dist/risk-profile/index.d.mts +1 -1
  48. package/dist/risk-profile/index.d.ts +1 -1
  49. package/dist/risk-profile/index.js +14 -1
  50. package/dist/risk-profile/index.js.map +1 -1
  51. package/dist/risk-profile/index.mjs +14 -1
  52. package/dist/risk-profile/index.mjs.map +1 -1
  53. package/dist/scores/index.d.mts +1 -1
  54. package/dist/scores/index.d.ts +1 -1
  55. package/dist/scores/index.js +14 -1
  56. package/dist/scores/index.js.map +1 -1
  57. package/dist/scores/index.mjs +14 -1
  58. package/dist/scores/index.mjs.map +1 -1
  59. package/dist/tax/index.d.mts +255 -0
  60. package/dist/tax/index.d.ts +255 -0
  61. package/dist/tax/index.js +652 -0
  62. package/dist/tax/index.js.map +1 -0
  63. package/dist/tax/index.mjs +650 -0
  64. package/dist/tax/index.mjs.map +1 -0
  65. package/package.json +1 -1
@@ -0,0 +1,255 @@
1
+ import { B as BaseClient, R as RequestOptions } from '../client-ePzhQKp9.mjs';
2
+
3
+ /**
4
+ * TypeScript type definitions for Vesant Tax Service API
5
+ *
6
+ * Types mirror the Go domain structs in:
7
+ * - services/transaction-monitoring-service/internal/domain/
8
+ * - services/transaction-monitoring-service/internal/handler/
9
+ */
10
+ type CustomerType = 'US_PERSON' | 'NON_US_PERSON' | 'NON_US_ENTITY';
11
+ /**
12
+ * Form status values stored on the customer_tax_profiles.form_status column.
13
+ * Matches Go constants CTPFormStatus*.
14
+ */
15
+ type CTPFormStatus = 'requested' | 'signed' | 'manual' | 'bounced' | 'uploaded' | 'expired' | 're_requested';
16
+ /**
17
+ * TIN status values stored on the customer_tax_profiles.tin_status column.
18
+ * Matches Go constants CTPTINStatus*.
19
+ */
20
+ type CTPTINStatus = 'not_required' | 'pending' | 'submitted' | 'verified' | 'rejected' | 'error' | 'expired';
21
+ /**
22
+ * CustomerTaxProfileRecord is the per-customer row from customer_tax_profiles.
23
+ * Returned by GET /api/v1/tax/customer-tax-profiles/{customer_id}
24
+ */
25
+ interface CustomerTaxProfileRecord {
26
+ id: string;
27
+ tenant_id: string;
28
+ customer_id: string;
29
+ customer_type: CustomerType;
30
+ form_type: string;
31
+ form_status: CTPFormStatus;
32
+ tin_status: CTPTINStatus;
33
+ tin_value?: string;
34
+ recipient_name?: string;
35
+ business_name?: string;
36
+ account_number?: string;
37
+ address?: string;
38
+ address_city?: string;
39
+ address_state?: string;
40
+ address_zip?: string;
41
+ address_country?: string;
42
+ customer_name?: string;
43
+ avalara_form_id?: string;
44
+ avalara_company_id?: string;
45
+ signed_at?: string;
46
+ verified_at?: string;
47
+ /** ISO date — W-8BEN / W-8BEN-E expires 3 years from signed_at */
48
+ expiry_date?: string;
49
+ backup_withholding: boolean;
50
+ b_notice_received: boolean;
51
+ e_delivery_consent: boolean;
52
+ withholding_enabled_by?: string;
53
+ withholding_enabled_at?: string;
54
+ tin_due_date?: string;
55
+ last_tin_check?: string;
56
+ request_count: number;
57
+ reminders_sent: number;
58
+ last_reminder_at?: string;
59
+ created_at: string;
60
+ updated_at: string;
61
+ }
62
+ /**
63
+ * Input for POST /api/v1/tax/customer-tax-profiles/{id}/re-request-form
64
+ */
65
+ interface ReRequestTaxFormInput {
66
+ /** Customer email address — required */
67
+ email: string;
68
+ /** Customer full name — optional */
69
+ name?: string;
70
+ }
71
+ /**
72
+ * Input for POST /api/v1/tax/customer-tax-profiles/{id}/enable-withholding
73
+ */
74
+ interface EnableWithholdingInput {
75
+ /** Admin user ID performing the action — required */
76
+ admin_user_id: string;
77
+ }
78
+ /** Response body from POST .../enable-withholding */
79
+ interface EnableWithholdingResponse {
80
+ message: string;
81
+ }
82
+ /**
83
+ * Result returned by POST /api/v1/tax/customer-tax-profiles/{id}/check-tin
84
+ */
85
+ interface TINCheckResult {
86
+ tin_result: Record<string, unknown>;
87
+ profile: CustomerTaxProfileRecord;
88
+ }
89
+ type TransactionAction = 'hold' | 'suspend' | 'release_with_withholding';
90
+ type EmailSendingMethod = 'tenant_email' | 'avalara_direct';
91
+ /**
92
+ * TaxRules is returned by GET /api/v1/tax/rules.
93
+ * It extends TenantTaxRules with the platform-wide withdrawal_threshold
94
+ * from the active VesantGlobalTaxRule for the current year.
95
+ */
96
+ interface TaxRules {
97
+ id: string;
98
+ tenant_id: string;
99
+ /** Platform-wide IRS withdrawal threshold (from VesantGlobalTaxRule). May be absent if not yet configured. */
100
+ withdrawal_threshold?: number;
101
+ trigger_account_creation: boolean;
102
+ trigger_first_withdrawal: boolean;
103
+ trigger_threshold: boolean;
104
+ trigger_manual: boolean;
105
+ trigger_tin_invalid: boolean;
106
+ trigger_w8ben_expiry: boolean;
107
+ trigger_tin_expired: boolean;
108
+ us_withholding_enabled: boolean;
109
+ us_withholding_rate: number;
110
+ non_us_withholding_enabled: boolean;
111
+ non_us_withholding_rate: number;
112
+ transaction_action: TransactionAction;
113
+ reminder_frequency_days: number;
114
+ reminder_max_count: number;
115
+ w8ben_expiry_warning_days: number;
116
+ tin_verification_due_date?: string;
117
+ email_sending_method: EmailSendingMethod;
118
+ display_tin_links_on_platform: boolean;
119
+ tax_treaty_support: boolean;
120
+ created_at: string;
121
+ updated_at: string;
122
+ }
123
+ /**
124
+ * Input for PUT /api/v1/tax/rules.
125
+ * Mirrors domain.UpdateRulesInput — withholding rates are NOT tenant-configurable.
126
+ */
127
+ interface UpdateTaxRulesInput {
128
+ trigger_account_creation: boolean;
129
+ trigger_first_withdrawal: boolean;
130
+ trigger_threshold: boolean;
131
+ trigger_manual: boolean;
132
+ trigger_tin_invalid: boolean;
133
+ trigger_w8ben_expiry: boolean;
134
+ trigger_tin_expired: boolean;
135
+ us_withholding_enabled: boolean;
136
+ non_us_withholding_enabled: boolean;
137
+ transaction_action: TransactionAction;
138
+ reminder_frequency_days: number;
139
+ reminder_max_count: number;
140
+ w8ben_expiry_warning_days: number;
141
+ tin_verification_due_date?: string;
142
+ email_sending_method: EmailSendingMethod;
143
+ display_tin_links_on_platform: boolean;
144
+ tax_treaty_support: boolean;
145
+ }
146
+ type TaxRuleApprovalStatus = 'pending' | 'approved' | 'rejected';
147
+ interface TaxRuleVersion {
148
+ id: string;
149
+ tenant_id: string;
150
+ version_number: number;
151
+ proposed_rules: Record<string, unknown>;
152
+ changed_fields: Record<string, unknown>;
153
+ changed_by: string;
154
+ approved_by?: string;
155
+ approval_status: TaxRuleApprovalStatus;
156
+ approved_at?: string;
157
+ activated_at?: string;
158
+ created_at: string;
159
+ }
160
+ interface ComplianceStatsFilters {
161
+ /** Predefined range: "7d" | "30d" | "90d" | "1y" */
162
+ time_range?: string;
163
+ /** ISO date YYYY-MM-DD (inclusive) */
164
+ from_date?: string;
165
+ /** ISO date YYYY-MM-DD (inclusive) */
166
+ to_date?: string;
167
+ }
168
+ interface DocumentRequestBreakdown {
169
+ total: number;
170
+ w9: number;
171
+ w8ben: number;
172
+ w8bene: number;
173
+ }
174
+ interface TINStatusBreakdown {
175
+ verified: number;
176
+ pending: number;
177
+ rejected: number;
178
+ }
179
+ interface WFormStatusBreakdown {
180
+ w9: Record<string, number>;
181
+ w8ben: Record<string, number>;
182
+ w8bene: Record<string, number>;
183
+ }
184
+ interface WFormCountBreakdown {
185
+ w9: number;
186
+ w8ben: number;
187
+ w8bene: number;
188
+ }
189
+ interface ComplianceStats {
190
+ total_taxable_customers: number;
191
+ total_documents_requested: DocumentRequestBreakdown;
192
+ tin_verified_customers: number;
193
+ tin_verification_completion_rate: number;
194
+ document_completion_count: number;
195
+ document_completion_rate: number;
196
+ overdue_documents: number;
197
+ tin_verification_status: TINStatusBreakdown;
198
+ w_forms_by_status: WFormStatusBreakdown;
199
+ w_forms_status_totals: Record<string, number>;
200
+ w_forms_count: WFormCountBreakdown;
201
+ }
202
+ interface GlobalTaxRule {
203
+ id: string;
204
+ withdrawal_threshold: number;
205
+ default_us_withholding: number;
206
+ default_non_us_withholding: number;
207
+ tax_treaty_support: boolean;
208
+ tax_year: number;
209
+ configured_by: string;
210
+ is_active: boolean;
211
+ created_at: string;
212
+ updated_at: string;
213
+ }
214
+ interface TreatyCountry {
215
+ id: string;
216
+ country_code: string;
217
+ country_name: string;
218
+ withholding_rate: number;
219
+ is_active: boolean;
220
+ configured_by?: string;
221
+ created_at: string;
222
+ updated_at: string;
223
+ }
224
+ interface TreatyCountryListResponse {
225
+ treaty_countries: TreatyCountry[];
226
+ count: number;
227
+ }
228
+ interface TaxClientConfig {
229
+ /** Base URL of the Transaction Monitoring Service API (e.g., "http://localhost:8097") */
230
+ baseURL: string;
231
+ tenantId: string;
232
+ apiKey?: string;
233
+ headers?: Record<string, string>;
234
+ timeout?: number;
235
+ debug?: boolean;
236
+ environment?: 'production' | 'sandbox';
237
+ }
238
+
239
+ declare class TaxClient extends BaseClient {
240
+ constructor(config: TaxClientConfig);
241
+ getCustomerTaxProfileRecord(customerID: string): Promise<CustomerTaxProfileRecord>;
242
+ requestTaxForm(customerID: string): Promise<CustomerTaxProfileRecord>;
243
+ checkTINStatus(customerID: string): Promise<TINCheckResult>;
244
+ reRequestTaxForm(customerID: string, input: ReRequestTaxFormInput): Promise<CustomerTaxProfileRecord>;
245
+ enableBackupWithholding(customerID: string, input: EnableWithholdingInput): Promise<EnableWithholdingResponse>;
246
+ downloadTaxForm(customerID: string, requestOptions?: RequestOptions): Promise<ArrayBuffer>;
247
+ getTaxRules(): Promise<TaxRules>;
248
+ updateTaxRules(input: UpdateTaxRulesInput): Promise<TaxRuleVersion>;
249
+ getComplianceStats(filters?: ComplianceStatsFilters): Promise<ComplianceStats>;
250
+ getCurrentGlobalTaxRule(): Promise<GlobalTaxRule>;
251
+ listTreatyCountries(): Promise<TreatyCountryListResponse>;
252
+ getTreatyCountry(code: string): Promise<TreatyCountry>;
253
+ }
254
+
255
+ export { type CTPFormStatus, type CTPTINStatus, type ComplianceStats, type ComplianceStatsFilters, type CustomerTaxProfileRecord, type CustomerType, type DocumentRequestBreakdown, type EmailSendingMethod, type EnableWithholdingInput, type EnableWithholdingResponse, type GlobalTaxRule, type ReRequestTaxFormInput, type TINCheckResult, type TINStatusBreakdown, TaxClient, type TaxClientConfig, type TaxRuleApprovalStatus, type TaxRuleVersion, type TaxRules, type TransactionAction, type TreatyCountry, type TreatyCountryListResponse, type UpdateTaxRulesInput, type WFormCountBreakdown, type WFormStatusBreakdown };
@@ -0,0 +1,255 @@
1
+ import { B as BaseClient, R as RequestOptions } from '../client-ePzhQKp9.js';
2
+
3
+ /**
4
+ * TypeScript type definitions for Vesant Tax Service API
5
+ *
6
+ * Types mirror the Go domain structs in:
7
+ * - services/transaction-monitoring-service/internal/domain/
8
+ * - services/transaction-monitoring-service/internal/handler/
9
+ */
10
+ type CustomerType = 'US_PERSON' | 'NON_US_PERSON' | 'NON_US_ENTITY';
11
+ /**
12
+ * Form status values stored on the customer_tax_profiles.form_status column.
13
+ * Matches Go constants CTPFormStatus*.
14
+ */
15
+ type CTPFormStatus = 'requested' | 'signed' | 'manual' | 'bounced' | 'uploaded' | 'expired' | 're_requested';
16
+ /**
17
+ * TIN status values stored on the customer_tax_profiles.tin_status column.
18
+ * Matches Go constants CTPTINStatus*.
19
+ */
20
+ type CTPTINStatus = 'not_required' | 'pending' | 'submitted' | 'verified' | 'rejected' | 'error' | 'expired';
21
+ /**
22
+ * CustomerTaxProfileRecord is the per-customer row from customer_tax_profiles.
23
+ * Returned by GET /api/v1/tax/customer-tax-profiles/{customer_id}
24
+ */
25
+ interface CustomerTaxProfileRecord {
26
+ id: string;
27
+ tenant_id: string;
28
+ customer_id: string;
29
+ customer_type: CustomerType;
30
+ form_type: string;
31
+ form_status: CTPFormStatus;
32
+ tin_status: CTPTINStatus;
33
+ tin_value?: string;
34
+ recipient_name?: string;
35
+ business_name?: string;
36
+ account_number?: string;
37
+ address?: string;
38
+ address_city?: string;
39
+ address_state?: string;
40
+ address_zip?: string;
41
+ address_country?: string;
42
+ customer_name?: string;
43
+ avalara_form_id?: string;
44
+ avalara_company_id?: string;
45
+ signed_at?: string;
46
+ verified_at?: string;
47
+ /** ISO date — W-8BEN / W-8BEN-E expires 3 years from signed_at */
48
+ expiry_date?: string;
49
+ backup_withholding: boolean;
50
+ b_notice_received: boolean;
51
+ e_delivery_consent: boolean;
52
+ withholding_enabled_by?: string;
53
+ withholding_enabled_at?: string;
54
+ tin_due_date?: string;
55
+ last_tin_check?: string;
56
+ request_count: number;
57
+ reminders_sent: number;
58
+ last_reminder_at?: string;
59
+ created_at: string;
60
+ updated_at: string;
61
+ }
62
+ /**
63
+ * Input for POST /api/v1/tax/customer-tax-profiles/{id}/re-request-form
64
+ */
65
+ interface ReRequestTaxFormInput {
66
+ /** Customer email address — required */
67
+ email: string;
68
+ /** Customer full name — optional */
69
+ name?: string;
70
+ }
71
+ /**
72
+ * Input for POST /api/v1/tax/customer-tax-profiles/{id}/enable-withholding
73
+ */
74
+ interface EnableWithholdingInput {
75
+ /** Admin user ID performing the action — required */
76
+ admin_user_id: string;
77
+ }
78
+ /** Response body from POST .../enable-withholding */
79
+ interface EnableWithholdingResponse {
80
+ message: string;
81
+ }
82
+ /**
83
+ * Result returned by POST /api/v1/tax/customer-tax-profiles/{id}/check-tin
84
+ */
85
+ interface TINCheckResult {
86
+ tin_result: Record<string, unknown>;
87
+ profile: CustomerTaxProfileRecord;
88
+ }
89
+ type TransactionAction = 'hold' | 'suspend' | 'release_with_withholding';
90
+ type EmailSendingMethod = 'tenant_email' | 'avalara_direct';
91
+ /**
92
+ * TaxRules is returned by GET /api/v1/tax/rules.
93
+ * It extends TenantTaxRules with the platform-wide withdrawal_threshold
94
+ * from the active VesantGlobalTaxRule for the current year.
95
+ */
96
+ interface TaxRules {
97
+ id: string;
98
+ tenant_id: string;
99
+ /** Platform-wide IRS withdrawal threshold (from VesantGlobalTaxRule). May be absent if not yet configured. */
100
+ withdrawal_threshold?: number;
101
+ trigger_account_creation: boolean;
102
+ trigger_first_withdrawal: boolean;
103
+ trigger_threshold: boolean;
104
+ trigger_manual: boolean;
105
+ trigger_tin_invalid: boolean;
106
+ trigger_w8ben_expiry: boolean;
107
+ trigger_tin_expired: boolean;
108
+ us_withholding_enabled: boolean;
109
+ us_withholding_rate: number;
110
+ non_us_withholding_enabled: boolean;
111
+ non_us_withholding_rate: number;
112
+ transaction_action: TransactionAction;
113
+ reminder_frequency_days: number;
114
+ reminder_max_count: number;
115
+ w8ben_expiry_warning_days: number;
116
+ tin_verification_due_date?: string;
117
+ email_sending_method: EmailSendingMethod;
118
+ display_tin_links_on_platform: boolean;
119
+ tax_treaty_support: boolean;
120
+ created_at: string;
121
+ updated_at: string;
122
+ }
123
+ /**
124
+ * Input for PUT /api/v1/tax/rules.
125
+ * Mirrors domain.UpdateRulesInput — withholding rates are NOT tenant-configurable.
126
+ */
127
+ interface UpdateTaxRulesInput {
128
+ trigger_account_creation: boolean;
129
+ trigger_first_withdrawal: boolean;
130
+ trigger_threshold: boolean;
131
+ trigger_manual: boolean;
132
+ trigger_tin_invalid: boolean;
133
+ trigger_w8ben_expiry: boolean;
134
+ trigger_tin_expired: boolean;
135
+ us_withholding_enabled: boolean;
136
+ non_us_withholding_enabled: boolean;
137
+ transaction_action: TransactionAction;
138
+ reminder_frequency_days: number;
139
+ reminder_max_count: number;
140
+ w8ben_expiry_warning_days: number;
141
+ tin_verification_due_date?: string;
142
+ email_sending_method: EmailSendingMethod;
143
+ display_tin_links_on_platform: boolean;
144
+ tax_treaty_support: boolean;
145
+ }
146
+ type TaxRuleApprovalStatus = 'pending' | 'approved' | 'rejected';
147
+ interface TaxRuleVersion {
148
+ id: string;
149
+ tenant_id: string;
150
+ version_number: number;
151
+ proposed_rules: Record<string, unknown>;
152
+ changed_fields: Record<string, unknown>;
153
+ changed_by: string;
154
+ approved_by?: string;
155
+ approval_status: TaxRuleApprovalStatus;
156
+ approved_at?: string;
157
+ activated_at?: string;
158
+ created_at: string;
159
+ }
160
+ interface ComplianceStatsFilters {
161
+ /** Predefined range: "7d" | "30d" | "90d" | "1y" */
162
+ time_range?: string;
163
+ /** ISO date YYYY-MM-DD (inclusive) */
164
+ from_date?: string;
165
+ /** ISO date YYYY-MM-DD (inclusive) */
166
+ to_date?: string;
167
+ }
168
+ interface DocumentRequestBreakdown {
169
+ total: number;
170
+ w9: number;
171
+ w8ben: number;
172
+ w8bene: number;
173
+ }
174
+ interface TINStatusBreakdown {
175
+ verified: number;
176
+ pending: number;
177
+ rejected: number;
178
+ }
179
+ interface WFormStatusBreakdown {
180
+ w9: Record<string, number>;
181
+ w8ben: Record<string, number>;
182
+ w8bene: Record<string, number>;
183
+ }
184
+ interface WFormCountBreakdown {
185
+ w9: number;
186
+ w8ben: number;
187
+ w8bene: number;
188
+ }
189
+ interface ComplianceStats {
190
+ total_taxable_customers: number;
191
+ total_documents_requested: DocumentRequestBreakdown;
192
+ tin_verified_customers: number;
193
+ tin_verification_completion_rate: number;
194
+ document_completion_count: number;
195
+ document_completion_rate: number;
196
+ overdue_documents: number;
197
+ tin_verification_status: TINStatusBreakdown;
198
+ w_forms_by_status: WFormStatusBreakdown;
199
+ w_forms_status_totals: Record<string, number>;
200
+ w_forms_count: WFormCountBreakdown;
201
+ }
202
+ interface GlobalTaxRule {
203
+ id: string;
204
+ withdrawal_threshold: number;
205
+ default_us_withholding: number;
206
+ default_non_us_withholding: number;
207
+ tax_treaty_support: boolean;
208
+ tax_year: number;
209
+ configured_by: string;
210
+ is_active: boolean;
211
+ created_at: string;
212
+ updated_at: string;
213
+ }
214
+ interface TreatyCountry {
215
+ id: string;
216
+ country_code: string;
217
+ country_name: string;
218
+ withholding_rate: number;
219
+ is_active: boolean;
220
+ configured_by?: string;
221
+ created_at: string;
222
+ updated_at: string;
223
+ }
224
+ interface TreatyCountryListResponse {
225
+ treaty_countries: TreatyCountry[];
226
+ count: number;
227
+ }
228
+ interface TaxClientConfig {
229
+ /** Base URL of the Transaction Monitoring Service API (e.g., "http://localhost:8097") */
230
+ baseURL: string;
231
+ tenantId: string;
232
+ apiKey?: string;
233
+ headers?: Record<string, string>;
234
+ timeout?: number;
235
+ debug?: boolean;
236
+ environment?: 'production' | 'sandbox';
237
+ }
238
+
239
+ declare class TaxClient extends BaseClient {
240
+ constructor(config: TaxClientConfig);
241
+ getCustomerTaxProfileRecord(customerID: string): Promise<CustomerTaxProfileRecord>;
242
+ requestTaxForm(customerID: string): Promise<CustomerTaxProfileRecord>;
243
+ checkTINStatus(customerID: string): Promise<TINCheckResult>;
244
+ reRequestTaxForm(customerID: string, input: ReRequestTaxFormInput): Promise<CustomerTaxProfileRecord>;
245
+ enableBackupWithholding(customerID: string, input: EnableWithholdingInput): Promise<EnableWithholdingResponse>;
246
+ downloadTaxForm(customerID: string, requestOptions?: RequestOptions): Promise<ArrayBuffer>;
247
+ getTaxRules(): Promise<TaxRules>;
248
+ updateTaxRules(input: UpdateTaxRulesInput): Promise<TaxRuleVersion>;
249
+ getComplianceStats(filters?: ComplianceStatsFilters): Promise<ComplianceStats>;
250
+ getCurrentGlobalTaxRule(): Promise<GlobalTaxRule>;
251
+ listTreatyCountries(): Promise<TreatyCountryListResponse>;
252
+ getTreatyCountry(code: string): Promise<TreatyCountry>;
253
+ }
254
+
255
+ export { type CTPFormStatus, type CTPTINStatus, type ComplianceStats, type ComplianceStatsFilters, type CustomerTaxProfileRecord, type CustomerType, type DocumentRequestBreakdown, type EmailSendingMethod, type EnableWithholdingInput, type EnableWithholdingResponse, type GlobalTaxRule, type ReRequestTaxFormInput, type TINCheckResult, type TINStatusBreakdown, TaxClient, type TaxClientConfig, type TaxRuleApprovalStatus, type TaxRuleVersion, type TaxRules, type TransactionAction, type TreatyCountry, type TreatyCountryListResponse, type UpdateTaxRulesInput, type WFormCountBreakdown, type WFormStatusBreakdown };