ynab 2.0.0-rc.1 → 2.2.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.
Files changed (90) hide show
  1. package/README.md +2 -2
  2. package/dist/apis/CategoriesApi.d.ts +16 -1
  3. package/dist/apis/CategoriesApi.js +42 -0
  4. package/dist/apis/CustomTransactionsApi.d.ts +1 -1
  5. package/dist/apis/TransactionsApi.d.ts +4 -4
  6. package/dist/apis/index.d.ts +0 -1
  7. package/dist/apis/index.js +5 -2
  8. package/dist/browser/ynab.js +1 -1
  9. package/dist/esm/apis/CategoriesApi.d.ts +16 -1
  10. package/dist/esm/apis/CategoriesApi.js +65 -1
  11. package/dist/esm/apis/CustomTransactionsApi.d.ts +1 -1
  12. package/dist/esm/apis/index.d.ts +0 -1
  13. package/dist/esm/apis/index.js +0 -1
  14. package/dist/esm/models/Category.d.ts +0 -1
  15. package/dist/esm/models/Category.js +0 -1
  16. package/dist/esm/models/CategoryGoalType.d.ts +25 -0
  17. package/dist/esm/models/CategoryGoalType.js +29 -0
  18. package/dist/esm/models/HybridTransaction.d.ts +9 -30
  19. package/dist/esm/models/HybridTransaction.js +7 -26
  20. package/dist/esm/models/PatchCategoryWrapper.d.ts +32 -0
  21. package/dist/esm/models/PatchCategoryWrapper.js +44 -0
  22. package/dist/esm/models/SaveCategory.d.ts +43 -0
  23. package/dist/esm/models/SaveCategory.js +47 -0
  24. package/dist/esm/models/SaveTransaction.d.ts +8 -28
  25. package/dist/esm/models/SaveTransaction.js +6 -24
  26. package/dist/esm/models/SaveTransactionWithId.d.ts +8 -28
  27. package/dist/esm/models/SaveTransactionWithId.js +6 -24
  28. package/dist/esm/models/SaveTransactionWithOptionalFields.d.ts +8 -28
  29. package/dist/esm/models/SaveTransactionWithOptionalFields.js +6 -24
  30. package/dist/esm/models/SaveTransactionWithOptionalFieldsFlagColor.d.ts +25 -0
  31. package/dist/esm/models/SaveTransactionWithOptionalFieldsFlagColor.js +29 -0
  32. package/dist/esm/models/ScheduledTransactionDetail.d.ts +4 -16
  33. package/dist/esm/models/ScheduledTransactionDetail.js +3 -14
  34. package/dist/esm/models/ScheduledTransactionSummary.d.ts +4 -16
  35. package/dist/esm/models/ScheduledTransactionSummary.js +3 -14
  36. package/dist/esm/models/ScheduledTransactionSummaryFlagColor.d.ts +25 -0
  37. package/dist/esm/models/ScheduledTransactionSummaryFlagColor.js +29 -0
  38. package/dist/esm/models/TransactionClearedStatus.d.ts +24 -0
  39. package/dist/esm/models/TransactionClearedStatus.js +31 -0
  40. package/dist/esm/models/TransactionDetail.d.ts +9 -30
  41. package/dist/esm/models/TransactionDetail.js +7 -26
  42. package/dist/esm/models/TransactionFlagColor.d.ts +27 -0
  43. package/dist/esm/models/TransactionFlagColor.js +34 -0
  44. package/dist/esm/models/TransactionSummary.d.ts +9 -30
  45. package/dist/esm/models/TransactionSummary.js +7 -26
  46. package/dist/esm/models/TransactionSummaryDebtTransactionType.d.ts +25 -0
  47. package/dist/esm/models/TransactionSummaryDebtTransactionType.js +29 -0
  48. package/dist/esm/models/index.d.ts +4 -0
  49. package/dist/esm/models/index.js +4 -0
  50. package/dist/index.js +5 -1
  51. package/dist/models/AccountType.d.ts +1 -1
  52. package/dist/models/Category.d.ts +1 -2
  53. package/dist/models/Category.js +0 -1
  54. package/dist/models/CategoryGoalType.d.ts +25 -0
  55. package/dist/models/CategoryGoalType.js +36 -0
  56. package/dist/models/HybridTransaction.d.ts +11 -32
  57. package/dist/models/HybridTransaction.js +8 -27
  58. package/dist/models/HybridTransactionAllOf.d.ts +1 -1
  59. package/dist/models/PatchCategoryWrapper.d.ts +32 -0
  60. package/dist/models/PatchCategoryWrapper.js +51 -0
  61. package/dist/models/SaveCategory.d.ts +43 -0
  62. package/dist/models/SaveCategory.js +54 -0
  63. package/dist/models/SaveTransaction.d.ts +8 -28
  64. package/dist/models/SaveTransaction.js +7 -25
  65. package/dist/models/SaveTransactionWithId.d.ts +8 -28
  66. package/dist/models/SaveTransactionWithId.js +7 -25
  67. package/dist/models/SaveTransactionWithOptionalFields.d.ts +8 -28
  68. package/dist/models/SaveTransactionWithOptionalFields.js +7 -25
  69. package/dist/models/SaveTransactionWithOptionalFieldsFlagColor.d.ts +25 -0
  70. package/dist/models/SaveTransactionWithOptionalFieldsFlagColor.js +36 -0
  71. package/dist/models/ScheduledTransactionDetail.d.ts +5 -17
  72. package/dist/models/ScheduledTransactionDetail.js +4 -15
  73. package/dist/models/ScheduledTransactionSummary.d.ts +5 -17
  74. package/dist/models/ScheduledTransactionSummary.js +4 -15
  75. package/dist/models/ScheduledTransactionSummaryFlagColor.d.ts +25 -0
  76. package/dist/models/ScheduledTransactionSummaryFlagColor.js +36 -0
  77. package/dist/models/TransactionClearedStatus.d.ts +24 -0
  78. package/dist/models/TransactionClearedStatus.js +37 -0
  79. package/dist/models/TransactionDetail.d.ts +10 -31
  80. package/dist/models/TransactionDetail.js +8 -27
  81. package/dist/models/TransactionFlagColor.d.ts +27 -0
  82. package/dist/models/TransactionFlagColor.js +40 -0
  83. package/dist/models/TransactionSummary.d.ts +10 -31
  84. package/dist/models/TransactionSummary.js +8 -27
  85. package/dist/models/TransactionSummaryDebtTransactionType.d.ts +25 -0
  86. package/dist/models/TransactionSummaryDebtTransactionType.js +36 -0
  87. package/dist/models/index.d.ts +4 -0
  88. package/dist/models/index.js +9 -1
  89. package/dist/runtime.d.ts +9 -9
  90. package/package.json +6 -7
