ynab 1.21.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,18 @@
1
1
  import * as CodeGen from "./api";
2
2
  export declare class TransactionsApi extends CodeGen.TransactionsApi {
3
+ /**
4
+ * Returns budget transactions by type
5
+ * @summary List transactions
6
+ * @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
7
+ * @param {'uncategorized' | 'unapproved'} [type] - If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
8
+ * @param {number} [last_knowledge_of_server] - The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
9
+ * @param {*} [options] - Override http request options.
10
+ * @throws {RequiredError}
11
+ * @memberof TransactionsApi
12
+ */
13
+ getTransactionsByType(budget_id: string, type: "uncategorized" | "unapproved", last_knowledge_of_server?: number, options?: any): Promise<CodeGen.TransactionsResponse & {
14
+ rateLimit: string | null;
15
+ }>;
3
16
  /**
4
17
  * Creates multiple transactions. Provide a body containing a 'transactions' array, multiple transactions will be created.
5
18
  * @summary Create a single transaction or multiple transactions
@@ -9,7 +22,9 @@ export declare class TransactionsApi extends CodeGen.TransactionsApi {
9
22
  * @throws {RequiredError}
10
23
  * @memberof TransactionsApi
11
24
  */
12
- createTransactions(budget_id: string, data: CodeGen.SaveTransactionsWrapper, options?: any): Promise<CodeGen.SaveTransactionsResponse>;
25
+ createTransactions(budget_id: string, data: CodeGen.SaveTransactionsWrapper, options?: any): Promise<CodeGen.SaveTransactionsResponse & {
26
+ rateLimit: string | null;
27
+ }>;
13
28
  /**
14
29
  * Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
15
30
  * @summary Bulk create transactions
@@ -18,5 +33,7 @@ export declare class TransactionsApi extends CodeGen.TransactionsApi {
18
33
  * @param {*} [options] - Override http request options.
19
34
  * @throws {RequiredError}
20
35
  */
21
- bulkCreateTransactions(budget_id: string, transactions: CodeGen.BulkTransactions, options?: any): Promise<CodeGen.BulkResponse>;
36
+ bulkCreateTransactions(budget_id: string, transactions: CodeGen.BulkTransactions, options?: any): Promise<CodeGen.BulkResponse & {
37
+ rateLimit: string | null;
38
+ }>;
22
39
  }
@@ -17,6 +17,19 @@ var TransactionsApi = /** @class */ (function (_super) {
17
17
  function TransactionsApi() {
18
18
  return _super !== null && _super.apply(this, arguments) || this;
19
19
  }
20
+ /**
21
+ * Returns budget transactions by type
22
+ * @summary List transactions
23
+ * @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
24
+ * @param {&#39;uncategorized&#39; | &#39;unapproved&#39;} [type] - If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
25
+ * @param {number} [last_knowledge_of_server] - The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
26
+ * @param {*} [options] - Override http request options.
27
+ * @throws {RequiredError}
28
+ * @memberof TransactionsApi
29
+ */
30
+ TransactionsApi.prototype.getTransactionsByType = function (budget_id, type, last_knowledge_of_server, options) {
31
+ return CodeGen.TransactionsApiFp(this.configuration).getTransactions(budget_id, undefined, type, last_knowledge_of_server, options)();
32
+ };
20
33
  /**
21
34
  * Creates multiple transactions. Provide a body containing a 'transactions' array, multiple transactions will be created.
22
35
  * @summary Create a single transaction or multiple transactions
@@ -1,5 +1,18 @@
1
1
  import * as CodeGen from "./api";
2
2
  export declare class TransactionsApi extends CodeGen.TransactionsApi {
3
+ /**
4
+ * Returns budget transactions by type
5
+ * @summary List transactions
6
+ * @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
7
+ * @param {&#39;uncategorized&#39; | &#39;unapproved&#39;} [type] - If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
8
+ * @param {number} [last_knowledge_of_server] - The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
9
+ * @param {*} [options] - Override http request options.
10
+ * @throws {RequiredError}
11
+ * @memberof TransactionsApi
12
+ */
13
+ getTransactionsByType(budget_id: string, type: "uncategorized" | "unapproved", last_knowledge_of_server?: number, options?: any): Promise<CodeGen.TransactionsResponse & {
14
+ rateLimit: string | null;
15
+ }>;
3
16
  /**
4
17
  * Creates multiple transactions. Provide a body containing a 'transactions' array, multiple transactions will be created.
5
18
  * @summary Create a single transaction or multiple transactions
@@ -9,7 +22,9 @@ export declare class TransactionsApi extends CodeGen.TransactionsApi {
9
22
  * @throws {RequiredError}
10
23
  * @memberof TransactionsApi
11
24
  */
12
- createTransactions(budget_id: string, data: CodeGen.SaveTransactionsWrapper, options?: any): Promise<CodeGen.SaveTransactionsResponse>;
25
+ createTransactions(budget_id: string, data: CodeGen.SaveTransactionsWrapper, options?: any): Promise<CodeGen.SaveTransactionsResponse & {
26
+ rateLimit: string | null;
27
+ }>;
13
28
  /**
14
29
  * Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
15
30
  * @summary Bulk create transactions
@@ -18,5 +33,7 @@ export declare class TransactionsApi extends CodeGen.TransactionsApi {
18
33
  * @param {*} [options] - Override http request options.
19
34
  * @throws {RequiredError}
20
35
  */
21
- bulkCreateTransactions(budget_id: string, transactions: CodeGen.BulkTransactions, options?: any): Promise<CodeGen.BulkResponse>;
36
+ bulkCreateTransactions(budget_id: string, transactions: CodeGen.BulkTransactions, options?: any): Promise<CodeGen.BulkResponse & {
37
+ rateLimit: string | null;
38
+ }>;
22
39
  }
@@ -3,6 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TransactionsApi = void 0;
4
4
  const CodeGen = require("./api");
5
5
  class TransactionsApi extends CodeGen.TransactionsApi {
6
+ /**
7
+ * Returns budget transactions by type
8
+ * @summary List transactions
9
+ * @param {string} budget_id - The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget).
10
+ * @param {&#39;uncategorized&#39; | &#39;unapproved&#39;} [type] - If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
11
+ * @param {number} [last_knowledge_of_server] - The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
12
+ * @param {*} [options] - Override http request options.
13
+ * @throws {RequiredError}
14
+ * @memberof TransactionsApi
15
+ */
16
+ getTransactionsByType(budget_id, type, last_knowledge_of_server, options) {
17
+ return CodeGen.TransactionsApiFp(this.configuration).getTransactions(budget_id, undefined, type, last_knowledge_of_server, options)();
18
+ }
6
19
  /**
7
20
  * Creates multiple transactions. Provide a body containing a 'transactions' array, multiple transactions will be created.
8
21
  * @summary Create a single transaction or multiple transactions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ynab",
3
- "version": "1.21.0",
3
+ "version": "1.27.0",
4
4
  "description": "YNAB API Javascript (Node) Library",
5
5
  "author": "You Need a Budget, LLC",
6
6
  "keywords": [
@@ -49,8 +49,5 @@
49
49
  "typescript": "^3.9.7",
50
50
  "webpack": "^4.44.1",
51
51
  "webpack-cli": "^3.3.12"
52
- },
53
- "engines": {
54
- "npm": "^5.2.0"
55
52
  }
56
53
  }