ynab 3.1.0 → 4.1.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 (153) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/AccountsApi.js +3 -3
  3. package/dist/apis/CategoriesApi.js +8 -8
  4. package/dist/apis/MoneyMovementsApi.js +4 -4
  5. package/dist/apis/MonthsApi.js +2 -2
  6. package/dist/apis/PayeeLocationsApi.js +3 -3
  7. package/dist/apis/PayeesApi.d.ts +15 -1
  8. package/dist/apis/PayeesApi.js +42 -3
  9. package/dist/apis/PlansApi.js +3 -3
  10. package/dist/apis/ScheduledTransactionsApi.js +5 -5
  11. package/dist/apis/TransactionsApi.js +11 -11
  12. package/dist/browser/ynab.js +1 -1
  13. package/dist/esm/apis/AccountsApi.js +3 -3
  14. package/dist/esm/apis/CategoriesApi.js +8 -8
  15. package/dist/esm/apis/MoneyMovementsApi.js +4 -4
  16. package/dist/esm/apis/MonthsApi.js +2 -2
  17. package/dist/esm/apis/PayeeLocationsApi.js +3 -3
  18. package/dist/esm/apis/PayeesApi.d.ts +15 -1
  19. package/dist/esm/apis/PayeesApi.js +65 -4
  20. package/dist/esm/apis/PlansApi.js +3 -3
  21. package/dist/esm/apis/ScheduledTransactionsApi.js +5 -5
  22. package/dist/esm/apis/TransactionsApi.js +11 -11
  23. package/dist/esm/models/Account.d.ts +40 -4
  24. package/dist/esm/models/Account.js +12 -0
  25. package/dist/esm/models/AccountBase.d.ts +136 -0
  26. package/dist/esm/models/AccountBase.js +92 -0
  27. package/dist/esm/models/Category.d.ts +100 -16
  28. package/dist/esm/models/Category.js +28 -0
  29. package/dist/esm/models/CategoryBase.d.ts +188 -0
  30. package/dist/esm/models/CategoryBase.js +113 -0
  31. package/dist/esm/models/ExistingCategory.d.ts +7 -1
  32. package/dist/esm/models/ExistingCategory.js +2 -0
  33. package/dist/esm/models/HybridTransaction.d.ts +12 -0
  34. package/dist/esm/models/HybridTransaction.js +4 -0
  35. package/dist/esm/models/MoneyMovement.d.ts +19 -7
  36. package/dist/esm/models/MoneyMovement.js +4 -0
  37. package/dist/esm/models/MoneyMovementBase.d.ts +75 -0
  38. package/dist/esm/models/MoneyMovementBase.js +57 -0
  39. package/dist/esm/models/MonthDetail.d.ts +48 -0
  40. package/dist/esm/models/MonthDetail.js +16 -0
  41. package/dist/esm/models/MonthDetailBase.d.ts +76 -0
  42. package/dist/esm/models/MonthDetailBase.js +68 -0
  43. package/dist/esm/models/MonthSummary.d.ts +50 -2
  44. package/dist/esm/models/MonthSummary.js +16 -0
  45. package/dist/esm/models/MonthSummaryBase.d.ts +69 -0
  46. package/dist/esm/models/MonthSummaryBase.js +63 -0
  47. package/dist/esm/models/NewCategory.d.ts +7 -1
  48. package/dist/esm/models/NewCategory.js +2 -0
  49. package/dist/esm/models/PlanDetail.d.ts +21 -21
  50. package/dist/esm/models/PlanDetail.js +21 -21
  51. package/dist/esm/models/PlanDetailResponseData.d.ts +1 -1
  52. package/dist/esm/models/PlanDetailResponseData.js +3 -3
  53. package/dist/esm/models/PlanSummaryResponseData.d.ts +2 -2
  54. package/dist/esm/models/PlanSummaryResponseData.js +5 -5
  55. package/dist/esm/models/PostPayee.d.ts +27 -0
  56. package/dist/esm/models/PostPayee.js +39 -0
  57. package/dist/esm/models/PostPayeeWrapper.d.ts +28 -0
  58. package/dist/esm/models/PostPayeeWrapper.js +40 -0
  59. package/dist/esm/models/SaveAccount.d.ts +3 -3
  60. package/dist/esm/models/SaveAccount.js +3 -3
  61. package/dist/esm/models/SaveAccountType.d.ts +24 -0
  62. package/dist/esm/models/SaveAccountType.js +42 -0
  63. package/dist/esm/models/SaveCategory.d.ts +7 -1
  64. package/dist/esm/models/SaveCategory.js +2 -0
  65. package/dist/esm/models/SavePayee.d.ts +1 -1
  66. package/dist/esm/models/ScheduledSubTransaction.d.ts +18 -6
  67. package/dist/esm/models/ScheduledSubTransaction.js +4 -0
  68. package/dist/esm/models/ScheduledSubTransactionBase.d.ts +81 -0
  69. package/dist/esm/models/ScheduledSubTransactionBase.js +63 -0
  70. package/dist/esm/models/ScheduledTransactionDetail.d.ts +12 -0
  71. package/dist/esm/models/ScheduledTransactionDetail.js +4 -0
  72. package/dist/esm/models/ScheduledTransactionSummary.d.ts +17 -5
  73. package/dist/esm/models/ScheduledTransactionSummary.js +4 -0
  74. package/dist/esm/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  75. package/dist/esm/models/ScheduledTransactionSummaryBase.js +94 -0
  76. package/dist/esm/models/SubTransaction.d.ts +19 -7
  77. package/dist/esm/models/SubTransaction.js +4 -0
  78. package/dist/esm/models/SubTransactionBase.d.ts +87 -0
  79. package/dist/esm/models/SubTransactionBase.js +65 -0
  80. package/dist/esm/models/TransactionDetail.d.ts +12 -0
  81. package/dist/esm/models/TransactionDetail.js +4 -0
  82. package/dist/esm/models/TransactionSummary.d.ts +22 -10
  83. package/dist/esm/models/TransactionSummary.js +4 -0
  84. package/dist/esm/models/TransactionSummaryBase.d.ts +151 -0
  85. package/dist/esm/models/TransactionSummaryBase.js +102 -0
  86. package/dist/esm/models/index.d.ts +12 -0
  87. package/dist/esm/models/index.js +12 -0
  88. package/dist/models/Account.d.ts +40 -4
  89. package/dist/models/Account.js +12 -0
  90. package/dist/models/AccountBase.d.ts +136 -0
  91. package/dist/models/AccountBase.js +98 -0
  92. package/dist/models/Category.d.ts +100 -16
  93. package/dist/models/Category.js +28 -0
  94. package/dist/models/CategoryBase.d.ts +188 -0
  95. package/dist/models/CategoryBase.js +120 -0
  96. package/dist/models/ExistingCategory.d.ts +7 -1
  97. package/dist/models/ExistingCategory.js +2 -0
  98. package/dist/models/HybridTransaction.d.ts +12 -0
  99. package/dist/models/HybridTransaction.js +4 -0
  100. package/dist/models/MoneyMovement.d.ts +19 -7
  101. package/dist/models/MoneyMovement.js +4 -0
  102. package/dist/models/MoneyMovementBase.d.ts +75 -0
  103. package/dist/models/MoneyMovementBase.js +63 -0
  104. package/dist/models/MonthDetail.d.ts +48 -0
  105. package/dist/models/MonthDetail.js +16 -0
  106. package/dist/models/MonthDetailBase.d.ts +76 -0
  107. package/dist/models/MonthDetailBase.js +74 -0
  108. package/dist/models/MonthSummary.d.ts +50 -2
  109. package/dist/models/MonthSummary.js +16 -0
  110. package/dist/models/MonthSummaryBase.d.ts +69 -0
  111. package/dist/models/MonthSummaryBase.js +69 -0
  112. package/dist/models/NewCategory.d.ts +7 -1
  113. package/dist/models/NewCategory.js +2 -0
  114. package/dist/models/PlanDetail.d.ts +21 -21
  115. package/dist/models/PlanDetail.js +21 -21
  116. package/dist/models/PlanDetailResponseData.d.ts +1 -1
  117. package/dist/models/PlanDetailResponseData.js +3 -3
  118. package/dist/models/PlanSummaryResponseData.d.ts +2 -2
  119. package/dist/models/PlanSummaryResponseData.js +5 -5
  120. package/dist/models/PostPayee.d.ts +27 -0
  121. package/dist/models/PostPayee.js +45 -0
  122. package/dist/models/PostPayeeWrapper.d.ts +28 -0
  123. package/dist/models/PostPayeeWrapper.js +46 -0
  124. package/dist/models/SaveAccount.d.ts +3 -3
  125. package/dist/models/SaveAccount.js +3 -3
  126. package/dist/models/SaveAccountType.d.ts +24 -0
  127. package/dist/models/SaveAccountType.js +50 -0
  128. package/dist/models/SaveCategory.d.ts +7 -1
  129. package/dist/models/SaveCategory.js +2 -0
  130. package/dist/models/SavePayee.d.ts +1 -1
  131. package/dist/models/ScheduledSubTransaction.d.ts +18 -6
  132. package/dist/models/ScheduledSubTransaction.js +4 -0
  133. package/dist/models/ScheduledSubTransactionBase.d.ts +81 -0
  134. package/dist/models/ScheduledSubTransactionBase.js +69 -0
  135. package/dist/models/ScheduledTransactionDetail.d.ts +12 -0
  136. package/dist/models/ScheduledTransactionDetail.js +4 -0
  137. package/dist/models/ScheduledTransactionSummary.d.ts +17 -5
  138. package/dist/models/ScheduledTransactionSummary.js +4 -0
  139. package/dist/models/ScheduledTransactionSummaryBase.d.ts +119 -0
  140. package/dist/models/ScheduledTransactionSummaryBase.js +101 -0
  141. package/dist/models/SubTransaction.d.ts +19 -7
  142. package/dist/models/SubTransaction.js +4 -0
  143. package/dist/models/SubTransactionBase.d.ts +87 -0
  144. package/dist/models/SubTransactionBase.js +71 -0
  145. package/dist/models/TransactionDetail.d.ts +12 -0
  146. package/dist/models/TransactionDetail.js +4 -0
  147. package/dist/models/TransactionSummary.d.ts +22 -10
  148. package/dist/models/TransactionSummary.js +4 -0
  149. package/dist/models/TransactionSummaryBase.d.ts +151 -0
  150. package/dist/models/TransactionSummaryBase.js +109 -0
  151. package/dist/models/index.d.ts +12 -0
  152. package/dist/models/index.js +12 -0
  153. package/package.json +2 -2