@@ -13,26 +13,8 @@
13
13
  */
14
14
  import { exists } from '../runtime';
15
15
  import { SubTransactionFromJSON, SubTransactionToJSON, } from './SubTransaction';
16
- /**
17
- * @export
18
- */
19
- export var TransactionDetailClearedEnum = {
20
- Cleared: 'cleared',
21
- Uncleared: 'uncleared',
22
- Reconciled: 'reconciled'
23
- };
24
- /**
25
- * @export
26
- */
27
- export var TransactionDetailFlagColorEnum = {
28
- Red: 'red',
29
- Orange: 'orange',
30
- Yellow: 'yellow',
31
- Green: 'green',
32
- Blue: 'blue',
33
- Purple: 'purple',
34
- Null: 'null'
35
- };
16
+ import { TransactionClearedStatusFromJSON, TransactionClearedStatusToJSON, } from './TransactionClearedStatus';
17
+ import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
36
18
  /**
37
19
  * @export
38
20
  */
@@ -42,10 +24,9 @@ export var TransactionDetailDebtTransactionTypeEnum = {
42
24
  Fee: 'fee',
43
25
  Interest: 'interest',
44
26
  Escrow: 'escrow',
45
- BalancedAdjustment: 'balancedAdjustment',
27
+ BalanceAdjustment: 'balanceAdjustment',
46
28
  Credit: 'credit',
47
29
  Charge: 'charge',
48
- Null: 'null'
49
30
  };
