Skip to content

Commit 5f28652

Browse files
authored
Support v3 API and add v2 deprecations (#127)
1 parent 35cf9a1 commit 5f28652

21 files changed

+526
-452
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@withabound/node-sdk",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"description": "The Abound Node library provides convenient access to the Abound API from applications written in server-side JavaScript.",
55
"author": "Abound <[email protected]>",
66
"license": "MIT",

src/AboundClient.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,27 @@ export interface AboundConfig {
2727
apiVersion: ApiVersion;
2828
}
2929

30-
export type ApiVersion = "v2";
30+
export type ApiVersion = "v2" | "v3";
3131

3232
export class AboundClient {
3333
// resources
3434
accessTokens: AccessTokens;
3535
documents: Documents;
36+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
3637
expenses: Expenses;
38+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
3739
incomes: Incomes;
3840
mailings: Mailings;
41+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
3942
mileages: Mileages;
4043
payers: Payers;
44+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4145
paymentMethods: PaymentMethods;
46+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4247
taxes: Taxes;
48+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4349
taxCategories: TaxCategories;
50+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4451
taxPayments: TaxPayments;
4552
users: Users;
4653

src/resources/Documents.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface Document {
4242
}
4343

4444
export enum DocumentType {
45+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4546
ACCOUNT_STATEMENT = "accountStatement",
4647
TEN99INT = "1099int",
4748
TEN99K = "1099k",

src/resources/Expenses.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,39 @@ interface ExpensePredictions {
3838

3939
/**
4040
* See https://docs.withabound.com/reference/expenses
41+
* @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog).
4142
*/
4243
export default class Expenses extends AboundUserScopedResource<
4344
ExpenseRequest,
4445
Expense
4546
> {
4647
path = "/expenses";
4748

49+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4850
public async create(
4951
userId: string,
5052
expenses: ExpenseRequest[]
5153
): Promise<AboundBulkResponse<Expense>> {
5254
return super.bulkCreateForUser(userId, { expenses });
5355
}
5456

57+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
5558
public async list(
5659
userId: string,
5760
parameters?: ExpenseParameters
5861
): Promise<AboundBulkResponse<Expense>> {
5962
return super.listForUser(userId, parameters);
6063
}
6164

65+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
6266
public async retrieve(
6367
userId: string,
6468
expenseId: string
6569
): Promise<AboundResponse<Expense>> {
6670
return super.retrieveForUser(userId, expenseId);
6771
}
6872

73+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
6974
public async update(
7075
userId: string,
7176
expenseId: string,
@@ -74,6 +79,7 @@ export default class Expenses extends AboundUserScopedResource<
7479
return super.updateForUser(userId, expenseId, { expense });
7580
}
7681

82+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
7783
public async delete(
7884
userId: string,
7985
expenseId: string

src/resources/Incomes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,39 @@ export enum IncomeType {
4848

4949
/**
5050
* See https://docs.withabound.com/reference/incomes
51+
* @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog).
5152
*/
5253
export default class Incomes extends AboundUserScopedResource<
5354
IncomeRequest,
5455
Income
5556
> {
5657
path = "/incomes";
5758

59+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
5860
public async create(
5961
userId: string,
6062
incomes: IncomeRequest[]
6163
): Promise<AboundBulkResponse<Income>> {
6264
return super.bulkCreateForUser(userId, { incomes });
6365
}
6466

67+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
6568
public async list(
6669
userId: string,
6770
parameters?: IncomeParameters
6871
): Promise<AboundBulkResponse<Income>> {
6972
return super.listForUser(userId, parameters);
7073
}
7174

75+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
7276
public async retrieve(
7377
userId: string,
7478
incomeId: string
7579
): Promise<AboundResponse<Income>> {
7680
return super.retrieveForUser(userId, incomeId);
7781
}
7882

83+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
7984
public async update(
8085
userId: string,
8186
incomeId: string,
@@ -84,6 +89,7 @@ export default class Incomes extends AboundUserScopedResource<
8489
return super.updateForUser(userId, incomeId, { income });
8590
}
8691

92+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
8793
public async delete(
8894
userId: string,
8995
incomeId: string

src/resources/Mileages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,39 @@ export interface Mileage extends MileageRequest {
2323

2424
/**
2525
* See https://docs.withabound.com/reference/mileage
26+
* @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog).
2627
*/
2728
export default class Mileages extends AboundUserScopedResource<
2829
MileageRequest,
2930
Mileage
3031
> {
3132
path = "/mileage";
3233

34+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
3335
public async list(
3436
userId: string,
3537
parameters?: MileageParameters
3638
): Promise<AboundBulkResponse<Mileage>> {
3739
return super.listForUser(userId, parameters);
3840
}
3941

42+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4043
public async create(
4144
userId: string,
4245
mileages: MileageRequest[]
4346
): Promise<AboundBulkResponse<Mileage>> {
4447
return super.bulkCreateForUser(userId, { mileages });
4548
}
4649

50+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4751
public async retrieve(
4852
userId: string,
4953
mileageId: string
5054
): Promise<AboundResponse<Mileage>> {
5155
return super.retrieveForUser(userId, mileageId);
5256
}
5357

58+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
5459
public async update(
5560
userId: string,
5661
mileageId: string,
@@ -59,6 +64,7 @@ export default class Mileages extends AboundUserScopedResource<
5964
return super.updateForUser(userId, mileageId, { mileage });
6065
}
6166

67+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
6268
public async delete(
6369
userId: string,
6470
mileageId: string

src/resources/PaymentMethods.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,31 @@ export enum AccountClass {
3737

3838
/**
3939
* See https://docs.withabound.com/reference/payment-methods
40+
* @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog).
4041
*/
4142
export default class PaymentMethods extends AboundUserScopedResource<
4243
PaymentMethodRequest,
4344
PaymentMethod
4445
> {
4546
path = "/paymentMethods";
4647

48+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
4749
public async create(
4850
userId: string,
4951
paymentMethod: PaymentMethodRequest
5052
): Promise<AboundResponse<PaymentMethod>> {
5153
return super.createForUser(userId, { paymentMethod });
5254
}
5355

56+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
5457
public async list(
5558
userId: string,
5659
parameters?: PaymentMethodParameters
5760
): Promise<AboundBulkResponse<PaymentMethod>> {
5861
return super.listForUser(userId, parameters);
5962
}
6063

64+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
6165
public async retrieve(
6266
userId: string,
6367
paymentMethodId: string

src/resources/TaxCategories.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { AboundResponse } from "./base/AboundResponse";
33

44
/**
55
* See https://docs.withabound.com/reference/tax-categories
6+
* @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog).
67
*/
78
export default class TaxCategories extends AboundBaseResource<never, string[]> {
89
path = "/taxCategories";
910

11+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
1012
public async retrieve(year: string): Promise<AboundResponse<string[]>> {
1113
return super.retrieveBaseResource(year);
1214
}

src/resources/TaxPayments.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,31 @@ export enum TaxPaymentDocumentType {
4646

4747
/**
4848
* See https://docs.withabound.com/reference/tax-payments
49+
* @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog).
4950
*/
5051
export default class TaxPayments extends AboundUserScopedResource<
5152
TaxPaymentRequest,
5253
TaxPayment
5354
> {
5455
path = "/taxPayments";
5556

57+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
5658
public async create(
5759
userId: string,
5860
taxPayment: TaxPaymentRequest
5961
): Promise<AboundResponse<TaxPayment>> {
6062
return super.createForUser(userId, { taxPayment });
6163
}
6264

65+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
6366
public async list(
6467
userId: string,
6568
parameters?: TaxPaymentParameters
6669
): Promise<AboundBulkResponse<TaxPayment>> {
6770
return super.listForUser(userId, parameters);
6871
}
6972

73+
/** @deprecated Our v2 API is now deprecated and will become completely unavailable on Tuesday May 16, 2023. Please consider upgrading to our v3 API as a way to prepare for the sunsetting of v2. For more detail on these product changes, what endpoints are changing in v3 and how that may affect your company, please view our [API Changelog](https://docs.withabound.com/changelog). */
7074
public async retrieve(userId: string, taxPaymentId: string) {
7175
return super.retrieveForUser(userId, taxPaymentId);
7276
}

0 commit comments

Comments
 (0)