@smartbills/sdk 1.1.0-alpha.2 → 1.1.0-alpha.20
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/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +811 -116
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -136,36 +136,36 @@ declare enum ReceiptSource {
|
|
|
136
136
|
*/
|
|
137
137
|
declare enum BillApprovalStatus {
|
|
138
138
|
/** Approval is pending review */
|
|
139
|
-
PENDING =
|
|
139
|
+
PENDING = "PENDING",
|
|
140
140
|
/** Bill has been approved */
|
|
141
|
-
APPROVED =
|
|
141
|
+
APPROVED = "APPROVED",
|
|
142
142
|
/** Bill has been rejected */
|
|
143
|
-
REJECTED =
|
|
143
|
+
REJECTED = "REJECTED",
|
|
144
144
|
/** Approval step was skipped */
|
|
145
|
-
SKIPPED =
|
|
145
|
+
SKIPPED = "SKIPPED",
|
|
146
146
|
/** Approval is not required for this bill */
|
|
147
147
|
NOT_REQUIRED = 4,
|
|
148
148
|
/** Approval has been delegated to another user */
|
|
149
|
-
DELEGATED =
|
|
149
|
+
DELEGATED = "DELEGATED",
|
|
150
150
|
/** Bill is currently under review */
|
|
151
|
-
IN_REVIEW =
|
|
151
|
+
IN_REVIEW = "IN_REVIEW",
|
|
152
152
|
/** Changes have been requested before approval */
|
|
153
|
-
REQUESTED_CHANGES =
|
|
153
|
+
REQUESTED_CHANGES = "REQUESTED_CHANGES"
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
156
|
* The type of approval required for a bill.
|
|
157
157
|
*/
|
|
158
158
|
declare enum BillApprovalType {
|
|
159
159
|
/** Approval is mandatory */
|
|
160
|
-
REQUIRED =
|
|
160
|
+
REQUIRED = "REQUIRED",
|
|
161
161
|
/** Approval is optional */
|
|
162
|
-
OPTIONAL =
|
|
162
|
+
OPTIONAL = "OPTIONAL",
|
|
163
163
|
/** Approver is notified for information only */
|
|
164
|
-
INFORMATIONAL =
|
|
164
|
+
INFORMATIONAL = "INFORMATIONAL",
|
|
165
165
|
/** Approval is required only when certain conditions are met */
|
|
166
|
-
CONDITIONAL =
|
|
166
|
+
CONDITIONAL = "CONDITIONAL",
|
|
167
167
|
/** Direct manager approval is required */
|
|
168
|
-
MANAGER =
|
|
168
|
+
MANAGER = "MANAGER"
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
171
|
* The current status of a bill in its lifecycle.
|
|
@@ -174,21 +174,21 @@ declare enum BillApprovalType {
|
|
|
174
174
|
*/
|
|
175
175
|
declare enum BillStatus {
|
|
176
176
|
/** Bill is being drafted and has not been submitted */
|
|
177
|
-
DRAFT =
|
|
177
|
+
DRAFT = "DRAFT",
|
|
178
178
|
/** Bill is awaiting approval from designated approvers */
|
|
179
|
-
PENDING_APPROVAL =
|
|
179
|
+
PENDING_APPROVAL = "PENDING_APPROVAL",
|
|
180
180
|
/** Bill has been approved and is ready for payment */
|
|
181
|
-
APPROVED =
|
|
181
|
+
APPROVED = "APPROVED",
|
|
182
182
|
/** Bill payment has been scheduled for a future date */
|
|
183
|
-
SCHEDULED =
|
|
183
|
+
SCHEDULED = "SCHEDULED",
|
|
184
184
|
/** Bill has been fully paid */
|
|
185
|
-
PAID =
|
|
185
|
+
PAID = "PAID",
|
|
186
186
|
/** Bill has been cancelled */
|
|
187
|
-
CANCELLED =
|
|
187
|
+
CANCELLED = "CANCELLED",
|
|
188
188
|
/** Bill is past the due date and unpaid */
|
|
189
|
-
OVERDUE =
|
|
189
|
+
OVERDUE = "OVERDUE",
|
|
190
190
|
/** Automated payment attempt failed */
|
|
191
|
-
PAYMENT_FAILED =
|
|
191
|
+
PAYMENT_FAILED = "PAYMENT_FAILED"
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* The role of a user within a business organization.
|
|
@@ -197,23 +197,23 @@ declare enum BillStatus {
|
|
|
197
197
|
*/
|
|
198
198
|
declare enum MembershipRole {
|
|
199
199
|
/** Full administrative access to all business features */
|
|
200
|
-
ADMINISTRATOR =
|
|
200
|
+
ADMINISTRATOR = "ADMINISTRATOR",
|
|
201
201
|
/** Manages financial operations including billing and payments */
|
|
202
|
-
FINANCE_MANAGER =
|
|
202
|
+
FINANCE_MANAGER = "FINANCE_MANAGER",
|
|
203
203
|
/** Handles accounting operations and reconciliation */
|
|
204
|
-
ACCOUNTANT =
|
|
204
|
+
ACCOUNTANT = "ACCOUNTANT",
|
|
205
205
|
/** Manages teams and approves expense reports */
|
|
206
|
-
MANAGER =
|
|
206
|
+
MANAGER = "MANAGER",
|
|
207
207
|
/** Standard employee with expense submission capabilities */
|
|
208
|
-
EMPLOYEE =
|
|
208
|
+
EMPLOYEE = "EMPLOYEE",
|
|
209
209
|
/** Read-only access for auditing and compliance */
|
|
210
|
-
AUDITOR =
|
|
210
|
+
AUDITOR = "AUDITOR",
|
|
211
211
|
/** Designated approver for bills and expense reports */
|
|
212
|
-
APPROVER =
|
|
212
|
+
APPROVER = "APPROVER",
|
|
213
213
|
/** Basic member with limited access */
|
|
214
|
-
MEMBER =
|
|
214
|
+
MEMBER = "MEMBER",
|
|
215
215
|
/** Member of the finance team with elevated financial access */
|
|
216
|
-
FINANCE_TEAM =
|
|
216
|
+
FINANCE_TEAM = "FINANCE_TEAM"
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* The status of an expense report in its lifecycle.
|
|
@@ -529,10 +529,10 @@ declare enum WorkflowTriggerType {
|
|
|
529
529
|
* The payer type indicating who is responsible for payment.
|
|
530
530
|
*/
|
|
531
531
|
declare enum PayerType {
|
|
532
|
-
/** Payment is personal */
|
|
533
|
-
|
|
532
|
+
/** Payment is personal (employee expense) */
|
|
533
|
+
EMPLOYEE = "EMPLOYEE",
|
|
534
534
|
/** Payment is a business expense */
|
|
535
|
-
|
|
535
|
+
COMPANY = "COMPANY"
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
/**
|
|
@@ -575,7 +575,7 @@ interface SBPagination {
|
|
|
575
575
|
*/
|
|
576
576
|
interface PaginationRequest {
|
|
577
577
|
page?: number;
|
|
578
|
-
|
|
578
|
+
pageSize?: number;
|
|
579
579
|
sortBy?: string;
|
|
580
580
|
sortDirection?: "asc" | "desc";
|
|
581
581
|
}
|
|
@@ -968,8 +968,11 @@ interface ExpenseReportListRequest extends PaginationRequest {
|
|
|
968
968
|
* Request payload for creating a new expense report.
|
|
969
969
|
*/
|
|
970
970
|
interface ExpenseReportCreateRequest {
|
|
971
|
-
|
|
971
|
+
title: string;
|
|
972
972
|
description?: string;
|
|
973
|
+
businessPurpose?: string;
|
|
974
|
+
startDate?: string;
|
|
975
|
+
endDate?: string;
|
|
973
976
|
}
|
|
974
977
|
/**
|
|
975
978
|
* Request payload for updating an existing expense report.
|
|
@@ -1096,6 +1099,39 @@ interface ExpenseReportPartialReimburseRequest {
|
|
|
1096
1099
|
* Response for bulk expense report operations.
|
|
1097
1100
|
*/
|
|
1098
1101
|
type SBExpenseReportBulkActionResponse = SBBulkActionResponse;
|
|
1102
|
+
interface BulkSubmitExpenseReportsRequest {
|
|
1103
|
+
reportIds: number[];
|
|
1104
|
+
}
|
|
1105
|
+
interface BulkRecallExpenseReportsRequest {
|
|
1106
|
+
reportIds: number[];
|
|
1107
|
+
reason?: string;
|
|
1108
|
+
}
|
|
1109
|
+
interface BulkApproveApprobationsRequest {
|
|
1110
|
+
reportIds: number[];
|
|
1111
|
+
notes?: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface BulkRejectApprobationsRequest {
|
|
1114
|
+
reportIds: number[];
|
|
1115
|
+
reason?: string;
|
|
1116
|
+
}
|
|
1117
|
+
interface BulkRequestChangesApprobationsRequest {
|
|
1118
|
+
reportIds: number[];
|
|
1119
|
+
changes?: string;
|
|
1120
|
+
}
|
|
1121
|
+
interface BulkMarkReimbursedApprobationsRequest {
|
|
1122
|
+
reportIds: number[];
|
|
1123
|
+
notes?: string;
|
|
1124
|
+
reimbursedDate?: string;
|
|
1125
|
+
}
|
|
1126
|
+
interface BulkPlanReimbursementApprobationsRequest {
|
|
1127
|
+
reportIds: number[];
|
|
1128
|
+
plannedDate: string;
|
|
1129
|
+
notes?: string;
|
|
1130
|
+
}
|
|
1131
|
+
interface BulkRevertToReviewApprobationsRequest {
|
|
1132
|
+
reportIds: number[];
|
|
1133
|
+
reason?: string;
|
|
1134
|
+
}
|
|
1099
1135
|
|
|
1100
1136
|
/**
|
|
1101
1137
|
* Request parameters for listing approbations (items pending the current user's approval).
|
|
@@ -1181,7 +1217,10 @@ declare class ApprobationService extends BaseService {
|
|
|
1181
1217
|
* @returns The expense report
|
|
1182
1218
|
* @throws {SmartbillsNotFoundError} If the report is not found
|
|
1183
1219
|
*/
|
|
1184
|
-
getById(reportId: number,
|
|
1220
|
+
getById(reportId: number, params?: {
|
|
1221
|
+
sortBy?: string;
|
|
1222
|
+
sortOrder?: string;
|
|
1223
|
+
}, options?: RequestOptions): Promise<SBExpenseReport>;
|
|
1185
1224
|
/**
|
|
1186
1225
|
* Approves an expense report.
|
|
1187
1226
|
*
|
|
@@ -1328,9 +1367,16 @@ declare class ApprobationService extends BaseService {
|
|
|
1328
1367
|
*/
|
|
1329
1368
|
downloadAttachmentsZip(reportId: number, options?: RequestOptions): Promise<Blob>;
|
|
1330
1369
|
updateExpense(reportId: number, expenseId: number, data: unknown, options?: RequestOptions): Promise<unknown>;
|
|
1370
|
+
resetExpenseReview(reportId: number, expenseId: number, options?: RequestOptions): Promise<SBExpenseReport>;
|
|
1331
1371
|
saveExpenseReview(reportId: number, data: ExpenseReportApproveRequest & {
|
|
1332
1372
|
saveExpenseReviewOnly?: boolean;
|
|
1333
1373
|
}, options?: RequestOptions): Promise<SBExpenseReport>;
|
|
1374
|
+
bulkApprove(data: BulkApproveApprobationsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
1375
|
+
bulkReject(data: BulkRejectApprobationsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
1376
|
+
bulkRequestChanges(data: BulkRequestChangesApprobationsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
1377
|
+
bulkMarkReimbursed(data: BulkMarkReimbursedApprobationsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
1378
|
+
bulkPlanReimbursement(data: BulkPlanReimbursementApprobationsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
1379
|
+
bulkRevertToReview(data: BulkRevertToReviewApprobationsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
1334
1380
|
}
|
|
1335
1381
|
|
|
1336
1382
|
/** Represents the current subscription state for a business. */
|
|
@@ -1347,7 +1393,7 @@ interface SBSubscription {
|
|
|
1347
1393
|
canceledAt?: string;
|
|
1348
1394
|
}
|
|
1349
1395
|
/** Represents a billing invoice issued to the business. */
|
|
1350
|
-
interface
|
|
1396
|
+
interface SBBillingInvoice {
|
|
1351
1397
|
id: string;
|
|
1352
1398
|
number?: string;
|
|
1353
1399
|
status: string;
|
|
@@ -1370,10 +1416,10 @@ interface SBUpcomingInvoice {
|
|
|
1370
1416
|
currency: string;
|
|
1371
1417
|
periodStart?: string;
|
|
1372
1418
|
periodEnd?: string;
|
|
1373
|
-
lines?:
|
|
1419
|
+
lines?: SBBillingInvoiceLine[];
|
|
1374
1420
|
}
|
|
1375
|
-
/** A single line item on
|
|
1376
|
-
interface
|
|
1421
|
+
/** A single line item on a billing invoice. */
|
|
1422
|
+
interface SBBillingInvoiceLine {
|
|
1377
1423
|
description?: string;
|
|
1378
1424
|
amount: number;
|
|
1379
1425
|
currency: string;
|
|
@@ -1409,7 +1455,7 @@ interface SBPortalSession {
|
|
|
1409
1455
|
url: string;
|
|
1410
1456
|
}
|
|
1411
1457
|
/** Query parameters for listing billing invoices. */
|
|
1412
|
-
interface
|
|
1458
|
+
interface BillingInvoiceListRequest {
|
|
1413
1459
|
page?: number;
|
|
1414
1460
|
pageSize?: number;
|
|
1415
1461
|
}
|
|
@@ -1462,9 +1508,9 @@ declare class BillingService extends BaseService {
|
|
|
1462
1508
|
/** Validates whether the business can downgrade to a lower plan without losing features. */
|
|
1463
1509
|
validateDowngrade(data: UpgradeSubscriptionRequest, options?: RequestOptions): Promise<SBDowngradeValidation>;
|
|
1464
1510
|
/** Lists billing invoices for the business with pagination support. */
|
|
1465
|
-
listInvoices(params?:
|
|
1511
|
+
listInvoices(params?: BillingInvoiceListRequest, options?: RequestOptions): Promise<SBListResponse<SBBillingInvoice>>;
|
|
1466
1512
|
/** Retrieves a specific billing invoice by its Stripe ID. */
|
|
1467
|
-
getInvoice(invoiceId: string, options?: RequestOptions): Promise<
|
|
1513
|
+
getInvoice(invoiceId: string, options?: RequestOptions): Promise<SBBillingInvoice>;
|
|
1468
1514
|
/** Retrieves the upcoming invoice preview based on the current subscription. */
|
|
1469
1515
|
getUpcomingInvoice(options?: RequestOptions): Promise<SBUpcomingInvoice>;
|
|
1470
1516
|
/** Retrieves current usage across all quota keys for the business. */
|
|
@@ -1830,6 +1876,7 @@ interface PaginateTransactionRequest extends PaginationRequest {
|
|
|
1830
1876
|
maxAmount?: number;
|
|
1831
1877
|
hasAttachment?: boolean;
|
|
1832
1878
|
employeeId?: number;
|
|
1879
|
+
payerType?: PayerType;
|
|
1833
1880
|
}
|
|
1834
1881
|
/**
|
|
1835
1882
|
* Request payload for updating an existing transaction.
|
|
@@ -1842,6 +1889,7 @@ interface TransactionUpdateRequest {
|
|
|
1842
1889
|
categoryId?: number;
|
|
1843
1890
|
note?: string;
|
|
1844
1891
|
vendorId?: number;
|
|
1892
|
+
payerType?: PayerType;
|
|
1845
1893
|
}
|
|
1846
1894
|
/**
|
|
1847
1895
|
* Request payload for batch-updating multiple transactions.
|
|
@@ -1853,6 +1901,7 @@ interface TransactionBatchUpdateRequest {
|
|
|
1853
1901
|
total?: number;
|
|
1854
1902
|
categoryId?: number;
|
|
1855
1903
|
vendorId?: number;
|
|
1904
|
+
payerType?: PayerType;
|
|
1856
1905
|
}
|
|
1857
1906
|
|
|
1858
1907
|
/**
|
|
@@ -2154,6 +2203,7 @@ interface SBBusiness extends SBEntity, SBTimestamps {
|
|
|
2154
2203
|
name: string;
|
|
2155
2204
|
legalName?: string;
|
|
2156
2205
|
description?: string;
|
|
2206
|
+
slug?: string;
|
|
2157
2207
|
logo?: string;
|
|
2158
2208
|
website?: string;
|
|
2159
2209
|
email?: string;
|
|
@@ -2174,10 +2224,20 @@ interface SBBusiness extends SBEntity, SBTimestamps {
|
|
|
2174
2224
|
* Controls the visual identity used on customer-facing documents and portals.
|
|
2175
2225
|
*/
|
|
2176
2226
|
interface SBBusinessBrand {
|
|
2227
|
+
id?: number;
|
|
2177
2228
|
logo?: string;
|
|
2229
|
+
icon?: string;
|
|
2230
|
+
coverImage?: string;
|
|
2178
2231
|
primaryColor?: string;
|
|
2179
2232
|
secondaryColor?: string;
|
|
2180
|
-
|
|
2233
|
+
facebook?: string;
|
|
2234
|
+
instagram?: string;
|
|
2235
|
+
linkedIn?: string;
|
|
2236
|
+
twitter?: string;
|
|
2237
|
+
youTube?: string;
|
|
2238
|
+
tikTok?: string;
|
|
2239
|
+
googleAnalyticsId?: string;
|
|
2240
|
+
gtmId?: string;
|
|
2181
2241
|
}
|
|
2182
2242
|
/**
|
|
2183
2243
|
* The subscription plan associated with a business.
|
|
@@ -2203,6 +2263,8 @@ interface BusinessCreateRequest {
|
|
|
2203
2263
|
timezone?: string;
|
|
2204
2264
|
taxNumber?: string;
|
|
2205
2265
|
registrationNumber?: string;
|
|
2266
|
+
plan?: string;
|
|
2267
|
+
billingInterval?: "month" | "year";
|
|
2206
2268
|
}
|
|
2207
2269
|
/**
|
|
2208
2270
|
* Request payload for updating an existing business.
|
|
@@ -2232,6 +2294,18 @@ interface BusinessBrandCreateRequest {
|
|
|
2232
2294
|
secondaryColor?: string;
|
|
2233
2295
|
coverImage?: File | Blob;
|
|
2234
2296
|
}
|
|
2297
|
+
interface BusinessBrandUpdateRequest {
|
|
2298
|
+
primaryColor?: string;
|
|
2299
|
+
secondaryColor?: string;
|
|
2300
|
+
facebook?: string;
|
|
2301
|
+
instagram?: string;
|
|
2302
|
+
linkedIn?: string;
|
|
2303
|
+
twitter?: string;
|
|
2304
|
+
youTube?: string;
|
|
2305
|
+
tikTok?: string;
|
|
2306
|
+
googleAnalyticsId?: string;
|
|
2307
|
+
gtmId?: string;
|
|
2308
|
+
}
|
|
2235
2309
|
/**
|
|
2236
2310
|
* Request payload for batch-updating multiple businesses.
|
|
2237
2311
|
*/
|
|
@@ -2352,6 +2426,12 @@ declare class BusinessService extends BaseService {
|
|
|
2352
2426
|
* ```
|
|
2353
2427
|
*/
|
|
2354
2428
|
createBrand(businessId: number, data: BusinessBrandCreateRequest, options?: RequestOptions): Promise<unknown>;
|
|
2429
|
+
uploadLogo(businessId: number, file: File | Blob, options?: RequestOptions): Promise<SBBusiness>;
|
|
2430
|
+
getBrand(businessId: number, options?: RequestOptions): Promise<SBBusinessBrand>;
|
|
2431
|
+
updateBrand(businessId: number, data: BusinessBrandUpdateRequest, options?: RequestOptions): Promise<SBBusinessBrand>;
|
|
2432
|
+
uploadBrandLogo(businessId: number, file: File | Blob, options?: RequestOptions): Promise<SBBusinessBrand>;
|
|
2433
|
+
uploadBrandIcon(businessId: number, file: File | Blob, options?: RequestOptions): Promise<SBBusinessBrand>;
|
|
2434
|
+
uploadBrandCover(businessId: number, file: File | Blob, options?: RequestOptions): Promise<SBBusinessBrand>;
|
|
2355
2435
|
/**
|
|
2356
2436
|
* Creates multiple businesses in a single batch operation.
|
|
2357
2437
|
*
|
|
@@ -2414,18 +2494,39 @@ interface InvitationListRequest extends PaginationRequest {
|
|
|
2414
2494
|
* Memberships define the relationship between a user and a business,
|
|
2415
2495
|
* including their role and permissions within the organization.
|
|
2416
2496
|
*/
|
|
2497
|
+
interface SBMembershipUserSummary {
|
|
2498
|
+
id: number;
|
|
2499
|
+
firstName?: string;
|
|
2500
|
+
lastName?: string;
|
|
2501
|
+
email?: string;
|
|
2502
|
+
fullName?: string;
|
|
2503
|
+
avatar?: string;
|
|
2504
|
+
}
|
|
2505
|
+
interface SBMembershipBusinessSummary {
|
|
2506
|
+
id: number;
|
|
2507
|
+
name?: string;
|
|
2508
|
+
slug?: string;
|
|
2509
|
+
currency?: string;
|
|
2510
|
+
logo?: string;
|
|
2511
|
+
timezone?: string;
|
|
2512
|
+
apEmail?: string;
|
|
2513
|
+
receiptEmail?: string;
|
|
2514
|
+
reimbursementEmail?: string;
|
|
2515
|
+
}
|
|
2417
2516
|
interface SBMembership extends SBEntity, SBTimestamps {
|
|
2418
|
-
userId
|
|
2419
|
-
userName?: string;
|
|
2420
|
-
userEmail?: string;
|
|
2421
|
-
userAvatar?: string;
|
|
2517
|
+
userId?: number;
|
|
2422
2518
|
businessId: number;
|
|
2423
|
-
businessName?: string;
|
|
2424
|
-
businessLogo?: string;
|
|
2425
|
-
role: MembershipRole;
|
|
2426
|
-
isActive: boolean;
|
|
2427
|
-
joinedAt?: string;
|
|
2428
2519
|
employeeId?: number;
|
|
2520
|
+
firstName?: string;
|
|
2521
|
+
lastName?: string;
|
|
2522
|
+
email?: string;
|
|
2523
|
+
phoneNumber?: string;
|
|
2524
|
+
avatar?: string;
|
|
2525
|
+
birthdate?: string;
|
|
2526
|
+
role: MembershipRole;
|
|
2527
|
+
status: number;
|
|
2528
|
+
user?: SBMembershipUserSummary;
|
|
2529
|
+
business?: SBMembershipBusinessSummary;
|
|
2429
2530
|
}
|
|
2430
2531
|
/**
|
|
2431
2532
|
* Request payload for updating a membership's role.
|
|
@@ -3107,6 +3208,7 @@ declare class EmailAccountService extends BaseService {
|
|
|
3107
3208
|
interface SBExpenseJob extends SBEntity, SBTimestamps {
|
|
3108
3209
|
fileName?: string;
|
|
3109
3210
|
status: string;
|
|
3211
|
+
jobStatus?: number | string;
|
|
3110
3212
|
progress?: number;
|
|
3111
3213
|
totalItems?: number;
|
|
3112
3214
|
processedItems?: number;
|
|
@@ -3115,12 +3217,22 @@ interface SBExpenseJob extends SBEntity, SBTimestamps {
|
|
|
3115
3217
|
employeeId?: number;
|
|
3116
3218
|
error?: string;
|
|
3117
3219
|
completedAt?: string;
|
|
3220
|
+
expenseReportId?: number;
|
|
3221
|
+
categoryId?: number;
|
|
3222
|
+
transactionId?: number;
|
|
3223
|
+
note?: string;
|
|
3224
|
+
attachment?: {
|
|
3225
|
+
id?: number;
|
|
3226
|
+
fileName?: string;
|
|
3227
|
+
url?: string;
|
|
3228
|
+
cdnUrl?: string;
|
|
3229
|
+
};
|
|
3118
3230
|
}
|
|
3119
3231
|
/**
|
|
3120
3232
|
* Request parameters for listing expense jobs with optional status filter.
|
|
3121
3233
|
*/
|
|
3122
3234
|
interface ExpenseJobListRequest extends PaginationRequest {
|
|
3123
|
-
status?: string;
|
|
3235
|
+
status?: string | string[];
|
|
3124
3236
|
}
|
|
3125
3237
|
|
|
3126
3238
|
/**
|
|
@@ -3189,6 +3301,7 @@ declare class ExpenseJobService extends BaseService {
|
|
|
3189
3301
|
* @throws {SmartbillsNotFoundError} If the employee or job is not found
|
|
3190
3302
|
*/
|
|
3191
3303
|
retryEmployeeJob(employeeId: number, jobId: number, options?: RequestOptions): Promise<void>;
|
|
3304
|
+
listByExpenseReport(reportId: number, params?: ExpenseJobListRequest, options?: RequestOptions): Promise<SBListResponse<SBExpenseJob>>;
|
|
3192
3305
|
}
|
|
3193
3306
|
|
|
3194
3307
|
/**
|
|
@@ -3374,7 +3487,10 @@ declare class ExpenseReportService extends BaseService {
|
|
|
3374
3487
|
*/
|
|
3375
3488
|
list(params?: ExpenseReportListRequest, options?: RequestOptions): Promise<SBListResponse<SBExpenseReport>>;
|
|
3376
3489
|
listForEmployee(employeeId: number, params?: ExpenseReportListRequest, options?: RequestOptions): Promise<SBListResponse<SBExpenseReport>>;
|
|
3377
|
-
getByIdForEmployee(employeeId: number, reportId: number,
|
|
3490
|
+
getByIdForEmployee(employeeId: number, reportId: number, params?: {
|
|
3491
|
+
sortBy?: string;
|
|
3492
|
+
sortOrder?: string;
|
|
3493
|
+
}, options?: RequestOptions): Promise<SBExpenseReport>;
|
|
3378
3494
|
/**
|
|
3379
3495
|
* Retrieves a single expense report by ID.
|
|
3380
3496
|
*
|
|
@@ -3388,7 +3504,10 @@ declare class ExpenseReportService extends BaseService {
|
|
|
3388
3504
|
* const report = await client.expenseReports.getById(123);
|
|
3389
3505
|
* ```
|
|
3390
3506
|
*/
|
|
3391
|
-
getById(reportId: number,
|
|
3507
|
+
getById(reportId: number, params?: {
|
|
3508
|
+
sortBy?: string;
|
|
3509
|
+
sortOrder?: string;
|
|
3510
|
+
}, options?: RequestOptions): Promise<SBExpenseReport>;
|
|
3392
3511
|
/**
|
|
3393
3512
|
* Lists expense reports belonging to the current user.
|
|
3394
3513
|
*
|
|
@@ -3584,6 +3703,8 @@ declare class ExpenseReportService extends BaseService {
|
|
|
3584
3703
|
* @param options - Request options including businessId, locale, and abort signal
|
|
3585
3704
|
* @returns Blob containing the exported file
|
|
3586
3705
|
*/
|
|
3706
|
+
bulkSubmit(data: BulkSubmitExpenseReportsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
3707
|
+
bulkRecall(data: BulkRecallExpenseReportsRequest, options?: RequestOptions): Promise<SBExpenseReportBulkActionResponse>;
|
|
3587
3708
|
export(data: ExpenseReportExportRequest, options?: RequestOptions): Promise<Blob>;
|
|
3588
3709
|
}
|
|
3589
3710
|
|
|
@@ -3632,6 +3753,10 @@ interface BulkAssignVendorRequest {
|
|
|
3632
3753
|
interface BulkDeleteExpensesRequest {
|
|
3633
3754
|
expenseIds: number[];
|
|
3634
3755
|
}
|
|
3756
|
+
interface BulkAssignPayerTypeRequest {
|
|
3757
|
+
expenseIds: number[];
|
|
3758
|
+
payerType: PayerType;
|
|
3759
|
+
}
|
|
3635
3760
|
interface BulkSetNoteRequest {
|
|
3636
3761
|
expenseIds: number[];
|
|
3637
3762
|
note: string | null;
|
|
@@ -3649,7 +3774,7 @@ interface ExpenseExportRequest {
|
|
|
3649
3774
|
categoryId?: number;
|
|
3650
3775
|
vendorId?: number;
|
|
3651
3776
|
expenseReportId?: number;
|
|
3652
|
-
format?: "
|
|
3777
|
+
format?: "CSV" | "EXCEL";
|
|
3653
3778
|
locale?: string;
|
|
3654
3779
|
}
|
|
3655
3780
|
/**
|
|
@@ -3663,11 +3788,15 @@ interface ExpenseAttachmentDownloadRequest {
|
|
|
3663
3788
|
* Request parameters for listing expenses with filters and pagination.
|
|
3664
3789
|
*/
|
|
3665
3790
|
interface ExpenseListRequest extends PaginationRequest {
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3791
|
+
searchTerm?: string;
|
|
3792
|
+
fromDate?: string;
|
|
3793
|
+
toDate?: string;
|
|
3669
3794
|
categoryId?: number;
|
|
3795
|
+
categoryIds?: number[];
|
|
3670
3796
|
vendorId?: number;
|
|
3797
|
+
vendorIds?: string;
|
|
3798
|
+
currencies?: string;
|
|
3799
|
+
submittedByEmployeeId?: number;
|
|
3671
3800
|
expenseReportId?: number;
|
|
3672
3801
|
minAmount?: number;
|
|
3673
3802
|
maxAmount?: number;
|
|
@@ -3710,6 +3839,51 @@ interface SBExpenseValidateResponse {
|
|
|
3710
3839
|
* Response for bulk expense operations.
|
|
3711
3840
|
*/
|
|
3712
3841
|
type SBExpenseBulkActionResponse = SBBulkActionResponse;
|
|
3842
|
+
interface PresignedUploadFileRequest {
|
|
3843
|
+
fileName: string;
|
|
3844
|
+
contentType: string;
|
|
3845
|
+
fileSize: number;
|
|
3846
|
+
note?: string;
|
|
3847
|
+
categoryId?: number;
|
|
3848
|
+
expenseReportId?: number;
|
|
3849
|
+
}
|
|
3850
|
+
interface PresignedUploadRequest {
|
|
3851
|
+
files: PresignedUploadFileRequest[];
|
|
3852
|
+
vendorId?: number;
|
|
3853
|
+
expenseReportId?: number;
|
|
3854
|
+
categoryId?: number;
|
|
3855
|
+
note?: string;
|
|
3856
|
+
type?: string;
|
|
3857
|
+
payerType?: string;
|
|
3858
|
+
}
|
|
3859
|
+
interface PresignedUploadFileResponse {
|
|
3860
|
+
fileName: string;
|
|
3861
|
+
s3Key: string;
|
|
3862
|
+
uploadUrl: string;
|
|
3863
|
+
contentType: string;
|
|
3864
|
+
}
|
|
3865
|
+
interface PresignedUploadResponse {
|
|
3866
|
+
uploadSessionId: string;
|
|
3867
|
+
files: PresignedUploadFileResponse[];
|
|
3868
|
+
}
|
|
3869
|
+
interface ConfirmUploadFileRequest {
|
|
3870
|
+
s3Key: string;
|
|
3871
|
+
fileName: string;
|
|
3872
|
+
contentType: string;
|
|
3873
|
+
note?: string;
|
|
3874
|
+
categoryId?: number;
|
|
3875
|
+
expenseReportId?: number;
|
|
3876
|
+
}
|
|
3877
|
+
interface ConfirmUploadRequest {
|
|
3878
|
+
uploadSessionId: string;
|
|
3879
|
+
files: ConfirmUploadFileRequest[];
|
|
3880
|
+
vendorId?: number;
|
|
3881
|
+
expenseReportId?: number;
|
|
3882
|
+
categoryId?: number;
|
|
3883
|
+
note?: string;
|
|
3884
|
+
type?: string;
|
|
3885
|
+
payerType?: string;
|
|
3886
|
+
}
|
|
3713
3887
|
|
|
3714
3888
|
/**
|
|
3715
3889
|
* Service for managing expenses (receipts and transactions) within a business.
|
|
@@ -3887,6 +4061,7 @@ declare class ExpenseService extends BaseService {
|
|
|
3887
4061
|
* @returns Bulk action response with success and failure counts
|
|
3888
4062
|
*/
|
|
3889
4063
|
bulkAssignCategory(data: BulkAssignCategoryRequest, options?: RequestOptions): Promise<SBExpenseBulkActionResponse>;
|
|
4064
|
+
bulkAssignPayerType(data: BulkAssignPayerTypeRequest, options?: RequestOptions): Promise<SBExpenseBulkActionResponse>;
|
|
3890
4065
|
/**
|
|
3891
4066
|
* Bulk assigns multiple expenses to an expense report.
|
|
3892
4067
|
*
|
|
@@ -3961,6 +4136,10 @@ declare class ExpenseService extends BaseService {
|
|
|
3961
4136
|
* @returns Array of updated expense transactions
|
|
3962
4137
|
*/
|
|
3963
4138
|
batchUpdate(data: unknown[], options?: RequestOptions): Promise<SBTransaction[]>;
|
|
4139
|
+
presignUpload(request: PresignedUploadRequest, options?: RequestOptions): Promise<PresignedUploadResponse>;
|
|
4140
|
+
confirmUpload(request: ConfirmUploadRequest, options?: RequestOptions): Promise<unknown>;
|
|
4141
|
+
presignEmployeeUpload(employeeId: number, request: PresignedUploadRequest, options?: RequestOptions): Promise<PresignedUploadResponse>;
|
|
4142
|
+
confirmEmployeeUpload(employeeId: number, request: ConfirmUploadRequest, options?: RequestOptions): Promise<unknown>;
|
|
3964
4143
|
}
|
|
3965
4144
|
|
|
3966
4145
|
/**
|
|
@@ -5697,6 +5876,8 @@ declare class VendorService extends BaseService {
|
|
|
5697
5876
|
* @returns Blob containing the CSV template
|
|
5698
5877
|
*/
|
|
5699
5878
|
downloadImportTemplate(options?: RequestOptions): Promise<Blob>;
|
|
5879
|
+
uploadLogo(vendorId: number, file: File | Blob, options?: RequestOptions): Promise<SBVendor>;
|
|
5880
|
+
uploadBusinessLogo(vendorId: number, file: File | Blob, options?: RequestOptions): Promise<SBVendor>;
|
|
5700
5881
|
}
|
|
5701
5882
|
|
|
5702
5883
|
/**
|
|
@@ -6032,80 +6213,108 @@ declare class DepartmentService extends BaseService {
|
|
|
6032
6213
|
delete(id: number, options?: RequestOptions): Promise<void>;
|
|
6033
6214
|
}
|
|
6034
6215
|
|
|
6035
|
-
/** Represents a product or service offered by the business. */
|
|
6036
6216
|
interface SBProduct extends SBEntity, SBTimestamps {
|
|
6037
6217
|
name: string;
|
|
6038
6218
|
description?: string;
|
|
6039
6219
|
price?: number;
|
|
6220
|
+
compareAtPrice?: number;
|
|
6221
|
+
cost?: number;
|
|
6040
6222
|
sku?: string;
|
|
6223
|
+
barcode?: string;
|
|
6224
|
+
image?: string;
|
|
6225
|
+
images?: SBProductImage[];
|
|
6226
|
+
category?: string;
|
|
6227
|
+
isActive?: boolean;
|
|
6228
|
+
taxable?: boolean;
|
|
6229
|
+
taxCode?: string;
|
|
6230
|
+
trackInventory?: boolean;
|
|
6231
|
+
stockQuantity?: number;
|
|
6232
|
+
lowStockThreshold?: number;
|
|
6233
|
+
weight?: number;
|
|
6234
|
+
weightUnit?: string;
|
|
6235
|
+
currency?: string;
|
|
6236
|
+
status?: string;
|
|
6237
|
+
active?: boolean;
|
|
6238
|
+
}
|
|
6239
|
+
interface SBProductImage {
|
|
6240
|
+
id?: number;
|
|
6241
|
+
src: string;
|
|
6242
|
+
position?: number;
|
|
6041
6243
|
}
|
|
6042
|
-
/** Query parameters for listing products with optional search. */
|
|
6043
6244
|
interface ProductListRequest extends PaginationRequest {
|
|
6044
6245
|
search?: string;
|
|
6045
6246
|
}
|
|
6247
|
+
interface ProductCreateRequest {
|
|
6248
|
+
name: string;
|
|
6249
|
+
description?: string;
|
|
6250
|
+
price?: number;
|
|
6251
|
+
compareAtPrice?: number;
|
|
6252
|
+
cost?: number;
|
|
6253
|
+
sku?: string;
|
|
6254
|
+
barcode?: string;
|
|
6255
|
+
category?: string;
|
|
6256
|
+
taxable?: boolean;
|
|
6257
|
+
taxCode?: string;
|
|
6258
|
+
trackInventory?: boolean;
|
|
6259
|
+
stockQuantity?: number;
|
|
6260
|
+
}
|
|
6261
|
+
interface ProductUpdateRequest {
|
|
6262
|
+
name?: string;
|
|
6263
|
+
description?: string;
|
|
6264
|
+
price?: number;
|
|
6265
|
+
compareAtPrice?: number;
|
|
6266
|
+
cost?: number;
|
|
6267
|
+
sku?: string;
|
|
6268
|
+
barcode?: string;
|
|
6269
|
+
category?: string;
|
|
6270
|
+
taxable?: boolean;
|
|
6271
|
+
taxCode?: string;
|
|
6272
|
+
trackInventory?: boolean;
|
|
6273
|
+
stockQuantity?: number;
|
|
6274
|
+
}
|
|
6046
6275
|
|
|
6047
|
-
/**
|
|
6048
|
-
* Service for managing products within a business.
|
|
6049
|
-
*
|
|
6050
|
-
* Products represent the goods or services sold by the business
|
|
6051
|
-
* and appear on receipts and invoices.
|
|
6052
|
-
*/
|
|
6053
6276
|
declare class ProductService extends BaseService {
|
|
6054
|
-
/**
|
|
6055
|
-
* Retrieves a paginated list of products.
|
|
6056
|
-
*
|
|
6057
|
-
* @param params - Optional filters, search, and pagination parameters
|
|
6058
|
-
* @param options - Request options including business context and abort signal
|
|
6059
|
-
* @returns A paginated list of products
|
|
6060
|
-
*/
|
|
6061
6277
|
list(params?: ProductListRequest, options?: RequestOptions): Promise<SBListResponse<SBProduct>>;
|
|
6062
|
-
/**
|
|
6063
|
-
* Retrieves a single product by ID.
|
|
6064
|
-
*
|
|
6065
|
-
* @param id - The product ID
|
|
6066
|
-
* @param options - Request options including business context and abort signal
|
|
6067
|
-
* @returns The product
|
|
6068
|
-
* @throws {SmartbillsNotFoundError} If the product is not found
|
|
6069
|
-
*/
|
|
6070
6278
|
getById(id: number, options?: RequestOptions): Promise<SBProduct>;
|
|
6279
|
+
create(data: ProductCreateRequest, options?: RequestOptions): Promise<SBProduct>;
|
|
6280
|
+
update(id: number, data: ProductUpdateRequest, options?: RequestOptions): Promise<SBProduct>;
|
|
6281
|
+
delete(id: number, options?: RequestOptions): Promise<void>;
|
|
6071
6282
|
}
|
|
6072
6283
|
|
|
6073
|
-
/** Represents a tax rate configured for a business. */
|
|
6074
6284
|
interface SBTax extends SBEntity, SBTimestamps {
|
|
6075
6285
|
name: string;
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6286
|
+
percentage: number;
|
|
6287
|
+
description?: string;
|
|
6288
|
+
country?: string;
|
|
6289
|
+
state?: string;
|
|
6290
|
+
jurisdiction?: string;
|
|
6291
|
+
type?: string;
|
|
6292
|
+
inclusive?: boolean;
|
|
6293
|
+
isActive?: boolean;
|
|
6294
|
+
taxIdentificationNumber?: string;
|
|
6079
6295
|
}
|
|
6080
|
-
/** Query parameters for listing tax rates with optional search. */
|
|
6081
6296
|
interface TaxListRequest extends PaginationRequest {
|
|
6082
6297
|
search?: string;
|
|
6083
6298
|
}
|
|
6299
|
+
interface TaxCreateRequest {
|
|
6300
|
+
name: string;
|
|
6301
|
+
percentage: number;
|
|
6302
|
+
description?: string;
|
|
6303
|
+
country?: string;
|
|
6304
|
+
state?: string;
|
|
6305
|
+
jurisdiction?: string;
|
|
6306
|
+
type?: string;
|
|
6307
|
+
inclusive?: boolean;
|
|
6308
|
+
taxIdentificationNumber?: string;
|
|
6309
|
+
}
|
|
6310
|
+
type TaxUpdateRequest = Partial<TaxCreateRequest>;
|
|
6084
6311
|
|
|
6085
|
-
/**
|
|
6086
|
-
* Service for managing tax configurations within a business.
|
|
6087
|
-
*
|
|
6088
|
-
* Taxes define the tax rates applied to receipts, invoices, and
|
|
6089
|
-
* expense items (e.g., GST, HST, PST, VAT).
|
|
6090
|
-
*/
|
|
6091
6312
|
declare class TaxService extends BaseService {
|
|
6092
|
-
/**
|
|
6093
|
-
* Retrieves a paginated list of tax configurations.
|
|
6094
|
-
*
|
|
6095
|
-
* @param params - Optional filters and pagination parameters
|
|
6096
|
-
* @param options - Request options including business context and abort signal
|
|
6097
|
-
* @returns A paginated list of tax configurations
|
|
6098
|
-
*/
|
|
6099
6313
|
list(params?: TaxListRequest, options?: RequestOptions): Promise<SBListResponse<SBTax>>;
|
|
6100
|
-
/**
|
|
6101
|
-
* Retrieves a single tax configuration by ID.
|
|
6102
|
-
*
|
|
6103
|
-
* @param id - The tax ID
|
|
6104
|
-
* @param options - Request options including business context and abort signal
|
|
6105
|
-
* @returns The tax configuration
|
|
6106
|
-
* @throws {SmartbillsNotFoundError} If the tax is not found
|
|
6107
|
-
*/
|
|
6108
6314
|
getById(id: number, options?: RequestOptions): Promise<SBTax>;
|
|
6315
|
+
create(data: TaxCreateRequest, options?: RequestOptions): Promise<SBTax>;
|
|
6316
|
+
update(id: number, data: TaxUpdateRequest, options?: RequestOptions): Promise<SBTax>;
|
|
6317
|
+
delete(id: number, options?: RequestOptions): Promise<void>;
|
|
6109
6318
|
}
|
|
6110
6319
|
|
|
6111
6320
|
/** Represents a promotional code that can be applied to receipts or transactions. */
|
|
@@ -6134,7 +6343,10 @@ declare class PromoCodeService extends BaseService {
|
|
|
6134
6343
|
getById(id: number, options?: RequestOptions): Promise<SBPromoCode>;
|
|
6135
6344
|
}
|
|
6136
6345
|
|
|
6137
|
-
|
|
6346
|
+
interface CategoryListRequest extends PaginationRequest {
|
|
6347
|
+
search?: string;
|
|
6348
|
+
isVisible?: boolean;
|
|
6349
|
+
}
|
|
6138
6350
|
interface SBCategory extends SBEntity, SBTimestamps {
|
|
6139
6351
|
name: string;
|
|
6140
6352
|
code?: string;
|
|
@@ -6142,13 +6354,11 @@ interface SBCategory extends SBEntity, SBTimestamps {
|
|
|
6142
6354
|
businessId?: number;
|
|
6143
6355
|
userId?: number;
|
|
6144
6356
|
}
|
|
6145
|
-
/** Payload for creating a new expense category. */
|
|
6146
6357
|
interface CategoryCreateRequest {
|
|
6147
6358
|
name: string;
|
|
6148
6359
|
code?: string;
|
|
6149
6360
|
isVisible?: boolean;
|
|
6150
6361
|
}
|
|
6151
|
-
/** Payload for updating an existing expense category. */
|
|
6152
6362
|
interface CategoryUpdateRequest {
|
|
6153
6363
|
name?: string;
|
|
6154
6364
|
code?: string;
|
|
@@ -6163,12 +6373,13 @@ interface CategoryUpdateRequest {
|
|
|
6163
6373
|
*/
|
|
6164
6374
|
declare class CategoryService extends BaseService {
|
|
6165
6375
|
/**
|
|
6166
|
-
* Retrieves
|
|
6376
|
+
* Retrieves a paginated list of expense categories for the business.
|
|
6167
6377
|
*
|
|
6378
|
+
* @param params - Optional filters and pagination parameters
|
|
6168
6379
|
* @param options - Request options including business context and abort signal
|
|
6169
|
-
* @returns
|
|
6380
|
+
* @returns A paginated list of expense categories
|
|
6170
6381
|
*/
|
|
6171
|
-
list(options?: RequestOptions): Promise<SBCategory
|
|
6382
|
+
list(params?: CategoryListRequest, options?: RequestOptions): Promise<SBListResponse<SBCategory>>;
|
|
6172
6383
|
/**
|
|
6173
6384
|
* Retrieves a single expense category by ID.
|
|
6174
6385
|
*
|
|
@@ -6509,6 +6720,23 @@ declare class EmailForwardingService extends BaseService {
|
|
|
6509
6720
|
disableUser(userId: number, options?: RequestOptions): Promise<SBEmailForwardingConfig>;
|
|
6510
6721
|
}
|
|
6511
6722
|
|
|
6723
|
+
interface SBAuthorizedSender {
|
|
6724
|
+
id: number;
|
|
6725
|
+
userId: number;
|
|
6726
|
+
businessId: number | null;
|
|
6727
|
+
emailAddress: string;
|
|
6728
|
+
createdAt: string;
|
|
6729
|
+
}
|
|
6730
|
+
interface CreateAuthorizedSenderRequest {
|
|
6731
|
+
emailAddress: string;
|
|
6732
|
+
}
|
|
6733
|
+
|
|
6734
|
+
declare class AuthorizedSenderService extends BaseService {
|
|
6735
|
+
list(businessId: number, options?: RequestOptions): Promise<SBAuthorizedSender[]>;
|
|
6736
|
+
create(businessId: number, data: CreateAuthorizedSenderRequest, options?: RequestOptions): Promise<SBAuthorizedSender>;
|
|
6737
|
+
delete(businessId: number, id: number, options?: RequestOptions): Promise<void>;
|
|
6738
|
+
}
|
|
6739
|
+
|
|
6512
6740
|
/** The type of rule that determines how loyalty points are accrued. */
|
|
6513
6741
|
type LoyaltyRuleType = "visit" | "spend" | "item_variation" | "category";
|
|
6514
6742
|
/** Base shape shared by all loyalty accrual rules. */
|
|
@@ -6636,6 +6864,466 @@ declare class LoyaltyService extends BaseService {
|
|
|
6636
6864
|
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
6637
6865
|
}
|
|
6638
6866
|
|
|
6867
|
+
declare enum InvoiceStatus {
|
|
6868
|
+
DRAFT = "Draft",
|
|
6869
|
+
SENT = "Sent",
|
|
6870
|
+
VIEWED = "Viewed",
|
|
6871
|
+
PARTIALLY_PAID = "PartiallyPaid",
|
|
6872
|
+
PAID = "Paid",
|
|
6873
|
+
MARKED_PAID = "MarkedPaid",
|
|
6874
|
+
OVERDUE = "Overdue",
|
|
6875
|
+
CANCELLED = "Cancelled",
|
|
6876
|
+
VOID = "Void"
|
|
6877
|
+
}
|
|
6878
|
+
interface SBInvoiceCustomer {
|
|
6879
|
+
id?: number;
|
|
6880
|
+
firstName?: string;
|
|
6881
|
+
lastName?: string;
|
|
6882
|
+
email?: string;
|
|
6883
|
+
phoneNumber?: string;
|
|
6884
|
+
company?: string;
|
|
6885
|
+
}
|
|
6886
|
+
interface SBInvoiceLineItemTax {
|
|
6887
|
+
id?: number;
|
|
6888
|
+
name?: string;
|
|
6889
|
+
rate?: number;
|
|
6890
|
+
amount?: SBMoney;
|
|
6891
|
+
taxId?: number;
|
|
6892
|
+
}
|
|
6893
|
+
interface SBInvoiceLineItem {
|
|
6894
|
+
id?: number;
|
|
6895
|
+
description?: string;
|
|
6896
|
+
quantity?: number;
|
|
6897
|
+
unitPrice?: number;
|
|
6898
|
+
price?: SBMoney;
|
|
6899
|
+
subTotal?: SBMoney;
|
|
6900
|
+
total?: SBMoney;
|
|
6901
|
+
amount?: number;
|
|
6902
|
+
productId?: number;
|
|
6903
|
+
product?: {
|
|
6904
|
+
id?: number;
|
|
6905
|
+
name?: string;
|
|
6906
|
+
sku?: string;
|
|
6907
|
+
};
|
|
6908
|
+
taxable?: boolean;
|
|
6909
|
+
taxIds?: number[];
|
|
6910
|
+
taxes?: SBInvoiceLineItemTax[];
|
|
6911
|
+
}
|
|
6912
|
+
interface SBInvoice extends SBEntity, SBTimestamps {
|
|
6913
|
+
invoiceNumber?: string;
|
|
6914
|
+
billStatus?: string;
|
|
6915
|
+
dueDate?: string;
|
|
6916
|
+
date?: string;
|
|
6917
|
+
billingPeriodStartDate?: string;
|
|
6918
|
+
billingPeriodEndDate?: string;
|
|
6919
|
+
autoPaymentDate?: string;
|
|
6920
|
+
amountDue?: SBMoney;
|
|
6921
|
+
balanceForward?: SBMoney;
|
|
6922
|
+
isOverdue?: boolean;
|
|
6923
|
+
isPaid?: boolean;
|
|
6924
|
+
paymentLinkToken?: string;
|
|
6925
|
+
paymentLinkUrl?: string;
|
|
6926
|
+
stripePaymentIntentId?: string;
|
|
6927
|
+
sentAt?: string;
|
|
6928
|
+
viewedAt?: string;
|
|
6929
|
+
voidedAt?: string;
|
|
6930
|
+
paidOn?: string;
|
|
6931
|
+
customerId?: number;
|
|
6932
|
+
vendorId?: number;
|
|
6933
|
+
total?: SBMoney;
|
|
6934
|
+
subTotal?: SBMoney;
|
|
6935
|
+
totalTaxes?: SBMoney;
|
|
6936
|
+
totalDiscounts?: SBMoney;
|
|
6937
|
+
totalFees?: SBMoney;
|
|
6938
|
+
totalBeforeTax?: SBMoney;
|
|
6939
|
+
currency?: string;
|
|
6940
|
+
hostedUrl?: string;
|
|
6941
|
+
shortUrl?: string;
|
|
6942
|
+
note?: string;
|
|
6943
|
+
lineItems?: SBInvoiceLineItem[];
|
|
6944
|
+
billingAddress?: SBAddress;
|
|
6945
|
+
shippingAddress?: SBAddress;
|
|
6946
|
+
reminders?: InvoiceReminder[];
|
|
6947
|
+
customer?: SBInvoiceCustomer;
|
|
6948
|
+
}
|
|
6949
|
+
interface InvoiceListRequest extends PaginationRequest {
|
|
6950
|
+
status?: string;
|
|
6951
|
+
customerId?: number;
|
|
6952
|
+
dateFrom?: string;
|
|
6953
|
+
dateTo?: string;
|
|
6954
|
+
minAmount?: number;
|
|
6955
|
+
maxAmount?: number;
|
|
6956
|
+
search?: string;
|
|
6957
|
+
}
|
|
6958
|
+
declare enum InvoiceReminderFrequency {
|
|
6959
|
+
ONCE = "ONCE",
|
|
6960
|
+
WEEKLY = "WEEKLY",
|
|
6961
|
+
BIWEEKLY = "BIWEEKLY",
|
|
6962
|
+
MONTHLY = "MONTHLY"
|
|
6963
|
+
}
|
|
6964
|
+
declare enum InvoiceReminderTiming {
|
|
6965
|
+
BEFORE_DUE = "BEFORE_DUE",
|
|
6966
|
+
ON_DUE = "ON_DUE",
|
|
6967
|
+
AFTER_DUE = "AFTER_DUE"
|
|
6968
|
+
}
|
|
6969
|
+
interface InvoiceReminder {
|
|
6970
|
+
id?: number;
|
|
6971
|
+
enabled: boolean;
|
|
6972
|
+
timing: InvoiceReminderTiming;
|
|
6973
|
+
daysOffset: number;
|
|
6974
|
+
frequency: InvoiceReminderFrequency;
|
|
6975
|
+
maxReminders: number;
|
|
6976
|
+
message?: string;
|
|
6977
|
+
}
|
|
6978
|
+
interface InvoiceCreateRequest {
|
|
6979
|
+
invoiceNumber?: string;
|
|
6980
|
+
date?: string;
|
|
6981
|
+
dueDate?: string;
|
|
6982
|
+
billingPeriodStartDate?: string;
|
|
6983
|
+
billingPeriodEndDate?: string;
|
|
6984
|
+
autoPaymentDate?: string;
|
|
6985
|
+
amountDue?: SBMoney;
|
|
6986
|
+
balanceForward?: SBMoney;
|
|
6987
|
+
paymentLinkUrl?: string;
|
|
6988
|
+
customerId?: number;
|
|
6989
|
+
vendorId?: number;
|
|
6990
|
+
currency?: string;
|
|
6991
|
+
note?: string;
|
|
6992
|
+
lineItems?: Omit<SBInvoiceLineItem, "id" | "product" | "taxes" | "price" | "subTotal" | "total">[];
|
|
6993
|
+
billingAddress?: SBAddress;
|
|
6994
|
+
shippingAddress?: SBAddress;
|
|
6995
|
+
reminders?: InvoiceReminder[];
|
|
6996
|
+
}
|
|
6997
|
+
type InvoiceUpdateRequest = Partial<InvoiceCreateRequest>;
|
|
6998
|
+
interface InvoiceSummary {
|
|
6999
|
+
totalRevenue: number;
|
|
7000
|
+
outstanding: number;
|
|
7001
|
+
overdueCount: number;
|
|
7002
|
+
paidThisMonth: number;
|
|
7003
|
+
totalCount: number;
|
|
7004
|
+
draftCount: number;
|
|
7005
|
+
sentCount: number;
|
|
7006
|
+
paidCount: number;
|
|
7007
|
+
}
|
|
7008
|
+
|
|
7009
|
+
declare class InvoiceService extends BaseService {
|
|
7010
|
+
list(params?: InvoiceListRequest, options?: RequestOptions): Promise<SBListResponse<SBInvoice>>;
|
|
7011
|
+
getById(id: number, options?: RequestOptions): Promise<SBInvoice>;
|
|
7012
|
+
create(data: InvoiceCreateRequest, options?: RequestOptions): Promise<SBInvoice>;
|
|
7013
|
+
update(id: number, data: InvoiceUpdateRequest, options?: RequestOptions): Promise<SBInvoice>;
|
|
7014
|
+
delete(id: number, options?: RequestOptions): Promise<void>;
|
|
7015
|
+
send(id: number, options?: RequestOptions): Promise<SBInvoice>;
|
|
7016
|
+
void(id: number, options?: RequestOptions): Promise<SBInvoice>;
|
|
7017
|
+
markPaid(id: number, options?: RequestOptions): Promise<SBInvoice>;
|
|
7018
|
+
duplicate(id: number, options?: RequestOptions): Promise<SBInvoice>;
|
|
7019
|
+
getSummary(options?: RequestOptions): Promise<InvoiceSummary>;
|
|
7020
|
+
downloadPdf(id: number, options?: RequestOptions): Promise<Blob>;
|
|
7021
|
+
getByPaymentToken(token: string): Promise<SBInvoice>;
|
|
7022
|
+
}
|
|
7023
|
+
|
|
7024
|
+
declare enum ConnectedAccountStatus {
|
|
7025
|
+
PENDING = "PENDING",
|
|
7026
|
+
RESTRICTED = "RESTRICTED",
|
|
7027
|
+
ENABLED = "ENABLED",
|
|
7028
|
+
DISABLED = "DISABLED",
|
|
7029
|
+
REJECTED = "REJECTED"
|
|
7030
|
+
}
|
|
7031
|
+
declare enum ConnectedAccountType {
|
|
7032
|
+
EXPRESS = "EXPRESS",
|
|
7033
|
+
STANDARD = "STANDARD",
|
|
7034
|
+
CUSTOM = "CUSTOM"
|
|
7035
|
+
}
|
|
7036
|
+
interface SBConnectedAccount extends SBEntity, SBTimestamps {
|
|
7037
|
+
businessId: number;
|
|
7038
|
+
stripeAccountId?: string;
|
|
7039
|
+
accountType: ConnectedAccountType;
|
|
7040
|
+
status: ConnectedAccountStatus;
|
|
7041
|
+
chargesEnabled: boolean;
|
|
7042
|
+
payoutsEnabled: boolean;
|
|
7043
|
+
detailsSubmitted: boolean;
|
|
7044
|
+
businessName?: string;
|
|
7045
|
+
businessUrl?: string;
|
|
7046
|
+
country?: string;
|
|
7047
|
+
defaultCurrency?: string;
|
|
7048
|
+
email?: string;
|
|
7049
|
+
applicationFeePercent: number;
|
|
7050
|
+
applicationFeeFixedAmount: number;
|
|
7051
|
+
applicationFeeCurrency: string;
|
|
7052
|
+
disabledReason?: string;
|
|
7053
|
+
currentlyDue?: string;
|
|
7054
|
+
pastDue?: string;
|
|
7055
|
+
bankAccountLast4?: string;
|
|
7056
|
+
bankAccountBankName?: string;
|
|
7057
|
+
bankAccountCurrency?: string;
|
|
7058
|
+
bankAccountCountry?: string;
|
|
7059
|
+
bankAccountRoutingLast4?: string;
|
|
7060
|
+
stripeDashboardUrl?: string;
|
|
7061
|
+
acceptedPaymentMethods: string;
|
|
7062
|
+
defaultPaymentTermsDays: number;
|
|
7063
|
+
smsNotificationsEnabled: boolean;
|
|
7064
|
+
automaticTaxEnabled: boolean;
|
|
7065
|
+
}
|
|
7066
|
+
interface ConnectedAccountOnboardingRequest {
|
|
7067
|
+
returnUrl: string;
|
|
7068
|
+
refreshUrl: string;
|
|
7069
|
+
businessName?: string;
|
|
7070
|
+
email?: string;
|
|
7071
|
+
country?: string;
|
|
7072
|
+
businessUrl?: string;
|
|
7073
|
+
}
|
|
7074
|
+
interface ConnectedAccountOnboardingResult {
|
|
7075
|
+
onboardingUrl: string;
|
|
7076
|
+
expiresAt: string;
|
|
7077
|
+
account: SBConnectedAccount;
|
|
7078
|
+
}
|
|
7079
|
+
interface FeeConfigurationRequest {
|
|
7080
|
+
applicationFeePercent: number;
|
|
7081
|
+
applicationFeeFixedAmount: number;
|
|
7082
|
+
applicationFeeCurrency: string;
|
|
7083
|
+
}
|
|
7084
|
+
interface ConnectedAccountSettingsRequest {
|
|
7085
|
+
acceptedPaymentMethods?: string;
|
|
7086
|
+
defaultPaymentTermsDays?: number;
|
|
7087
|
+
smsNotificationsEnabled?: boolean;
|
|
7088
|
+
automaticTaxEnabled?: boolean;
|
|
7089
|
+
}
|
|
7090
|
+
|
|
7091
|
+
declare class ConnectedAccountService extends BaseService {
|
|
7092
|
+
get(options?: RequestOptions): Promise<SBConnectedAccount>;
|
|
7093
|
+
getStatus(options?: RequestOptions): Promise<SBConnectedAccount>;
|
|
7094
|
+
createOnboardingLink(data: ConnectedAccountOnboardingRequest, options?: RequestOptions): Promise<ConnectedAccountOnboardingResult>;
|
|
7095
|
+
refreshOnboardingLink(data: Pick<ConnectedAccountOnboardingRequest, "returnUrl" | "refreshUrl">, options?: RequestOptions): Promise<{
|
|
7096
|
+
url: string;
|
|
7097
|
+
}>;
|
|
7098
|
+
createLoginLink(options?: RequestOptions): Promise<{
|
|
7099
|
+
url: string;
|
|
7100
|
+
}>;
|
|
7101
|
+
updateFees(data: FeeConfigurationRequest, options?: RequestOptions): Promise<SBConnectedAccount>;
|
|
7102
|
+
updateSettings(data: ConnectedAccountSettingsRequest, options?: RequestOptions): Promise<SBConnectedAccount>;
|
|
7103
|
+
disable(options?: RequestOptions): Promise<void>;
|
|
7104
|
+
}
|
|
7105
|
+
|
|
7106
|
+
declare enum InvoicePaymentStatus {
|
|
7107
|
+
PENDING = "Pending",
|
|
7108
|
+
PROCESSING = "Processing",
|
|
7109
|
+
SUCCEEDED = "Succeeded",
|
|
7110
|
+
FAILED = "Failed",
|
|
7111
|
+
CANCELED = "Canceled",
|
|
7112
|
+
REFUNDED = "Refunded",
|
|
7113
|
+
PARTIALLY_REFUNDED = "PartiallyRefunded",
|
|
7114
|
+
DISPUTED = "Disputed",
|
|
7115
|
+
EXPIRED = "Expired"
|
|
7116
|
+
}
|
|
7117
|
+
interface SBInvoicePayment extends SBEntity, SBTimestamps {
|
|
7118
|
+
connectedAccountId: number;
|
|
7119
|
+
businessId: number;
|
|
7120
|
+
invoiceId: number;
|
|
7121
|
+
externalInvoiceId?: string;
|
|
7122
|
+
status: InvoicePaymentStatus;
|
|
7123
|
+
amount: number;
|
|
7124
|
+
tipAmount: number;
|
|
7125
|
+
applicationFeeAmount: number;
|
|
7126
|
+
netAmount: number;
|
|
7127
|
+
currency: string;
|
|
7128
|
+
stripePaymentIntentId?: string;
|
|
7129
|
+
stripeCheckoutSessionId?: string;
|
|
7130
|
+
checkoutUrl?: string;
|
|
7131
|
+
paymentMethodType?: string;
|
|
7132
|
+
paymentMethodLast4?: string;
|
|
7133
|
+
paymentMethodBrand?: string;
|
|
7134
|
+
customerEmail?: string;
|
|
7135
|
+
customerName?: string;
|
|
7136
|
+
failureCode?: string;
|
|
7137
|
+
failureMessage?: string;
|
|
7138
|
+
clientSecret?: string;
|
|
7139
|
+
paidAt?: string;
|
|
7140
|
+
}
|
|
7141
|
+
interface CheckoutLineItem {
|
|
7142
|
+
description: string;
|
|
7143
|
+
quantity: number;
|
|
7144
|
+
unitAmount: number;
|
|
7145
|
+
taxRateIds?: string[];
|
|
7146
|
+
}
|
|
7147
|
+
interface InvoicePaymentCreateRequest {
|
|
7148
|
+
invoiceId: number;
|
|
7149
|
+
amount: number;
|
|
7150
|
+
tipAmount?: number;
|
|
7151
|
+
currency?: string;
|
|
7152
|
+
customerEmail?: string;
|
|
7153
|
+
customerName?: string;
|
|
7154
|
+
successUrl?: string;
|
|
7155
|
+
cancelUrl?: string;
|
|
7156
|
+
invoiceNumber?: string;
|
|
7157
|
+
lineItems?: CheckoutLineItem[];
|
|
7158
|
+
}
|
|
7159
|
+
interface InvoicePaymentFilterRequest {
|
|
7160
|
+
status?: InvoicePaymentStatus;
|
|
7161
|
+
dateFrom?: string;
|
|
7162
|
+
dateTo?: string;
|
|
7163
|
+
page?: number;
|
|
7164
|
+
pageSize?: number;
|
|
7165
|
+
}
|
|
7166
|
+
interface SBRefund extends SBEntity, SBTimestamps {
|
|
7167
|
+
invoicePaymentId: number;
|
|
7168
|
+
stripeRefundId?: string;
|
|
7169
|
+
amount: number;
|
|
7170
|
+
currency: string;
|
|
7171
|
+
reason?: string;
|
|
7172
|
+
status: string;
|
|
7173
|
+
failureReason?: string;
|
|
7174
|
+
notes?: string;
|
|
7175
|
+
applicationFeeReversed: boolean;
|
|
7176
|
+
}
|
|
7177
|
+
interface RefundCreateRequest {
|
|
7178
|
+
amount?: number;
|
|
7179
|
+
reason?: string;
|
|
7180
|
+
notes?: string;
|
|
7181
|
+
}
|
|
7182
|
+
interface SBDispute extends SBEntity, SBTimestamps {
|
|
7183
|
+
invoicePaymentId: number;
|
|
7184
|
+
stripeDisputeId?: string;
|
|
7185
|
+
amount: number;
|
|
7186
|
+
currency: string;
|
|
7187
|
+
reason?: string;
|
|
7188
|
+
status: string;
|
|
7189
|
+
evidenceDueBy?: string;
|
|
7190
|
+
isEvidenceSubmitted: boolean;
|
|
7191
|
+
}
|
|
7192
|
+
interface DisputeEvidenceRequest {
|
|
7193
|
+
uncategorizedText?: string;
|
|
7194
|
+
customerCommunication?: string;
|
|
7195
|
+
serviceDocumentation?: string;
|
|
7196
|
+
}
|
|
7197
|
+
interface LedgerSummary {
|
|
7198
|
+
grossRevenue: number;
|
|
7199
|
+
smartbillsFees: number;
|
|
7200
|
+
stripeProcessingFees: number;
|
|
7201
|
+
refundsIssued: number;
|
|
7202
|
+
disputedAmount: number;
|
|
7203
|
+
netRevenue: number;
|
|
7204
|
+
currency: string;
|
|
7205
|
+
periodStart: string;
|
|
7206
|
+
periodEnd: string;
|
|
7207
|
+
}
|
|
7208
|
+
interface LedgerEntry {
|
|
7209
|
+
id: number;
|
|
7210
|
+
type: string;
|
|
7211
|
+
description: string;
|
|
7212
|
+
invoicePaymentId?: number;
|
|
7213
|
+
grossAmount: number;
|
|
7214
|
+
feeAmount: number;
|
|
7215
|
+
netAmount: number;
|
|
7216
|
+
currency: string;
|
|
7217
|
+
status: string;
|
|
7218
|
+
stripeId?: string;
|
|
7219
|
+
createdAt: string;
|
|
7220
|
+
}
|
|
7221
|
+
interface Payout {
|
|
7222
|
+
stripePayoutId: string;
|
|
7223
|
+
amount: number;
|
|
7224
|
+
currency: string;
|
|
7225
|
+
status: string;
|
|
7226
|
+
arrivalDate?: string;
|
|
7227
|
+
bankAccountLast4?: string;
|
|
7228
|
+
description?: string;
|
|
7229
|
+
createdAt: string;
|
|
7230
|
+
}
|
|
7231
|
+
interface PagedResult<T> {
|
|
7232
|
+
items: T[];
|
|
7233
|
+
totalCount: number;
|
|
7234
|
+
page: number;
|
|
7235
|
+
pageSize: number;
|
|
7236
|
+
totalPages: number;
|
|
7237
|
+
}
|
|
7238
|
+
|
|
7239
|
+
declare class InvoicePaymentService extends BaseService {
|
|
7240
|
+
create(data: InvoicePaymentCreateRequest, options?: RequestOptions): Promise<SBInvoicePayment>;
|
|
7241
|
+
list(params?: InvoicePaymentFilterRequest, options?: RequestOptions): Promise<PagedResult<SBInvoicePayment>>;
|
|
7242
|
+
getById(id: number, options?: RequestOptions): Promise<SBInvoicePayment>;
|
|
7243
|
+
cancel(id: number, options?: RequestOptions): Promise<SBInvoicePayment>;
|
|
7244
|
+
createRefund(paymentId: number, data: RefundCreateRequest, options?: RequestOptions): Promise<SBRefund>;
|
|
7245
|
+
listRefunds(paymentId: number, options?: RequestOptions): Promise<SBRefund[]>;
|
|
7246
|
+
listDisputes(params?: {
|
|
7247
|
+
page?: number;
|
|
7248
|
+
pageSize?: number;
|
|
7249
|
+
}, options?: RequestOptions): Promise<SBDispute[]>;
|
|
7250
|
+
submitEvidence(disputeId: number, data: DisputeEvidenceRequest, options?: RequestOptions): Promise<SBDispute>;
|
|
7251
|
+
acceptDispute(disputeId: number, options?: RequestOptions): Promise<SBDispute>;
|
|
7252
|
+
getLedgerSummary(from: string, to: string, options?: RequestOptions): Promise<LedgerSummary>;
|
|
7253
|
+
getLedgerEntries(params?: Record<string, unknown>, options?: RequestOptions): Promise<LedgerEntry[]>;
|
|
7254
|
+
getPayouts(params?: Record<string, unknown>, options?: RequestOptions): Promise<Payout[]>;
|
|
7255
|
+
exportLedgerCsv(from: string, to: string, options?: RequestOptions): Promise<Blob>;
|
|
7256
|
+
}
|
|
7257
|
+
|
|
7258
|
+
declare enum PayoutStatus {
|
|
7259
|
+
PAID = "paid",
|
|
7260
|
+
PENDING = "pending",
|
|
7261
|
+
IN_TRANSIT = "in_transit",
|
|
7262
|
+
CANCELED = "canceled",
|
|
7263
|
+
FAILED = "failed"
|
|
7264
|
+
}
|
|
7265
|
+
declare enum PayoutInterval {
|
|
7266
|
+
DAILY = "daily",
|
|
7267
|
+
WEEKLY = "weekly",
|
|
7268
|
+
MONTHLY = "monthly",
|
|
7269
|
+
MANUAL = "manual"
|
|
7270
|
+
}
|
|
7271
|
+
interface SBPayout {
|
|
7272
|
+
id: string;
|
|
7273
|
+
amount: number;
|
|
7274
|
+
currency: string;
|
|
7275
|
+
status: string;
|
|
7276
|
+
arrivalDate: string;
|
|
7277
|
+
method?: string;
|
|
7278
|
+
description?: string;
|
|
7279
|
+
failureCode?: string;
|
|
7280
|
+
failureMessage?: string;
|
|
7281
|
+
createdAt: string;
|
|
7282
|
+
}
|
|
7283
|
+
interface PayoutListRequest {
|
|
7284
|
+
page?: number;
|
|
7285
|
+
pageSize?: number;
|
|
7286
|
+
startingAfter?: string;
|
|
7287
|
+
endingBefore?: string;
|
|
7288
|
+
}
|
|
7289
|
+
interface PayoutListResponse {
|
|
7290
|
+
data: SBPayout[];
|
|
7291
|
+
hasMore: boolean;
|
|
7292
|
+
}
|
|
7293
|
+
interface CreatePayoutRequest {
|
|
7294
|
+
amount: number;
|
|
7295
|
+
currency?: string;
|
|
7296
|
+
description?: string;
|
|
7297
|
+
}
|
|
7298
|
+
interface PayoutSchedule {
|
|
7299
|
+
interval: string;
|
|
7300
|
+
delayDays?: number;
|
|
7301
|
+
weeklyAnchor?: string;
|
|
7302
|
+
monthlyAnchor?: number;
|
|
7303
|
+
}
|
|
7304
|
+
interface UpdatePayoutScheduleRequest {
|
|
7305
|
+
interval: string;
|
|
7306
|
+
weeklyAnchor?: string;
|
|
7307
|
+
monthlyAnchor?: number;
|
|
7308
|
+
delayDays?: number;
|
|
7309
|
+
}
|
|
7310
|
+
interface BalanceAmount {
|
|
7311
|
+
amount: number;
|
|
7312
|
+
currency: string;
|
|
7313
|
+
}
|
|
7314
|
+
interface SBBalance {
|
|
7315
|
+
available: BalanceAmount[];
|
|
7316
|
+
pending: BalanceAmount[];
|
|
7317
|
+
}
|
|
7318
|
+
|
|
7319
|
+
declare class PayoutService extends BaseService {
|
|
7320
|
+
list(params?: PayoutListRequest, options?: RequestOptions): Promise<PayoutListResponse>;
|
|
7321
|
+
create(data: CreatePayoutRequest, options?: RequestOptions): Promise<SBPayout>;
|
|
7322
|
+
getSchedule(options?: RequestOptions): Promise<PayoutSchedule>;
|
|
7323
|
+
updateSchedule(data: UpdatePayoutScheduleRequest, options?: RequestOptions): Promise<PayoutSchedule>;
|
|
7324
|
+
getBalance(options?: RequestOptions): Promise<SBBalance>;
|
|
7325
|
+
}
|
|
7326
|
+
|
|
6639
7327
|
/**
|
|
6640
7328
|
* Configuration options for initializing a {@link SmartbillsClient}.
|
|
6641
7329
|
*/
|
|
@@ -6714,7 +7402,12 @@ declare class SmartbillsClient {
|
|
|
6714
7402
|
readonly employees: EmployeeService;
|
|
6715
7403
|
readonly attachments: AttachmentService;
|
|
6716
7404
|
readonly emailForwarding: EmailForwardingService;
|
|
7405
|
+
readonly authorizedSenders: AuthorizedSenderService;
|
|
6717
7406
|
readonly loyalty: LoyaltyService;
|
|
7407
|
+
readonly invoices: InvoiceService;
|
|
7408
|
+
readonly connectedAccounts: ConnectedAccountService;
|
|
7409
|
+
readonly invoicePayments: InvoicePaymentService;
|
|
7410
|
+
readonly payouts: PayoutService;
|
|
6718
7411
|
/**
|
|
6719
7412
|
* Creates a new Smartbills client instance.
|
|
6720
7413
|
*
|
|
@@ -6904,5 +7597,7 @@ declare function isConflictError(error: unknown): error is SmartbillsConflictErr
|
|
|
6904
7597
|
declare function isQuotaError(error: unknown): error is SmartbillsQuotaError;
|
|
6905
7598
|
declare function isRetryableError(error: unknown): boolean;
|
|
6906
7599
|
|
|
6907
|
-
|
|
6908
|
-
|
|
7600
|
+
declare function uploadFileToS3(uploadUrl: string, file: Blob | ArrayBuffer, contentType: string): Promise<void>;
|
|
7601
|
+
|
|
7602
|
+
export { AccessToken, AppInstallationService, AppInstallationStatus, ApprobationService, AttachmentService, AuthorizedSenderService, BaseService, BillApprovalStatus, BillApprovalType, BillService, BillStatus, BillingService, BusinessService, BusinessUserService, CategoryService, CheckoutDocumentType, CheckoutPaymentStatus, CheckoutService, CheckoutStatus, ConnectAccountStatus, ConnectService, ConnectedAccountService, ConnectedAccountStatus, ConnectedAccountType, CustomerService, DEFAULT_BASE_URL, DepartmentService, EmailAccountService, EmailAccountStatus, EmailAccountSyncStatus, EmailAccountType, EmailForwardingService, EmployeeService, ErrorCode, ExpenseItemStatus, ExpenseJobService, ExpenseReportAuditLogAction, ExpenseReportExpenseService, ExpenseReportPaymentService, ExpenseReportService, ExpenseReportStatus, ExpenseService, ExpenseSplitType, HttpClient, IntegrationService, IntegrationStatus, InvitationService, InvitationStatus, InvoicePaymentService, InvoicePaymentStatus, InvoiceReminderFrequency, InvoiceReminderTiming, InvoiceService, InvoiceStatus, LocationService, LoyaltyService, MailboxType, MembershipRole, MembershipService, NotificationService, NotificationType, PayerType, PaymentMethodService, PayoutInterval, PayoutService, PayoutStatus, ProductService, PromoCodeService, ReceiptPaymentStatus, ReceiptPaymentType, ReceiptService, ReceiptSource, ReceiptType, ReportingService, SmartbillsApiError, SmartbillsAuthenticationError, SmartbillsClient, SmartbillsConflictError, SmartbillsError, SmartbillsNetworkError, SmartbillsNotFoundError, SmartbillsPermissionError, SmartbillsQuotaError, SmartbillsRateLimitError, SmartbillsValidationError, SyncTriggerType, TableService, TaxService, TransactionService, TransactionType, UserService, VendorConnectionService, VendorConnectionStatus, VendorService, WorkflowService, WorkflowTriggerType, isApiError, isAuthenticationError, isConflictError, isNetworkError, isNotFoundError, isPermissionError, isQuotaError, isRateLimitError, isRetryableError, isSmartbillsError, isValidationError, uploadFileToS3 };
|
|
7603
|
+
export type { AddExpenseToReportRequest, AddExpensesToReportBatchRequest, ApprobationListRequest, AssociateExpenseReportUpdateRequest, AttachmentListRequest, AttachmentRenameRequest, BalanceAmount, BillApprovalRequest, BillBatchUpdateRequest, BillCancelRequest, BillCreateRequest, BillListRequest, BillMarkPaidRequest, BillReschedulePaymentRequest, BillRetryPaymentRequest, BillSchedulePaymentRequest, BillSubmitForApprovalRequest, BillTransitionRequest, BillUpdateRequest, BillingInvoiceListRequest, BulkApproveApprobationsRequest, BulkAssignCategoryRequest, BulkAssignExpenseReportRequest, BulkAssignPayerTypeRequest, BulkAssignReportCategoryRequest, BulkAssignVendorRequest, BulkBillApproveRequest, BulkBillCancelPaymentRequest, BulkBillDeleteRequest, BulkBillMarkPaidRequest, BulkBillRemindRequest, BulkBillRetryPaymentRequest, BulkBillSchedulePaymentRequest, BulkBillUnscheduleRequest, BulkBillUpdateRequest, BulkDeleteExpenseReportsRequest, BulkDeleteExpensesRequest, BulkDeleteVendorsRequest, BulkMarkReimbursedApprobationsRequest, BulkPlanReimbursementApprobationsRequest, BulkRecallExpenseReportsRequest, BulkRejectApprobationsRequest, BulkRemoveReportExpensesRequest, BulkRequestChangesApprobationsRequest, BulkRevertToReviewApprobationsRequest, BulkSetNoteRequest, BulkSubmitExpenseReportsRequest, BusinessBatchUpdateRequest, BusinessBrandCreateRequest, BusinessBrandUpdateRequest, BusinessCreateRequest, BusinessUpdateRequest, CategoryCreateRequest, CategoryListRequest, CategoryUpdateRequest, CheckoutLineItem, ConfirmUploadFileRequest, ConfirmUploadRequest, ConnectOnboardingRequest, ConnectedAccountOnboardingRequest, ConnectedAccountOnboardingResult, ConnectedAccountSettingsRequest, CreateAuthorizedSenderRequest, CreateCheckoutPaymentIntentRequest, CreatePaymentMethodRequest, CreatePayoutRequest, CreatePortalSessionRequest, CredentialProvider, CustomerCreateRequest, CustomerListRequest, CustomerUpdateRequest, DepartmentCreateRequest, DepartmentListRequest, DepartmentUpdateRequest, DisputeEvidenceRequest, EditExpenseInReportRequest, EmailAccountImapCreateRequest, EmailAccountListRequest, EmailAccountOAuth2CreateRequest, EmailAccountUpdateRequest, EmailForwardingConfigRequest, EmployeeBulkAssignManagerRequest, EmployeeCreateRequest, EmployeeListRequest, EmployeeSetManagerRequest, EmployeeUpdateRequest, ErrorCodeType, ExpenseAttachmentDownloadRequest, ExpenseCategoryUpdateRequest, ExpenseExportRequest, ExpenseJobListRequest, ExpenseListRequest, ExpenseNoteUpdateRequest, ExpenseOverTimeRequest, ExpenseReportApproveRequest, ExpenseReportAssignLedgerAccountRequest, ExpenseReportCommentCreateRequest, ExpenseReportCreateRequest, ExpenseReportExportRequest, ExpenseReportListRequest, ExpenseReportPartialReimburseRequest, ExpenseReportPlanReimbursementRequest, ExpenseReportRecallRequest, ExpenseReportReimburseRequest, ExpenseReportRejectRequest, ExpenseReportRequestChangesRequest, ExpenseReportUpdateRequest, ExpenseReviewUpdateRequest, ExpenseSplitItem, ExpenseSplitLineItem, ExpenseSplitRequest, FeeConfigurationRequest, HistoricalSyncRequest, HttpClientConfig, IntegrationCallbackRequest, IntegrationListRequest, InvitationCreateRequest, InvitationListRequest, InvoiceCreateRequest, InvoiceListRequest, InvoicePaymentCreateRequest, InvoicePaymentFilterRequest, InvoiceReminder, InvoiceSummary, InvoiceUpdateRequest, LedgerEntry, LedgerSummary, LocationBatchCreateRequest, LocationBatchUpdateRequest, LocationCreateRequest, LocationImageUrlRequest, LocationListRequest, LocationUpdateRequest, LoyaltyProgramCreateRequest, LoyaltyProgramListRequest, LoyaltyProgramStatus, LoyaltyProgramUpdateRequest, LoyaltyRewardType, LoyaltyRuleType, MailboxUpdateRequest, MembershipCreateRequest, MembershipEmailInviteRequest, MembershipListRequest, MembershipRoleUpdateRequest, NotificationListRequest, PagedResult, PaginateBusinessRequest, PaginateTransactionRequest, PaginationRequest, PaymentMethodListRequest, Payout, PayoutListRequest, PayoutListResponse, PayoutSchedule, PresignedUploadFileRequest, PresignedUploadFileResponse, PresignedUploadRequest, PresignedUploadResponse, ProductCreateRequest, ProductListRequest, ProductUpdateRequest, ReceiptCreateRequest, ReceiptListRequest, ReceiptOCRCreateRequest, ReceiptUpdateRequest, RefundCheckoutPaymentRequest, RefundCreateRequest, ReportDateRange, ReportingRequest, RequestOptions, SBAddress, SBAppInstallation, SBApprobationSummary, SBAttachment, SBAuthorizedSender, SBBalance, SBBatchResponse, SBBill, SBBillApproval, SBBillApprovalHistoryItem, SBBillAttachment, SBBillBulkActionResponse, SBBillLineItem, SBBillStatusSummary, SBBillTax, SBBillTransitionResponse, SBBillingAddress, SBBillingInvoice, SBBillingInvoiceLine, SBBillingPaymentMethod, SBBillingPlan, SBBillingUsage, SBBulkActionResponse, SBBulkActionResult, SBBusiness, SBBusinessBrand, SBBusinessPlan, SBCategory, SBCategoryRuleData, SBCheckoutLineItem, SBCheckoutPayment, SBCheckoutPaymentDispute, SBCheckoutPaymentRefund, SBCheckoutTax, SBCheckoutTransactionResponse, SBConnectAccount, SBConnectAccountRequirements, SBConnectDashboardResponse, SBConnectOnboardingResponse, SBConnectedAccount, SBCoordinate, SBCreateCheckoutPaymentIntentResponse, SBCustomer, SBDepartment, SBDepartmentMember, SBDispute, SBDowngradeValidation, SBEmailAccount, SBEmailAccountAuthorizeResponse, SBEmailForwardingConfig, SBEmployee, SBEmployeeCategoryBreakdownReport, SBEmployeeDepartment, SBEmployeeLocation, SBEmployeeManager, SBEntity, SBExpenseBulkActionResponse, SBExpenseByCategoryReport, SBExpenseByDayReport, SBExpenseByEmployeeReport, SBExpenseByVendorReport, SBExpenseJob, SBExpenseMonthlySummary, SBExpenseOverTimeDataPoint, SBExpenseOverTimeReport, SBExpenseReport, SBExpenseReportAuditLogEntry, SBExpenseReportBulkActionResponse, SBExpenseReportComment, SBExpenseReportItem, SBExpenseReportSummary, SBExpenseReportTimelineEntry, SBExpenseValidateResponse, SBFileDownloadResponse, SBHistoricalSyncResponse, SBIntegration, SBIntegrationAuthorizeResponse, SBInvitation, SBInvoice, SBInvoiceCustomer, SBInvoiceLineItem, SBInvoiceLineItemTax, SBInvoicePayment, SBItemVariationRuleData, SBListResponse, SBLocation, SBLocationImage, SBLoyaltyProgram, SBLoyaltyRule, SBLoyaltyRuleBase, SBMailbox, SBMarketplaceApp, SBMembership, SBMembershipBusinessSummary, SBMembershipUserSummary, SBMerchantLedger, SBMoney, SBNotification, SBPagination, SBPaymentMethod, SBPaymentMethodBillingDetails, SBPaymentMethodSetupIntentResponse, SBPayout, SBPortalSession, SBProduct, SBProductImage, SBPromoCode, SBReceipt, SBReceiptBarcode, SBReceiptBusiness, SBReceiptCustomer, SBReceiptDiscount, SBReceiptDocument, SBReceiptFee, SBReceiptLineItem, SBReceiptPayment, SBReceiptPaymentCard, SBReceiptRefund, SBReceiptTax, SBReceiptTransaction, SBReceiptVendor, SBRefund, SBSessionTokenResponse, SBSetupIntent, SBSharedMailbox, SBSpendRuleData, SBSubscription, SBSyncSession, SBTable, SBTableColumn, SBTableRow, SBTax, SBTaxByCategoryReport, SBTaxByTypeReport, SBTaxByVendorReport, SBTaxSummaryReport, SBTimestamps, SBTransaction, SBTransactionAttachment, SBTransactionMerchant, SBTransactionTax, SBTransactionUploadResponse, SBTransactionVendor, SBUpcomingInvoice, SBUserAccount, SBValidateEmailResponse, SBValidateSharedMailboxResponse, SBVendor, SBVendorBulkActionResponse, SBVendorConnectResponse, SBVendorConnection, SBVendorImportResult, SBVisitRuleData, SBWorkflow, SBWorkflowCondition, SBWorkflowStep, SBWorkflowTestResponse, SmartbillsClientOptions, SmartbillsFieldError, SubmitDisputeEvidenceRequest, SyncSessionListRequest, TableCreateRequest, TableListRequest, TableUpdateRequest, TaxCreateRequest, TaxListRequest, TaxUpdateRequest, TransactionBatchUpdateRequest, TransactionUpdateRequest, UpdateInstallationStatusRequest, UpdatePayoutScheduleRequest, UpgradeSubscriptionRequest, UsageHistoryRequest, UserUpdateRequest, VendorBatchUpdateRequest, VendorConnectRequest, VendorCreateRequest, VendorListRequest, VendorMergeRequest, VendorUpdateRequest, WorkflowCreateRequest, WorkflowListRequest, WorkflowTestRequest, WorkflowUpdateRequest };
|