50
31
  /**
51
32
  * Check if a given object implements the TransactionDetail interface.
@@ -75,9 +56,9 @@ export function TransactionDetailFromJSONTyped(json, ignoreDiscriminator) {
75
56
  'date': json['date'],
76
57
  'amount': json['amount'],
77
58
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
78
- 'cleared': json['cleared'],
59
+ 'cleared': TransactionClearedStatusFromJSON(json['cleared']),
79
60
  'approved': json['approved'],
80
- 'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
61
+ 'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
81
62
  'account_id': json['account_id'],
82
63
  'payee_id': !exists(json, 'payee_id') ? undefined : json['payee_id'],
83
64
  'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
@@ -107,9 +88,9 @@ export function TransactionDetailToJSON(value) {
107
88
  'date': value.date,
108
89
  'amount': value.amount,
109
90
  'memo': value.memo,
110
- 'cleared': value.cleared,
91
+ 'cleared': TransactionClearedStatusToJSON(value.cleared),
111
92
  'approved': value.approved,
112
- 'flag_color': value.flag_color,
93
+ 'flag_color': TransactionFlagColorToJSON(value.flag_color),
113
94
  'account_id': value.account_id,
114
95
  'payee_id': value.payee_id,
115
96
  'category_id': value.category_id,
@@ -0,0 +1,27 @@
1
+ /**
2
+ * YNAB API Endpoints
3
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The transaction flag
14
+ * @export
15
+ */
16
+ export declare const TransactionFlagColor: {
17
+ readonly Red: "red";
18
+ readonly Orange: "orange";
19
+ readonly Yellow: "yellow";
20
+ readonly Green: "green";
21
+ readonly Blue: "blue";
22
+ readonly Purple: "purple";
23
+ };
24
+ export declare type TransactionFlagColor = typeof TransactionFlagColor[keyof typeof TransactionFlagColor];
25
+ export declare function TransactionFlagColorFromJSON(json: any): TransactionFlagColor;
26
+ export declare function TransactionFlagColorFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionFlagColor;
27
+ export declare function TransactionFlagColorToJSON(value?: TransactionFlagColor | null): any;
@@ -0,0 +1,34 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * YNAB API Endpoints
5
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * The transaction flag
16
+ * @export
17
+ */
18
+ export var TransactionFlagColor = {
19
+ Red: 'red',
20
+ Orange: 'orange',
21
+ Yellow: 'yellow',
22
+ Green: 'green',
23
+ Blue: 'blue',
24
+ Purple: 'purple',
25
+ };
26
+ export function TransactionFlagColorFromJSON(json) {
27
+ return TransactionFlagColorFromJSONTyped(json, false);
28
+ }
29
+ export function TransactionFlagColorFromJSONTyped(json, ignoreDiscriminator) {
30
+ return json;
31
+ }
32
+ export function TransactionFlagColorToJSON(value) {
33
+ return value;
34
+ }
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
13
+ import type { TransactionFlagColor } from './TransactionFlagColor';
12
14
  /**
13
15
  *
14
16
  * @export
@@ -40,11 +42,11 @@ export interface TransactionSummary {
40
42
  */
41
43
  memo?: string | null;
42
44
  /**
43
- * The cleared status of the transaction
44
- * @type {string}
45
+ *
46
+ * @type {TransactionClearedStatus}
45
47
  * @memberof TransactionSummary
46
48
  */
47
- cleared: TransactionSummaryClearedEnum;
49
+ cleared: TransactionClearedStatus;
48
50
  /**
49
51
  * Whether or not the transaction is approved
50
52
  * @type {boolean}
@@ -52,11 +54,11 @@ export interface TransactionSummary {
52
54
  */
53
55
  approved: boolean;
54
56
  /**
55
- * The transaction flag
56
- * @type {string}
57
+ *
58
+ * @type {TransactionFlagColor}
57
59
  * @memberof TransactionSummary
58
60
  */
59
- flag_color?: TransactionSummaryFlagColorEnum;
61
+ flag_color?: TransactionFlagColor | null;
60
62
  /**
61
63
  *
62
64
  * @type {string}
@@ -124,28 +126,6 @@ export interface TransactionSummary {
124
126
  */
125
127
  deleted: boolean;
126
128
  }
