vesant-sdk 1.6.6 → 1.7.0-dev.059da4f
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.
- package/README.md +14 -4
- package/dist/{client-ePzhQKp9.d.mts → client-BolQlL5e.d.mts} +1 -1
- package/dist/{client-ePzhQKp9.d.ts → client-BolQlL5e.d.ts} +1 -1
- package/dist/client-C3DCmGe9.d.ts +436 -0
- package/dist/{client-C_A7QLcB.d.ts → client-DMIRx7Tu.d.mts} +5 -3
- package/dist/{client-BlCxjbY2.d.mts → client-DoMSYMMR.d.ts} +5 -3
- package/dist/client-ZNdnpWe7.d.mts +436 -0
- package/dist/compliance/index.d.mts +25 -429
- package/dist/compliance/index.d.ts +25 -429
- package/dist/compliance/index.js +187 -103
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +187 -104
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.d.mts +2 -2
- package/dist/decisions/index.d.ts +2 -2
- package/dist/decisions/index.js +1 -1
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +1 -1
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +4 -4
- package/dist/geolocation/index.d.ts +4 -4
- package/dist/geolocation/index.js +7 -24
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +7 -24
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +12 -70
- package/dist/index.d.ts +12 -70
- package/dist/index.js +314 -296
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +313 -295
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +4 -4
- package/dist/kyc/core.d.ts +4 -4
- package/dist/kyc/core.js +86 -27
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +86 -28
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +280 -50
- package/dist/kyc/index.d.ts +280 -50
- package/dist/kyc/index.js +86 -27
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +86 -28
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +46 -9
- package/dist/react.d.ts +46 -9
- package/dist/react.js +891 -276
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +890 -275
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +4 -4
- package/dist/risk-profile/index.d.ts +4 -4
- package/dist/risk-profile/index.js +1 -1
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +1 -1
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.d.mts +2 -2
- package/dist/scores/index.d.ts +2 -2
- package/dist/scores/index.js +1 -1
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +1 -1
- package/dist/scores/index.mjs.map +1 -1
- package/dist/tax/index.d.mts +46 -41
- package/dist/tax/index.d.ts +46 -41
- package/dist/tax/index.js +13 -36
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +13 -36
- package/dist/tax/index.mjs.map +1 -1
- package/dist/{types-1RzYeSal.d.mts → types-BOFaMQxI.d.mts} +2 -2
- package/dist/{types-B4Ezqo7V.d.mts → types-CBQRNL-l.d.mts} +14 -1
- package/dist/{types-B4Ezqo7V.d.ts → types-CBQRNL-l.d.ts} +14 -1
- package/dist/{types-X5Md_dD_.d.ts → types-UGyDl1fd.d.ts} +2 -2
- package/dist/webhooks/index.d.mts +189 -2
- package/dist/webhooks/index.d.ts +189 -2
- package/dist/webhooks/index.js +49 -7
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/index.mjs +49 -7
- package/dist/webhooks/index.mjs.map +1 -1
- package/package.json +16 -13
- package/dist/fraud/index.d.mts +0 -80
- package/dist/fraud/index.d.ts +0 -80
- package/dist/fraud/index.js +0 -606
- package/dist/fraud/index.js.map +0 -1
- package/dist/fraud/index.mjs +0 -604
- package/dist/fraud/index.mjs.map +0 -1
- package/dist/index-B04H4xfJ.d.mts +0 -320
- package/dist/index-CItMPmLL.d.ts +0 -320
package/dist/tax/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseClient, R as RequestOptions } from '../client-
|
|
1
|
+
import { B as BaseClient, R as RequestOptions } from '../client-BolQlL5e.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* TypeScript type definitions for Vesant Tax Service API
|
|
@@ -49,14 +49,6 @@ interface CustomerTaxProfileRecord {
|
|
|
49
49
|
backup_withholding: boolean;
|
|
50
50
|
b_notice_received: boolean;
|
|
51
51
|
e_delivery_consent: boolean;
|
|
52
|
-
/** B-Notice lifecycle stage. 'none' until IRS issues a CP2100. */
|
|
53
|
-
b_notice_stage: 'none' | 'first' | 'second';
|
|
54
|
-
b_notice_sent_at?: string;
|
|
55
|
-
b_notice_second_sent_at?: string;
|
|
56
|
-
/** ISO date the CP2100 notice was received from the IRS. */
|
|
57
|
-
cp2100_received_at?: string;
|
|
58
|
-
/** Set when the customer is flagged for fraud or tax non-compliance. */
|
|
59
|
-
b_notice_flag_reason?: 'fraud' | 'tax_non_compliance';
|
|
60
52
|
withholding_enabled_by?: string;
|
|
61
53
|
withholding_enabled_at?: string;
|
|
62
54
|
tin_due_date?: string;
|
|
@@ -70,16 +62,16 @@ interface CustomerTaxProfileRecord {
|
|
|
70
62
|
/**
|
|
71
63
|
* Input for POST /api/v1/tax/customer-tax-profiles/{id}/re-request-form
|
|
72
64
|
*/
|
|
73
|
-
interface CustomerTaxProfileDocuments {
|
|
74
|
-
w_form: string;
|
|
75
|
-
'1099_form': string;
|
|
76
|
-
}
|
|
77
65
|
interface ReRequestTaxFormInput {
|
|
78
66
|
/** Customer email address — required */
|
|
79
67
|
email: string;
|
|
80
68
|
/** Customer full name — optional */
|
|
81
69
|
name?: string;
|
|
82
70
|
}
|
|
71
|
+
interface CustomerTaxProfileDocuments {
|
|
72
|
+
w_form: string;
|
|
73
|
+
'1099_form': string;
|
|
74
|
+
}
|
|
83
75
|
/**
|
|
84
76
|
* Input for POST /api/v1/tax/customer-tax-profiles/{id}/enable-withholding
|
|
85
77
|
*/
|
|
@@ -129,6 +121,12 @@ interface TaxRules {
|
|
|
129
121
|
email_sending_method: EmailSendingMethod;
|
|
130
122
|
display_tin_links_on_platform: boolean;
|
|
131
123
|
tax_treaty_support: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Restricts tax evaluation to sweepstakes withdrawals only.
|
|
126
|
+
* When true (default), cash withdrawals bypass TIN/W-9 checks and withholding.
|
|
127
|
+
* Read-only: not editable via UpdateTaxRulesInput.
|
|
128
|
+
*/
|
|
129
|
+
tax_scope_sweepstakes_only: boolean;
|
|
132
130
|
created_at: string;
|
|
133
131
|
updated_at: string;
|
|
134
132
|
}
|
|
@@ -155,6 +153,16 @@ interface UpdateTaxRulesInput {
|
|
|
155
153
|
display_tin_links_on_platform: boolean;
|
|
156
154
|
tax_treaty_support: boolean;
|
|
157
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Result of POST /api/v1/tax/reminders/run — the manual W-9/tax-form
|
|
158
|
+
* reminder job trigger. Counts are for the current tenant only.
|
|
159
|
+
*/
|
|
160
|
+
interface RemindersRunResult {
|
|
161
|
+
tenant_id: string;
|
|
162
|
+
sent_count: number;
|
|
163
|
+
skipped_count: number;
|
|
164
|
+
error_count: number;
|
|
165
|
+
}
|
|
158
166
|
type TaxRuleApprovalStatus = 'pending' | 'approved' | 'rejected';
|
|
159
167
|
interface TaxRuleVersion {
|
|
160
168
|
id: string;
|
|
@@ -237,6 +245,28 @@ interface TreatyCountryListResponse {
|
|
|
237
245
|
treaty_countries: TreatyCountry[];
|
|
238
246
|
count: number;
|
|
239
247
|
}
|
|
248
|
+
interface RequestTaxFormWithProfileInput {
|
|
249
|
+
customer_id: string;
|
|
250
|
+
email: string;
|
|
251
|
+
first_name?: string;
|
|
252
|
+
last_name?: string;
|
|
253
|
+
date_of_birth?: string;
|
|
254
|
+
phone_number?: string;
|
|
255
|
+
country?: string;
|
|
256
|
+
state?: string;
|
|
257
|
+
city?: string;
|
|
258
|
+
zip_code?: string;
|
|
259
|
+
address?: string;
|
|
260
|
+
ip_address?: string;
|
|
261
|
+
form_type?: string;
|
|
262
|
+
}
|
|
263
|
+
interface RequestTaxFormWithProfileOutput {
|
|
264
|
+
profile?: CustomerTaxProfileRecord;
|
|
265
|
+
request_id?: string;
|
|
266
|
+
reference_id?: string;
|
|
267
|
+
form_id?: string;
|
|
268
|
+
public_url?: string;
|
|
269
|
+
}
|
|
240
270
|
interface TaxClientConfig {
|
|
241
271
|
/** Base URL of the Transaction Monitoring Service API (e.g., "http://localhost:8097") */
|
|
242
272
|
baseURL: string;
|
|
@@ -247,49 +277,24 @@ interface TaxClientConfig {
|
|
|
247
277
|
debug?: boolean;
|
|
248
278
|
environment?: 'production' | 'sandbox';
|
|
249
279
|
}
|
|
250
|
-
interface RunRemindersResponse {
|
|
251
|
-
tenant_id: string;
|
|
252
|
-
sent_count: number;
|
|
253
|
-
skipped_count: number;
|
|
254
|
-
error_count: number;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Input for TaxClient.updateReminderConfig().
|
|
258
|
-
* Only updates reminder-specific fields; all other tax rule settings are preserved.
|
|
259
|
-
* Caller must be authenticated as a Tenant Super Admin.
|
|
260
|
-
*/
|
|
261
|
-
interface UpdateReminderConfigInput {
|
|
262
|
-
/** Days between reminders. Must be >= 7. */
|
|
263
|
-
reminder_frequency_days: number;
|
|
264
|
-
/** Max reminders per customer before stopping. Must be > 0. */
|
|
265
|
-
reminder_max_count: number;
|
|
266
|
-
}
|
|
267
280
|
|
|
268
281
|
declare class TaxClient extends BaseClient {
|
|
269
282
|
constructor(config: TaxClientConfig);
|
|
270
283
|
getCustomerTaxProfileRecord(customerID: string): Promise<CustomerTaxProfileRecord>;
|
|
271
284
|
requestTaxForm(customerID: string): Promise<CustomerTaxProfileRecord>;
|
|
285
|
+
requestTaxFormWithProfile(input: RequestTaxFormWithProfileInput): Promise<RequestTaxFormWithProfileOutput>;
|
|
272
286
|
checkTINStatus(customerID: string): Promise<TINCheckResult>;
|
|
273
287
|
reRequestTaxForm(customerID: string, input: ReRequestTaxFormInput): Promise<CustomerTaxProfileRecord>;
|
|
274
288
|
enableBackupWithholding(customerID: string, input: EnableWithholdingInput): Promise<EnableWithholdingResponse>;
|
|
275
289
|
getCustomerDocuments(customerID: string): Promise<CustomerTaxProfileDocuments>;
|
|
276
290
|
downloadTaxForm(customerID: string, requestOptions?: RequestOptions): Promise<ArrayBuffer>;
|
|
277
|
-
runReminders(): Promise<RunRemindersResponse>;
|
|
278
|
-
/**
|
|
279
|
-
* Update only the reminder configuration (frequency + max count) without
|
|
280
|
-
* touching any other tax rule settings. Fetches current rules first and
|
|
281
|
-
* merges the reminder fields before sending the update.
|
|
282
|
-
*
|
|
283
|
-
* Requires the caller to be authenticated as a Tenant Super Admin.
|
|
284
|
-
* Throws VesantError with status 403 if the role requirement is not met.
|
|
285
|
-
*/
|
|
286
|
-
updateReminderConfig(input: UpdateReminderConfigInput): Promise<TaxRuleVersion>;
|
|
287
291
|
getTaxRules(): Promise<TaxRules>;
|
|
288
292
|
updateTaxRules(input: UpdateTaxRulesInput): Promise<TaxRuleVersion>;
|
|
293
|
+
runReminders(): Promise<RemindersRunResult>;
|
|
289
294
|
getComplianceStats(filters?: ComplianceStatsFilters): Promise<ComplianceStats>;
|
|
290
295
|
getCurrentGlobalTaxRule(): Promise<GlobalTaxRule>;
|
|
291
296
|
listTreatyCountries(): Promise<TreatyCountryListResponse>;
|
|
292
297
|
getTreatyCountry(code: string): Promise<TreatyCountry>;
|
|
293
298
|
}
|
|
294
299
|
|
|
295
|
-
export { type CTPFormStatus, type CTPTINStatus, type ComplianceStats, type ComplianceStatsFilters, type CustomerTaxProfileDocuments, type CustomerTaxProfileRecord, type CustomerType, type DocumentRequestBreakdown, type EmailSendingMethod, type EnableWithholdingInput, type EnableWithholdingResponse, type GlobalTaxRule, type ReRequestTaxFormInput, type
|
|
300
|
+
export { type CTPFormStatus, type CTPTINStatus, type ComplianceStats, type ComplianceStatsFilters, type CustomerTaxProfileDocuments, type CustomerTaxProfileRecord, type CustomerType, type DocumentRequestBreakdown, type EmailSendingMethod, type EnableWithholdingInput, type EnableWithholdingResponse, type GlobalTaxRule, type ReRequestTaxFormInput, type RemindersRunResult, type RequestTaxFormWithProfileInput, type RequestTaxFormWithProfileOutput, 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 };
|
package/dist/tax/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BaseClient, R as RequestOptions } from '../client-
|
|
1
|
+
import { B as BaseClient, R as RequestOptions } from '../client-BolQlL5e.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* TypeScript type definitions for Vesant Tax Service API
|
|
@@ -49,14 +49,6 @@ interface CustomerTaxProfileRecord {
|
|
|
49
49
|
backup_withholding: boolean;
|
|
50
50
|
b_notice_received: boolean;
|
|
51
51
|
e_delivery_consent: boolean;
|
|
52
|
-
/** B-Notice lifecycle stage. 'none' until IRS issues a CP2100. */
|
|
53
|
-
b_notice_stage: 'none' | 'first' | 'second';
|
|
54
|
-
b_notice_sent_at?: string;
|
|
55
|
-
b_notice_second_sent_at?: string;
|
|
56
|
-
/** ISO date the CP2100 notice was received from the IRS. */
|
|
57
|
-
cp2100_received_at?: string;
|
|
58
|
-
/** Set when the customer is flagged for fraud or tax non-compliance. */
|
|
59
|
-
b_notice_flag_reason?: 'fraud' | 'tax_non_compliance';
|
|
60
52
|
withholding_enabled_by?: string;
|
|
61
53
|
withholding_enabled_at?: string;
|
|
62
54
|
tin_due_date?: string;
|
|
@@ -70,16 +62,16 @@ interface CustomerTaxProfileRecord {
|
|
|
70
62
|
/**
|
|
71
63
|
* Input for POST /api/v1/tax/customer-tax-profiles/{id}/re-request-form
|
|
72
64
|
*/
|
|
73
|
-
interface CustomerTaxProfileDocuments {
|
|
74
|
-
w_form: string;
|
|
75
|
-
'1099_form': string;
|
|
76
|
-
}
|
|
77
65
|
interface ReRequestTaxFormInput {
|
|
78
66
|
/** Customer email address — required */
|
|
79
67
|
email: string;
|
|
80
68
|
/** Customer full name — optional */
|
|
81
69
|
name?: string;
|
|
82
70
|
}
|
|
71
|
+
interface CustomerTaxProfileDocuments {
|
|
72
|
+
w_form: string;
|
|
73
|
+
'1099_form': string;
|
|
74
|
+
}
|
|
83
75
|
/**
|
|
84
76
|
* Input for POST /api/v1/tax/customer-tax-profiles/{id}/enable-withholding
|
|
85
77
|
*/
|
|
@@ -129,6 +121,12 @@ interface TaxRules {
|
|
|
129
121
|
email_sending_method: EmailSendingMethod;
|
|
130
122
|
display_tin_links_on_platform: boolean;
|
|
131
123
|
tax_treaty_support: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Restricts tax evaluation to sweepstakes withdrawals only.
|
|
126
|
+
* When true (default), cash withdrawals bypass TIN/W-9 checks and withholding.
|
|
127
|
+
* Read-only: not editable via UpdateTaxRulesInput.
|
|
128
|
+
*/
|
|
129
|
+
tax_scope_sweepstakes_only: boolean;
|
|
132
130
|
created_at: string;
|
|
133
131
|
updated_at: string;
|
|
134
132
|
}
|
|
@@ -155,6 +153,16 @@ interface UpdateTaxRulesInput {
|
|
|
155
153
|
display_tin_links_on_platform: boolean;
|
|
156
154
|
tax_treaty_support: boolean;
|
|
157
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Result of POST /api/v1/tax/reminders/run — the manual W-9/tax-form
|
|
158
|
+
* reminder job trigger. Counts are for the current tenant only.
|
|
159
|
+
*/
|
|
160
|
+
interface RemindersRunResult {
|
|
161
|
+
tenant_id: string;
|
|
162
|
+
sent_count: number;
|
|
163
|
+
skipped_count: number;
|
|
164
|
+
error_count: number;
|
|
165
|
+
}
|
|
158
166
|
type TaxRuleApprovalStatus = 'pending' | 'approved' | 'rejected';
|
|
159
167
|
interface TaxRuleVersion {
|
|
160
168
|
id: string;
|
|
@@ -237,6 +245,28 @@ interface TreatyCountryListResponse {
|
|
|
237
245
|
treaty_countries: TreatyCountry[];
|
|
238
246
|
count: number;
|
|
239
247
|
}
|
|
248
|
+
interface RequestTaxFormWithProfileInput {
|
|
249
|
+
customer_id: string;
|
|
250
|
+
email: string;
|
|
251
|
+
first_name?: string;
|
|
252
|
+
last_name?: string;
|
|
253
|
+
date_of_birth?: string;
|
|
254
|
+
phone_number?: string;
|
|
255
|
+
country?: string;
|
|
256
|
+
state?: string;
|
|
257
|
+
city?: string;
|
|
258
|
+
zip_code?: string;
|
|
259
|
+
address?: string;
|
|
260
|
+
ip_address?: string;
|
|
261
|
+
form_type?: string;
|
|
262
|
+
}
|
|
263
|
+
interface RequestTaxFormWithProfileOutput {
|
|
264
|
+
profile?: CustomerTaxProfileRecord;
|
|
265
|
+
request_id?: string;
|
|
266
|
+
reference_id?: string;
|
|
267
|
+
form_id?: string;
|
|
268
|
+
public_url?: string;
|
|
269
|
+
}
|
|
240
270
|
interface TaxClientConfig {
|
|
241
271
|
/** Base URL of the Transaction Monitoring Service API (e.g., "http://localhost:8097") */
|
|
242
272
|
baseURL: string;
|
|
@@ -247,49 +277,24 @@ interface TaxClientConfig {
|
|
|
247
277
|
debug?: boolean;
|
|
248
278
|
environment?: 'production' | 'sandbox';
|
|
249
279
|
}
|
|
250
|
-
interface RunRemindersResponse {
|
|
251
|
-
tenant_id: string;
|
|
252
|
-
sent_count: number;
|
|
253
|
-
skipped_count: number;
|
|
254
|
-
error_count: number;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Input for TaxClient.updateReminderConfig().
|
|
258
|
-
* Only updates reminder-specific fields; all other tax rule settings are preserved.
|
|
259
|
-
* Caller must be authenticated as a Tenant Super Admin.
|
|
260
|
-
*/
|
|
261
|
-
interface UpdateReminderConfigInput {
|
|
262
|
-
/** Days between reminders. Must be >= 7. */
|
|
263
|
-
reminder_frequency_days: number;
|
|
264
|
-
/** Max reminders per customer before stopping. Must be > 0. */
|
|
265
|
-
reminder_max_count: number;
|
|
266
|
-
}
|
|
267
280
|
|
|
268
281
|
declare class TaxClient extends BaseClient {
|
|
269
282
|
constructor(config: TaxClientConfig);
|
|
270
283
|
getCustomerTaxProfileRecord(customerID: string): Promise<CustomerTaxProfileRecord>;
|
|
271
284
|
requestTaxForm(customerID: string): Promise<CustomerTaxProfileRecord>;
|
|
285
|
+
requestTaxFormWithProfile(input: RequestTaxFormWithProfileInput): Promise<RequestTaxFormWithProfileOutput>;
|
|
272
286
|
checkTINStatus(customerID: string): Promise<TINCheckResult>;
|
|
273
287
|
reRequestTaxForm(customerID: string, input: ReRequestTaxFormInput): Promise<CustomerTaxProfileRecord>;
|
|
274
288
|
enableBackupWithholding(customerID: string, input: EnableWithholdingInput): Promise<EnableWithholdingResponse>;
|
|
275
289
|
getCustomerDocuments(customerID: string): Promise<CustomerTaxProfileDocuments>;
|
|
276
290
|
downloadTaxForm(customerID: string, requestOptions?: RequestOptions): Promise<ArrayBuffer>;
|
|
277
|
-
runReminders(): Promise<RunRemindersResponse>;
|
|
278
|
-
/**
|
|
279
|
-
* Update only the reminder configuration (frequency + max count) without
|
|
280
|
-
* touching any other tax rule settings. Fetches current rules first and
|
|
281
|
-
* merges the reminder fields before sending the update.
|
|
282
|
-
*
|
|
283
|
-
* Requires the caller to be authenticated as a Tenant Super Admin.
|
|
284
|
-
* Throws VesantError with status 403 if the role requirement is not met.
|
|
285
|
-
*/
|
|
286
|
-
updateReminderConfig(input: UpdateReminderConfigInput): Promise<TaxRuleVersion>;
|
|
287
291
|
getTaxRules(): Promise<TaxRules>;
|
|
288
292
|
updateTaxRules(input: UpdateTaxRulesInput): Promise<TaxRuleVersion>;
|
|
293
|
+
runReminders(): Promise<RemindersRunResult>;
|
|
289
294
|
getComplianceStats(filters?: ComplianceStatsFilters): Promise<ComplianceStats>;
|
|
290
295
|
getCurrentGlobalTaxRule(): Promise<GlobalTaxRule>;
|
|
291
296
|
listTreatyCountries(): Promise<TreatyCountryListResponse>;
|
|
292
297
|
getTreatyCountry(code: string): Promise<TreatyCountry>;
|
|
293
298
|
}
|
|
294
299
|
|
|
295
|
-
export { type CTPFormStatus, type CTPTINStatus, type ComplianceStats, type ComplianceStatsFilters, type CustomerTaxProfileDocuments, type CustomerTaxProfileRecord, type CustomerType, type DocumentRequestBreakdown, type EmailSendingMethod, type EnableWithholdingInput, type EnableWithholdingResponse, type GlobalTaxRule, type ReRequestTaxFormInput, type
|
|
300
|
+
export { type CTPFormStatus, type CTPTINStatus, type ComplianceStats, type ComplianceStatsFilters, type CustomerTaxProfileDocuments, type CustomerTaxProfileRecord, type CustomerType, type DocumentRequestBreakdown, type EmailSendingMethod, type EnableWithholdingInput, type EnableWithholdingResponse, type GlobalTaxRule, type ReRequestTaxFormInput, type RemindersRunResult, type RequestTaxFormWithProfileInput, type RequestTaxFormWithProfileOutput, 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 };
|
package/dist/tax/index.js
CHANGED
|
@@ -216,7 +216,7 @@ function createConsoleLogger() {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
// src/core/version.ts
|
|
219
|
-
var SDK_VERSION = "1.
|
|
219
|
+
var SDK_VERSION = "1.7.0";
|
|
220
220
|
|
|
221
221
|
// src/shared/browser-utils.ts
|
|
222
222
|
function generateUUID() {
|
|
@@ -572,6 +572,15 @@ var TaxClient = class extends BaseClient {
|
|
|
572
572
|
{ method: "POST" }
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
+
async requestTaxFormWithProfile(input) {
|
|
576
|
+
return this.request(
|
|
577
|
+
"/api/v1/tax/customer-tax-profiles/request-form-with-profile",
|
|
578
|
+
{
|
|
579
|
+
method: "POST",
|
|
580
|
+
body: JSON.stringify(input)
|
|
581
|
+
}
|
|
582
|
+
);
|
|
583
|
+
}
|
|
575
584
|
async checkTINStatus(customerID) {
|
|
576
585
|
return this.requestWithRetry(
|
|
577
586
|
`/api/v1/tax/customer-tax-profiles/${customerID}/check-tin`,
|
|
@@ -609,41 +618,6 @@ var TaxClient = class extends BaseClient {
|
|
|
609
618
|
{ ...requestOptions, responseType: "arraybuffer" }
|
|
610
619
|
);
|
|
611
620
|
}
|
|
612
|
-
async runReminders() {
|
|
613
|
-
return this.request("/api/v1/tax/reminders/run", {
|
|
614
|
-
method: "POST"
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* Update only the reminder configuration (frequency + max count) without
|
|
619
|
-
* touching any other tax rule settings. Fetches current rules first and
|
|
620
|
-
* merges the reminder fields before sending the update.
|
|
621
|
-
*
|
|
622
|
-
* Requires the caller to be authenticated as a Tenant Super Admin.
|
|
623
|
-
* Throws VesantError with status 403 if the role requirement is not met.
|
|
624
|
-
*/
|
|
625
|
-
async updateReminderConfig(input) {
|
|
626
|
-
const current = await this.getTaxRules();
|
|
627
|
-
return this.updateTaxRules({
|
|
628
|
-
trigger_account_creation: current.trigger_account_creation,
|
|
629
|
-
trigger_first_withdrawal: current.trigger_first_withdrawal,
|
|
630
|
-
trigger_threshold: current.trigger_threshold,
|
|
631
|
-
trigger_manual: current.trigger_manual,
|
|
632
|
-
trigger_tin_invalid: current.trigger_tin_invalid,
|
|
633
|
-
trigger_w8ben_expiry: current.trigger_w8ben_expiry,
|
|
634
|
-
trigger_tin_expired: current.trigger_tin_expired,
|
|
635
|
-
us_withholding_enabled: current.us_withholding_enabled,
|
|
636
|
-
non_us_withholding_enabled: current.non_us_withholding_enabled,
|
|
637
|
-
transaction_action: current.transaction_action,
|
|
638
|
-
w8ben_expiry_warning_days: current.w8ben_expiry_warning_days,
|
|
639
|
-
tin_verification_due_date: current.tin_verification_due_date,
|
|
640
|
-
email_sending_method: current.email_sending_method,
|
|
641
|
-
display_tin_links_on_platform: current.display_tin_links_on_platform,
|
|
642
|
-
tax_treaty_support: current.tax_treaty_support,
|
|
643
|
-
reminder_frequency_days: input.reminder_frequency_days,
|
|
644
|
-
reminder_max_count: input.reminder_max_count
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
621
|
// ==========================================================================
|
|
648
622
|
// P2 — Tenant Tax Rules
|
|
649
623
|
// ==========================================================================
|
|
@@ -658,6 +632,9 @@ var TaxClient = class extends BaseClient {
|
|
|
658
632
|
});
|
|
659
633
|
return res.version;
|
|
660
634
|
}
|
|
635
|
+
async runReminders() {
|
|
636
|
+
return this.request("/api/v1/tax/reminders/run", { method: "POST" });
|
|
637
|
+
}
|
|
661
638
|
async getComplianceStats(filters) {
|
|
662
639
|
const params = {};
|
|
663
640
|
if (filters?.time_range) params.time_range = filters.time_range;
|