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
@@ -10,6 +10,8 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SaveSubTransaction } from './SaveSubTransaction';
13
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
+ import type { TransactionFlagColor } from './TransactionFlagColor';
13
15
  /**
14
16
  *
15
17
  * @export
@@ -65,11 +67,11 @@ export interface SaveTransactionWithId {
65
67
  */
66
68
  memo?: string | null;
67
69
  /**
68
- * The cleared status of the transaction
69
- * @type {string}
70
+ *
71
+ * @type {TransactionClearedStatus}
70
72
  * @memberof SaveTransactionWithId
71
73
  */
72
- cleared?: SaveTransactionWithIdClearedEnum;
74
+ cleared?: TransactionClearedStatus;
73
75
  /**
74
76
  * Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
75
77
  * @type {boolean}
@@ -77,11 +79,11 @@ export interface SaveTransactionWithId {
77
79
  */
78
80
  approved?: boolean;
79
81
  /**
80
- * The transaction flag
81
- * @type {string}
82
+ *
83
+ * @type {TransactionFlagColor}
82
84
  * @memberof SaveTransactionWithId
83
85
  */
84
- flag_color?: SaveTransactionWithIdFlagColorEnum;
86
+ flag_color?: TransactionFlagColor | null;
85
87
  /**
86
88
  * If specified, the new transaction will be assigned this `import_id` and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a "user-entered" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
87
89
  * @type {string}
@@ -95,28 +97,6 @@ export interface SaveTransactionWithId {
95
97
  */
96
98
  subtransactions?: Array<SaveSubTransaction>;
97
99
  }
98
- /**
99
- * @export
100
- */
101
- export declare const SaveTransactionWithIdClearedEnum: {
102
- readonly Cleared: "cleared";
103
- readonly Uncleared: "uncleared";
104
- readonly Reconciled: "reconciled";
105
- };
106
- export declare type SaveTransactionWithIdClearedEnum = typeof SaveTransactionWithIdClearedEnum[keyof typeof SaveTransactionWithIdClearedEnum];
107
- /**
108
- * @export
109
- */
110
- export declare const SaveTransactionWithIdFlagColorEnum: {
111
- readonly Red: "red";
112
- readonly Orange: "orange";
113
- readonly Yellow: "yellow";
114
- readonly Green: "green";
115
- readonly Blue: "blue";
116
- readonly Purple: "purple";
117
- readonly Null: "null";
118
- };
119
- export declare type SaveTransactionWithIdFlagColorEnum = typeof SaveTransactionWithIdFlagColorEnum[keyof typeof SaveTransactionWithIdFlagColorEnum];
120
100
  /**
121
101
  * Check if a given object implements the SaveTransactionWithId interface.
122
102
  */
@@ -13,26 +13,8 @@
13
13
  */
14
14
  import { exists } from '../runtime';
15
15
  import { SaveSubTransactionFromJSON, SaveSubTransactionToJSON, } from './SaveSubTransaction';
16
- /**
17
- * @export
18
- */
19
- export var SaveTransactionWithIdClearedEnum = {
20
- Cleared: 'cleared',
21
- Uncleared: 'uncleared',
22
- Reconciled: 'reconciled'
23
- };
24
- /**
25
- * @export
26
- */
27
- export var SaveTransactionWithIdFlagColorEnum = {
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
  * Check if a given object implements the SaveTransactionWithId interface.
38
20
  */
@@ -56,9 +38,9 @@ export function SaveTransactionWithIdFromJSONTyped(json, ignoreDiscriminator) {
56
38
  'payee_name': !exists(json, 'payee_name') ? undefined : json['payee_name'],
57
39
  'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
58
40
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
59
- 'cleared': !exists(json, 'cleared') ? undefined : json['cleared'],
41
+ 'cleared': !exists(json, 'cleared') ? undefined : TransactionClearedStatusFromJSON(json['cleared']),
60
42
  'approved': !exists(json, 'approved') ? undefined : json['approved'],
61
- 'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
43
+ 'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
62
44
  'import_id': !exists(json, 'import_id') ? undefined : json['import_id'],
63
45
  'subtransactions': !exists(json, 'subtransactions') ? undefined : (json['subtransactions'].map(SaveSubTransactionFromJSON)),
64
46
  };
@@ -79,9 +61,9 @@ export function SaveTransactionWithIdToJSON(value) {
79
61
  'payee_name': value.payee_name,
80
62
  'category_id': value.category_id,
81
63
  'memo': value.memo,
82
- 'cleared': value.cleared,
64
+ 'cleared': TransactionClearedStatusToJSON(value.cleared),
83
65
  'approved': value.approved,
84
- 'flag_color': value.flag_color,
66
+ 'flag_color': TransactionFlagColorToJSON(value.flag_color),
85
67
  'import_id': value.import_id,
86
68
  'subtransactions': value.subtransactions === undefined ? undefined : (value.subtransactions.map(SaveSubTransactionToJSON)),
87
69
  };
@@ -10,6 +10,8 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SaveSubTransaction } from './SaveSubTransaction';
13
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
+ import type { TransactionFlagColor } from './TransactionFlagColor';
13
15
  /**
14
16
  *
15
17
  * @export
@@ -59,11 +61,11 @@ export interface SaveTransactionWithOptionalFields {
59
61
  */