@@ -0,0 +1,113 @@
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
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
8
+ */
9
+ /**
10
+ * @export
11
+ */
12
+ export var CategoryBaseGoalTypeEnum = {
13
+ Tb: 'TB',
14
+ Tbd: 'TBD',
15
+ Mf: 'MF',
16
+ Need: 'NEED',
17
+ Debt: 'DEBT'
18
+ };
19
+ /**
20
+ * Check if a given object implements the CategoryBase interface.
21
+ */
22
+ export function instanceOfCategoryBase(value) {
23
+ if (!('id' in value) || value['id'] === undefined)
24
+ return false;
25
+ if (!('category_group_id' in value) || value['category_group_id'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ if (!('hidden' in value) || value['hidden'] === undefined)
30
+ return false;
31
+ if (!('budgeted' in value) || value['budgeted'] === undefined)
32
+ return false;
33
+ if (!('activity' in value) || value['activity'] === undefined)
34
+ return false;
35
+ if (!('balance' in value) || value['balance'] === undefined)
36
+ return false;
37
+ if (!('deleted' in value) || value['deleted'] === undefined)
38
+ return false;
39
+ return true;
40
+ }
41
+ export function CategoryBaseFromJSON(json) {
42
+ return CategoryBaseFromJSONTyped(json, false);
43
+ }
44
+ export function CategoryBaseFromJSONTyped(json, ignoreDiscriminator) {
45
+ if (json == null) {
46
+ return json;
47
+ }
48
+ return {
49
+ 'id': json['id'],
50
+ 'category_group_id': json['category_group_id'],
51
+ 'category_group_name': json['category_group_name'] == null ? undefined : json['category_group_name'],
52
+ 'name': json['name'],
53
+ 'hidden': json['hidden'],
54
+ 'original_category_group_id': json['original_category_group_id'] == null ? undefined : json['original_category_group_id'],
55
+ 'note': json['note'] == null ? undefined : json['note'],
56
+ 'budgeted': json['budgeted'],
57
+ 'activity': json['activity'],
58
+ 'balance': json['balance'],
59
+ 'goal_type': json['goal_type'] == null ? undefined : json['goal_type'],
60
+ 'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
61
+ 'goal_day': json['goal_day'] == null ? undefined : json['goal_day'],
62
+ 'goal_cadence': json['goal_cadence'] == null ? undefined : json['goal_cadence'],
63
+ 'goal_cadence_frequency': json['goal_cadence_frequency'] == null ? undefined : json['goal_cadence_frequency'],
64
+ 'goal_creation_month': json['goal_creation_month'] == null ? undefined : json['goal_creation_month'],
65
+ 'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
66
+ 'goal_target_month': json['goal_target_month'] == null ? undefined : json['goal_target_month'],
67
+ 'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
68
+ 'goal_percentage_complete': json['goal_percentage_complete'] == null ? undefined : json['goal_percentage_complete'],
69
+ 'goal_months_to_budget': json['goal_months_to_budget'] == null ? undefined : json['goal_months_to_budget'],
70
+ 'goal_under_funded': json['goal_under_funded'] == null ? undefined : json['goal_under_funded'],
71
+ 'goal_overall_funded': json['goal_overall_funded'] == null ? undefined : json['goal_overall_funded'],
72
+ 'goal_overall_left': json['goal_overall_left'] == null ? undefined : json['goal_overall_left'],
73
+ 'goal_snoozed_at': json['goal_snoozed_at'] == null ? undefined : json['goal_snoozed_at'],
74
+ 'deleted': json['deleted'],
75
+ };
76
+ }
77
+ export function CategoryBaseToJSON(json) {
78
+ return CategoryBaseToJSONTyped(json, false);
79
+ }
80
+ export function CategoryBaseToJSONTyped(value, ignoreDiscriminator) {
81
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+ return {
86
+ 'id': value['id'],
87
+ 'category_group_id': value['category_group_id'],
88
+ 'category_group_name': value['category_group_name'],
89
+ 'name': value['name'],
90
+ 'hidden': value['hidden'],
91
+ 'original_category_group_id': value['original_category_group_id'],
92
+ 'note': value['note'],
93
+ 'budgeted': value['budgeted'],
94
+ 'activity': value['activity'],
95
+ 'balance': value['balance'],
96
+ 'goal_type': value['goal_type'],
97
+ 'goal_needs_whole_amount': value['goal_needs_whole_amount'],
98
+ 'goal_day': value['goal_day'],
99
+ 'goal_cadence': value['goal_cadence'],
100
+ 'goal_cadence_frequency': value['goal_cadence_frequency'],
101
+ 'goal_creation_month': value['goal_creation_month'],
102
+ 'goal_target': value['goal_target'],
103
+ 'goal_target_month': value['goal_target_month'],
104
+ 'goal_target_date': value['goal_target_date'],
105
+ 'goal_percentage_complete': value['goal_percentage_complete'],
106
+ 'goal_months_to_budget': value['goal_months_to_budget'],
107
+ 'goal_under_funded': value['goal_under_funded'],
108
+ 'goal_overall_funded': value['goal_overall_funded'],
109
+ 'goal_overall_left': value['goal_overall_left'],
110
+ 'goal_snoozed_at': value['goal_snoozed_at'],
111
+ 'deleted': value['deleted'],
112
+ };
113
+ }
@@ -29,7 +29,7 @@ export interface ExistingCategory {
29
29
  */
30
30
  category_group_id?: string;
31
31
  /**
32
- * The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly 'Needed for Spending' goal will be created for the category with this target amount.
32
+ * The goal target amount in milliunits format. If value is specified and goal has not already been configured for category, a monthly goal will be created for the category with this target amount. If goal_type is not specified, it will default to 'NEED' or 'MF' for Credit Card Payment categories.
33
33
  * @type {number}
34
34
  * @memberof ExistingCategory
35
35
  */
@@ -40,6 +40,12 @@ export interface ExistingCategory {
40
40
  * @memberof ExistingCategory
41
41
  */
42
42
  goal_target_date?: string;
43
+ /**
44
+ * Whether the goal requires the full target amount each period. Only supported for 'NEED' goals. When true, the goal is configured as 'Set aside another...'. When false, the goal is configured as 'Refill up to...'.
45
+ * @type {boolean}
46
+ * @memberof ExistingCategory
47
+ */
48
+ goal_needs_whole_amount?: boolean;
43
49
  }
44
50
  /**
45
51
  * Check if a given object implements the ExistingCategory interface.
@@ -25,6 +25,7 @@ export function ExistingCategoryFromJSONTyped(json, ignoreDiscriminator) {
25
25
  'category_group_id': json['category_group_id'] == null ? undefined : json['category_group_id'],
26
26
  'goal_target': json['goal_target'] == null ? undefined : json['goal_target'],
27
27
  'goal_target_date': json['goal_target_date'] == null ? undefined : json['goal_target_date'],
28
+ 'goal_needs_whole_amount': json['goal_needs_whole_amount'] == null ? undefined : json['goal_needs_whole_amount'],
28
29
  };
29
30
  }
30
31
  export function ExistingCategoryToJSON(json) {
@@ -41,5 +42,6 @@ export function ExistingCategoryToJSONTyped(value, ignoreDiscriminator) {
41
42
  'category_group_id': value['category_group_id'],
42
43
  'goal_target': value['goal_target'],
43
44
  'goal_target_date': value['goal_target_date'],
45
+ 'goal_needs_whole_amount': value['goal_needs_whole_amount'],
44
46
  };
45
47
  }
@@ -126,6 +126,18 @@ export interface HybridTransaction {
126
126
  * @memberof HybridTransaction
127
127
  */
128
128
  deleted: boolean;
129
+ /**
130
+ * The transaction amount formatted in the plan's currency format
131
+ * @type {string}
132
+ * @memberof HybridTransaction
133
+ */
134
+ amount_formatted?: string;
135
+ /**
136
+ * The transaction amount as a decimal currency amount
137
+ * @type {number}
138
+ * @memberof HybridTransaction
139
+ */
140
+ amount_currency?: number;
129
141
  /**
130
142
  * Whether the hybrid transaction represents a regular transaction or a subtransaction
131
143
  * @type {HybridTransactionTypeEnum}
@@ -79,6 +79,8 @@ export function HybridTransactionFromJSONTyped(json, ignoreDiscriminator) {
79
79
  'import_payee_name_original': json['import_payee_name_original'] == null ? undefined : json['import_payee_name_original'],
80
80
  'debt_transaction_type': json['debt_transaction_type'] == null ? undefined : json['debt_transaction_type'],
81
81
  'deleted': json['deleted'],
82
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
83
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
82
84
  'type': json['type'],
83
85
  'parent_transaction_id': json['parent_transaction_id'] == null ? undefined : json['parent_transaction_id'],
84
86
  'account_name': json['account_name'],
@@ -114,6 +116,8 @@ export function HybridTransactionToJSONTyped(value, ignoreDiscriminator) {
114
116
  'import_payee_name_original': value['import_payee_name_original'],
115
117
  'debt_transaction_type': value['debt_transaction_type'],
116
118
  'deleted': value['deleted'],
119
+ 'amount_formatted': value['amount_formatted'],
120
+ 'amount_currency': value['amount_currency'],
117
121
  'type': value['type'],
118
122
  'parent_transaction_id': value['parent_transaction_id'],
119
123
  'account_name': value['account_name'],
@@ -21,49 +21,61 @@ export interface MoneyMovement {
21
21
  * @type {string}
22
22
  * @memberof MoneyMovement
23
23
  */
24
- month?: string | null;
24
+ month?: string;
25
25
  /**
26
26
  * The date/time the money movement was processed on the server in ISO format (e.g. 2024-01-01T12:00:00Z)
27
27
  * @type {string}
28
28
  * @memberof MoneyMovement
29
29
  */
30
- moved_at?: string | null;
30
+ moved_at?: string;
31
31
  /**
32
32
  *
33
33
  * @type {string}
34
34
  * @memberof MoneyMovement
35
35
  */
36
- note?: string | null;
36
+ note?: string;
37
37
  /**
38
38
  * The id of the money movement group this movement belongs to
39
39
  * @type {string}
40
40
  * @memberof MoneyMovement
41
41
  */
42
- money_movement_group_id?: string | null;
42
+ money_movement_group_id?: string;
43
43
  /**
44
44
  * The id of the user who performed the money movement
45
45
  * @type {string}
46
46
  * @memberof MoneyMovement
47
47
  */
48
- performed_by_user_id?: string | null;
48
+ performed_by_user_id?: string;
49
49
  /**
50
50
  * The id of the category the money was moved from
51
51
  * @type {string}
52
52
  * @memberof MoneyMovement
53
53
  */
54
- from_category_id?: string | null;
54
+ from_category_id?: string;
55
55
  /**
56
56
  * The id of the category the money was moved to
57
57
  * @type {string}
58
58
  * @memberof MoneyMovement
59
59
  */
60
- to_category_id?: string | null;
60
+ to_category_id?: string;
61
61
  /**
62
62
  * The amount of the money movement in milliunits format
63
63
  * @type {number}
64
64
  * @memberof MoneyMovement
65
65
  */
66
66
  amount: number;
67
+ /**
68
+ * The money movement amount formatted in the plan's currency format
69
+ * @type {string}
70
+ * @memberof MoneyMovement
71
+ */
72
+ amount_formatted?: string;
73
+ /**
74
+ * The money movement amount as a decimal currency amount
75
+ * @type {number}
76
+ * @memberof MoneyMovement
77
+ */
78
+ amount_currency?: number;
67
79
  }
68
80
  /**
69
81
  * Check if a given object implements the MoneyMovement interface.
@@ -33,6 +33,8 @@ export function MoneyMovementFromJSONTyped(json, ignoreDiscriminator) {
33
33
  'from_category_id': json['from_category_id'] == null ? undefined : json['from_category_id'],
34
34
  'to_category_id': json['to_category_id'] == null ? undefined : json['to_category_id'],
35
35
  'amount': json['amount'],
36
+ 'amount_formatted': json['amount_formatted'] == null ? undefined : json['amount_formatted'],
37
+ 'amount_currency': json['amount_currency'] == null ? undefined : json['amount_currency'],
36
38
  };
37
39
  }
38
40
  export function MoneyMovementToJSON(json) {
@@ -53,5 +55,7 @@ export function MoneyMovementToJSONTyped(value, ignoreDiscriminator) {
53
55
  'from_category_id': value['from_category_id'],
54
56
  'to_category_id': value['to_category_id'],
55
57
  'amount': value['amount'],
58
+ 'amount_formatted': value['amount_formatted'],
59
+ 'amount_currency': value['amount_currency'],
56
60
  };
57
61
  }
@@ -0,0 +1,75 @@
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
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
6
+ */
7
+ /**
8
+ *
9
+ * @export
10
+ * @interface MoneyMovementBase
11
+ */
12
+ export interface MoneyMovementBase {
13
+ /**
14
+ *
15
+ * @type {string}
16
+ * @memberof MoneyMovementBase
17
+ */
18
+ id: string;
19
+ /**
20
+ * The month of the money movement in ISO format (e.g. 2024-01-01)
21
+ * @type {string}
22
+ * @memberof MoneyMovementBase
23
+ */
24
+ month?: string | null;
25
+ /**
26
+ * The date/time the money movement was processed on the server in ISO format (e.g. 2024-01-01T12:00:00Z)
27
+ * @type {string}
28
+ * @memberof MoneyMovementBase
29
+ */
30
+ moved_at?: string | null;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof MoneyMovementBase
35
+ */
36
+ note?: string | null;
37
+ /**
38
+ * The id of the money movement group this movement belongs to
39
+ * @type {string}
40
+ * @memberof MoneyMovementBase
41
+ */
42
+ money_movement_group_id?: string | null;
43
+ /**
44
+ * The id of the user who performed the money movement
45
+ * @type {string}
46
+ * @memberof MoneyMovementBase
47
+ */
48
+ performed_by_user_id?: string | null;
49
+ /**
50
+ * The id of the category the money was moved from
51
+ * @type {string}
52
+ * @memberof MoneyMovementBase
53
+ */
54
+ from_category_id?: string | null;
55
+ /**
56
+ * The id of the category the money was moved to
57
+ * @type {string}
58
+ * @memberof MoneyMovementBase
59
+ */
60
+ to_category_id?: string | null;
61
+ /**
62
+ * The amount of the money movement in milliunits format
63
+ * @type {number}
64
+ * @memberof MoneyMovementBase
65
+ */
66
+ amount: number;
67
+ }
68
+ /**
69
+ * Check if a given object implements the MoneyMovementBase interface.
70
+ */
71
+ export declare function instanceOfMoneyMovementBase(value: object): value is MoneyMovementBase;
72
+ export declare function MoneyMovementBaseFromJSON(json: any): MoneyMovementBase;
73
+ export declare function MoneyMovementBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MoneyMovementBase;
74
+ export declare function MoneyMovementBaseToJSON(json: any): MoneyMovementBase;
75
+ export declare function MoneyMovementBaseToJSONTyped(value?: MoneyMovementBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
8
+ */
9
+ /**
10
+ * Check if a given object implements the MoneyMovementBase interface.
11
+ */
12
+ export function instanceOfMoneyMovementBase(value) {
13
+ if (!('id' in value) || value['id'] === undefined)
14
+ return false;
15
+ if (!('amount' in value) || value['amount'] === undefined)
16
+ return false;
17
+ return true;
18
+ }
19
+ export function MoneyMovementBaseFromJSON(json) {
20
+ return MoneyMovementBaseFromJSONTyped(json, false);
21
+ }
22
+ export function MoneyMovementBaseFromJSONTyped(json, ignoreDiscriminator) {
23
+ if (json == null) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'id': json['id'],
28
+ 'month': json['month'] == null ? undefined : json['month'],
29
+ 'moved_at': json['moved_at'] == null ? undefined : json['moved_at'],
30
+ 'note': json['note'] == null ? undefined : json['note'],
31
+ 'money_movement_group_id': json['money_movement_group_id'] == null ? undefined : json['money_movement_group_id'],
32
+ 'performed_by_user_id': json['performed_by_user_id'] == null ? undefined : json['performed_by_user_id'],
33
+ 'from_category_id': json['from_category_id'] == null ? undefined : json['from_category_id'],
34
+ 'to_category_id': json['to_category_id'] == null ? undefined : json['to_category_id'],
35
+ 'amount': json['amount'],
36
+ };
37
+ }
38
+ export function MoneyMovementBaseToJSON(json) {
39
+ return MoneyMovementBaseToJSONTyped(json, false);
40
+ }
41
+ export function MoneyMovementBaseToJSONTyped(value, ignoreDiscriminator) {
42
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'id': value['id'],
48
+ 'month': value['month'],
49
+ 'moved_at': value['moved_at'],
50
+ 'note': value['note'],
51
+ 'money_movement_group_id': value['money_movement_group_id'],
52
+ 'performed_by_user_id': value['performed_by_user_id'],
53
+ 'from_category_id': value['from_category_id'],
54
+ 'to_category_id': value['to_category_id'],
55
+ 'amount': value['amount'],
56
+ };
57
+ }
@@ -59,6 +59,54 @@ export interface MonthDetail {
59
59
  * @memberof MonthDetail
60
60
  */
61
61
  deleted: boolean;
62
+ /**
63
+ * The total income formatted in the plan's currency format
64
+ * @type {string}
65
+ * @memberof MonthDetail
66
+ */
67
+ income_formatted?: string;
68
+ /**
69
+ * The total income as a decimal currency amount
70
+ * @type {number}
71
+ * @memberof MonthDetail
72
+ */
73
+ income_currency?: number;
74
+ /**
75
+ * The total amount assigned formatted in the plan's currency format
76
+ * @type {string}
77
+ * @memberof MonthDetail
78
+ */
79
+ budgeted_formatted?: string;
80
+ /**
81
+ * The total amount assigned as a decimal currency amount
82
+ * @type {number}
83
+ * @memberof MonthDetail
84
+ */
85
+ budgeted_currency?: number;
86
+ /**
87
+ * The total activity amount formatted in the plan's currency format
88
+ * @type {string}
89
+ * @memberof MonthDetail
90
+ */
91
+ activity_formatted?: string;
92
+ /**
93
+ * The total activity amount as a decimal currency amount
94
+ * @type {number}
95
+ * @memberof MonthDetail
96
+ */
97
+ activity_currency?: number;
98
+ /**
99
+ * The available amount for 'Ready to Assign' formatted in the plan's currency format
100
+ * @type {string}
101
+ * @memberof MonthDetail
102
+ */
103
+ to_be_budgeted_formatted?: string;
104
+ /**
105
+ * The available amount for 'Ready to Assign' as a decimal currency amount
106
+ * @type {number}
107
+ * @memberof MonthDetail
108
+ */
109
+ to_be_budgeted_currency?: number;
62
110
  /**
63
111
  * The plan month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
64
112
  * @type {Array<Category>}
@@ -43,6 +43,14 @@ export function MonthDetailFromJSONTyped(json, ignoreDiscriminator) {
43
43
  'to_be_budgeted': json['to_be_budgeted'],
44
44
  'age_of_money': json['age_of_money'] == null ? undefined : json['age_of_money'],
45
45
  'deleted': json['deleted'],
46
+ 'income_formatted': json['income_formatted'] == null ? undefined : json['income_formatted'],
47
+ 'income_currency': json['income_currency'] == null ? undefined : json['income_currency'],
48
+ 'budgeted_formatted': json['budgeted_formatted'] == null ? undefined : json['budgeted_formatted'],
49
+ 'budgeted_currency': json['budgeted_currency'] == null ? undefined : json['budgeted_currency'],
50
+ 'activity_formatted': json['activity_formatted'] == null ? undefined : json['activity_formatted'],
51
+ 'activity_currency': json['activity_currency'] == null ? undefined : json['activity_currency'],
52
+ 'to_be_budgeted_formatted': json['to_be_budgeted_formatted'] == null ? undefined : json['to_be_budgeted_formatted'],
53
+ 'to_be_budgeted_currency': json['to_be_budgeted_currency'] == null ? undefined : json['to_be_budgeted_currency'],
46
54
  'categories': (json['categories'].map(CategoryFromJSON)),
47
55
  };
48
56
  }
@@ -63,6 +71,14 @@ export function MonthDetailToJSONTyped(value, ignoreDiscriminator) {
63
71
  'to_be_budgeted': value['to_be_budgeted'],
64
72
  'age_of_money': value['age_of_money'],
65
73
  'deleted': value['deleted'],
74
+ 'income_formatted': value['income_formatted'],
75
+ 'income_currency': value['income_currency'],
76
+ 'budgeted_formatted': value['budgeted_formatted'],
77
+ 'budgeted_currency': value['budgeted_currency'],
78
+ 'activity_formatted': value['activity_formatted'],
79
+ 'activity_currency': value['activity_currency'],
80
+ 'to_be_budgeted_formatted': value['to_be_budgeted_formatted'],
81
+ 'to_be_budgeted_currency': value['to_be_budgeted_currency'],
66
82
  'categories': (value['categories'].map(CategoryToJSON)),
67
83
  };
68
84
  }
@@ -0,0 +1,76 @@
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
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
6
+ */
7
+ import type { CategoryBase } from './CategoryBase';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface MonthDetailBase
12
+ */
13
+ export interface MonthDetailBase {
14
+ /**
15
+ *
16
+ * @type {string}
17
+ * @memberof MonthDetailBase
18
+ */
19
+ month: string;
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof MonthDetailBase
24
+ */
25
+ note?: string;
26
+ /**
27
+ * The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
28
+ * @type {number}
29
+ * @memberof MonthDetailBase
30
+ */
31
+ income: number;
32
+ /**
33
+ * The total amount assigned (budgeted) in the month
34
+ * @type {number}
35
+ * @memberof MonthDetailBase
36
+ */
37
+ budgeted: number;
38
+ /**
39
+ * The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to Assign'
40
+ * @type {number}
41
+ * @memberof MonthDetailBase
42
+ */
43
+ activity: number;
44
+ /**
45
+ * The available amount for 'Ready to Assign'
46
+ * @type {number}
47
+ * @memberof MonthDetailBase
48
+ */
49
+ to_be_budgeted: number;
50
+ /**
51
+ * The Age of Money as of the month
52
+ * @type {number}
53
+ * @memberof MonthDetailBase
54
+ */
55
+ age_of_money?: number;
56
+ /**
57
+ * Whether or not the month has been deleted. Deleted months will only be included in delta requests.
58
+ * @type {boolean}
59
+ * @memberof MonthDetailBase
60
+ */
61
+ deleted: boolean;
62
+ /**
63
+ * The plan month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
64
+ * @type {Array<CategoryBase>}
65
+ * @memberof MonthDetailBase
66
+ */
67
+ categories: Array<CategoryBase>;
68
+ }
69
+ /**
70
+ * Check if a given object implements the MonthDetailBase interface.
71
+ */
72
+ export declare function instanceOfMonthDetailBase(value: object): value is MonthDetailBase;
73
+ export declare function MonthDetailBaseFromJSON(json: any): MonthDetailBase;
74
+ export declare function MonthDetailBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MonthDetailBase;
75
+ export declare function MonthDetailBaseToJSON(json: any): MonthDetailBase;
76
+ export declare function MonthDetailBaseToJSONTyped(value?: MonthDetailBase | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,68 @@
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
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
8
+ */
9
+ import { CategoryBaseFromJSON, CategoryBaseToJSON, } from './CategoryBase';
10
+ /**
11
+ * Check if a given object implements the MonthDetailBase interface.
12
+ */
13
+ export function instanceOfMonthDetailBase(value) {
14
+ if (!('month' in value) || value['month'] === undefined)
15
+ return false;
16
+ if (!('income' in value) || value['income'] === undefined)
17
+ return false;
18
+ if (!('budgeted' in value) || value['budgeted'] === undefined)
19
+ return false;
20
+ if (!('activity' in value) || value['activity'] === undefined)
21
+ return false;
22
+ if (!('to_be_budgeted' in value) || value['to_be_budgeted'] === undefined)
23
+ return false;
24
+ if (!('deleted' in value) || value['deleted'] === undefined)
25
+ return false;
26
+ if (!('categories' in value) || value['categories'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ export function MonthDetailBaseFromJSON(json) {
31
+ return MonthDetailBaseFromJSONTyped(json, false);
32
+ }
33
+ export function MonthDetailBaseFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'month': json['month'],
39
+ 'note': json['note'] == null ? undefined : json['note'],
40
+ 'income': json['income'],
41
+ 'budgeted': json['budgeted'],
42
+ 'activity': json['activity'],
43
+ 'to_be_budgeted': json['to_be_budgeted'],
44
+ 'age_of_money': json['age_of_money'] == null ? undefined : json['age_of_money'],
45
+ 'deleted': json['deleted'],
46
+ 'categories': (json['categories'].map(CategoryBaseFromJSON)),
47
+ };
48
+ }
49
+ export function MonthDetailBaseToJSON(json) {
50
+ return MonthDetailBaseToJSONTyped(json, false);
51
+ }
52
+ export function MonthDetailBaseToJSONTyped(value, ignoreDiscriminator) {
53
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'month': value['month'],
59
+ 'note': value['note'],
60
+ 'income': value['income'],
61
+ 'budgeted': value['budgeted'],
62
+ 'activity': value['activity'],
63
+ 'to_be_budgeted': value['to_be_budgeted'],
64
+ 'age_of_money': value['age_of_money'],
65
+ 'deleted': value['deleted'],
66
+ 'categories': (value['categories'].map(CategoryBaseToJSON)),
67
+ };
68
+ }