127
- /**
128
- * @export
129
- */
130
- export declare const TransactionSummaryClearedEnum: {
131
- readonly Cleared: "cleared";
132
- readonly Uncleared: "uncleared";
133
- readonly Reconciled: "reconciled";
134
- };
135
- export declare type TransactionSummaryClearedEnum = typeof TransactionSummaryClearedEnum[keyof typeof TransactionSummaryClearedEnum];
136
- /**
137
- * @export
138
- */
139
- export declare const TransactionSummaryFlagColorEnum: {
140
- readonly Red: "red";
141
- readonly Orange: "orange";
142
- readonly Yellow: "yellow";
143
- readonly Green: "green";
144
- readonly Blue: "blue";
145
- readonly Purple: "purple";
146
- readonly Null: "null";
147
- };
148
- export declare type TransactionSummaryFlagColorEnum = typeof TransactionSummaryFlagColorEnum[keyof typeof TransactionSummaryFlagColorEnum];
149
129
  /**
150
130
  * @export
151
131
  */
@@ -155,10 +135,9 @@ export declare const TransactionSummaryDebtTransactionTypeEnum: {
155
135
  readonly Fee: "fee";
156
136
  readonly Interest: "interest";
157
137
  readonly Escrow: "escrow";
158
- readonly BalancedAdjustment: "balancedAdjustment";
138
+ readonly BalanceAdjustment: "balanceAdjustment";
159
139
  readonly Credit: "credit";
160
140
  readonly Charge: "charge";
161
- readonly Null: "null";
162
141
  };
163
142
  export declare type TransactionSummaryDebtTransactionTypeEnum = typeof TransactionSummaryDebtTransactionTypeEnum[keyof typeof TransactionSummaryDebtTransactionTypeEnum];
164
143
  /**
@@ -12,26 +12,8 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { exists } from '../runtime';
15
- /**
16
- * @export
17
- */
18
- export var TransactionSummaryClearedEnum = {
19
- Cleared: 'cleared',
20
- Uncleared: 'uncleared',
21
- Reconciled: 'reconciled'
22
- };
23
- /**
24
- * @export
25
- */
26
- export var TransactionSummaryFlagColorEnum = {
27
- Red: 'red',
28
- Orange: 'orange',
29
- Yellow: 'yellow',
30
- Green: 'green',
31
- Blue: 'blue',
32
- Purple: 'purple',
33
- Null: 'null'
34
- };
15
+ import { TransactionClearedStatusFromJSON, TransactionClearedStatusToJSON, } from './TransactionClearedStatus';
16
+ import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
35
17
  /**
36
18
  * @export
37
19
  */
@@ -41,10 +23,9 @@ export var TransactionSummaryDebtTransactionTypeEnum = {
41
23
  Fee: 'fee',
42
24
  Interest: 'interest',
43
25
  Escrow: 'escrow',
44
- BalancedAdjustment: 'balancedAdjustment',
26
+ BalanceAdjustment: 'balanceAdjustment',
45
27
  Credit: 'credit',
46
28
  Charge: 'charge',
47
- Null: 'null'
48
29
  };