60
62
  memo?: string | null;
61
63
  /**
62
- * The cleared status of the transaction
63
- * @type {string}
64
+ *
65
+ * @type {TransactionClearedStatus}
64
66
  * @memberof SaveTransactionWithOptionalFields
65
67
  */
66
- cleared?: SaveTransactionWithOptionalFieldsClearedEnum;
68
+ cleared?: TransactionClearedStatus;
67
69
  /**
68
70
  * Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
69
71
  * @type {boolean}
@@ -71,11 +73,11 @@ export interface SaveTransactionWithOptionalFields {
71
73
  */
72
74
  approved?: boolean;
73
75
  /**
74
- * The transaction flag
75
- * @type {string}
76
+ *
77
+ * @type {TransactionFlagColor}
76
78
  * @memberof SaveTransactionWithOptionalFields
77
79
  */
78
- flag_color?: SaveTransactionWithOptionalFieldsFlagColorEnum;
80
+ flag_color?: TransactionFlagColor | null;
79
81
  /**
80
82
  * If specified, the new transaction will be assigned this `import_id` and considered "imported". We will also attempt to match this imported transaction to an existing "user-entered" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a "user-entered" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API).
81
83
  * @type {string}
@@ -89,28 +91,6 @@ export interface SaveTransactionWithOptionalFields {
89
91
  */
90
92
  subtransactions?: Array<SaveSubTransaction>;
91
93
  }
92
- /**
93
- * @export
94
- */
95
- export declare const SaveTransactionWithOptionalFieldsClearedEnum: {
96
- readonly Cleared: "cleared";
97
- readonly Uncleared: "uncleared";
98
- readonly Reconciled: "reconciled";
99
- };
100
- export declare type SaveTransactionWithOptionalFieldsClearedEnum = typeof SaveTransactionWithOptionalFieldsClearedEnum[keyof typeof SaveTransactionWithOptionalFieldsClearedEnum];
101
- /**
102
- * @export
103
- */
104
- export declare const SaveTransactionWithOptionalFieldsFlagColorEnum: {
105
- readonly Red: "red";
106
- readonly Orange: "orange";
107
- readonly Yellow: "yellow";
108
- readonly Green: "green";
109
- readonly Blue: "blue";
110
- readonly Purple: "purple";
111
- readonly Null: "null";
112
- };
113
- export declare type SaveTransactionWithOptionalFieldsFlagColorEnum = typeof SaveTransactionWithOptionalFieldsFlagColorEnum[keyof typeof SaveTransactionWithOptionalFieldsFlagColorEnum];
114
94
  /**
115
95
  * Check if a given object implements the SaveTransactionWithOptionalFields interface.
116
96
  */
@@ -13,26 +13,8 @@
13
13
  */
14
14
  import { exists } from '../runtime';
15
15
  import { SaveSubTransactionFromJSON, SaveSubTransactionToJSON, } from './SaveSubTransaction';