49
30
  /**
50
31
  * Check if a given object implements the TransactionSummary interface.
@@ -72,9 +53,9 @@ export function TransactionSummaryFromJSONTyped(json, ignoreDiscriminator) {
72
53
  'date': json['date'],
73
54
  'amount': json['amount'],
74
55
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
75
- 'cleared': json['cleared'],
56
+ 'cleared': TransactionClearedStatusFromJSON(json['cleared']),
76
57
  'approved': json['approved'],
77
- 'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
58
+ 'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
78
59
  'account_id': json['account_id'],
79
60
  'payee_id': !exists(json, 'payee_id') ? undefined : json['payee_id'],
80
61
  'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
@@ -100,9 +81,9 @@ export function TransactionSummaryToJSON(value) {
100
81
  'date': value.date,
101
82
  'amount': value.amount,
102
83
  'memo': value.memo,
103
- 'cleared': value.cleared,
84
+ 'cleared': TransactionClearedStatusToJSON(value.cleared),
104
85
  'approved': value.approved,
105
- 'flag_color': value.flag_color,
86
+ 'flag_color': TransactionFlagColorToJSON(value.flag_color),
106
87
  'account_id': value.account_id,
107
88
  'payee_id': value.payee_id,
108
89
  'category_id': value.category_id,
@@ -0,0 +1,25 @@
1
+ /**
2
+ * YNAB API Endpoints
3
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * If the transaction is a debt/loan account transaction, the type of transaction
14
+ * @export
15
+ * @interface TransactionSummaryDebtTransactionType
16
+ */
17
+ export interface TransactionSummaryDebtTransactionType {
18
+ }
19
+ /**
20
+ * Check if a given object implements the TransactionSummaryDebtTransactionType interface.
21
+ */
22
+ export declare function instanceOfTransactionSummaryDebtTransactionType(value: object): boolean;
23
+ export declare function TransactionSummaryDebtTransactionTypeFromJSON(json: any): TransactionSummaryDebtTransactionType;
24
+ export declare function TransactionSummaryDebtTransactionTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionSummaryDebtTransactionType;
25
+ export declare function TransactionSummaryDebtTransactionTypeToJSON(value?: TransactionSummaryDebtTransactionType | null): any;
@@ -0,0 +1,29 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * YNAB API Endpoints
5
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the TransactionSummaryDebtTransactionType interface.
16
+ */
17
+ export function instanceOfTransactionSummaryDebtTransactionType(value) {
18
+ var isInstance = true;
19
+ return isInstance;
20
+ }
21
+ export function TransactionSummaryDebtTransactionTypeFromJSON(json) {
22
+ return TransactionSummaryDebtTransactionTypeFromJSONTyped(json, false);
23
+ }
24
+ export function TransactionSummaryDebtTransactionTypeFromJSONTyped(json, ignoreDiscriminator) {
25
+ return json;
26
+ }
27
+ export function TransactionSummaryDebtTransactionTypeToJSON(value) {
28
+ return value;
29
+ }
@@ -41,6 +41,7 @@ export * from './MonthDetailResponseData';
41
41
  export * from './MonthSummariesResponse';
42
42
  export * from './MonthSummariesResponseData';
43
43
  export * from './MonthSummary';
44
+ export * from './PatchCategoryWrapper';
44
45
  export * from './PatchMonthCategoryWrapper';
45
46
  export * from './PatchTransactionsWrapper';
46
47
  export * from './Payee';
@@ -57,6 +58,7 @@ export * from './PostAccountWrapper';
57
58
  export * from './PostTransactionsWrapper';
58
59
  export * from './PutTransactionWrapper';
59
60
  export * from './SaveAccount';
61
+ export * from './SaveCategory';
60
62
  export * from './SaveCategoryResponse';
61
63
  export * from './SaveCategoryResponseData';
62
64
  export * from './SaveMonthCategory';
@@ -76,8 +78,10 @@ export * from './ScheduledTransactionSummary';
76
78
  export * from './ScheduledTransactionsResponse';
77
79
  export * from './ScheduledTransactionsResponseData';
78
80
  export * from './SubTransaction';
81
+ export * from './TransactionClearedStatus';
79
82
  export * from './TransactionDetail';
80
83
  export * from './TransactionDetailAllOf';
84
+ export * from './TransactionFlagColor';
81
85
  export * from './TransactionResponse';
82
86
  export * from './TransactionResponseData';
83
87
  export * from './TransactionSummary';
@@ -43,6 +43,7 @@ export * from './MonthDetailResponseData';
43
43
  export * from './MonthSummariesResponse';
44
44
  export * from './MonthSummariesResponseData';
45
45
  export * from './MonthSummary';
46
+ export * from './PatchCategoryWrapper';
46
47
  export * from './PatchMonthCategoryWrapper';
47
48
  export * from './PatchTransactionsWrapper';
48
49
  export * from './Payee';
@@ -59,6 +60,7 @@ export * from './PostAccountWrapper';
59
60
  export * from './PostTransactionsWrapper';
60
61
  export * from './PutTransactionWrapper';
61
62
  export * from './SaveAccount';
63
+ export * from './SaveCategory';
62
64
  export * from './SaveCategoryResponse';
63
65
  export * from './SaveCategoryResponseData';
64
66
  export * from './SaveMonthCategory';
@@ -78,8 +80,10 @@ export * from './ScheduledTransactionSummary';
78
80
  export * from './ScheduledTransactionsResponse';
79
81
  export * from './ScheduledTransactionsResponseData';
80
82
  export * from './SubTransaction';
83
+ export * from './TransactionClearedStatus';
81
84
  export * from './TransactionDetail';
82
85
  export * from './TransactionDetailAllOf';
86
+ export * from './TransactionFlagColor';
83
87
  export * from './TransactionResponse';
84
88
  export * from './TransactionResponseData';
85
89
  export * from './TransactionSummary';
package/dist/index.js CHANGED
@@ -2,7 +2,11 @@
2
2
  /* tslint:disable */
3
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
4
  if (k2 === undefined) k2 = k;
5
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
6
10
  }) : (function(o, m, k, k2) {
7
11
  if (k2 === undefined) k2 = k;
8
12
  o[k2] = m[k];
@@ -28,7 +28,7 @@ export declare const AccountType: {
28
28
  readonly MedicalDebt: "medicalDebt";
29
29
  readonly OtherDebt: "otherDebt";
30
30
  };
31
- export declare type AccountType = typeof AccountType[keyof typeof AccountType];
31
+ export type AccountType = typeof AccountType[keyof typeof AccountType];
32
32
  export declare function AccountTypeFromJSON(json: any): AccountType;
33
33
  export declare function AccountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountType;
34
34
  export declare function AccountTypeToJSON(value?: AccountType | null): any;
@@ -163,9 +163,8 @@ export declare const CategoryGoalTypeEnum: {
163
163
  readonly Mf: "MF";
164
164
  readonly Need: "NEED";
165
165
  readonly Debt: "DEBT";
166
- readonly Null: "null";
167
166
  };
168
- export declare type CategoryGoalTypeEnum = typeof CategoryGoalTypeEnum[keyof typeof CategoryGoalTypeEnum];
167
+ export type CategoryGoalTypeEnum = typeof CategoryGoalTypeEnum[keyof typeof CategoryGoalTypeEnum];
169
168
  /**
170
169
  * Check if a given object implements the Category interface.
171
170
  */
@@ -24,7 +24,6 @@ exports.CategoryGoalTypeEnum = {
24
24
  Mf: 'MF',
25
25
  Need: 'NEED',
26
26
  Debt: 'DEBT',
27
- Null: 'null'
28
27
  };
29
28
  /**
30
29
  * Check if a given object implements the Category interface.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * YNAB API Endpoints
3
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending')
14
+ * @export
15
+ * @interface CategoryGoalType
16
+ */
17
+ export interface CategoryGoalType {
18
+ }
19
+ /**
20
+ * Check if a given object implements the CategoryGoalType interface.
21
+ */
22
+ export declare function instanceOfCategoryGoalType(value: object): boolean;
23
+ export declare function CategoryGoalTypeFromJSON(json: any): CategoryGoalType;
24
+ export declare function CategoryGoalTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryGoalType;
25
+ export declare function CategoryGoalTypeToJSON(value?: CategoryGoalType | null): any;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * YNAB API Endpoints
6
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CategoryGoalTypeToJSON = exports.CategoryGoalTypeFromJSONTyped = exports.CategoryGoalTypeFromJSON = exports.instanceOfCategoryGoalType = void 0;
17
+ /**
18
+ * Check if a given object implements the CategoryGoalType interface.
19
+ */
20
+ function instanceOfCategoryGoalType(value) {
21
+ let isInstance = true;
22
+ return isInstance;
23
+ }
24
+ exports.instanceOfCategoryGoalType = instanceOfCategoryGoalType;
25
+ function CategoryGoalTypeFromJSON(json) {
26
+ return CategoryGoalTypeFromJSONTyped(json, false);
27
+ }
28
+ exports.CategoryGoalTypeFromJSON = CategoryGoalTypeFromJSON;
29
+ function CategoryGoalTypeFromJSONTyped(json, ignoreDiscriminator) {
30
+ return json;
31
+ }
32
+ exports.CategoryGoalTypeFromJSONTyped = CategoryGoalTypeFromJSONTyped;
33
+ function CategoryGoalTypeToJSON(value) {
34
+ return value;
35
+ }
36
+ exports.CategoryGoalTypeToJSON = CategoryGoalTypeToJSON;
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
13
+ import type { TransactionFlagColor } from './TransactionFlagColor';
12
14
  /**
13
15
  *
14
16
  * @export
@@ -40,11 +42,11 @@ export interface HybridTransaction {
40
42
  */
41
43
  memo?: string | null;
42
44
  /**
43
- * The cleared status of the transaction
44
- * @type {string}
45
+ *
46
+ * @type {TransactionClearedStatus}
45
47
  * @memberof HybridTransaction
46
48
  */
47
- cleared: HybridTransactionClearedEnum;
49
+ cleared: TransactionClearedStatus;
48
50
  /**
49
51
  * Whether or not the transaction is approved
50
52
  * @type {boolean}
@@ -52,11 +54,11 @@ export interface HybridTransaction {
52
54
  */
53
55
  approved: boolean;
54
56
  /**
55
- * The transaction flag
56
- * @type {string}
57
+ *
58
+ * @type {TransactionFlagColor}
57
59
  * @memberof HybridTransaction
58
60
  */
59
- flag_color?: HybridTransactionFlagColorEnum;
61
+ flag_color?: TransactionFlagColor | null;
60
62
  /**
61
63
  *
62
64
  * @type {string}
@@ -154,28 +156,6 @@ export interface HybridTransaction {
154
156
  */
155
157
  category_name?: string;
156
158
  }
157
- /**
158
- * @export
159
- */
160
- export declare const HybridTransactionClearedEnum: {
161
- readonly Cleared: "cleared";
162
- readonly Uncleared: "uncleared";
163
- readonly Reconciled: "reconciled";
164
- };
165
- export declare type HybridTransactionClearedEnum = typeof HybridTransactionClearedEnum[keyof typeof HybridTransactionClearedEnum];
166
- /**
167
- * @export
168
- */
169
- export declare const HybridTransactionFlagColorEnum: {
170
- readonly Red: "red";
171
- readonly Orange: "orange";
172
- readonly Yellow: "yellow";
173
- readonly Green: "green";
174
- readonly Blue: "blue";
175
- readonly Purple: "purple";
176
- readonly Null: "null";
177
- };
178
- export declare type HybridTransactionFlagColorEnum = typeof HybridTransactionFlagColorEnum[keyof typeof HybridTransactionFlagColorEnum];
179
159
  /**
180
160
  * @export
181
161
  */
@@ -185,12 +165,11 @@ export declare const HybridTransactionDebtTransactionTypeEnum: {
185
165
  readonly Fee: "fee";
186
166
  readonly Interest: "interest";
187
167
  readonly Escrow: "escrow";
188
- readonly BalancedAdjustment: "balancedAdjustment";
168
+ readonly BalanceAdjustment: "balanceAdjustment";
189
169
  readonly Credit: "credit";
190
170
  readonly Charge: "charge";
191
- readonly Null: "null";
192
171
  };
193
- export declare type HybridTransactionDebtTransactionTypeEnum = typeof HybridTransactionDebtTransactionTypeEnum[keyof typeof HybridTransactionDebtTransactionTypeEnum];
172
+ export type HybridTransactionDebtTransactionTypeEnum = typeof HybridTransactionDebtTransactionTypeEnum[keyof typeof HybridTransactionDebtTransactionTypeEnum];
194
173
  /**
195
174
  * @export
196
175
  */
@@ -198,7 +177,7 @@ export declare const HybridTransactionTypeEnum: {
198
177
  readonly Transaction: "transaction";
199
178
  readonly Subtransaction: "subtransaction";
200
179
  };
201
- export declare type HybridTransactionTypeEnum = typeof HybridTransactionTypeEnum[keyof typeof HybridTransactionTypeEnum];
180
+ export type HybridTransactionTypeEnum = typeof HybridTransactionTypeEnum[keyof typeof HybridTransactionTypeEnum];
202
181
  /**
203
182
  * Check if a given object implements the HybridTransaction interface.
204
183
  */
@@ -13,28 +13,10 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.HybridTransactionToJSON = exports.HybridTransactionFromJSONTyped = exports.HybridTransactionFromJSON = exports.instanceOfHybridTransaction = exports.HybridTransactionTypeEnum = exports.HybridTransactionDebtTransactionTypeEnum = exports.HybridTransactionFlagColorEnum = exports.HybridTransactionClearedEnum = void 0;
16
+ exports.HybridTransactionToJSON = exports.HybridTransactionFromJSONTyped = exports.HybridTransactionFromJSON = exports.instanceOfHybridTransaction = exports.HybridTransactionTypeEnum = exports.HybridTransactionDebtTransactionTypeEnum = void 0;
17
17
  const runtime_1 = require("../runtime");
18
- /**
19
- * @export
20
- */
21
- exports.HybridTransactionClearedEnum = {
22
- Cleared: 'cleared',
23
- Uncleared: 'uncleared',
24
- Reconciled: 'reconciled'
25
- };
26
- /**
27
- * @export
28
- */
29
- exports.HybridTransactionFlagColorEnum = {
30
- Red: 'red',
31
- Orange: 'orange',
32
- Yellow: 'yellow',
33
- Green: 'green',
34
- Blue: 'blue',
35
- Purple: 'purple',
36
- Null: 'null'
37
- };
18
+ const TransactionClearedStatus_1 = require("./TransactionClearedStatus");
19
+ const TransactionFlagColor_1 = require("./TransactionFlagColor");
38
20
  /**
39
21
  * @export
40
22
  */
@@ -44,10 +26,9 @@ exports.HybridTransactionDebtTransactionTypeEnum = {
44
26
  Fee: 'fee',
45
27
  Interest: 'interest',
46
28
  Escrow: 'escrow',
47
- BalancedAdjustment: 'balancedAdjustment',
29
+ BalanceAdjustment: 'balanceAdjustment',
48
30
  Credit: 'credit',
49
31
  Charge: 'charge',
50
- Null: 'null'
51
32
  };
52
33
  /**
53
34
  * @export
@@ -86,9 +67,9 @@ function HybridTransactionFromJSONTyped(json, ignoreDiscriminator) {
86
67
  'date': json['date'],
87
68
  'amount': json['amount'],
88
69
  'memo': !(0, runtime_1.exists)(json, 'memo') ? undefined : json['memo'],
89
- 'cleared': json['cleared'],
70
+ 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusFromJSON)(json['cleared']),
90
71
  'approved': json['approved'],
91
- 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : json['flag_color'],
72
+ 'flag_color': !(0, runtime_1.exists)(json, 'flag_color') ? undefined : (0, TransactionFlagColor_1.TransactionFlagColorFromJSON)(json['flag_color']),
92
73
  'account_id': json['account_id'],
93
74
  'payee_id': !(0, runtime_1.exists)(json, 'payee_id') ? undefined : json['payee_id'],
94
75
  'category_id': !(0, runtime_1.exists)(json, 'category_id') ? undefined : json['category_id'],
@@ -120,9 +101,9 @@ function HybridTransactionToJSON(value) {
120
101
  'date': value.date,
121
102
  'amount': value.amount,
122
103
  'memo': value.memo,
123
- 'cleared': value.cleared,
104
+ 'cleared': (0, TransactionClearedStatus_1.TransactionClearedStatusToJSON)(value.cleared),
124
105
  'approved': value.approved,
125
- 'flag_color': value.flag_color,
106
+ 'flag_color': (0, TransactionFlagColor_1.TransactionFlagColorToJSON)(value.flag_color),
126
107
  'account_id': value.account_id,
127
108
  'payee_id': value.payee_id,
128
109
  'category_id': value.category_id,
@@ -53,7 +53,7 @@ export declare const HybridTransactionAllOfTypeEnum: {
53
53
  readonly Transaction: "transaction";
54
54
  readonly Subtransaction: "subtransaction";
55
55
  };
56
- export declare type HybridTransactionAllOfTypeEnum = typeof HybridTransactionAllOfTypeEnum[keyof typeof HybridTransactionAllOfTypeEnum];
56
+ export type HybridTransactionAllOfTypeEnum = typeof HybridTransactionAllOfTypeEnum[keyof typeof HybridTransactionAllOfTypeEnum];
57
57
  /**
58
58
  * Check if a given object implements the HybridTransactionAllOf interface.
59
59
  */