16
- /**
17
- * @export
18
- */
19
- export var SaveTransactionWithOptionalFieldsClearedEnum = {
20
- Cleared: 'cleared',
21
- Uncleared: 'uncleared',
22
- Reconciled: 'reconciled'
23
- };
24
- /**
25
- * @export
26
- */
27
- export var SaveTransactionWithOptionalFieldsFlagColorEnum = {
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
  * Check if a given object implements the SaveTransactionWithOptionalFields interface.
38
20
  */
@@ -55,9 +37,9 @@ export function SaveTransactionWithOptionalFieldsFromJSONTyped(json, ignoreDiscr
55
37
  'payee_name': !exists(json, 'payee_name') ? undefined : json['payee_name'],
56
38
  'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
57
39
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
58
- 'cleared': !exists(json, 'cleared') ? undefined : json['cleared'],
40
+ 'cleared': !exists(json, 'cleared') ? undefined : TransactionClearedStatusFromJSON(json['cleared']),
59
41
  'approved': !exists(json, 'approved') ? undefined : json['approved'],
60
- 'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
42
+ 'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
61
43
  'import_id': !exists(json, 'import_id') ? undefined : json['import_id'],
62
44
  'subtransactions': !exists(json, 'subtransactions') ? undefined : (json['subtransactions'].map(SaveSubTransactionFromJSON)),
63
45
  };
@@ -77,9 +59,9 @@ export function SaveTransactionWithOptionalFieldsToJSON(value) {
77
59
  'payee_name': value.payee_name,
78
60
  'category_id': value.category_id,
79
61
  'memo': value.memo,
80
- 'cleared': value.cleared,
62
+ 'cleared': TransactionClearedStatusToJSON(value.cleared),
81
63
  'approved': value.approved,
82
- 'flag_color': value.flag_color,
64
+ 'flag_color': TransactionFlagColorToJSON(value.flag_color),
83
65
  'import_id': value.import_id,
84
66
  'subtransactions': value.subtransactions === undefined ? undefined : (value.subtransactions.map(SaveSubTransactionToJSON)),
85
67
  };
@@ -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 transaction flag
14
+ * @export
15
+ * @interface SaveTransactionWithOptionalFieldsFlagColor
16
+ */
17
+ export interface SaveTransactionWithOptionalFieldsFlagColor {
18
+ }
19
+ /**
20
+ * Check if a given object implements the SaveTransactionWithOptionalFieldsFlagColor interface.
21
+ */
22
+ export declare function instanceOfSaveTransactionWithOptionalFieldsFlagColor(value: object): boolean;
23
+ export declare function SaveTransactionWithOptionalFieldsFlagColorFromJSON(json: any): SaveTransactionWithOptionalFieldsFlagColor;
24
+ export declare function SaveTransactionWithOptionalFieldsFlagColorFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaveTransactionWithOptionalFieldsFlagColor;
25
+ export declare function SaveTransactionWithOptionalFieldsFlagColorToJSON(value?: SaveTransactionWithOptionalFieldsFlagColor | 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 SaveTransactionWithOptionalFieldsFlagColor interface.
16
+ */
17
+ export function instanceOfSaveTransactionWithOptionalFieldsFlagColor(value) {
18
+ var isInstance = true;
19
+ return isInstance;
20
+ }
21
+ export function SaveTransactionWithOptionalFieldsFlagColorFromJSON(json) {
22
+ return SaveTransactionWithOptionalFieldsFlagColorFromJSONTyped(json, false);
23
+ }
24
+ export function SaveTransactionWithOptionalFieldsFlagColorFromJSONTyped(json, ignoreDiscriminator) {
25
+ return json;
26
+ }
27
+ export function SaveTransactionWithOptionalFieldsFlagColorToJSON(value) {
28
+ return value;
29
+ }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { ScheduledSubTransaction } from './ScheduledSubTransaction';
13
+ import type { TransactionFlagColor } from './TransactionFlagColor';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -53,11 +54,11 @@ export interface ScheduledTransactionDetail {
53
54
  */
54
55
  memo?: string | null;
55
56
  /**
56
- * The scheduled transaction flag
57
- * @type {string}
57
+ *
58
+ * @type {TransactionFlagColor}
58
59
  * @memberof ScheduledTransactionDetail
59
60
  */
60
- flag_color?: ScheduledTransactionDetailFlagColorEnum;
61
+ flag_color?: TransactionFlagColor | null;
61
62
  /**
62
63
  *
63
64
  * @type {string}
@@ -132,19 +133,6 @@ export declare const ScheduledTransactionDetailFrequencyEnum: {
132
133
  readonly EveryOtherYear: "everyOtherYear";
133
134
  };
134
135
  export declare type ScheduledTransactionDetailFrequencyEnum = typeof ScheduledTransactionDetailFrequencyEnum[keyof typeof ScheduledTransactionDetailFrequencyEnum];
135
- /**
136
- * @export
137
- */
138
- export declare const ScheduledTransactionDetailFlagColorEnum: {
139
- readonly Red: "red";
140
- readonly Orange: "orange";
141
- readonly Yellow: "yellow";
142
- readonly Green: "green";
143
- readonly Blue: "blue";
144
- readonly Purple: "purple";
145
- readonly Null: "null";
146
- };
147
- export declare type ScheduledTransactionDetailFlagColorEnum = typeof ScheduledTransactionDetailFlagColorEnum[keyof typeof ScheduledTransactionDetailFlagColorEnum];
148
136
  /**
149
137
  * Check if a given object implements the ScheduledTransactionDetail interface.
150
138
  */
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { exists } from '../runtime';
15
15
  import { ScheduledSubTransactionFromJSON, ScheduledSubTransactionToJSON, } from './ScheduledSubTransaction';
16
+ import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
16
17
  /**
17
18
  * @export
18
19
  */
@@ -31,18 +32,6 @@ export var ScheduledTransactionDetailFrequencyEnum = {
31
32
  Yearly: 'yearly',
32
33
  EveryOtherYear: 'everyOtherYear'
33
34
  };
34
- /**
35
- * @export
36
- */
37
- export var ScheduledTransactionDetailFlagColorEnum = {
38
- Red: 'red',
39
- Orange: 'orange',
40
- Yellow: 'yellow',
41
- Green: 'green',
42
- Blue: 'blue',
43
- Purple: 'purple',
44
- Null: 'null'
45
- };
46
35
  /**
47
36
  * Check if a given object implements the ScheduledTransactionDetail interface.
48
37
  */
@@ -73,7 +62,7 @@ export function ScheduledTransactionDetailFromJSONTyped(json, ignoreDiscriminato
73
62
  'frequency': json['frequency'],
74
63
  'amount': json['amount'],
75
64
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
76
- 'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
65
+ 'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
77
66
  'account_id': json['account_id'],
78
67
  'payee_id': !exists(json, 'payee_id') ? undefined : json['payee_id'],
79
68
  'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
@@ -99,7 +88,7 @@ export function ScheduledTransactionDetailToJSON(value) {
99
88
  'frequency': value.frequency,
100
89
  'amount': value.amount,
101
90
  'memo': value.memo,
102
- 'flag_color': value.flag_color,
91
+ 'flag_color': TransactionFlagColorToJSON(value.flag_color),
103
92
  'account_id': value.account_id,
104
93
  'payee_id': value.payee_id,
105
94
  'category_id': value.category_id,
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TransactionFlagColor } from './TransactionFlagColor';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -52,11 +53,11 @@ export interface ScheduledTransactionSummary {
52
53
  */
53
54
  memo?: string | null;
54
55
  /**
55
- * The scheduled transaction flag
56
- * @type {string}
56
+ *
57
+ * @type {TransactionFlagColor}
57
58
  * @memberof ScheduledTransactionSummary
58
59
  */
59
- flag_color?: ScheduledTransactionSummaryFlagColorEnum;
60
+ flag_color?: TransactionFlagColor | null;
60
61
  /**
61
62
  *
62
63
  * @type {string}
@@ -107,19 +108,6 @@ export declare const ScheduledTransactionSummaryFrequencyEnum: {
107
108
  readonly EveryOtherYear: "everyOtherYear";
108
109
  };
109
110
  export declare type ScheduledTransactionSummaryFrequencyEnum = typeof ScheduledTransactionSummaryFrequencyEnum[keyof typeof ScheduledTransactionSummaryFrequencyEnum];
110
- /**
111
- * @export
112
- */
113
- export declare const ScheduledTransactionSummaryFlagColorEnum: {
114
- readonly Red: "red";
115
- readonly Orange: "orange";
116
- readonly Yellow: "yellow";
117
- readonly Green: "green";
118
- readonly Blue: "blue";
119
- readonly Purple: "purple";
120
- readonly Null: "null";
121
- };
122
- export declare type ScheduledTransactionSummaryFlagColorEnum = typeof ScheduledTransactionSummaryFlagColorEnum[keyof typeof ScheduledTransactionSummaryFlagColorEnum];
123
111
  /**
124
112
  * Check if a given object implements the ScheduledTransactionSummary interface.
125
113
  */
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { exists } from '../runtime';
15
+ import { TransactionFlagColorFromJSON, TransactionFlagColorToJSON, } from './TransactionFlagColor';
15
16
  /**
16
17
  * @export
17
18
  */
@@ -30,18 +31,6 @@ export var ScheduledTransactionSummaryFrequencyEnum = {
30
31
  Yearly: 'yearly',
31
32
  EveryOtherYear: 'everyOtherYear'
32
33
  };
33
- /**
34
- * @export
35
- */
36
- export var ScheduledTransactionSummaryFlagColorEnum = {
37
- Red: 'red',
38
- Orange: 'orange',
39
- Yellow: 'yellow',
40
- Green: 'green',
41
- Blue: 'blue',
42
- Purple: 'purple',
43
- Null: 'null'
44
- };
45
34
  /**
46
35
  * Check if a given object implements the ScheduledTransactionSummary interface.
47
36
  */
@@ -70,7 +59,7 @@ export function ScheduledTransactionSummaryFromJSONTyped(json, ignoreDiscriminat
70
59
  'frequency': json['frequency'],
71
60
  'amount': json['amount'],
72
61
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
73
- 'flag_color': !exists(json, 'flag_color') ? undefined : json['flag_color'],
62
+ 'flag_color': !exists(json, 'flag_color') ? undefined : TransactionFlagColorFromJSON(json['flag_color']),
74
63
  'account_id': json['account_id'],
75
64
  'payee_id': !exists(json, 'payee_id') ? undefined : json['payee_id'],
76
65
  'category_id': !exists(json, 'category_id') ? undefined : json['category_id'],
@@ -92,7 +81,7 @@ export function ScheduledTransactionSummaryToJSON(value) {
92
81
  'frequency': value.frequency,
93
82
  'amount': value.amount,
94
83
  'memo': value.memo,
95
- 'flag_color': value.flag_color,
84
+ 'flag_color': TransactionFlagColorToJSON(value.flag_color),
96
85
  'account_id': value.account_id,
97
86
  'payee_id': value.payee_id,
98
87
  '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
+ * The scheduled transaction flag
14
+ * @export
15
+ * @interface ScheduledTransactionSummaryFlagColor
16
+ */
17
+ export interface ScheduledTransactionSummaryFlagColor {
18
+ }
19
+ /**
20
+ * Check if a given object implements the ScheduledTransactionSummaryFlagColor interface.
21
+ */
22
+ export declare function instanceOfScheduledTransactionSummaryFlagColor(value: object): boolean;
23
+ export declare function ScheduledTransactionSummaryFlagColorFromJSON(json: any): ScheduledTransactionSummaryFlagColor;
24
+ export declare function ScheduledTransactionSummaryFlagColorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduledTransactionSummaryFlagColor;
25
+ export declare function ScheduledTransactionSummaryFlagColorToJSON(value?: ScheduledTransactionSummaryFlagColor | 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 ScheduledTransactionSummaryFlagColor interface.
16
+ */
17
+ export function instanceOfScheduledTransactionSummaryFlagColor(value) {
18
+ var isInstance = true;
19
+ return isInstance;
20
+ }
21
+ export function ScheduledTransactionSummaryFlagColorFromJSON(json) {
22
+ return ScheduledTransactionSummaryFlagColorFromJSONTyped(json, false);
23
+ }
24
+ export function ScheduledTransactionSummaryFlagColorFromJSONTyped(json, ignoreDiscriminator) {
25
+ return json;
26
+ }
27
+ export function ScheduledTransactionSummaryFlagColorToJSON(value) {
28
+ return value;
29
+ }
@@ -0,0 +1,24 @@
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 cleared status of the transaction
14
+ * @export
15
+ */
16
+ export declare const TransactionClearedStatus: {
17
+ readonly Cleared: "cleared";
18
+ readonly Uncleared: "uncleared";
19
+ readonly Reconciled: "reconciled";
20
+ };
21
+ export declare type TransactionClearedStatus = typeof TransactionClearedStatus[keyof typeof TransactionClearedStatus];
22
+ export declare function TransactionClearedStatusFromJSON(json: any): TransactionClearedStatus;
23
+ export declare function TransactionClearedStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionClearedStatus;
24
+ export declare function TransactionClearedStatusToJSON(value?: TransactionClearedStatus | null): any;
@@ -0,0 +1,31 @@
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 cleared status of the transaction
16
+ * @export
17
+ */
18
+ export var TransactionClearedStatus = {
19
+ Cleared: 'cleared',
20
+ Uncleared: 'uncleared',
21
+ Reconciled: 'reconciled'
22
+ };
23
+ export function TransactionClearedStatusFromJSON(json) {
24
+ return TransactionClearedStatusFromJSONTyped(json, false);
25
+ }
26
+ export function TransactionClearedStatusFromJSONTyped(json, ignoreDiscriminator) {
27
+ return json;
28
+ }
29
+ export function TransactionClearedStatusToJSON(value) {
30
+ return value;
31
+ }
@@ -10,6 +10,8 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { SubTransaction } from './SubTransaction';
13
+ import type { TransactionClearedStatus } from './TransactionClearedStatus';
14
+ import type { TransactionFlagColor } from './TransactionFlagColor';
13
15
  /**
14
16
  *
15
17
  * @export
@@ -41,11 +43,11 @@ export interface TransactionDetail {
41
43
  */
42
44
  memo?: string | null;
43
45
  /**
44
- * The cleared status of the transaction
45
- * @type {string}
46
+ *
47
+ * @type {TransactionClearedStatus}
46
48
  * @memberof TransactionDetail
47
49
  */
48
- cleared: TransactionDetailClearedEnum;
50
+ cleared: TransactionClearedStatus;
49
51
  /**
50
52
  * Whether or not the transaction is approved
51
53
  * @type {boolean}
@@ -53,11 +55,11 @@ export interface TransactionDetail {
53
55
  */
54
56
  approved: boolean;
55
57
  /**
56
- * The transaction flag
57
- * @type {string}
58
+ *
59
+ * @type {TransactionFlagColor}
58
60
  * @memberof TransactionDetail
59
61
  */
60
- flag_color?: TransactionDetailFlagColorEnum;
62
+ flag_color?: TransactionFlagColor | null;
61
63
  /**
62
64
  *
63
65
  * @type {string}
@@ -149,28 +151,6 @@ export interface TransactionDetail {
149
151
  */
150
152
  subtransactions: Array<SubTransaction>;
151
153
  }
152
- /**
153
- * @export
154
- */
155
- export declare const TransactionDetailClearedEnum: {
156
- readonly Cleared: "cleared";
157
- readonly Uncleared: "uncleared";
158
- readonly Reconciled: "reconciled";
159
- };
160
- export declare type TransactionDetailClearedEnum = typeof TransactionDetailClearedEnum[keyof typeof TransactionDetailClearedEnum];
161
- /**
162
- * @export
163
- */
164
- export declare const TransactionDetailFlagColorEnum: {
165
- readonly Red: "red";
166
- readonly Orange: "orange";
167
- readonly Yellow: "yellow";
168
- readonly Green: "green";
169
- readonly Blue: "blue";
170
- readonly Purple: "purple";
171
- readonly Null: "null";
172
- };
173
- export declare type TransactionDetailFlagColorEnum = typeof TransactionDetailFlagColorEnum[keyof typeof TransactionDetailFlagColorEnum];
174
154
  /**
175
155
  * @export
176
156
  */
@@ -180,10 +160,9 @@ export declare const TransactionDetailDebtTransactionTypeEnum: {
180
160
  readonly Fee: "fee";
181
161
  readonly Interest: "interest";
182
162
  readonly Escrow: "escrow";
183
- readonly BalancedAdjustment: "balancedAdjustment";
163
+ readonly BalanceAdjustment: "balanceAdjustment";
184
164
  readonly Credit: "credit";
185
165
  readonly Charge: "charge";
186
- readonly Null: "null";
187
166
  };
188
167
  export declare type TransactionDetailDebtTransactionTypeEnum = typeof TransactionDetailDebtTransactionTypeEnum[keyof typeof TransactionDetailDebtTransactionTypeEnum];
189
168
  /**